Commit graph

487 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
cbf388a5fd
style: Move the StyleSheetSet into the Stylist.
This will allow tracking whether there have been only additions to the
stylesheet set, and in that case don't destroy and completely rebuild the
invalidation map.
2017-08-22 16:55:52 +02:00
Fernando Jiménez Moreno
1b123400eb Wait for actual paint before setting paint related metrics 2017-08-22 14:36:06 +02:00
Emilio Cobos Álvarez
02b203891f
style: Move DocumentStyleSheet to style. 2017-08-21 19:03:31 +02:00
Emilio Cobos Álvarez
85996826ab
style: Remove Stylist::is_device_dirty.
More progress on unifying how Gecko and Servo track stylist dirtiness.
2017-08-21 17:58:43 +02:00
Emilio Cobos Álvarez
0f37b209cb
stylo: Remove a lot of the restyle damage related complexity.
The only reason why we had the `existing_style_for_style_damage` bit is to apply
some optimizations that we don't have anymore.

I still want to reintroduce a few of them, at least for the non-eager
pseudo-element case... But I think I won't need this at all.

This allows us to remove a fair amount of Gecko code too.
2017-08-20 13:59:46 +02:00
bors-servo
62d0de349d Auto merge of #18056 - cynicaldevil:remove-treesink-dep-on-dom, r=nox
End TreeBuilder's reliance on DOM.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->

Fixed h5e's TreeBuilder so that it does not use `same_tree` and `has_parent_node` methods: d8c2ea5cb6
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18056)
<!-- Reviewable:end -->
2017-08-18 16:27:05 -05:00
Nikhil Shagrithaya
99235c9201 Updated h5e and x5e 2017-08-18 19:51:17 +05:30
Emilio Cobos Álvarez
d1725b1f19
style: Replicate the list of stylesheets on the layout thread.
This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in
order to be able to eventually move the stylesheets into the stylist, and be
able to incrementally update the invalidation map.
2017-08-18 14:31:35 +02:00
Nazım Can Altınova
6893446b71 Add a pref checking mechanism for alias properties 2017-08-16 13:23:14 -07:00
Cameron McCormack
321643ae61 style: Factor out per-origin data storage.
Also add an iter_mut_origins() function.
2017-08-13 18:50:57 +08:00
Bobby Holley
24a52b7990 Do all descendant bit propagation from Gecko over FFI.
Deduplicating code is nice, and it will help us when we make the bit
propagation more complicated in upcoming patches.

MozReview-Commit-ID: KIQnNJVayrM
2017-08-11 17:00:37 -07:00
Cameron McCormack
57622004ce style: Split collected @font-face / @counter-style rules per origin. 2017-08-11 13:39:49 +08:00
Brad Werth
557ffa979d Rework MediaType to be an atom-based struct instead of an enum.
MozReview-Commit-ID: 1Tfrs9PBkhA
2017-08-09 13:25:30 -07:00
bors-servo
31582a4874 Auto merge of #18002 - glennw:update-wr-linux-subpx, r=emilio
Update WR (text optimizations, Linux subpixel positioning / rasterization).

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18002)
<!-- Reviewable:end -->
2017-08-08 16:05:54 -05:00
Glenn Watson
f6a9f15fed Update WR.
* CPU text run optimizations.
* Linux subpixel positioning / rasterization.
* Update debug flags API.
* Update to resource transactions API.
2017-08-09 07:05:05 +10:00
Matt Brubeck
ca300d6424 Allow CalculateStackingRelativePositions to short-circuit 2017-08-08 11:20:16 -07:00
Matt Brubeck
832b811198 Change the mis-named 'traverse_flow_tree_preorder' to 'reflow' 2017-08-08 10:53:20 -07:00
Matt Brubeck
d1a37f1ea3 Code organization: Move all generic traversal code to layout::traversal 2017-08-08 10:53:19 -07:00
Matt Brubeck
a08bc13df9 Rename compute_absolute_position to compute_stacking_relative_position 2017-08-08 10:53:17 -07:00
Alan Jeffrey
936dd3ef63 Speculatively evaluate paint functions during style. 2017-07-31 13:02:28 -05:00
Dzmitry Malyshau
101c426eb7 WR multi-document update 2017-07-28 22:28:11 -04:00
Gecko Backout
3f1af3e62f Backed out changeset c424ad1c5f94 for build failures a=backout CLOSED TREE
Backs out https://github.com/servo/servo/pull/17892
2017-07-28 23:21:03 +00:00
bors-servo
12a49dc0be Auto merge of #17892 - kvark:wr, r=glennw
WR multi-document update

