Closed Bug 1581974 Opened 5 years ago Closed 5 years ago

Make dom/base/test/test_intersectionobservers.html in fission world

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Fission Milestone M4
Tracking Status
firefox71 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

dom/base/test/test_intersectionobservers.html fails in fission world. A problem I can see is to obtain the root scroll frame for the presshell of the document. In fission world, PresShell::GetRootScrollFrame returns an nsIFrame but it's not what we want there. We, instead, check whether the given |aDocument| is cross-origin or not there.

Hsin-Yi, is there anybody wants to work on this in your team? I believe this can be fixed without any layout knowledge, so this would be a good first bug for a person who want to jump in fission world. If nobody there, I can of course take this.

One caveat is that I haven't read the IntersectionObserver spec carefully, so there might be other works we should do for fission.

Component: Document Navigation → DOM: Core & HTML
Flags: needinfo?(htsai)

Hi :hiro, thank you for filing this bug. My team members are currently working on other fission mochitest failures that we probably won't get to this before the investigation/fix on others is done.

Flags: needinfo?(htsai)
Priority: -- → P2

I will take this. I realized there is another issue in fission world, that is that we walk up prescontext tree to find the implicit root but it fails if there is a cross-origin document in between the top level document and same-origin descendant documents in fission world. So, a better way I can think of is to try to obtain the top level document via BrowsingContext::Top() and if we can't get the top level document, we can consider it's a cross-origin document in fission world.

So that we can avoid 1) obtaining a wrong root in cross-process documents
and also avoid 2) not being able to obtain the proper root in same-origin
documents in the case where there is a cross-process document in between
the top level document and the same-origin documents.

dom/base/test/test_intersectionobservers.html is a test of case 1).
testing/web-platform/tests/intersection-observer/same-origin-grand-child-iframe.sub.html
is a test case of case 2).

Attachment #9093832 - Attachment description: Bug 1581974 - Try to get the implicit root via BrowsingContext::Top() instead of walking up pres context tree. r?jwatt → Bug 1581974 - Change DOMIntersectionObserver::Update to use the BrowsingContext parent chain. r?jwatt
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/676ba571526a
Change DOMIntersectionObserver::Update to use the BrowsingContext parent chain. r=jwatt
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/19171 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Assignee: nobody → hikezoe.birchill
Upstream PR merged by moz-wptsync-bot

Retroactively moving fixed bugs whose summaries mention "Fission" (or other Fission-related keywords) but are not assigned to a Fission Milestone to an appropriate Fission Milestone.

This will generate a lot of bugmail, so you can filter your bugmail for the following UUID and delete them en masse:

0ee3c76a-bc79-4eb2-8d12-05dc0b68e732

Fission Milestone: --- → M4
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: