Commit Graph

105 Commits

Author SHA1 Message Date
Brad Werth
80409f33ea Bug 1555511 Part 2: Remove a float division in MVM::ScaleZoomWithDisplayWidth. r=botond
This is a drive-by fix to turn a division into a multiplication. It also
is more correct in that the existing code attempts a divide-by-zero if
aNewViewport.width is zero. The updated code will instead return a zoom
of zero in such a case.

Differential Revision: https://phabricator.services.mozilla.com/D32909

--HG--
extra : rebase_source : 83ab76092596d7feda11f66d83c022d3d1e4acd3
extra : source : 2a85e3af81bbe475217ecdf16ce7c5a1a7985a21
2019-06-04 22:25:06 +00:00
Brad Werth
b376db90f4 Bug 1555511 Part 1: Make MVM::UpdateResolution clamp viewport zoom for the new display size later in the calculation. r=botond
The existing math is attempting to adjust the display scale ratio to
prevent the new size from landing outside the min/max zoom bounds. This
introduces unwanted side effects that can be avoided by simply clamping
to min/max at the end. The remaining math correctly handles the case
where the zoom has ALREADY been clamped, which is the only important
case.

Differential Revision: https://phabricator.services.mozilla.com/D32908

--HG--
extra : rebase_source : 3767a50a7d88ceced7b0b3d5979020296f91d7a2
extra : source : 262d2cad64079c343e35b757ac642b231d50e0df
2019-06-04 22:23:47 +00:00
Andreea Pavel
33de335869 Backed out 4 changesets (bug 1555511) for failing dt at browser_boxmodel_pseudo-element.js on a CLOSED TREE
Backed out changeset e0cd61fa79ed (bug 1555511)
Backed out changeset 8c6e5561abed (bug 1555511)
Backed out changeset 2a85e3af81bb (bug 1555511)
Backed out changeset 262d2cad6407 (bug 1555511)
2019-06-05 11:53:38 +03:00
Brad Werth
9fdafeb859 Bug 1555511 Part 2: Remove a float division in MVM::ScaleZoomWithDisplayWidth. r=botond
This is a drive-by fix to turn a division into a multiplication. It also
is more correct in that the existing code attempts a divide-by-zero if
aNewViewport.width is zero. The updated code will instead return a zoom
of zero in such a case.

Differential Revision: https://phabricator.services.mozilla.com/D32909

--HG--
extra : moz-landing-system : lando
2019-06-04 22:25:06 +00:00
Brad Werth
85e82d9ed7 Bug 1555511 Part 1: Make MVM::UpdateResolution clamp viewport zoom for the new display size later in the calculation. r=botond
The existing math is attempting to adjust the display scale ratio to
prevent the new size from landing outside the min/max zoom bounds. This
introduces unwanted side effects that can be avoided by simply clamping
to min/max at the end. The remaining math correctly handles the case
where the zoom has ALREADY been clamped, which is the only important
case.

Differential Revision: https://phabricator.services.mozilla.com/D32908

--HG--
extra : moz-landing-system : lando
2019-06-04 22:23:47 +00:00
Mihai Alexandru Michis
09cd19a7b2 Backed out 4 changesets (bug 1555511) for devtools failures at browser_viewport_resizing_minimum_scale.js CLOSED TREE
Backed out changeset 80b9b4eb8305 (bug 1555511)
Backed out changeset d9ce18a4d7cd (bug 1555511)
Backed out changeset 5e9e587d0622 (bug 1555511)
Backed out changeset 24e136f27469 (bug 1555511)
2019-06-04 12:43:01 +03:00
Brad Werth
e2cac68fa2 Bug 1555511 Part 2: Remove a float division in MVM::ScaleZoomWithDisplayWidth. r=botond
This is a drive-by fix to turn a division into a multiplication. It also
is more correct in that the existing code attempts a divide-by-zero if
aNewViewport.width is zero. The updated code will instead return a zoom
of zero in such a case.

Differential Revision: https://phabricator.services.mozilla.com/D32909

--HG--
extra : moz-landing-system : lando
2019-06-03 18:28:40 +00:00
Brad Werth
256c9b4b38 Bug 1555511 Part 1: Make MVM::UpdateResolution clamp viewport zoom for the new display size later in the calculation. r=botond
The existing math is attempting to adjust the display scale ratio to
prevent the new size from landing outside the min/max zoom bounds. This
introduces unwanted side effects that can be avoided by simply clamping
to min/max at the end. The remaining math correctly handles the case
where the zoom has ALREADY been clamped, which is the only important
case.

