Repository navigation
script: Make iframes know their pipeline IDs at all times, even after navigation. - #10159
Conversation
|
cc @paulrouget |
dd97a10 to
e5287b4
Compare
|
Added a reftest. r? @jdm |
|
Can you split the reflow call into a separate commit, with an explanation in the commit message about why it's necessary? |
e5287b4 to
eb6a9bd
Compare
|
Removed the reflow call per @Ms2ger's suggestion; only dirtying is needed. |
|
☔ The latest upstream changes (presumably #10242) made this pull request unmergeable. Please resolve the merge conflicts. |
|
This is bitrotting, and badly needed for browserhtml testing (back / forward buttons don't work without this patch). |
|
Sorry, I've been on the hook for high priority Gecko stuff recently. |
|
@jdm Would you be willing to hand the review off to someone else? I'm happy to if you suggest someone. |
|
Sorry, I thought this was much more complicated than it is. r=me after rebasing! |
eb6a9bd to
5308e8c
Compare
|
@bors-servo: r=jdm |
|
📌 Commit 5308e8c has been approved by |
script: Make iframes know their pipeline IDs at all times, even after navigation. Since WebRender uses the pipeline ID stored in the iframe element to determine which pipeline to display, it had better be kept up to date! Closes #9919. r? @jdm <!-- 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/10159) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
Both tests that failed use iframe history navigation APIs, which is pretty suspicious :) |
|
Mac: Linux: |
|
This is very strange, because in |
|
Yeah, I'll take a look. |
|
@jdm After some reverse engineering of This is intermittent, BTW. |
|
@jdm I've figured out what the problem is, I'm pretty sure: occasionally the data URL in the iframe gets navigated away from before it loads, and that URL is never removed from Do you have a preferred way to address this? |
|
That explanation doesn't make sense to me, since the iframe element's load event handler isn't invoked until the load is complete, and the code removes the load blocker directly following the invocation. Reading the code did cause me to file #10384, but that wouldn't cause the problem we're seeing. |
|
@jdm So it seems that's what's going on is something like this. In the good case, Does this make sense? How would you prefer to deal with this? |
|
So for I haven't been able to figure out why the new test would timeout, however. I need to keep thinking about that. |
|
☔ The latest upstream changes (presumably #10345) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@jdm Ping, when you get a chance. Any thoughts as to the failing test? |
|
Sorry, I've been meaning to get back to this. I'll think more about it on Monday. |
|
@pcwalton I'll approve a PR with the following diff: diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 9fc3239..999df0b 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -183,6 +183,9 @@ impl HTMLIFrameElement {
self.subpage_id.set(Some(new_subpage_id));
self.pipeline_id.set(Some(new_pipeline_id));
+ let mut blocker = self.load_blocker.borrow_mut();
+ LoadBlocker::terminate(&mut blocker);
+
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
}The problem is that the mozbrowserlocation event fires before the load event for the event, and if the test performs a navigation as a result of mozbrowserlocation this can result in the iframe's pipeline being updated and the script thread not being able to find an iframe for the load event for the previous document, so the load blocker is never removed. By removing any outstanding load blocker when we update the pipeline, we achieve the same effect and ensure that the window load event can't fire too early either. |
5308e8c to
7bd2570
Compare
|
Thanks a bunch! Updated the patch and verified locally that your fix works. r? @jdm |
navigation. Since WebRender uses the pipeline ID stored in the iframe element to determine which pipeline to display, it had better be kept up to date! Closes servo#9919.
|
@bors-servo: r+ |
|
📌 Commit 7bd2570 has been approved by |
script: Make iframes know their pipeline IDs at all times, even after navigation. Since WebRender uses the pipeline ID stored in the iframe element to determine which pipeline to display, it had better be kept up to date! Closes #9919. r? @jdm <!-- 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/10159) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!
Closes #9919.
r? @jdm
This change is