Fix#4124
This also introduce `BarCast::from_actual()` which is used for up-cast for dom's actual data types (non JS pointer values).
Source-Repo: https://github.com/servo/servo
Source-Revision: 82050d1e535681ea993e4290d02bcf4b9f4ee5a2
The current code calls as_slice() on the Option, yielding &[DOMString], and
then calls to_string, yielding "[prefix]".
Source-Repo: https://github.com/servo/servo
Source-Revision: 76cc006a40d7242e64c6c12f033127c569914e31
This is a grab bag of various microoptimizations for script that I came across when profiling our performance on RoboHornet.
r? @jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 69f8b46f362a828ffaefe9623355bc1ad76dc5e0
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.
Fixes#3790.
Source-Repo: https://github.com/servo/servo
Source-Revision: c9089c45c4b7d40419233b48a192d85a8ad71c99
This function is not particular to the parser, so should live in the DOM.
Source-Repo: https://github.com/servo/servo
Source-Revision: 2c6859937354760f2d175c60bad1daa16bd2ed22
Fixes#3356. This makes script elements fetch their source synchronously and execute immediately by default. It also lays some groundwork for future deferred or async script loading.
(Depends on #3716 to fix a content test failure caused by running script during parsing.)
Source-Repo: https://github.com/servo/servo
Source-Revision: 272ae0cc1beb83c839d5fbd746e67f4ae746db99
...itor after the initial parse. Fixes#1720. Fixes#3738.
r? @Ms2ger or @Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: 2df236376a443d8d031ee7a72379f336f2cd8cc4
#3050
Altough LayoutDataRef is touched from layout, we don't use DOMRefCell in it becasuse
it's expected to manipulate in layout task.
Source-Repo: https://github.com/servo/servo
Source-Revision: f5e8df9dac9330f2818906c471ed05f5975828c6
This also tackles some nearby FIXMEs. `traverse_preorder` is used in a LOT of
DOM functions..
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 2bc4ffe5cf331fb7bd246af34c5d12e4e03adda9
r? @Ms2ger, @jdm
The parser is now a JS-managed object and we use hooks in html5ever to trace its internal state. This should be memory-safe even if arbitrary JavaScript can run during a parse. Please let me know if you think of a reason it wouldn't be!
I think the likely outcome of a garbage collection during parsing is a dynamic `RefCell` borrow failure, but I'm going to look into that after this lands. It should be safe to trace the parser while it's mutably borrowed, as long as it's not shared between threads, so we can probably switch to `UnsafeCell`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8d3b107568ab965b518b8003b702a5db993fa7d0
--HG--
rename : servo/tests/content/test_document_characterSet_long.html => servo/tests/content/test_document_characterSet_long.html.disabled
rename : servo/tests/content/test_document_characterSet_short.html => servo/tests/content/test_document_characterSet_short.html.disabled
`Node.unsafe_get_flags()` returns `*const NodeFlags`, but `NodeFlags` has only `u8` length.
So We should just returns a raw value instead of any pointers.
Source-Repo: https://github.com/servo/servo
Source-Revision: 84b2fe54b9a4f1b04531600492be1b27d3915e05
This also hides the not-yet-working parts of incremental reflow behind a runtime
flag. As I get the failing reftests passing, I'll send pull requests for them one
by one.
Source-Repo: https://github.com/servo/servo
Source-Revision: 56989b8dec4aa95a3b484d45f15b23f9b3daaf13
75% improvement in style recalc for Guardians of the Galaxy.
Source-Repo: https://github.com/servo/servo
Source-Revision: 8077edc0622b04aeb26d42ced86ea285c9cac0e7
This PR removes public fields from all (hope I didn't miss any) DOM structs. Should |Page| be privatized as well? This PR additionally introduces a #[privatize] lint to ensure nobody accidentally re-introduces a public field.
All changesets compile separately if applied in the same order. Hope that helps reviewing but I can of course squash them before merging.
Source-Repo: https://github.com/servo/servo
Source-Revision: f350879574194bb612eac88e21d0920e9827afa7
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.
I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.
This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.
At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.
r? @pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 85b277655f07db1cb99c4d3dee93804735ed0470
This implements basic support for attribute selectors with namespace prefixes. I would have added a more sophisticated test covering various selectors but it seems that we don't have an XML parser yet and thus no XHTML support?
r? @SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: f49c730720a51d14dacefe9815faf50216b36b91
Now that we use `JSTraceable` (defined in `script`), we can create arbitrary implementations on non-`script` types (eg `Url` or `RequestHeaderCollection`) where in the past we had to rely on `Traceable` and `Untraceable` to achieve cross-crate impls of `Encodable`.
This removes the two completely. They can be reintroduced if required, though the `untraceable!` macro should suffice.
Fixes#3469
Source-Repo: https://github.com/servo/servo
Source-Revision: b34df7c343579f200d2e67e21fc566842a4e4a91
This also removes the unnecessary formation of a trait object.
Source-Repo: https://github.com/servo/servo
Source-Revision: 93e259227a969dbea1319d4d3ce92bc5706c6b06
The biggest language change is that enum variants now also reserve (for future use) a name in the type namespace, which must not collide with other types. Some things were renamed, and others qualified as `module::name`.
Source-Repo: https://github.com/servo/servo
Source-Revision: 7409685589c550ee7a9f94182f511acddab4c6fd