Differential Revision: https://phabricator.services.mozilla.com/D32908

--HG--
extra : moz-landing-system : lando
2019-06-03 18:28:34 +00:00
Gurzau Raul
aea781583c Backed out 4 changesets (bug 1555511) for failing at browser_viewport_resizing_minimum_scale.js
Backed out changeset 6988b151bbe7 (bug 1555511)
Backed out changeset aa1c32a38785 (bug 1555511)
Backed out changeset 999f3af17edf (bug 1555511)
Backed out changeset 1069871269f7 (bug 1555511)
2019-06-03 03:25:58 +03:00
Brad Werth
2c084a33fd Bug 1555511 Part 2: Remove a float division in MVM::ScaleZoomWithDisplayWidth. r=botond
This is a drive-by fix to turn a division into a multiplication. It also
is more correct in that the existing code attempts a divide-by-zero if
aNewViewport.width is zero. The updated code will instead return a zoom
of zero in such a case.

Differential Revision: https://phabricator.services.mozilla.com/D32909

--HG--
extra : moz-landing-system : lando
2019-05-31 22:10:59 +00:00
Brad Werth
8c5b5937fe Bug 1555511 Part 1: Make MVM::UpdateResolution clamp viewport zoom for the new display size later in the calculation. r=botond
The existing math is attempting to adjust the display scale ratio to
prevent the new size from landing outside the min/max zoom bounds. This
introduces unwanted side effects that can be avoided by simply clamping
to min/max at the end. The remaining math correctly handles the case
where the zoom has ALREADY been clamped, which is the only important
case.

Differential Revision: https://phabricator.services.mozilla.com/D32908

--HG--
extra : moz-landing-system : lando
2019-05-31 22:10:28 +00:00
Jean-Yves Avenard
022c57caf3 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-26 14:31:53 +00:00
Gurzau Raul
967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard
074aea57fe Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-24 11:37:50 +00:00
Gurzau Raul
74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard
d59781ac33 Bug 1550422 - P23. Remove now unused gfxPrefs. r=jrmuizel
And with some tidying some comments and removing stray #include "gfxPrefs.h"

Differential Revision: https://phabricator.services.mozilla.com/D31468

--HG--
extra : moz-landing-system : lando
2019-05-22 12:46:30 +00:00
Brad Werth
0cadd363db Bug 1548896 Part 1: Prevent MobileViewportManager::GetCompositionSize from returning negative sizes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D30736

--HG--
extra : moz-landing-system : lando
2019-05-13 17:26:34 +00:00
Brad Werth
47f6d7796a Bug 1538681 Part 1: Backout a change that added an early-exit in MobileViewportManager::UpdateResolution. r=botond
This change was originally added as a drive-by optimization in Bug 1501665.
The early-exit apparently routes around a needed side effect in the case
where resolution is re-set to its current value.

Differential Revision: https://phabricator.services.mozilla.com/D28566

--HG--
extra : moz-landing-system : lando
2019-04-29 17:54:19 +00:00
Hiroyuki Ikezoe
8bd0453a43 Bug 1528052 - Suppress resize events until the initial paint has finished on mobile. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D28172

--HG--
extra : moz-landing-system : lando
2019-04-23 04:14:55 +00:00
Botond Ballo
fbb1036cee Bug 1531962 - Extract an MVMContext interface used by MobileViewportManager to interact with its surroundings. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D26246

--HG--
extra : moz-landing-system : lando
2019-04-04 22:11:40 +00:00
Daniel Holbert
ce2f2d7371 Bug 1541150: Add missing includes/namespaces/decls to fix non-unified build bustage in layout/base. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D25827

--HG--
extra : moz-landing-system : lando
2019-04-02 20:11:56 +00:00
Hiroyuki Ikezoe
9db5bc51b8 Bug 1519013 - Shrink the content to display size if user has never changed the site resolution. r=botond
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
2019-03-28 03:04:59 +00:00
Brad Werth
5a6a418623 Bug 1536755 Part 1: Enforce viewport zoom constraints when the content size changes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D24424

--HG--
extra : moz-landing-system : lando
2019-03-22 21:01:26 +00:00
Brad Werth
9a86c02a44 Bug 1501665 Part 10: Modify viewport resize zoom scaling to account for clamped zoom levels. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21291

