Skip to content

compositor: Send animation ticks to layout even if there are script animation frames. - #12751

Merged
bors-servo merged 3 commits into
servo:masterfrom
emilio:transitions-raf
Aug 8, 2016
Merged

bors-servo merged 3 commits into
servo:masterfrom
emilio:transitions-raf

Conversation

@emilio

@emilio emilio commented Aug 5, 2016 •

Copy link
Copy Markdown
Member

  • There are tests for these changes OR
  • These changes do not require tests because _____

The script tick ends up only processing JS callbacks related to animation
frames, so CSS transitions/animations end up not working as expected.

This could have accidentally worked before #12563 because we over-restyled, but
now this is no longer the case.

Other possible way to do it is making a layout reflow with RAF handle CSS
animations/transitions too, but that may not work if the reflow ends up being
suppressed (that could very well be the case), and we'd need to handle a lot
more state in the document, so this solution (assuming it doesn't break try)
seems a bit less flacky.

Missing a test, will add one soon. Fixes #12749.


This change is Reviewable

…nimation frames.

The script tick ends up only processing JS callbacks related to animation
frames, so CSS transitions/animations end up not working as expected.

This could have accidentally worked before servo#12563 because we over-restyled, but
now this is no longer the case.

Other possible way to do it is making a layout reflow with RAF handle CSS
animations/transitions too, but that may not work if the reflow ends up being
suppressed (that could very well be the case), and we'd need to handle a lot
more state in the document, so this solution (assuming it doesn't break try)
seems a bit less flacky.

Fixes servo#12749.
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 5, 2016
@emilio

emilio commented Aug 5, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 805988e with merge aca89b2...

bors-servo pushed a commit that referenced this pull request Aug 5, 2016
compositor: Send animation ticks to layout even if there are script animation frames.

<!-- 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
- [x] These changes fix #12749 (github issue number if applicable).

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

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

The script tick ends up only processing JS callbacks related to animation
frames, so CSS transitions/animations end up not working as expected.

This could have accidentally worked before #12563 because we over-restyled, but
now this is no longer the case.

Other possible way to do it is making a layout reflow with RAF handle CSS
animations/transitions too, but that may not work if the reflow ends up being
suppressed (that could very well be the case), and we'd need to handle a lot
more state in the document, so this solution (assuming it doesn't break try)
seems a bit less flacky.

Missing a test, will add one soon. Fixes #12749.
@metajack

metajack commented Aug 5, 2016

Copy link
Copy Markdown
Collaborator

r? @pcwalton

@highfive highfive assigned pcwalton and unassigned SimonSapin Aug 5, 2016
@jdm jdm added the S-needs-tests New tests have been requested by a reviewer. label Aug 5, 2016
@emilio emilio removed the S-needs-tests New tests have been requested by a reviewer. label Aug 5, 2016
@pcwalton

pcwalton commented Aug 8, 2016

Copy link
Copy Markdown
Contributor

Looks fine.

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit a3d1457 has been approved by pcwalton

@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 Aug 8, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit a3d1457 with merge 0b98321...

bors-servo pushed a commit that referenced this pull request Aug 8, 2016
compositor: Send animation ticks to layout even if there are script animation frames.

<!-- 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
- [x] These changes fix #12749 (github issue number if applicable).

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

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

The script tick ends up only processing JS callbacks related to animation
frames, so CSS transitions/animations end up not working as expected.

This could have accidentally worked before #12563 because we over-restyled, but
now this is no longer the case.

Other possible way to do it is making a layout reflow with RAF handle CSS
animations/transitions too, but that may not work if the reflow ends up being
suppressed (that could very well be the case), and we'd need to handle a lot
more state in the document, so this solution (assuming it doesn't break try)
seems a bit less flacky.

Missing a test, will add one soon. Fixes #12749.

<!-- 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/12751)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

@bors-servo
bors-servo merged commit a3d1457 into servo:master Aug 8, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 8, 2016
@emilio
emilio deleted the transitions-raf branch August 8, 2016 17:08
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.

requestAnimationFrame seems to break CSS transitions

7 participants