Skip to content

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

Merged
bors-servo merged 3 commits into
servo:masterfrom
jdm:iframe-painting-after-navigation-redux
Jan 28, 2016
Merged

bors-servo merged 3 commits into
servo:masterfrom
jdm:iframe-painting-after-navigation-redux

Conversation

@jdm

@jdm jdm commented Jan 25, 2016

Copy link
Copy Markdown
Member

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

jdm commented Jan 25, 2016

Copy link
Copy Markdown
Member Author

r? @pcwalton

@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

Thanks so much for looking into this!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 2d53520 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 Jan 25, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 2d53520 with merge 34c277f...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 25, 2016
@jdm
jdm force-pushed the iframe-painting-after-navigation-redux branch from 2d53520 to 795d10f Compare January 25, 2016 21:56
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 25, 2016
@jdm

jdm commented Jan 25, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 795d10f has been approved by jdm

@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 Jan 25, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 795d10f with merge 6e23fad...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - linux-dev

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 25, 2016
@jdm
jdm force-pushed the iframe-painting-after-navigation-redux branch from 795d10f to 87c8758 Compare January 25, 2016 22:56
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 25, 2016
@jdm

jdm commented Jan 25, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 87c8758 has been approved by jdm

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Jan 26, 2016
@jdm

jdm commented Jan 26, 2016

Copy link
Copy Markdown
Member Author

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

pcwalton and others added 3 commits January 26, 2016 16:37
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 servo#8081.
…d a catch-all reflow for all same-origin pages sharing an event loop.a
@jdm
jdm force-pushed the iframe-painting-after-navigation-redux branch from 87c8758 to c79231f Compare January 27, 2016 23:17
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Jan 27, 2016
@jdm

jdm commented Jan 27, 2016

Copy link
Copy Markdown
Member Author

The latest commit fixes #9432.

@glennw

glennw commented Jan 27, 2016

Copy link
Copy Markdown
Member

@jdm The last commit looks good to me.

@jdm

jdm commented Jan 27, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c79231f has been approved by jdm

@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 Jan 27, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c79231f with merge 0fa9d32...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Jan 28, 2016
@mbrubeck

Copy link
Copy Markdown
Contributor

@bors-servo retry #8127

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ 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
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit c79231f into servo:master Jan 28, 2016
@jdm jdm mentioned this pull request Mar 27, 2019
4 tasks done
bors-servo pushed 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 pushed 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 pushed 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 pushed 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 -->
github-merge-queue Bot pushed a commit that referenced this pull request Apr 30, 2025
*Describe the changes that this pull request makes here. This will be
the commit message.*
rewritten the PR #28571
Implement
[Window#focus](https://html.spec.whatwg.org/multipage/#dom-window-focus),
[Window#blur](https://html.spec.whatwg.org/multipage/#dom-window-blur)
Testing: WPT
Fixes: #8981 #9421

---------

Signed-off-by: kongbai1996 <[email protected]>
Co-authored-by: yvt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-tests-failed The changes caused existing tests to fail.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iframe not painted anymore after navigation (regression c72d0c2)

7 participants