window.outerHeight returns wrong value in Responsive Design mode
Categories
(DevTools :: Responsive Design Mode, defect, P1)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: supersonicsnow, Assigned: mtigley)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rdm-mvp])
Attachments
(3 files)
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
•
|
||
Some observations as I was investigating a potential solution:
The window's outerHeight
property is writeable by both chrome and non-chrome, the difference is that if the caller is non-chrome, the value written to outerHeight acts as a Replaceable value. If the caller is chrome, then this value is directly written to window.outerHeight
and modifies the window's height dimensions appropriately. See: https://searchfox.org/mozilla-central/source/dom/webidl/Window.webidl#205
Since the window can distinguish between a caller that's either chrome or not, a possible solution is to also do the same by checking the document's InRDMPane property and writing the passed outerHeight value as a Replaceable IDL property. See: https://searchfox.org/mozilla-central/source/dom/base/nsGlobalWindowInner.cpp#6655
I'll try this out.
UPDATE:
After further investigation into this, it makes more sense that the RDM iframe's outer window should just return its inner window's size values as its outer size. The reasoning for this is that the RDM browser will always represent the size of the browser viewport of the device it's simulating. So when we try to retrieve the RDM browser's outer size properties, the iframe's inner window will forward this call to the iframe's outer window. From here, we should check if the document is contained in the RDM pane and return the inner window's size values instead.
Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
•
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
•
|
||
Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1986a2058bb1
https://hg.mozilla.org/mozilla-central/rev/a3edc47a8b67
Description
•