Add tests of getViewportInfo with initial-scale smaller than min-scale
Categories
(DevTools :: Responsive Design Mode, defect, P1)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: hiro, Assigned: bradwerth)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rdm-mvp] [dt-q])
Attachments
(2 files, 2 obsolete files)
STR
1. Open attachment 8855130 [details] in RDM
2. Enable touch simulation
Comment 1•6 years ago
|
||
Happens in Nightly only, not Stable or Dev Edition.
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
I accidentally noticed how to solve this issue. In MobileViewportManager::RefreshViewportSize we should also check nsLayoutUtils::ShouldHandleMetaViewport() along with gfxPrefs::APZAllowZooming() check [1]. And probably we also do the same thing in MobileViewportManager::RefreshVisualViewportSize(). [1] https://hg.mozilla.org/mozilla-central/file/e4220fa7a191/layout/base/MobileViewportManager.cpp#l413
Reporter | ||
Comment 4•6 years ago
|
||
Gah, simply adding ShouldHandleMetaViewport check breaks a bunch of test cases which enable dom.meta-viewport.enabled. Botond, is it an intentional behavior that MobileViewportManager is generated when the pref is true? (I thought ShouldHandleMetaViewport just simply returns true when the touch simulator is enabled on RDM). If so, we will figure out another way to solve this bug.
Comment 5•6 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #4) > Gah, simply adding ShouldHandleMetaViewport check breaks a bunch of test > cases which enable dom.meta-viewport.enabled. > > Botond, is it an intentional behavior that MobileViewportManager is > generated when the pref is true? (I thought ShouldHandleMetaViewport just > simply returns true when the touch simulator is enabled on RDM). If so, we > will figure out another way to solve this bug. We need a MobileViewportManager for correct handling of a meta viewport tag, so we create one when touch simulation is enabled in RDM (when we want to start respecting the page's meta viewport tag). Let me know if that answers your question. I don't understand the breakage you mention, if you go into more detail I might be able to suggest something.
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Once Bug 1521814 lands, this issue will need the pref dom.meta-viewport.enabled set to true in order to properly test it.
Assignee | ||
Comment 7•5 years ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #6)
Once Bug 1521814 lands, this issue will need the pref dom.meta-viewport.enabled set to true in order to properly test it.
Update: the relevant pref is devtools.responsive.metaViewport.enabled.
Comment 8•5 years ago
|
||
Hello Hiroyuki. Want to confirm if you are still working on this bug or if it can be reassigned to a member of the RDM Team? Thanks.
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
I attempted to reproduce this bug and noticed a more severe problem that's appeared since the bug was filed. After returning from RDM, the page content is cropped to a much smaller area. According to mozregression, this new unwanted behavior appeared with the landing of Bug 1501665. That isn't terribly surprising since that bug changed so much.
Not changing the bug title yet because these results are probably related to the same cause. In other words, the scrollbars being cropped to a too-small rectangle (the original bug) is now joined by the viewport being cropped to a too-small rectangle.
Assignee | ||
Comment 10•5 years ago
|
||
Attachment 8855130 [details] has meta viewport tag:
<meta name="viewport" content="width=250, initial-scale=0.01">
initial-scale is the likely issue for this problem. I don't think we have good test coverage of RDM with initial-scale.
Reporter | ||
Comment 11•5 years ago
|
||
No, I am not actively working on this any more. Thanks!
(In reply to Brad Werth [:bradwerth] from comment #10)
Attachment 8855130 [details] has meta viewport tag:
<meta name="viewport" content="width=250, initial-scale=0.01">
initial-scale is the likely issue for this problem. I don't think we have good test coverage of RDM with initial-scale.
FWIW, the behavior for cases where initial-scale < 0.25 might be changed by bug 1550105, since the spec says non negative scale value is clamped to the range [0.1, 10], and we changed the value of the minimum boundary to 0.25 in bug 1510214.
Assignee | ||
Comment 12•5 years ago
|
||
Still thinking this through. The call to nsPresContext::SetVisibleArea is getting correct values, but the visible area is getting scaled by the very high resolution value that was used by the RDM mode with meta viewport on. You can see the content cropping bug just by toggling touch simulation button (which also controls meta viewport).
Assignee | ||
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d51c4005d8a29dcf889ca67d30d39f1657b5bee9
Updated•5 years ago
|
Assignee | ||
Comment 15•5 years ago
|
||
This is another one that's difficult to test in an automated fashion. I'll request review of the patch as-is with an explanation of the difficulties.
Reporter | ||
Comment 16•5 years ago
|
||
I've been wondering we can simulate RDM in our reftest harness.
Assignee | ||
Comment 17•5 years ago
|
||
Hiro, would you please test that the attached patch solves the issue you found with the scrollbars? I was never really able to replicate that issue but instead found this screen cropping issue instead. I hope that the patch will resolve the issue you found, as well.
Reporter | ||
Comment 18•5 years ago
|
||
It's been already fixed by you! Bug 1521814 fixed the issue I mentioned in comment 0. Thank you!
Assignee | ||
Comment 19•5 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #18)
It's been already fixed by you! Bug 1521814 fixed the issue I mentioned in comment 0. Thank you!
In that case, would you please retest with the pref devtools.responsive.metaViewport.enabled set? That's all that Bug 1521814 affected.
Reporter | ||
Comment 20•5 years ago
|
||
With the pref set (true) the scrollbars in the example in question are not incorrectly rendered but initial-scale=0.1
seems not to be applied. But with the binary in the try in comment 14 the example looks fine to me.
Updated•5 years ago
|
Assignee | ||
Comment 21•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 22•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=738e73098325d165bc93e0beae8719f558545cb1
Updated•5 years ago
|
Assignee | ||
Comment 23•5 years ago
|
||
Depends on D32321
Updated•5 years ago
|
Assignee | ||
Comment 24•5 years ago
|
||
It appears this has been fixed by Bug 1550105.
Updated•5 years ago
|
Comment 25•5 years ago
|
||
We might as well still land the test.
Assignee | ||
Comment 26•5 years ago
|
||
I just came to the same conclusion. The tests for Bug 1550105 don't go through getViewportInfo, and that seems useful to test as well.
Updated•5 years ago
|
Updated•5 years ago
|
Comment 27•5 years ago
|
||
Pushed by bwerth@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b337e189320 Part 1: Add a test of getViewportInfo clamping initial-scale to min-scale. r=botond
Updated•5 years ago
|
Comment 28•5 years ago
|
||
bugherder |
Description
•