Closed
Bug 1246346
Opened 9 years ago
Closed 9 years ago
screen.left and screen.top does not return the correct value with mixed DPI monitors
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox44 | --- | unaffected |
firefox45 | --- | unaffected |
firefox46 | + | unaffected |
firefox47 | + | fixed |
firefox-esr38 | --- | unaffected |
firefox-esr45 | --- | unaffected |
People
(Reporter: emk, Assigned: jfkthame)
References
Details
(Keywords: regression)
Attachments
(2 files)
1.83 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
2.41 KB,
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce.
1. Set two monitors to the following configuration:
Monitor 1 (primary): 1280*960, 100% scale
Monitor 2: 1920*1440, 150% scale
2. Open Nightly on the second monitor.
3. Open Web Console and type the following command:
[screen.left,screen.top,screen.width,screen.height]
Actual result:
Array [853, 0, 1280, 960]
Expected result:
Array [1280, 0, 1280, 960]
We will need a similar fix to bug 1240085.
Reporter | ||
Updated•9 years ago
|
Summary: screen.width and screen.left does not return the correct value. → screen.width and screen.left does not return the correct value with mixed DPI monitors
Reporter | ||
Updated•9 years ago
|
Summary: screen.width and screen.left does not return the correct value with mixed DPI monitors → screen.left and screen.top does not return the correct value with mixed DPI monitors
Comment 1•9 years ago
|
||
Tracking since this looks like a recent regression in 46.
Comment 2•9 years ago
|
||
Jonathan, can you take a look at this or help find an owner for this bug?
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 3•9 years ago
|
||
Yes, I should be able to deal with this.
Assignee: nobody → jfkthame
Flags: needinfo?(jfkthame)
Assignee | ||
Comment 4•9 years ago
|
||
This is a helper to make the next patch much simpler; we already have the deviceContext, so exposing the Desktop-to-Device scale here avoids the need for a QI-dance via nsIBaseWindow or whatever. (I suspect this might turn out to be handy in other places, too.)
Attachment #8718793 -
Flags: review?(VYV03354)
Assignee | ||
Comment 5•9 years ago
|
||
I don't have the exact same monitor configuration as yours in comment 0, but with this I'm seeing sensible results in similar mixed-dpi setups.
Attachment #8718794 -
Flags: review?(VYV03354)
Reporter | ||
Updated•9 years ago
|
Attachment #8718793 -
Flags: review?(VYV03354) → review+
Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8718794 [details] [diff] [review]
patch 2 - Correct the origin of the DOM screen coordinates (screen.left, screen.top) for secondary display on a mixed-DPI configuration
LGTM about the correctness (I don't consider about the performance such as talos regressions).
Attachment #8718794 -
Flags: review?(VYV03354) → review+
Assignee | ||
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8c76ded2edb9adf8193020127f059d4b79d5c61c
Bug 1246346 - patch 1 - Expose a DesktopToDevice scale factor on nsDeviceContext. r=emk
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc5233e55fec8b05f8284d407f5e1ff4be6795d0
Bug 1246346 - patch 2 - Correct the origin of the DOM screen coordinates (screen.left, screen.top) for secondary display on a mixed-DPI configuration. r=emk
Updated•9 years ago
|
Keywords: regressionwindow-wanted
Comment 8•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8c76ded2edb9
https://hg.mozilla.org/mozilla-central/rev/fc5233e55fec
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•8 years ago
|
Version: unspecified → Trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•