--HG--
extra : source : 520dd24a73fc1a224c38c93ab91d36eecce727ed
2019-03-18 14:59:12 +00:00
Brad Werth
1f70e7449b Bug 1501665 Part 9: Early exit around an unnecessary call to UpdateVisualViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21287

--HG--
extra : source : 3542bf2b89ddf170efe6c723a64f297868bc7db1
2019-03-18 14:58:49 +00:00
Brad Werth
16be774e5b Bug 1501665 Part 8: Allow MVM::RequestReflow to adjust resolution, and do so when destroying the MVM. r=botond
Currently the MobileViewportManager leaves somethings permanently changed
even after it is destroyed: it may have changed the resolution of
the Document, and it may have set a fixed size for the visual viewport.
Both of these changes need to be un-done to return to normal display of
the Document.

Differential Revision: https://phabricator.services.mozilla.com/D17999

--HG--
extra : source : 088dc24eabc75eea96301d50550e0a8817f5f809
2019-03-18 14:58:31 +00:00
Brad Werth
7fc19a53b5 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : source : cf42ea4e8443cdcb5f446dfb95d92d5998f55f24
2019-03-18 14:56:55 +00:00
shindli
b7de66af4f Backed out 13 changesets (bug 1501665) for failing a11y tests in accessible/tests/mochitest/relations/test_tabbrowser.xul CLOSED TREE
Backed out changeset 2fa518cb0dfc (bug 1501665)
Backed out changeset afaf26d7df42 (bug 1501665)
Backed out changeset 5bdf0ad9dc66 (bug 1501665)
Backed out changeset 520dd24a73fc (bug 1501665)
Backed out changeset 3542bf2b89dd (bug 1501665)
Backed out changeset 088dc24eabc7 (bug 1501665)
Backed out changeset 178210eb72ba (bug 1501665)
Backed out changeset 9eebe767ef20 (bug 1501665)
Backed out changeset 6a84e97d0e62 (bug 1501665)
Backed out changeset cf42ea4e8443 (bug 1501665)
Backed out changeset 731d7ee06d86 (bug 1501665)
Backed out changeset 8e0afe4a041a (bug 1501665)
Backed out changeset be1026de486b (bug 1501665)
2019-03-18 18:08:58 +02:00
Brad Werth
e77eba40ba Bug 1501665 Part 10: Modify viewport resize zoom scaling to account for clamped zoom levels. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21291

--HG--
extra : moz-landing-system : lando
2019-03-18 14:59:12 +00:00
Brad Werth
217c46ca45 Bug 1501665 Part 9: Early exit around an unnecessary call to UpdateVisualViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D21287

--HG--
extra : moz-landing-system : lando
2019-03-18 14:58:49 +00:00
Brad Werth
a4eaa45fd4 Bug 1501665 Part 8: Allow MVM::RequestReflow to adjust resolution, and do so when destroying the MVM. r=botond
Currently the MobileViewportManager leaves somethings permanently changed
even after it is destroyed: it may have changed the resolution of
the Document, and it may have set a fixed size for the visual viewport.
Both of these changes need to be un-done to return to normal display of
the Document.

Differential Revision: https://phabricator.services.mozilla.com/D17999

--HG--
extra : moz-landing-system : lando
2019-03-18 14:58:31 +00:00
Brad Werth
b43c639430 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : moz-landing-system : lando
2019-03-18 14:56:55 +00:00
Brad Werth
3ea8e6c214 Bug 1504659 Part 1: Make RefreshVisualViewportSize allow non-APZ zooming, and call it during RefreshViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D13173

--HG--
extra : moz-landing-system : lando
2019-01-16 21:56:54 +00:00
Cosmin Sabou
f621d8b160 Backed out 5 changesets (bug 1504659) for android reftest failures. CLOSED TREE
Backed out changeset 793e842be7f6 (bug 1504659)
Backed out changeset 229ed2090371 (bug 1504659)
Backed out changeset 0818e2b1f2c5 (bug 1504659)
Backed out changeset bd806b413342 (bug 1504659)
Backed out changeset 3e12097e2b60 (bug 1504659)
2019-01-16 21:23:39 +02:00
Brad Werth
0a5341e566 Bug 1504659 Part 1: Make RefreshVisualViewportSize allow non-APZ zooming, and call it during RefreshViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D13173

