Commit graph

1313 commits

Author SHA1 Message Date
Patrick Walton
9c7b9fa32d layout: Remove some bogus code that tried to handle
absolutely-positioned flows separately when storing overflow.

This code dates back to the time when absolutely positioned flows were
ignored by all of their ancestors up to the containing block. This
hasn't been true for at least a year.

Closes #9306.
Closes #9309.
Is a partial fix for #9308.
2016-01-25 10:52:07 -08:00
Simon Sapin
6fd46b5e6a Update cssparser.
https://github.com/servo/rust-cssparser/pull/91
2016-01-21 17:58:03 +01:00
bors-servo
77d3fbcca3 Auto merge of #9284 - bholley:bootstrap_stylo, r=SimonSapin
Add Partial Implementation of style DOM traits for Gecko, and some basic glue to let Gecko call into Servo

The wrapper stuff is partially-complete, modulo some unimplemented methods. The glue code is just a toy for now. Regardless, I think it's worth getting some of this stuff in-tree to minimize breakage.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9284)
<!-- Reviewable:end -->
2016-01-19 14:19:10 +05:30
bors-servo
8f7f7e11b7 Auto merge of #9341 - askalski:issue9338, r=KiChjang
Fix to issue 9338

Fixes #9338.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9341)
<!-- Reviewable:end -->
2016-01-18 20:30:41 +05:30
askalski
cf107bca4f replacing custom fmin function with standard f32.min in components/layout/display_list_builder.rs 2016-01-18 12:17:19 +01:00
Kishor Bhat
4c5eeb1f58 Remove unused imports in layout 2016-01-17 13:17:23 +05:30
Ms2ger
74f6c9b74f Update to rustc 1.7.0-nightly (b4707ebca 2015-12-27) 2016-01-14 14:56:18 -06:00
bors-servo
a76de4b0cc Auto merge of #9300 - antrik:assert_empty_fontgroup, r=Ms2ger
layout/text.rs: Add assertion for empty fontgroup

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9300)
<!-- Reviewable:end -->
2016-01-14 14:11:56 +05:30
Olaf Buddenhagen
422639fb60 layout/text.rs: Add assertion for empty fontgroup 2016-01-14 08:35:32 +01:00
Joshua Holmer
83e66d6959 Move AnimationState to script_traits
Resolves #9223
2016-01-13 18:14:12 -05:00
Bobby Holley
84f24a04a4 Basic wrappers and glue for GeckoLib. 2016-01-13 12:14:00 -08:00
Ms2ger
86d3c576f2 Remove some unused extern crates. 2016-01-13 09:37:28 +01:00
Bobby Holley
77b1027646 Hoist style() and unstyle() into TNode. 2016-01-12 13:16:05 -08:00
Bobby Holley
384cdfcfff Hoist ParseErrorReporter into style and remove the dependency on msg.
The pipeline id stuff is currently unused. If someone needs it, they can add
an additional trait bound on their css error reporter to get the pipeline id.
2016-01-11 18:01:48 -08:00
bors-servo
47617578af Auto merge of #9245 - Ms2ger:reexports, r=nox
Stop reexporting style types from layout_interface.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9245)
<!-- Reviewable:end -->
2016-01-11 23:57:51 +05:30
bors-servo
099beee85c Auto merge of #8983 - Manishearth:cursors, r=jdm
Various textinput fixes

 - Currently the cursor sticks around if you click elsewhere. Now the text inputs are relayout-ed on blur.
 - Currently whitespace gets collapsed in text input (https://github.com/servo/servo/issues/8772). Not anymore.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8983)
<!-- Reviewable:end -->
2016-01-11 23:21:03 +05:30
Ms2ger
9dc85e0d40 Stop reexporting ReflowGoal from layout_interface. 2016-01-11 10:00:17 +01:00
Ms2ger
39ba25572b Stop reexporting Animation from layout_interface. 2016-01-11 09:47:08 +01:00
John DeSilva
f32995543d Move Epoch to gfx_traits
Resolves #9222. Moved Epoch from components/msg/compositor_msg to
components/gfx_traits/lib. Updated use statements to reflect the move.
2016-01-10 17:36:52 -05:00
bors-servo
d3889b4be4 Auto merge of #9236 - tgummerer:fix-9220, r=Wafflespeanut
Move LayerType enum to gfx_trait

The LayerType enum is only used in gfx_traits and layout, so it
shouldn't be defined in msg.  Move the definition to gfx_traits
instead.

Fixes #9220

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9236)
<!-- Reviewable:end -->
2016-01-10 21:18:45 +05:30
Thomas Gummerer
70a2179cd2 Move LayerType enum to gfx_trait
The LayerType enum is only used in gfx_traits and layout, so it
shouldn't be defined in msg.  Move the definition to gfx_traits
instead.

Fixes #9220
2016-01-10 16:20:37 +01:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
bors-servo
1436ee5afa Auto merge of #9008 - mrobinson:reflow, r=pcwalton
More aggressively remove Fragment RestyleDamage

Now clean up damage on all fragments that belong to a Flow. This ensures
that damage does not re-propagate up to the parent Flow from the
Fragments. It also means that the flow tree dump should show a more
accurate picture of the state of the flow tree.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9008)
<!-- Reviewable:end -->
2016-01-09 07:01:23 +05:30
Martin Robinson
d720452698 Use DisplayListSection everywhere
DisplayListSection, StackingLevel, and BackgroundAndBorderLevel all
represent pretty much the same thing, a particular section of the
display list. Instead of maintaining three enums which do the same
thing, just use DisplayListSection everywhere. It's a superset of the
other two and this change will make it easier to flatten the DisplayList
in the future for WebRender.
2016-01-08 10:19:03 -08:00
bors-servo
58111a6420 Auto merge of #9177 - pcwalton:filter-out-useless-clips, r=glennw
gfx: Eagerly transform clips into `ClippingRegion::max()` if possible.

