Commit graph

38 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
b1fca78cba
layout: Mark correctly parents of dirty elements. 2016-08-14 01:37:28 -07:00
bors-servo
7b1f75b605 Auto merge of #12831 - notriddle:master, r=Manishearth
Add a flag to dump the computed style values

I used this to trace #11818 to a style bug, rather than a layout bug.

---

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes do not fix any issues
- [X] These changes do not require tests because debugging

<!-- 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/12831)
<!-- Reviewable:end -->
2016-08-12 20:55:27 -05:00
Michael Howell
748a573917 Add a flag to dump the computed style values
I used this to trace #11818 to a style bug, rather than a layout bug.
2016-08-12 11:11:23 -07:00
Anthony Ramine
7ad51dcd7a Update serde to 0.8 (fixes #12659) 2016-08-12 18:37:27 +02:00
Martin Robinson
6259df5e2d Update to euclid 0.8 2016-08-12 03:12:06 +02:00
bors-servo
1b2450339c Auto merge of #12757 - emilio:stylo, r=bholley,pcwalton
stylo: Stop restyling display: none elements, remove the has_changed hack that made us use ReconstructFrame unconditionally.

<!-- 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: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

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

r? @bholley

<!-- 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/12757)
<!-- Reviewable:end -->
2016-08-10 21:02:30 -05:00
Emilio Cobos Álvarez
6b60383f24
layout: Ensure a element's style is up to date when processing queries. 2016-08-10 18:26:23 -07:00
Emilio Cobos Álvarez
28d7c2dca8
layout: Take into account the client point for fixed positioned stacking contexts. 2016-08-08 13:03:55 -07:00
Emilio Cobos Álvarez
0e3d4ab407
layout: Expand animation test mode to support not force-ticking layout. 2016-08-05 14:42:45 -07:00
Glenn Watson
db8c3ef727 Update cargo.lock for wr2, pin ipc-channel. 2016-08-03 10:44:10 +02:00
bors-servo
a0c502261d Auto merge of #12615 - nox:die-opts-die, r=Ms2ger
Remove use of opts::use_webrender in layout_thread

<!-- 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/12615)
<!-- Reviewable:end -->
2016-07-27 22:36:53 -05:00
bors-servo
944d371b8f Auto merge of #12563 - emilio:stylo, r=bholley,jdm,pcwalton
stylo: Improve restyling performance

This commit adds hooks to the Servo style traversal to avoid traversing all the
DOM for every restyle. Additionally it changes the behavior of the dirty flag to
be propagated top down, to prevent extra overhead when an element is dirtied.

This commit doesn't aim to change the behavior on Servo just yet, since Servo does extra job when dirtying the node related with DOM revision counters that might be necessary.

CC @asajeffrey for the DOM revision counters stuff. When a node is dirty, do all its descendants really need to increment the revision counter, or is this an unintended effect? My intuition is that this is hurting performance quite a lot for servo.

r? @bholley

<!-- 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: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because no geckolib tests yet.

<!-- 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/12563)
<!-- Reviewable:end -->
2016-07-27 17:56:26 -05:00
Emilio Cobos Álvarez
f6043a2394
layout: Remove now unused dirty_all_nodes function in layout thread. 2016-07-27 11:14:48 -07:00
Emilio Cobos Álvarez
c3a727ebda
style: Remove a few more unuseful traversals now we can. 2016-07-27 11:14:45 -07:00
Anthony Ramine
a2921732bb Remove use of opts::use_webrender in layout_thread
If we have a webrender_api value, this means we should use webrender.
2016-07-27 14:39:43 +02:00
Eduard Burtescu
3d8eab424c Update Rust to 1.12.0-nightly (9316ae515 2016-07-24) 2016-07-26 19:35:51 +02:00
Dirkjan Ochtman
e182d29441 Hoist retrieval of layout_threads from opts into Constellation 2016-07-24 21:45:31 +02:00
Alan Jeffrey
c889900cff Removed panic channel, replaced by integrated logging and issue reporting. 2016-07-20 21:56:43 -05:00
Emilio Cobos Álvarez
0b67b218d0
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations. 2016-07-20 09:05:53 -07:00
Simon Sapin
6d0e48f6cc Remove some type aliases that are now just re-exports. 2016-07-20 08:42:47 +02:00
Simon Sapin
789807b7b0 Remove the ComputedValue traits and style_struct_traits 2016-07-20 08:42:40 +02:00
Simon Sapin
b2a7e44373 Move ServoSelectorImpl to a dedicated module. 2016-07-20 08:40:53 +02:00
Shing Lyu
f754cacbd5 Only restyle viewport-relative nodes on viewport size change 2016-07-18 11:01:42 +08:00
Alan Jeffrey
62e95c5a61 All our Cargo.toml files should contain an MPL-2.0 license field. 2016-07-14 10:26:34 -05:00
Anthony Ramine
bf34fdde1f Move util::workqueue to style 2016-07-04 21:56:09 +02:00
bors-servo
ec0d3e084d Auto merge of #11946 - emilio:animations-sender, r=bholley
style: Remove the Mutex from new_animations_sender by moving it to the local StyleContext.

