Commit graph

419 commits

Author SHA1 Message Date
bors-servo
a557b51c28 auto merge of #5154 : luniv/servo/viewpoint-percent-lengths, r=SimonSapin
Spec: http://dev.w3.org/csswg/css-values-3/#viewport-relative-lengths
2015-03-05 18:55:02 -07:00
Dan Fox
559ff68b31 Get rid of servo_util 2015-03-05 17:42:05 +00:00
Dan Fox
19686acdec Merge in servo/master 2015-03-05 17:34:18 +00:00
James Gilbertson
00785ecf63 Make the initial viewport size available to style::properties::cascade 2015-03-05 07:09:10 -07:00
bors-servo
9d58c086e7 auto merge of #5128 : bjwbell/servo/inline-block_fix_min-width, r=jdm
With inline-block elements set the width to max(min width,
specified width) instead of only using the specified width.

Fixes https://github.com/servo/servo/issues/4945
2015-03-03 22:24:44 -07:00
Bryan Bell
a35ffe1c6e For inline-block correctly use min-width
With inline-block elements set the width to max(min width,
specified width) instead of only using the specified width.
2015-03-03 21:06:57 -08:00
bors-servo
e19fbc686c auto merge of #5125 : glennw/servo/remove-iframe-layers, r=larsbergstrom 2015-03-03 15:12:45 -07:00
Glenn Watson
86baef2cc0 Remove compositor layers when iframes are removed from doc or display:none. 2015-03-04 07:51:46 +10:00
Simon Sapin
4c1d778ced Revert "layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1"
This reverts commit 30fd28d107.
2015-03-03 21:16:24 +01:00
Dan Fox
3441b2c329 layout/layout_data.rs -> layout/data.rs 2015-03-03 19:59:38 +00:00
bors-servo
e1a50c7719 auto merge of #5133 : servo/servo/background-size, r=SimonSapin
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.

Rebase of #4368. Fixes #4368.
2015-03-03 11:48:54 -07:00
Dan Fox
3f9032c1a1 Re-alphabetise imports 2015-03-03 18:16:50 +00:00
Dan Fox
dd0df4e9c5 Rename util.rs -> layout_data.rs 2015-03-03 18:12:06 +00:00
Dan Fox
564d12435a Move ToGfxColor to display_list_builder.rs 2015-03-03 17:59:44 +00:00
Dan Fox
b424de2092 Extract OpaqueNodeMethods to own file 2015-03-03 17:49:10 +00:00
bors-servo
5cd6316add auto merge of #5067 : servo/servo/counters, r=SimonSapin
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.

Moved from #4544, because Critic.

Fixes #4544.
2015-03-03 10:42:52 -07:00
Patrick Walton
09c53f461d layout: Implement image-rendering per CSS-IMAGES-3 § 5.3 and
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.
2015-03-03 17:54:12 +01:00
Patrick Walton
30fd28d107 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-03 17:31:19 +01:00
Patrick Walton
a82fc00806 layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.
Fragmentation is not yet supported.
2015-03-03 17:03:27 +01:00
bors-servo
ac4a690e8f auto merge of #5121 : glennw/servo/transparent-hover, r=mbrubeck
Move culling of transparent display items to paint task rather than display list builder, so that hit testing detects mouse over on transparent background elements.
2015-03-02 19:42:49 -07:00
bors-servo
65454e51c8 auto merge of #5086 : glennw/servo/reap-more-stuff, r=jdm
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-02 16:45:51 -07:00
Glenn Watson
0817f9ad44 Fix hover state on elements with transparent background colours.
Move culling of transparent display items to paint task rather than display list builder, so that hit testing detects mouse over on transparent background elements.
2015-03-03 09:15:11 +10:00
Patrick Walton
09358b908d layout: Implement text-shadow per CSS-TEXT-DECORATION-3 § 4. 2015-03-02 13:28:51 -08:00
Glenn Watson
611fd7a846 Reap layout data whenever a node is removed from the tree.
Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts.