This helps WebRender look for useless clips and optimize them out.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9177)
<!-- Reviewable:end -->
2016-01-08 21:24:45 +05:30
bors-servo
a0d26445c0 Auto merge of #9171 - pcwalton:linear-gradients-background-clip, r=mbrubeck
Fix `linear_gradients_lengths_a.html` and fix Servo's use of "background-clip" to actually make it work.

See the commit messages for details.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9171)
<!-- Reviewable:end -->
2016-01-08 15:10:02 +05:30
Bobby Holley
3b33174163 Review nits: Narrowly scoping unsafety, and expanding comment. 2016-01-07 11:17:31 -08:00
Patrick Walton
3103b03262 gfx: Eagerly transform clips into ClippingRegion::max() if possible.
This helps WebRender look for useless clips and optimize them out.
2016-01-06 19:48:14 -08:00
Bobby Holley
29987a6715 Bonus Fix - Rename traverse_dom_preorder to traverse_dom.
The incorrect naming here was bugging me - the dom traversal has both pre- and post-order
processing steps.
2016-01-06 19:21:13 -08:00
Bobby Holley
136c0938a2 Hoist the style parts of sequential.rs into style/. 2016-01-06 19:21:11 -08:00
Bobby Holley
57d2a0b0db Make sequential traversal operate on TNode instead of LayoutNode.
I forgot to do this along with the parallel case. Ideally I'd merge this patch
into that one, but then I'd need to rebase it over the LayoutContext patch,
which would be a pain.
2016-01-06 19:21:09 -08:00
Bobby Holley
60b3c66b28 Hoist the style parts of parallel.rs into style/. 2016-01-06 19:21:07 -08:00
Bobby Holley
f9a02f0aba Hoist the style parts of traversal.rs into style/. 2016-01-06 18:50:16 -08:00
Bobby Holley
bf1a7d243f Remove the dependency of parallel DOM traversal and style calculation on LayoutContext. 2016-01-06 18:24:18 -08:00
Bobby Holley
ebc5eb1b98 Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode. 2016-01-06 17:58:53 -08:00
Patrick Walton
fdb791bdd5 layout: Take the value of background-clip into account when
determining the painting area for background images and gradients.

See: https://drafts.csswg.org/css-backgrounds-3/#the-background-clip
2016-01-06 10:39:51 -08:00
Bobby Holley
513a75d86a Hoist the rest of css/matching.rs into style/. 2016-01-04 09:41:31 -08:00
Bobby Holley
94b0789a5f Remove the dependency of css/matching.rs on SharedLayoutContext. 2016-01-04 09:38:04 -08:00
Bobby Holley
08f2a24552 Remove the dependency of css/matching.rs on concrete RestyleDamage.
We can make this easier by inlining helper method implementations in the traits themselves,
which makes the code more compact as a nice side-effect.
2016-01-04 09:38:04 -08:00
Bobby Holley
27987c3bb4 Introduce a concept of restyle damage to the style system.
We can't hoist RestyleDamage itself, because it's very layout-dependent. But this
should be enough to let us hoist the things we need.
2016-01-04 09:38:04 -08:00
Bobby Holley
947134949a Refactor parallel dom traversal to be agnostic to the processing steps themselves. 2016-01-04 09:38:04 -08:00
Manish Goregaokar
23e7dfa57b Relayout text input elements on blur 2016-01-03 13:18:24 +05:30
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
Ms2ger
828392b41c Don't copy the list of stylesheets in LayoutTask::handle_reflow.
It would be nice to avoid exposing the fact that these are stored in an Arc
to the selector matching code.
2015-12-30 15:13:08 +01:00
bors-servo
3f407ea3d6 Auto merge of #9077 - bholley:split_layout_context_etc, r=SimonSapin
Split the style-related bits out of LayoutContext and hoist more stuff into style/

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9077)
<!-- Reviewable:end -->
2015-12-30 11:01:23 +05:30
bors-servo
0f5c614609 Auto merge of #9051 - bholley:split_style_and_layout_wrappers, r=SimonSapin
Split layout wrappers into style+layout and layout-only functionality

This is a step towards removing the dependency of stylo on layout/.

This PR depends on #9004.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9051)
<!-- Reviewable:end -->
2015-12-30 10:04:14 +05:30
Bobby Holley
a05d7f1dfd Hoist style-related context bits into style/.
We do a few things-here:
* Hoist non-layout-dependent fields in SharedLayoutData and LocalLayoutData into style/.
* Hoist parts of css/matching.rs into style/.
* Hoist parts of layout/animation.rs into style/animation.rs.
* Remove the duplicated-but-slightly-different definition of OpaqueNode.
2015-12-29 12:07:07 -08:00
Bobby Holley
47059d2d26 Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.

There's still more to do to make the style system usable standalone, but
this is a good start.
2015-12-29 11:50:03 -08:00
Joe Kachmar
655268d111 Separate script and layout messages, issue #8843 2015-12-26 12:24:51 -05:00
bors-servo
f77c792886 Auto merge of #9055 - simartin:issue_9042, r=Wafflespeanut
Issue #9042: Report incorrect number of spaces around => in the style checker

Fixes https://github.com/servo/servo/issues/9042

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9055)
<!-- Reviewable:end -->
2015-12-24 10:55:48 +05:30