elementFromPoint-002.html, elementFromPoint-003.html and dialog-showModal.html
use document.elementFromPoint with a given point which is calculated from the
value returned by getBoundingClientRect() for a 100% width element. Before
this change, the given point is outside of view because there is no viewport
meta tag in the documents so that elementFromPoint fails. After this change, the
documents fit to the visual viewport so that elementFromPoint works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D16155
--HG--
extra : moz-landing-system : lando
Both of reftests in this commit are based on an exmaple [1] in the Viewports
Explainer written by David Bokan.
position-fixed-out-of-view.html fails without the fix because the position:fixed
element is rendered at the right edge of the visual viewport so that it's
visible in the first place.
position-fixed-on-minimum-scale-size.html does NOT fail without the fix either
because the position:fixed element sticks at the right edge of the visual
viewport so that it still be there even after the visual viewport offset has
been changed.
[1] https://github.com/bokand/bokand.github.io/blob/master/web_viewports_explainer.md#chrome-2
Differential Revision: https://phabricator.services.mozilla.com/D18797
--HG--
extra : moz-landing-system : lando
There are two mochitests need to be changed. Both of contents have very large
element (5000px, 5000px), to avoid expanding the layout viewport to the large
size we restrict the minimum scale to 1.0 so that we can still check the layout
scroll range.
Also with this minimum scale size usage change, no-zoom-ref.html doesn't render
the horizontal scrollbar on _desktops_ for some reasons (presumably
reftest-async-zoom affects it, and possibly the reasons are the same as bug
1385145 or bug 1269739). Instead of fixing the issue on desktops, I am going to
take a workaround to add explicit minimum-scale value here, it somehow renders
the scrollbar on desktops too.
Note that the reftest added in this commit fails without this fix.
Depends on D18041
Differential Revision: https://phabricator.services.mozilla.com/D18042
--HG--
extra : moz-landing-system : lando
The reftest in this commit fails without changing the default value. The test
image is shrunk too much.
Differential Revision: https://phabricator.services.mozilla.com/D13172
--HG--
extra : moz-landing-system : lando
The reftest in this commit fails without changing the default value. The test
image is shrunk too much.
Differential Revision: https://phabricator.services.mozilla.com/D13172
--HG--
extra : moz-landing-system : lando
There are 7 test cases in this commit.
- no-viewport.html
A test case that wider contents should be scaled down even if no viewport
meta tag exists.
- viewport-width.html
A test case that wider contents should be scaled down (i.e. fit to the
device screen).
- minimum-scale.html
A test case that the initial zoom value is clamped by minimum-scale.
- initial-scale-0.html
A test case that specified initial-scale value is less than the default
minimum scale value (0.1), in such cases we shrink the content to fit
the display size.
- initial-scale-100.html
A test case that specified initial-scale value is greater than the default
maximum scale value (10), in such cases we shrink the content to fit
the display size.
- initial-scale-1.html
A test case that the auto initial zoom calculation doesn't apply to the
documents specifying initial-scale.
- box-shadow.html
A test case that box-shadow-ed area isn't incorporated into the initial zoom
value.
Depends on D10197
Differential Revision: https://phabricator.services.mozilla.com/D10198
--HG--
extra : moz-landing-system : lando