<!-- Please describe your changes on the following line: -->
The PR updates WR version to support multiple documents (https://github.com/servo/webrender/pull/1509) but doesn't take advantage of this new feature yet.
It also makes Servo to use `DevicePixel` from WR instead of rolling out another one.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because _____ no extra logic

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17892)
<!-- Reviewable:end -->
2017-07-28 13:26:52 -05:00
Dzmitry Malyshau
8c588e8c36 WR multi-document update 2017-07-28 14:22:36 -04:00
Bobby Holley
ce295f6daf Pass TraversalFlags from C++ into Rust.
MozReview-Commit-ID: EVUzgnL5coN
2017-07-27 14:25:58 -07:00
Simon Sapin
a205c82264 Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26) 2017-07-27 02:21:01 +02:00
Emilio Cobos Álvarez
9b2d96f7e7
stylo: Honor the relevant link visited pref.
MozReview-Commit-ID: D5NiEJUpONQ
2017-07-23 22:37:47 +02:00
Alan Jeffrey
caa3585219 Fixed scaling artefacts in paint worklets caused by zoom and hidpi. 2017-07-20 17:25:50 -05:00
Fernando Jiménez Moreno
892b30edca Implement basic Time To First Paint and First Contentful Paint PWMs 2017-07-20 15:41:21 +02:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Manish Goregaokar
89930e7565 stylo: Switch Gecko over to ServoStyleContext 2017-07-17 18:03:23 -07:00
bors-servo
38f4ae80c4 Auto merge of #17739 - jdm:no-vendor-prefixed-errors, r=emilio
Suppress CSS parser errors for vendor-prefixed properties.

This matches the behaviour of Gecko's CSS parser.

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #17736
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17739)
<!-- Reviewable:end -->
2017-07-17 07:10:11 -07:00
Josh Matthews
94d631c1f4 Suppress CSS parser errors for vendor-prefixed properties. 2017-07-17 10:00:31 -04:00
Emilio Cobos Álvarez
bf9369b29d
script: Move the layout_wrapper outside of script.
This allows us to have ensure_data() and clear_data() functions on the TElement
trait, instead of hacking around it adding methods in random traits.

This also allows us to do some further cleanup, which I'd rather do in a
followup.
2017-07-15 16:41:12 +02:00
bors-servo
6597178b91
Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals

https://bugzilla.mozilla.org/show_bug.cgi?id=1380198

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17701)
<!-- Reviewable:end -->
2017-07-14 11:01:07 +02:00
Emilio Cobos Álvarez
a34f288b98
Revert "Auto merge of #17701 - bholley:reuse_allocations, r=emilio"
This reverts commit ebfc8f5858, reversing
changes made to 5585ff2c44.

Animation code can reenter and create a new TLS context from the traversal
SequentialTask, so this won't work as written.
2017-07-13 09:58:08 +02:00
bors-servo
173181a491 Auto merge of #17694 - glennw:webrender-update, r=glennw
Upgrade to the latest version of WebRender

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17694)
<!-- Reviewable:end -->
2017-07-12 21:52:27 -07:00
Bobby Holley
d1c31f7eaf Add owning_ref back as a style dep, and update parking_lot. 2017-07-12 16:37:50 -07:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
bors-servo
f85778884f Auto merge of #17673 - hgallagher1993:local_branch, r=jdm
Removed unused import

Removed unused import `script_layout_interface::reporter::CSSErrorReporter in components/layout_thread/lib.rs

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] These changes fix #17671 (github issue number if applicable).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17673)
<!-- Reviewable:end -->
2017-07-11 20:09:52 -07:00
Alan Jeffrey
ef033b8362 Implemented paint worklet properties. 2017-07-11 17:28:56 -05:00
Hugh Gallagher
e13daa1e78 Removed unused import script_layout_interface::reporter::CSSErrorReporter 2017-07-11 21:54:07 +01:00
Josh Matthews
a08371e8eb stylo: Create error reporters linked to documents (bug 1352669) 2017-07-10 20:46:08 -04:00
Emilio Cobos Álvarez
1263075776
stylo: Fix StyleSheetInner/Stylesheet mapping
The key of this patch is the split between Stylesheet and StylesheetContents.

Gecko will use StylesheetContents, which maps to a ServoStyleSheetInner.
2017-07-02 15:49:40 +02:00
Jeremy Lempereur
60de05d77d Passing ProfilerChan by reference to the send_profile_data method. 2017-06-25 14:29:44 +02:00
J. Ryan Stinnett
c32c0ac9dc Drop root_flow to avoid rule node leaks 2017-06-22 17:50:10 -05:00
Simon Sapin
316cd35767 Untry 2017-06-18 13:21:51 +02:00
Simon Sapin
605ef8b7ec Remove explicit dependencies on serde_derive 2017-06-16 13:58:21 +02:00
Bastien Orivel
76d8573393 Bump serde to 1.0 2017-06-16 13:31:18 +02:00
Emilio Cobos Álvarez
ffc45e9aaa
style: Inline RestyleData.
Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf
2017-06-16 03:36:18 +02:00