PositionedEventTargeting.cpp calls GetResolution
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox127 | --- | fixed |
People
(Reporter: tnikkel, Assigned: ajakobi)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][foundation])
Attachments
(1 file)
This code might need changes when fission comes to android.
Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #0)
This code might need changes when fission comes to android.
In that case, I will tag this bug to be tracked for Android Fission.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
|
||
It turned out that the pres shell in AppUnitsFromMM in question is NOT the top level one, it's for the document where the event happens regardless of whether it's in OOP or not. So for example, even without Fission if I clicked inside an iframe element, the GetResolution always returns 1.0. So this bug is definitely valid, but it's not for Fission specific, it's been there since the beginning of our event retarget system. And as far as I can tell no one had reported this issue until Timothy found the code flaw.
With the reason I'd say this bug doesn't need to block Android Fission. Chris, what do you think?
Reporter | ||
Comment 3•3 years ago
|
||
This code is only executed on Android, where we haven't enabled fission, so we wouldn't expect anyone to find it except my reading the code.
Comment 4•3 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #3)
This code is only executed on Android, where we haven't enabled fission, so we wouldn't expect anyone to find it except my reading the code.
So it sounds like this bug is still valid, but will only affect Android Fission. If that's correct, I'll still track this bug for Android Fission.
Comment 5•3 years ago
|
||
This bug has already been there without enabling Fission on Android, that's what I meant.
Comment 6•3 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #5)
This bug has already been there without enabling Fission on Android, that's what I meant.
To be clear, Android users should be able to find this bug without enabling Fission by clicking somewhere inside an iframe on a zoomed in/out content. With the content, event-retargetting doesn't work as what the code is supposed to. I presume people isn't so severe where event re-targetting happened or not.
Comment 7•3 years ago
|
||
Thanks for the clarification. In that case, I won't track this bug as a blocker for Android Fission.
Updated•10 months ago
|
Updated•10 months ago
|
Assignee | ||
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Assignee | ||
Comment 9•8 months ago
|
||
Updated•8 months ago
|
Comment 10•7 months ago
|
||
Comment 11•7 months ago
|
||
Backed out for causing gv-junit crashes @ TryInferEnclosingResolution
Backout link: https://hg.mozilla.org/integration/autoland/rev/5a31505f08c64efa6eb7a8ed02d5e9c0db448e37
Comment 12•7 months ago
•
|
||
I guess the in-process root content document (what we are passing to TryInferEnclosingResolution
) is not necessarily always the root of the entire document hierarchy in the process (what TryInferEnclosingResolution
is asserting), i.e. sometimes there is a chrome document enclosing the root content document.
(It's interesting to note the failure is in ExtensionActionTest#testOpenPopup
, suggesting that the scenario where this doesn't hold is related to popups.)
Suggested fix: make an additional call to GetRootPresContext()
before calling TryInferEnclosingResolution()
.
(Note: we don't want to replace the call to GetInProcessRootContentDocumentPresContext()
with GetRootPresContext()
, because for the resolution we do want the root content document.)
Comment 13•7 months ago
|
||
I think TryInferEnclosingResolution
was originally supposed to be called in a content process.
And it looks like the JUnit test runs with extensions.webextensions.remote=false
(which is not our default value), thus the popup document gets loaded in the parent process as a content document.
If we allow such situations, I think we can just drop the assertion entirely from the function, this IsTopLevel() check handles the situations properly.
Assignee | ||
Comment 14•7 months ago
•
|
||
Thanks, Hiro. Removing the assertion of course seems to be the easiest fix. Botond, what do you think?
Comment 15•7 months ago
|
||
(In reply to Alex Jakobi [:ajakobi] from comment #14)
Removing the assertion of course seems to be the easiest fix. Botond, what do you think?
I think the assertion is helpful to catch the scenario where the caller passes in a subdocument in the content process of an OOP iframe. In that scenario, the OOP iframe may in fact be subject to an enclosing resolution, but the function would just silently return 1.0f instead.
As an alternative suggestion, perhaps we can add an early-return if (!XRE_IsContentProcess())
to the function (before the assertion)?
Comment 16•7 months ago
|
||
Comment 17•7 months ago
|
||
bugherder |
Description
•