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
Simon Martin
cec661fa86
Issue #9042 : Report incorrect number of spaces around => in the style checker.
2015-12-23 20:54:26 +01:00
Bobby Holley
874545d8ca
Hoist more stuff from the concrete wrapper implementations into the trait definitions to allow sharing.
2015-12-23 12:05:25 -07:00
Bobby Holley
e55a56d757
Add an is_text_node to LayoutNode, so that we don't need to implement type_id for the style system.
2015-12-23 12:05:25 -07:00
Bobby Holley
6637626e02
Make DangerousThreadSafeLayoutNode public. :-(
...
I'm open to suggestions on how to do this better.
2015-12-23 12:05:25 -07:00
Martin Robinson
ce8e6fd3b9
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.
2015-12-23 17:01:22 +01:00
bors-servo
68c4f290c7
Auto merge of #8938 - nerith:gfx, r=Ms2ger
...
Move LayerKind and ScrollPolicy enums to gfx_traits
Fixes #8836 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8938 )
<!-- Reviewable:end -->
2015-12-23 18:38:51 +05:30
bors-servo
48388ad036
Auto merge of #9040 - mrobinson:fix-comment, r=nox
...
Remove a fixed TODO
Issue #2009 has already been fixed and closed so we can remove this TODO
entirely.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9040 )
<!-- Reviewable:end -->
2015-12-22 20:40:13 +05:30
Martin Robinson
ecc58786b7
Remove workaround for Rect::is_empty
...
Now that euclid is up-to-date this workaround is no longer necessary.
2015-12-22 10:30:52 +01:00
Martin Robinson
74a23c9af2
Remove a fixed TODO
...
Issue #2009 has already been fixed and closed so we can remove this TODO
entirely.
2015-12-21 18:37:54 +01:00
Brandon Fairchild
637afecec9
Move LayerKind and ScrollPolicy enums to gfx_traits
...
This also moves LayerId and LayerProperties to gfx_traits.
Fixes #8836 .
2015-12-20 20:43:31 -05:00
Mathieu Agopian
11234f5370
Use Url.join instead of UrlParser.base_url(...).parse ( #9002 )
2015-12-18 17:02:41 +01:00
bors-servo
338f66003e
Auto merge of #8995 - pcwalton:measure-text-shaping, r=mbrubeck
...
gfx: Measure text shaping time in the time profiler.
r? @mbrubeck
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8995 )
<!-- Reviewable:end -->
2015-12-17 10:57:29 +05:30
bors-servo
bc7158310c
Auto merge of #8903 - KiChjang:layout-reporter-redirect, r=nox
...
fix for Layout memory reporter uses pre-redirect url
Rebase of #7612 .
Fixes #6872 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8903 )
<!-- Reviewable:end -->
2015-12-16 23:18:30 +05:30
Patrick Walton
df93b1f194
gfx: Measure text shaping time in the time profiler.
2015-12-15 13:28:05 -08:00
GauriGNaik
fc81276c8e
Add pipeline information to CSS error reporting.
2015-12-14 11:18:30 -05:00
Alex Gaynor
d57ac454d5
Removed use of a #![feature] that is now stable
2015-12-10 07:16:53 -05:00
Tomas Cernaj
5507be2653
Move ScriptMsg from msg crate into script_traits
2015-12-09 20:50:11 +01:00
Keith Yeung
2ee446de5d
Fix build errors after rebasing and address review comments
2015-12-09 10:56:21 -08:00
Arnaud Marant
8cdafe8ffc
remove Option because it is never used as None
2015-12-09 02:10:40 -08:00
Arnaud Marant
239f1ae1a7
fix for Layout memory reporter uses pre-redirect url #6872
2015-12-09 01:58:11 -08:00
Ms2ger
2e40297885
Move from clock_ticks to time.
...
This is recommended at <https://github.com/tomaka/clock_ticks >.
2015-12-07 11:03:48 -05:00
bors-servo
2dbc314e2d
Auto merge of #8796 - cheba:zero-point, r=SimonSapin
...
Replaced ZERO_POINT with Point2D::zero()
This is a proposed in servo/servo#8792 clean up.
Fixes #8792 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8796 )
<!-- Reviewable:end -->
2015-12-04 11:09:59 +05:30
bors-servo
32b90cdb6f
Auto merge of #8800 - servo:warnings, r=metajack
...
Fix warnings
Fixing unused attributes warnings required updating serde_macros
which required updating to rustc 1.6.0-nightly (a2866e387 2015-11-30)
which required updating some other dependencies.
Fix #8709 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8800 )
<!-- Reviewable:end -->
2015-12-04 05:37:38 +05:30
Alexander Mankuta
ee746e252c
Replaced ZERO_POINT with Point2D::zero()
2015-12-03 19:46:45 +02:00
Simon Sapin
b19cc7e44c
Fix warnings
...
Fixing unused attributes warnings required updating serde_macros
which required updating to rustc 1.6.0-nightly (a2866e387 2015-11-30)
which required updating some other dependencies.
2015-12-03 17:05:26 +01:00
Alexander Mankuta
546d2f564f
Replaced ZERO_RECT with Rect::zero()
2015-12-03 15:39:30 +02:00
bors-servo
8b95d7b8d8
Auto merge of #8757 - servo:skia, r=mbrubeck
...
Use skia and deps from crates.io.
This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687 .
Fix https://github.com/servo/skia/issues/70
This builds, but the at the moment causes a number of tidy errors for duplicated crates.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757 )
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
Simon Sapin
aa1eba4f5a
Use skia and deps from crates.io.
...
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
Bobby Holley
cf33f00018
Generalize the rest of layout to operate on generic Layout*.
...
There wasn't a good way to split this up, unfortunately.
With this change, the only remaining usage of the Servo-specific structures is
in layout_task, where the root node is received from the script task. \o/
2015-11-28 18:01:02 -08:00
Bobby Holley
77a8091996
Generalize css/matching.rs to operate on generic Layout*.
2015-11-28 18:01:02 -08:00
Bobby Holley
3aeaff35de
Switch ChildrenIterator to be an associated type.
...
If we use ThreadsafeLayoutNodeChildrenIterator directly as the return type of children(),
we need to export the DangerousThreadSafeLayoutNode which the iterator implementation
relies upon.
2015-11-28 18:01:02 -08:00
Bobby Holley
2cfe4de09b
Constrain the ConcreteLayoutFoo associated types to provide full tri-ality among the types.
...
Otherwise we end up with this problem: http://is.gd/ACBLAU
2015-11-28 18:01:02 -08:00
bors-servo
dbff1ab336
Auto merge of #8692 - GuillaumeGomez:patch-1, r=Wafflespeanut
...
Ensure crate are alphabetically sorted
cc @nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8692 )
<!-- Reviewable:end -->
2015-11-28 19:34:11 +05:30
bors-servo
d50b87edec
Auto merge of #8702 - mrobinson:fragments, r=pcwalton
...
Build Fragments without the RECONSTRUCT_FLOW bit
The RECONSTRUCT_FLOW restyle damage bit shouldn't apply to newly
constructed flow tree elements. It is explicitly removed for Flows, but
not for Fragments. This causes RECONSTRUCT_FLOW to bubble up to Flows
that contain any Fragments at all. Instead explicitly remove the
RECONSTRUCT_FLOW bit when creating a new Fragment.
There isn't a good way to test this currently, but all tests should
continue to pass.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png " height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8702 )
<!-- Reviewable:end -->
2015-11-28 10:04:28 +05:30