Commit graph

338 commits

Author SHA1 Message Date
bors-servo
2d8bd10abe auto merge of #3828 : cgaebel/servo/layout-node-dumping, r=pcwalton
r? @pcwalton
2014-10-28 13:12:52 -06:00
Patrick Walton
68091d7a86 layout: Make some formatting cleanups.
These should have no effect on functionality.
2014-10-28 12:00:35 -07:00
Clark Gaebel
e4d8741991 remove warning 2014-10-28 10:28:24 -07:00
Clark Gaebel
47091c014d combine conditions 2014-10-28 10:26:48 -07:00
Clark Gaebel
a8f80b89f4 layout: Implement flow tree dumping with RUST_LOG=debug is on.
r? @pcwalton
2014-10-28 10:14:12 -07:00
Clark Gaebel
432071b703 Layout: Fix resize (which just plain doesn't work right now).
Currently, both restyle/flow construction _and_ reflow are skipped
during resize. Reflow should not be in that list. This patch fixes
that.
2014-10-28 09:35:24 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Patrick Walton
e9a61c1ccf layout: Don't destroy the flow tree when resizing the window 2014-10-20 22:05:38 -07:00
Clark Gaebel
81bd3cbd9d Fixes the table_percentage_width_a.html reftest with incremental reflow turned on. 2014-10-20 11:13:31 -07:00
Glenn Watson
076495db94 Use opts as a global, to avoid cloning and passing the struct all over the code. 2014-10-20 10:48:47 +10:00
bors-servo
3906cecd16 auto merge of #3719 : mrobinson/servo/flow-dump, r=pcwalton
The flow tree is currently dumped for debugging purposes early on in
the flow process, so many values are still zero. If we wait to dump it
until later, the output will more accurately reflect the real flow tree.
2014-10-17 19:51:24 -06:00
Martin Robinson
e7c79906bd Wait to dump flow tree until flow is complete
The flow tree is currently dumped for debugging purposes early on in
the flow process, so many values are still zero. If we wait to dump it
until later, the output will more accurately reflect the real flow tree.
2014-10-17 18:48:09 -07:00
Clark Gaebel
8496c056e7 Fixed the inline_element_border_a reftest with incremental layout turned on. 2014-10-17 11:11:14 -07:00
Clark Gaebel
2faf5b270f Fix image_dynamic_remove reftest with incremental layout turned out
This also adds some extra debugging infrastructure which I found useful tracking
this bug down. A regression in the br reftests is also uncovered by this patch,
which I'll work on fixing next.

r? @pcwalton
2014-10-17 11:11:14 -07:00
bors-servo
b83352f7eb auto merge of #3692 : cgaebel/servo/fix-incremental-append-style, r=pcwalton
@pcwalton r?
2014-10-15 20:00:20 -06:00
Clark Gaebel
0a541fc83c Fix append_style reftests with incremental reflow turned on.
@pcwalton r?
2014-10-15 15:47:11 -07:00
Clark Gaebel
76ed7484eb Use the Deref traits for FlowRefs.
This patch switches FlowRefs to using the Deref and DerefMut traits, instead of
the custom `get` and `get_mut` functions.
2014-10-15 11:04:05 -07:00
bors-servo
7eaeaeeb21 auto merge of #3668 : cgaebel/servo/sequential-reflow, r=pcwalton
Now that DOM/Flow traversals have been refactored out, the `recalc_style_for_subtree`
function in `css/matching.rs` can be removed, in lieu of just running the standard
`recalc_style_for_node` and `construct_flows` traversals sequentially. Now we
no longer have the maintenance headache of duplicating selector matching logic
in two places! \o/

This passes reftests with both default arguments, and with `-y 1`.

r? @pcwalton
2014-10-14 19:33:28 -06:00
bors-servo
3eb6b17137 auto merge of #3610 : glennw/servo/media-queries, r=SimonSapin 2014-10-14 18:36:29 -06:00
Clark Gaebel
7368d42225 Removes duplicate CSS selector matching logic.
Now that DOM/Flow traversals have been refactored out, the `recalc_style_for_subtree`
function in `css/matching.rs` can be removed, in lieu of just running the standard
`recalc_style_for_node` and `construct_flows` traversals sequentially. Now we
no longer have the maintenance headache of duplicating selector matching logic
in two places! \o/

r? @pcwalton
2014-10-14 16:28:29 -07:00
bors-servo
56989b8dec auto merge of #3640 : cgaebel/servo/incremental-flow-construction, r=pcwalton
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.
2014-10-14 16:51:30 -06:00
Glenn Watson
c7d81fdde6 Implement media queries parser and matching. Improves mobile first sites like bootstrap3. 2014-10-15 07:36:31 +10:00
Clark Gaebel
f552e2f750 try to reset flows which need reflow, since reflow isn't yet idempotent 2014-10-14 10:33:46 -07:00
bors-servo
48ce107d72 auto merge of #3675 : glennw/servo/local-fonts, r=pcwalton 2014-10-14 11:33:34 -06:00
Glenn Watson
1827852810 Add support for local font faces. Improves fonts on rust lang and guide. 2014-10-14 15:59:08 +10:00
Patrick Walton
bffaad118e layout: Rewrite clipping to be per-display-item instead of having
a separate `ClipDisplayItem`.

We push down clipping areas during absolute position calculation. This
makes display items into a flat list, improving cache locality. It
dramatically simplifies the code all around.

Because we need to push down clip rects even for absolutely-positioned
children of non-absolutely-positioned flows, this patch alters the
parallel traversal to compute absolute positions for
absolutely-positioned children at the same time it computes absolute
positions for other children. This doesn't seem to break anything either
in theory (since the overall order remains correct) or in practice. It
simplifies the parallel traversal code quite a bit.

See the relevant Gecko bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=615734
2014-10-13 21:40:36 -07:00
Patrick Walton
2a790d06dd Use Gecko's simpler Bloom filter instead of one based on hash
stretching.

This preserves the usage of the Bloom filter throughout style recalc,
but the implementation is rewritten. Provides a 15% improvement on
Guardians of the Galaxy.
2014-10-10 17:02:27 -07:00
Clark Gaebel
24bff2416b Factors out DOM traversal, keeping the code in parallel free of traversal-specific logic.
DOM traversals and Flow traversals look very similar. This patch unifies them
with the preorder/postorder pattern. Hopefully, it also opens the door for writing
the traversal code only once, instead of the duplication we have today.
2014-10-10 14:55:18 -04:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
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
2014-10-09 12:55:21 -04:00
Patrick Walton
01c90d8d6a layout: Implement z-index. 2014-10-08 22:30:44 -07:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Patrick Walton
f5c0124363 layout: Remove layout/extra.rs.
Also, rename a few methods in layout that arguably had confusing names.
2014-09-18 11:33:04 -07:00
Clark Gaebel
670ca9894e Fixed #3386. 2014-09-18 09:20:23 -07:00
Clark Gaebel
6bc63d47cd Added more complex profiling metadata. 2014-09-17 15:41:27 -07:00
Matt Brubeck
1ae3bda172 Move link rel=stylesheet fetching to layout task
Fixes #3346.
2014-09-16 07:12:01 -07:00
Clark Gaebel
acd83ff47b Added a bloom filter to CSS selector matching. 2014-09-15 16:29:45 -07:00
Clark Gaebel
95b54e44ea Block layout RPC on the first layout call 2014-09-09 22:06:10 -07:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/layout/layout_task.rs (Browse further)