<!-- 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: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [x] These changes do not require tests because refactoring.

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

As a follow-up, we could move all the data living under a mutex in the
SharedLayoutContext only in order to create the local context to the same place.

This should increase animation performance when there are multiple animations in
one page that happen to be on different threads.

r? @SimonSapin/@mbrubeck for the style/layout, @bholley for the geckolib changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11946)
<!-- Reviewable:end -->
2016-07-01 14:12:54 -07:00
Emilio Cobos Álvarez
203d2a62c2
style: Remove the Mutex from new_animations_sender by moving it to the local StyleContext.
As a follow-up, we could move all the data living under a mutex in the
SharedLayoutContext only in order to create the local context to the same place.

This should increase animation performance when there are multiple animations in
one page that happen to be on different threads.
2016-07-01 13:48:06 -07:00
Ms2ger
0078e6c3bb Don't panic in LayoutThread::exit_now() if the paint thread is gone already.
Fixes #11996.
Fixes #12005.
Fixes #12007.
Fixes #12011.
Fixes #12026.
2016-07-01 12:15:51 +02:00
Ms2ger
6b981039d0 Avoid the Vec reversal in DisplayList::hit_test. 2016-06-29 09:46:45 +02:00
Ms2ger
ae064dc7c1 Simplify the code setting hit_test_response. 2016-06-29 09:33:30 +02:00
Ms2ger
aefa941626 Pass a straight Vec to DisplayList::new().
There is no reason to have a runtime check here.
2016-06-29 09:33:29 +02:00
Emilio Cobos Álvarez
2d566ef0ef
style: Fix parsing and add generated keyframes 2016-06-28 15:20:59 +00:00
Emilio Cobos Álvarez
8527762b83
style: Allow pausing and unpausing animations.
There's a bit of flickering when unpausing where the node has the original
state, but I'm not totally sure where it comes from, posibly from
PropertyAnimation returning None due to no styles changing?
2016-06-28 15:13:03 +00:00
Emilio Cobos Álvarez
bc970596d6
layout: Make animations work... more or less.
There's some maths I've done wrong, but it DOES animate some things, though
they're only triggered past the first restyle, and we probably have some
duplications where the animations arrive to layout.

Anyway, got to go.
2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c16c5acade
style: Rewrite the animation representation to allow having state in layout
I have to make the appropriate changes in layout, but I'm running out of battery
in the bus.
2016-06-28 15:09:53 +00:00
Anthony Ramine
38a79e4506 Update Rust to 1.11.0-nightly (ad7fe6521 2016-06-23)
I also properly bump any dependency related to the serde_macros removal
from webrender_traits
2016-06-27 14:13:44 +02:00
Simon Sapin
f7f81e0ed0 Use our copy of RefCell for style data.
This allows removing `#![feature(as_unsafe_cell)]` in geckolib
and make progress towards #11815.
2016-06-23 16:13:49 +02:00
Ms2ger
6528bee84f Introduce a layout_thread crate; drop the dependency of layout on script. 2016-06-20 21:23:44 +02:00