Patrick Walton
587cf98209
layout: Promote absolute positioning, floatedness, and clearance into
...
flags to avoid virtual calls.
These were showing up really high in the maze solver profile.
2014-10-28 19:38:22 -07:00
bors-servo
c20bb66aef
auto merge of #3841 : pcwalton/servo/removing-whitespace-damage, r=cgaebel
...
Avoids total reflow of the entire document on the maze solver.
I have tested Wikipedia reflow and it still works.
r? @cgaebel
2014-10-28 19:12:39 -06:00
bors-servo
08288fea41
auto merge of #3840 : pcwalton/servo/ib-splits-linked-list, r=glennw
...
r? @glennw
2014-10-28 18:36:41 -06:00
bors-servo
651ef60b1c
auto merge of #3839 : pcwalton/servo/fewer-moves-in-dls, r=glennw
...
These were showing up in the profile.
r? @glennw
2014-10-28 17:57:43 -06:00
bors-servo
4bdd9a5ec0
auto merge of #3837 : pcwalton/servo/layout-formatting-cleanups, r=metajack
...
These should have no effect on functionality.
r? @metajack
2014-10-28 17:21:48 -06:00
Patrick Walton
01965c399e
layout: Stop adding damage when removing whitespace.
...
Avoids total reflow of the entire document on the maze solver.
2014-10-28 14:56:39 -07:00
Patrick Walton
16c0ebc14c
layout: Put {ib} splits into a linked list so we stop copying them all
...
the time.
2014-10-28 14:39:45 -07:00
Patrick Walton
93bf69a6fe
layout: Use the new append_from
method to get rid of a bunch of moves
...
in display list construction.
These were showing up in the profile.
2014-10-28 14:28:34 -07:00
Patrick Walton
4bf0acbe38
layout: Support more types of selectors for style sharing.
...
This helps avoid problems with style sharing in common cases, often
caused by the user agent stylesheet.
2014-10-28 14:12:50 -07:00
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
cb5fa23a1e
use println instead of error
2014-10-28 10:24:50 -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
Josh Matthews
a1b2f4b590
Add an optional --debug-mozjs argument to mach build
that enables a non-optimized, debug build of mozjs and rust-mozjs. Update the Cargo snapshot to enable new feature support.
2014-10-24 16:18:25 -04:00
Glenn Watson
b1c226778f
Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms.
2014-10-24 08:25:10 +10:00
Patrick Walton
de5e2fd5e2
layout: Shrink fragments down from 448 bytes down to 128 bytes.
...
16% performance improvement in layout (!)
2014-10-23 09:13:41 -07:00
Clark Gaebel
5cd47c7670
Clear reflow flags after reflow.
2014-10-22 17:46:28 -07:00
bors-servo
01f6a8102d
auto merge of #3771 : pcwalton/servo/display-list-building-cleanup, r=mrobinson
...
`layout::fragment` and `layout::block` were getting too big.
r? @mrobinson
2014-10-22 10:54:35 -06:00
Patrick Walton
821793351e
layout: Largely move display list building out to a separate file.
...
`layout::fragment` and `layout::block` were getting too big.
2014-10-22 08:02:17 -07:00
bors-servo
fe230ef37d
auto merge of #3763 : cgaebel/servo/issue-3753, r=pcwalton
...
r? @pcwalton
Looks like I forgot to save `ScannedTextFragment`s block sizes with their
inline sizes. This patch fixes that.
Fixes #3753
2014-10-21 23:27:36 -06:00
bors-servo
f5ad89f927
auto merge of #3747 : mrobinson/servo/validate-display-list, r=pcwalton
...
When this option is enabled, the layout task will print an error when
display list items draw outside their owning Flow's position rect. This
will make it easier to detect layout errors before they break rendering.
This is a command-line option for the moment, because we violate this
rule quite a bit still. Once all bugs causing this are fixed, we can be
more aggressive about enabling the option.
2014-10-21 17:51:43 -06:00
bors-servo
3936d14260
auto merge of #3746 : mrobinson/servo/debug-fragment-borders, r=pcwalton
...
This is quite a bit cleaner than abusing the rust debug functionality.
If we start collecting too many debugging options in the servo
executable we could opt to organize them into a single option.
Fixes #2263 .
2014-10-21 17:06:40 -06:00
Clark Gaebel
b31f9e0188
properly incrementally set block size
2014-10-21 14:26:22 -07:00
bors-servo
2bc4ffe5cf
auto merge of #3744 : cgaebel/servo/efficient-preorder-traversal, r=pcwalton
...
This also tackles some nearby FIXMEs. `traverse_preorder` is used in a LOT of
DOM functions..
r? @pcwalton
2014-10-21 13:09:38 -06:00
bors-servo
018146b1a8
auto merge of #3728 : cgaebel/servo/dump-flow-tree-with-println, r=mrobinson
...
r? @mrobinson
2014-10-21 11:27:40 -06:00
Clark Gaebel
a5bb2f299f
more efficient preorder DOM traversals
2014-10-21 10:01:15 -07:00
Martin Robinson
2d5168a1e5
Add an option to show debug fragment borders
...
This is quite a bit cleaner than abusing the rust debug functionality.
If we start collecting too many debugging options in the servo
executable we could opt to organize them into a single option.
Fixes #2263 .
2014-10-21 08:49:25 -07:00
Martin Robinson
adecdbd4cf
Add an option to validate display list items
...
When this option is enabled, the layout task will print an error when
display list items draw outside their owning Flow's position rect. This
will make it easier to detect layout errors before they break rendering.
This is a command-line option for the moment, because we violate this
rule quite a bit still. Once all bugs causing this are fixed, we can be
more aggressive about enabling the option.
2014-10-21 08:47:40 -07:00
Patrick Walton
e9a61c1ccf
layout: Don't destroy the flow tree when resizing the window
2014-10-20 22:05:38 -07:00
Patrick Walton
bb6f557276
layout: Rewrite text and inline fragment handling during flow
...
construction to avoid cloning and moving flows so much.
Besides amounting to a 5%-10% win on a page with a lot of text, this
simplifies and refactors the text layout code.
2014-10-20 22:05:38 -07:00
Clark Gaebel
174975061e
Dump the flow tree with println, instead of error
2014-10-20 11:14:03 -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
Patrick Walton
a6fcec468f
layout: Remove FontStyle
in favor of using the font style struct
...
directly, and optimize `get_layout_font_group()` to use a small vector.
Seems to be a 38% layout win on a site I tested with a lot of text.
2014-10-15 22:17:57 -07:00
bors-servo
f3066c70da
auto merge of #3689 : cgaebel/servo/working-incremental-flow-construction, r=pcwalton
...
This implements fragment merging, in order to incrementally reflow linebroken
text. This makes the `whitespace_pre.html` reftest pass with incremental reflow
turned on with `-i`.
2014-10-15 21:27:20 -06: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
481adcd654
Fix whitespace_pre with incremental reflow turned on.
...
This implements fragment merging, in order to incrementally reflow linebroken
text. This makes the `whitespace_pre.html` reftest pass with incremental reflow
turned on with `-i`.
2014-10-15 16:04:21 -07: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
Tetsuharu OHZEKI
fb98384fa5
Use DOMRefCell<T> in Element.
2014-10-15 13:44:02 +09:00
bors-servo
f1c050531f
auto merge of #3655 : kaseyc/servo/add_to_js_method, r=jdm
...
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js/
Fixes #3616
2014-10-14 22:00:28 -06:00
Kasey Carrothers
6d91e92c90
Add a to_js method to the casting trait code in CodegenRust.py
...
Replace the manual checks and calls to transmute_copy in /layout/wrapper.rs with calls to to_js
Fixes #3616
2014-10-14 19:06:53 -07:00