--HG--
extra : moz-landing-system : lando
2019-01-16 17:09:24 +00:00
Narcis Beleuzu
9d87d4782c Backed out 5 changesets (bug 1504659) for reftest failures on frame-reconstruction-scroll-clamping.html.
Backed out changeset 749c9dcbbd7f (bug 1504659)
Backed out changeset 783f7ccbd797 (bug 1504659)
Backed out changeset 231b16b0091e (bug 1504659)
Backed out changeset a88ccc9308e0 (bug 1504659)
Backed out changeset 738e1ee854eb (bug 1504659)
2019-01-15 07:34:58 +02:00
Brad Werth
d2660a3462 Bug 1504659 Part 1: Make RefreshVisualViewportSize allow non-APZ zooming, and call it during RefreshViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D13173

--HG--
extra : moz-landing-system : lando
2019-01-14 20:07:22 +00:00
Timothy Nikkel
865c9362f2 Bug 1515113. Fix compile. CLOSED TREE 2019-01-08 14:42:17 -06:00
Timothy Nikkel
ffd12d481b Bug 1515113. r=kats 2019-01-08 14:26:08 -06:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Cosmin Sabou
fc229ed2c7 Merge mozilla-inbound to mozilla-central. a=merge 2018-12-30 11:31:03 +02:00
Hiroyuki Ikezoe
c8743de655 Bug 1516368 - Unite ChangeOrigin::eRestore and eOther as ChangeOrigin::eMainThread. r=botond
Depends on D15340

Differential Revision: https://phabricator.services.mozilla.com/D15341

--HG--
extra : moz-landing-system : lando
2018-12-30 02:45:47 +00:00
Hiroyuki Ikezoe
529616ef3a Bug 1516368 - Change SetResolutionAndScaleTo to take an enum instead of an nsAtoms*. r=botond
There is no reason to use nsAtoms*, it's error prone, i.e. the function
can take arbitrary nsAtoms*.

Depends on D15339

Differential Revision: https://phabricator.services.mozilla.com/D15340

--HG--
extra : moz-landing-system : lando
2018-12-30 02:16:42 +00:00
Hiroyuki Ikezoe
aa9e0b7720 Bug 1516368 - Rename aViewportSize to aViewportOrContentSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15335

--HG--
extra : moz-landing-system : lando
2018-12-30 02:15:42 +00:00
Emilio Cobos Álvarez
f131713362 Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug
This is a big step in order to merge both.

Also allows to remove some very silly casts, though it causes us to add some
ToSupports around to deal with ambiguity of casts from nsIDocument to
nsISupports, and add a dummy nsISupports implementation that will go away later
in the series.

Differential Revision: https://phabricator.services.mozilla.com/D15352
2018-12-29 20:41:28 +01:00
Botond Ballo
4e2bbb39df Bug 1512267 - If you set a pres shell resolution, you must scale to it. r=kats,JanH
Differential Revision: https://phabricator.services.mozilla.com/D13928

--HG--
extra : moz-landing-system : lando
2018-12-10 19:32:59 +00:00
Narcis Beleuzu
d69962cc06 Backed out 2 changesets (bug 1504659) for mochitest failures on test_innerWidthHeight_script.html . CLOSED TREE
Backed out changeset f2574f5b186e (bug 1504659)
Backed out changeset 45f63618f66e (bug 1504659)
2018-12-05 22:19:24 +02:00
Botond Ballo
a88fd1acef Bug 1511137 - Track more accurately when the main thread originates a resolution change. r=kats
The tracking is done using nsAtom origins, similarly to how updates to the
scroll offset are tracked.

Currently, APZ still uses some heuristics to deduce that the main thread
originated a resolution change in some cases, but the intention is to try
to remove those and rely only on this mechanism in the future.

Differential Revision: https://phabricator.services.mozilla.com/D13741

--HG--
extra : moz-landing-system : lando
2018-12-05 16:29:18 +00:00
Brad Werth
268ef43bd7 Bug 1504659 Part 1: Make RefreshVisualViewportSize allow non-APZ zooming, and call it during RefreshViewportSize. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D13173

--HG--
extra : moz-landing-system : lando
2018-12-05 17:16:34 +00:00
Cameron McCormack
1ea7c3efc9 Bug 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin
Depends on D13686

Differential Revision: https://phabricator.services.mozilla.com/D13775

--HG--
extra : moz-landing-system : lando
2018-12-05 18:44:05 +00:00