Commit graph

11 commits

Author SHA1 Message Date
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Dan Fox
559ff68b31 Get rid of servo_util 2015-03-05 17:42:05 +00:00
Manish Goregaokar
b68b7e87c8 self import 2015-01-28 13:46:00 +05:30
Ms2ger
13c7cf928a Stop calling deref() and deref_mut() explicitly. 2015-01-22 16:04:21 +01:00
Patrick Walton
bf540d590a layout: Explicitly thread border box dimensions and relative offsets
through display list building.

The old `flow_origin` concept was ill-defined (sometimes the border box
plus the flow origin, sometimes including horizontal margins and
sometimes not, sometimes including relative position and sometimes not),
leading to brittleness and test failures. This commit reworks the logic
to always pass border box origins in during display list building.
2015-01-04 17:43:05 -08:00
Patrick Walton
5ea2c6dcfd layout: Paint stacking contexts' overflow areas properly.
This was making `box-shadow` not show up in many cases, in particular,
but the effects were not limited to that.
2015-01-04 17:41:59 -08:00
Martin Robinson
2d72f00ccf Have ContentBox(es)Queries consult the flow tree
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.
2014-11-03 10:30:28 -08:00
Patrick Walton
68091d7a86 layout: Make some formatting cleanups.
These should have no effect on functionality.
2014-10-28 12:00:35 -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
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
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