select drop down menu position is wrong in transformed OOP iframes
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
341 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
It seems I missed the case in bug 1550800. And I am not sure yet where we need to incorporate the transform value.
Assignee | ||
Comment 1•4 years ago
•
|
||
So a problem I noticed is that for dropdown (or some such) positions in OOP iframes use PuppetWidget::WidgetToScreenOffset (via mozInnerScreen{X,Y}) to get the coordinate origin of the document inside the iframe, but it's the origin, it doesn't convert positions inside the iframe by the outer transform values, in this test case, scale(2)
is a transform in the parent document.
Presumably one of reasonable place to factor outer transforms is inside ViewportUtils::GetVisualToLayoutTransform.
Another possible solution I can think of is to introduce a new function in PuppetWidget (or BrowserChild) to convert a given position in the OOP iframe units (app units/css units) to screen coordinate system.
Assignee | ||
Comment 2•4 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)
Presumably one of reasonable place to factor outer transforms is inside ViewportUtils::GetVisualToLayoutTransform.
This is not going to work. The function is supposed to be a conversion in the same units, whereas for downdown position case, we do convert a given rect to screen coordinates only if |aInScreenCoords| is true.
So,
Another possible solution I can think of is to introduce a new function in PuppetWidget (or BrowserChild) to convert a given position in the OOP iframe units (app units/css units) to screen coordinate system.
We probably need to add this new function and expose it in JS.
CCing Neil.
Assignee | ||
Comment 3•4 years ago
|
||
Hmm I may be wrong. ViewportUtils::GetVisualToLayoutTransform is probably supposed to convert from in a coordinate system to a different coordinate system in the same unit?
Updated•4 years ago
|
Assignee | ||
Comment 4•4 years ago
|
||
Note that I've noticed this case doesn't work on Chrome on at least Linux, I haven't tried on other platforms.
Comment 5•4 years ago
|
||
Hiro, can you please check this on Chrome with other platforms too, so we know how to prioritize fixing this? Thanks!
Assignee | ||
Comment 6•4 years ago
|
||
Confirmed it doesn't work with Chrome on Window either. I also confirmed that Neil's patch in bug 1684795 fixes this issue too. I will duplicate this as the bug once after the bug 1684795 fixed, but for now I am going to make this bug block to bug 1684795.
Assignee | ||
Comment 7•4 years ago
|
||
It's already set in browser.ini.
Updated•4 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
The intension behind this change is that we want to factor out openSelectPopup
and hideSelectPopup in an independnt js file to reuse the functions for
different browser tests but unfortunately factoring out the hideSelectPopup
causes the following lint error;
ChromeUtils.import should not be called with (..., null) to retrieve the JSM
global object. Rely on explicit exports instead.
mozilla/reject-chromeutils-import-null (eslint)
As of now, there is an on-going work to fix ChromeUtils.import calls with null
(bug 1609271) and the reason why the same error doesn't happen in the head.js is
the file is excluded from lint targets [1]. Fixing the error properly requires
SelectChild.jsm modifications so we defer the issue to bug 1609271 and re-use
the head.js directly instead.
[1] https://searchfox.org/mozilla-central/rev/6a6a366031680829746b5d2362610b868fd9571a/.eslintrc.js#511
Depends on D104365
Assignee | ||
Comment 9•4 years ago
|
||
Depends on D104366
Assignee | ||
Comment 10•4 years ago
|
||
Depends on D104367
Assignee | ||
Comment 11•4 years ago
|
||
Depends on D104368
Assignee | ||
Comment 12•4 years ago
|
||
The issue will be handled in bug 1691346.
Depends on D104369
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4c77e4c5e140
https://hg.mozilla.org/mozilla-central/rev/a10f4eaeaae8
https://hg.mozilla.org/mozilla-central/rev/67c83ae3b221
https://hg.mozilla.org/mozilla-central/rev/3d7ef339f822
https://hg.mozilla.org/mozilla-central/rev/659ca747e61d
https://hg.mozilla.org/mozilla-central/rev/c88e15c44b91
Description
•