Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Fix detection of animations to avoid style flushing in getComputedStyle. #19016

Merged
merged 1 commit into from Oct 25, 2017

Conversation

emilio
Copy link
Member

@emilio emilio commented Oct 25, 2017

This fixes multiple things:

  • EffectCompositor was using the light tree instead of the flat tree.

  • When we insert an element inside the document, we may not style it right away
    (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we
    trigger animations and transitions from the traversal, we can't skip flushing
    if we call getComputedStyle on any of those.

Bug: 1406750
Reviewed-by: hiro
MozReview-Commit-ID: DpAhmLH3uJ2


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 25, 2017
@emilio emilio force-pushed the animation-avoid-flush-not-quite branch from 5de2004 to 2895e33 Compare October 25, 2017 14:02
@emilio
Copy link
Member Author

emilio commented Oct 25, 2017

@bors-servo r=hiro

@bors-servo
Copy link
Contributor

📌 Commit 2895e33 has been approved by hiro

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 25, 2017
…utedStyle.

This fixes multiple things:

 * EffectCompositor was using the light tree instead of the flat tree.

 * When we insert an element inside the document, we may not style it right away
   (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we
   trigger animations and transitions from the traversal, we can't skip flushing
   if we call getComputedStyle on any of those.

Bug: 1406750
Reviewed-by: hiro
MozReview-Commit-ID: DpAhmLH3uJ2
@emilio emilio force-pushed the animation-avoid-flush-not-quite branch from 2895e33 to 05beeee Compare October 25, 2017 14:07
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 25, 2017
@emilio
Copy link
Member Author

emilio commented Oct 25, 2017

@bors-servo r=hiro

  • Annotated with the bug number.

@bors-servo
Copy link
Contributor

📌 Commit 05beeee has been approved by hiro

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 25, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 05beeee with merge 6035b75...

bors-servo pushed a commit that referenced this pull request Oct 25, 2017
style: Fix detection of animations to avoid style flushing in getComputedStyle.

This fixes multiple things:

 * EffectCompositor was using the light tree instead of the flat tree.

 * When we insert an element inside the document, we may not style it right away
   (we mark it for lazy frame construction with the NODE_NEEDS_FRAME). Since we
   trigger animations and transitions from the traversal, we can't skip flushing
   if we call getComputedStyle on any of those.

Bug: 1406750
Reviewed-by: hiro
MozReview-Commit-ID: DpAhmLH3uJ2

<!-- 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/19016)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: hiro
Pushing 6035b75 to master...

@bors-servo bors-servo merged commit 05beeee into servo:master Oct 25, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants