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

compositing: Fix a couple of bugs that prevented iframes from painting after navigation. #9421

Merged
merged 3 commits into from Jan 28, 2016

Conversation

@jdm
Copy link
Member

jdm commented Jan 25, 2016

The first bug was that iframes were not reflowed in their parent DOM when the child page navigated. This is fixed by simply having the constellation notify the appropriate script thread when navigation occurs.

The second bug was that the compositor was unable to adjust the pipeline for existing iframe layers, only new ones. This patch adds logic to do that.

The third bug was that we have ad-hoc reflow calls throughout script/, and we didn't trigger any reflow from the code that dispatches the load event for the iframe so the test for the first two issues would always time out. The second commit adds another reflow call to do that, and also bites the bullet and adds a catch-all reflow (which does nothing if there's no dirty nodes in the document) at the return to the event loop.

Closes #8081.

Extension of #9285.

Review on Reviewable

@jdm
Copy link
Member Author

jdm commented Jan 25, 2016

@pcwalton
Copy link
Contributor

pcwalton commented Jan 25, 2016

@bors-servo: r+

Thanks so much for looking into this!

@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

📌 Commit 2d53520 has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

Testing commit 2d53520 with merge 34c277f...

bors-servo added a commit that referenced this pull request Jan 25, 2016
…cwalton

compositing: Fix a couple of bugs that prevented iframes from painting after navigation.

The first bug was that iframes were not reflowed in their parent DOM when the child page navigated. This is fixed by simply having the constellation notify the appropriate script thread when navigation occurs.

The second bug was that the compositor was unable to adjust the pipeline for existing iframe layers, only new ones. This patch adds logic to do that.

The third bug was that we have ad-hoc reflow calls throughout script/, and we didn't trigger any reflow from the code that dispatches the `load` event for the iframe so the test for the first two issues would always time out. The second commit adds another reflow call to do that, and also bites the bullet and adds a catch-all reflow (which does nothing if there's no dirty nodes in the document) at the return to the event loop.

Closes #8081.

Extension of #9285.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9421)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

💔 Test failed - linux-dev

@jdm jdm force-pushed the jdm:iframe-painting-after-navigation-redux branch from 2d53520 to 795d10f Jan 25, 2016
@jdm
Copy link
Member Author

jdm commented Jan 25, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

📌 Commit 795d10f has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

Testing commit 795d10f with merge 6e23fad...

bors-servo added a commit that referenced this pull request Jan 25, 2016
compositing: Fix a couple of bugs that prevented iframes from painting after navigation.

The first bug was that iframes were not reflowed in their parent DOM when the child page navigated. This is fixed by simply having the constellation notify the appropriate script thread when navigation occurs.

The second bug was that the compositor was unable to adjust the pipeline for existing iframe layers, only new ones. This patch adds logic to do that.

The third bug was that we have ad-hoc reflow calls throughout script/, and we didn't trigger any reflow from the code that dispatches the `load` event for the iframe so the test for the first two issues would always time out. The second commit adds another reflow call to do that, and also bites the bullet and adds a catch-all reflow (which does nothing if there's no dirty nodes in the document) at the return to the event loop.

Closes #8081.

Extension of #9285.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9421)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

💔 Test failed - linux-dev

@jdm jdm force-pushed the jdm:iframe-painting-after-navigation-redux branch from 795d10f to 87c8758 Jan 25, 2016
@jdm
Copy link
Member Author

jdm commented Jan 25, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jan 25, 2016

📌 Commit 87c8758 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jan 26, 2016

💔 Test failed - linux-rel

@jdm
Copy link
Member Author

jdm commented Jan 26, 2016

Huh. I'm going to try and reproduce #9432 locally, since that's hit every test run.

pcwalton and others added 3 commits Jan 13, 2016
after navigation.

The first bug was that iframes were not reflowed in their parent DOM
when the child page navigated. This is fixed by simply having the
constellation notify the appropriate script thread when navigation
occurs.

The second bug was that the compositor was unable to adjust the pipeline
for existing iframe layers, only new ones. This patch adds logic to do
that.

Closes #8081.
…d a catch-all reflow for all same-origin pages sharing an event loop.a
@jdm jdm force-pushed the jdm:iframe-painting-after-navigation-redux branch from 87c8758 to c79231f Jan 27, 2016
@jdm
Copy link
Member Author

jdm commented Jan 27, 2016

The latest commit fixes #9432.

@glennw
Copy link
Member

glennw commented Jan 27, 2016

@jdm The last commit looks good to me.

@jdm
Copy link
Member Author

jdm commented Jan 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2016

📌 Commit c79231f has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jan 27, 2016

Testing commit c79231f with merge 0fa9d32...

bors-servo added a commit that referenced this pull request Jan 27, 2016
compositing: Fix a couple of bugs that prevented iframes from painting after navigation.

The first bug was that iframes were not reflowed in their parent DOM when the child page navigated. This is fixed by simply having the constellation notify the appropriate script thread when navigation occurs.

The second bug was that the compositor was unable to adjust the pipeline for existing iframe layers, only new ones. This patch adds logic to do that.

The third bug was that we have ad-hoc reflow calls throughout script/, and we didn't trigger any reflow from the code that dispatches the `load` event for the iframe so the test for the first two issues would always time out. The second commit adds another reflow call to do that, and also bites the bullet and adds a catch-all reflow (which does nothing if there's no dirty nodes in the document) at the return to the event loop.

Closes #8081.

Extension of #9285.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9421)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jan 28, 2016

💔 Test failed - linux-rel

@mbrubeck
Copy link
Contributor

mbrubeck commented Jan 28, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jan 28, 2016

Previous build results for android, gonk, linux-dev, mac-dev-unit are reusable. Rebuilding only linux-rel, mac-rel-css, mac-rel-wpt...

@bors-servo
Copy link
Contributor

bors-servo commented Jan 28, 2016

@bors-servo bors-servo merged commit c79231f into servo:master Jan 28, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@jdm jdm mentioned this pull request Mar 27, 2019
4 of 4 tasks complete
bors-servo added a commit that referenced this pull request Mar 28, 2019
Remove unnecessary explicit reflows

These should be unnecessary since the introduction of the catch-all reflow in #9421. Any explicit reflow that is not performing a layout query is unnecessary, and we should be postponing reflow for as long as possible. This should allow pages to perform better when processing mouse events, for example, and allow profiles to better reflect the actual work being done by a page.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #5329
- [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/23118)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Apr 9, 2019
Remove unnecessary explicit reflows

These should be unnecessary since the introduction of the catch-all reflow in #9421. Any explicit reflow that is not performing a layout query is unnecessary, and we should be postponing reflow for as long as possible. This should allow pages to perform better when processing mouse events, for example, and allow profiles to better reflect the actual work being done by a page.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #5329
- [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/23118)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Apr 9, 2019
Remove unnecessary explicit reflows

These should be unnecessary since the introduction of the catch-all reflow in #9421. Any explicit reflow that is not performing a layout query is unnecessary, and we should be postponing reflow for as long as possible. This should allow pages to perform better when processing mouse events, for example, and allow profiles to better reflect the actual work being done by a page.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #5329
- [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/23118)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Apr 9, 2019
Remove unnecessary explicit reflows

These should be unnecessary since the introduction of the catch-all reflow in #9421. Any explicit reflow that is not performing a layout query is unnecessary, and we should be postponing reflow for as long as possible. This should allow pages to perform better when processing mouse events, for example, and allow profiles to better reflect the actual work being done by a page.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #5329
- [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/23118)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.