Clear the layout data when a node becomes display:none.
2015-03-03 07:12:51 +10:00
Bryan Bell
ec2fa2558c Remove interior borders during flow construction
Instead of looking at the boundaries of the text run, set the border
width to zero and the border style to none on border sides that are not
the outermost for a node container that is display: inline.
2015-02-27 15:52:12 -08:00
bors-servo
8ad3c5aeb6 auto merge of #5064 : glennw/servo/hide-after-layout, r=pcwalton
Prior to incremental layout, the code would remove the existing
construction result. However, with incremental layout the construction result
is cloned rather than removed. This change ensures that the previous
construction result is cleared when an element's display type
changes to none.
2015-02-26 14:46:10 -07:00
Glenn Watson
a2f1f12c96 Fix setting display:none after a layout where the element was visible.
Prior to incremental layout, the code would remove the existing
construction result. However, with incremental layout the construction result
is cloned rather than removed. This change ensures that the previous
construction result is cleared when an element's display type
changes to none.
2015-02-27 07:44:24 +10:00
bors-servo
67b78983db auto merge of #5062 : Adenilson/servo/printDisplayList01, r=pcwalton
This patch will iterate through the DisplayList after the reflow is done and print its elements (as also any sub-lists associated to a child node stacking context).
2015-02-25 20:15:56 -07:00
Adenilson Cavalcanti
b9e9d7471d Implements a DisplayList dumper.
This patch will iterate through the DisplayList after the reflow
is done and print its elements (as also any sub-lists associated
to a child node stacking context).

It adds a new CLI parameter to trigger the function to dump the display list
to console (i.e. servo --debug dump-display-list url).

Using both display list and flow tree information is helpful to debug
rendering issues.
2015-02-25 19:10:05 -08:00
Matt Brubeck
e2c0f4906e Fix incorrect comment in BlockFlow.
The behavior of this code was changed in #3631.  The parent no longer sets the
inline size to a temporary value.
2015-02-24 17:28:31 -08:00
Simon Sapin
2a50755c8a Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
bors-servo
d26345f868 auto merge of #4994 : pcwalton/servo/layout-tinting, r=pcwalton
r? @metajack
2015-02-20 23:06:48 -07:00
Patrick Walton
40a3b41758 layout: Add an option to visualize parallel layout 2015-02-20 19:11:35 -08:00
Adenilson Cavalcanti
8a1e81a9ae Actually print the contents of Flow Tree into console.
When executing servo with proper flags (i.e. --debug dump-flow-tree),
it should print the flow tree. We had the code, but it was commented.
2015-02-20 16:52:18 -08:00
Ms2ger
b6483c96be Move layout to libc from crates.io. 2015-02-19 21:38:25 +01:00
Ms2ger
aaed4a54c7 Use rustc-serialize rather than the built-in deprecated serialize. 2015-02-17 13:24:15 +01:00
bors-servo
a452652317 auto merge of #4938 : nnethercote/servo/dont-clone-bloom-filter, r=Ms2ger
When a cached bloom filter is found during traversal, there are two
cases, both of which currently do unnecessary allocations. This patch
avoids these allocations. In the process, it renders correct two
previously-incorrect comments, and moves one of those comments into a
better spot.

While scrolling moderately fast all the way through the "Guardians of
the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to
`clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with
`clear()` calls.
2015-02-16 15:54:48 -07:00
Nicholas Nethercote
65cc902564 Update a comment about STYLE_BLOOM. 2015-02-16 14:02:07 -08:00
bors-servo
6d2e840bf4 auto merge of #4934 : glennw/servo/fix-1248, r=pcwalton 2015-02-16 14:06:52 -07:00
Nicholas Nethercote
edf00a50fc Avoid bloom filter churn.
When a cached bloom filter is found during traversal, there are two
cases, both of which currently do unnecessary allocations. This patch
avoids these allocations. In the process, it renders correct two
previously-incorrect comments, and moves one of those comments into a
better spot.

While scrolling moderately fast all the way through the "Guardians of
the Galaxy" Wikipedia page, this patch (a) avoids 1.2 million calls to
`clone()` and (b) replaces 111,000 `BloomFilter::new()` calls with
`clear()` calls.
2015-02-15 21:23:35 -08:00
Glenn Watson
984012c9e3 Support root element having percentage heights in layout. This allows using standard CSS techniques to place a footer at the bottom of the page. 2015-02-16 14:46:19 +10:00
Glenn Watson
7aacf90161 Fixes background-color calculation for iframes. Fixes #1248 2015-02-16 08:16:18 +10:00
Adenilson Cavalcanti
ffa62c9688 Companion single Color patch.
This will also update the rust-azure dependency
to point to the hash where we have a single Color type.

Just executed ref-tests and no regressions found.
2015-02-13 14:49:28 -08:00
bors-servo
26aee53c82 auto merge of #4904 : mbrubeck/servo/dlist, r=pcwalton
r? @pcwalton
2015-02-12 16:39:53 -07:00
Matt Brubeck
04fb3a5267 Make dlist::split use new DList::split_off. 2015-02-12 15:39:08 -08:00
Ms2ger
1059115865 Use boxed::into_raw in create_or_get_local_context. 2015-02-12 22:58:08 +01:00
Ms2ger
2b0eb98c1d Fix some warnings in layout. 2015-02-12 18:58:38 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00