Граф коммитов

60 Коммитов

Автор SHA1 Сообщение Дата
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
Ciure Andrei 8b45f141ca Backed out 2 changesets (bug 1504659) for browser_scroll.js failures CLOSED TREE
Backed out changeset bcebb3fd72d3 (bug 1504659)
Backed out changeset 1dbe3852e298 (bug 1504659)
2018-12-05 06:57:03 +02:00
Brad Werth 0f0088f7ee 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 02:55:25 +00:00
Botond Ballo cad1533d02 Bug 1511375 - Update the visual viewport size in UpdateResolution() if either the zoom or the display size might have changed. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D13578

--HG--
extra : moz-landing-system : lando
2018-12-01 05:34:57 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Botond Ballo 58464bd083 Bug 1509552 - Ensure MobileViewportManager doesn't choose a zoom level that makes the content smaller than the visual viewport. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D13315

--HG--
extra : moz-landing-system : lando
2018-11-30 00:59:11 +00:00
Botond Ballo 647b04cbf1 Bug 1509552 - MobileViewportManager::UpdateResolution cleanup, part 3. r=kats
Adds an |UpdateType| parameter to UpdateResolution() to better separate the
pre-reflow and post-reflow logic.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 00:58:56 +00:00
Botond Ballo 51c7ddc4f7 Bug 1509552 - MobileViewportManager::UpdateResolution cleanup, part 2. r=kats
* Call SetResolutionAndScaleTo() in just one place
* Call UpdateVisualViewportSize() in UpdateResolution() rather than
  requiring the caller to do it (and on non-first paints, only call it
  if the resolution has actually changed)

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

--HG--
extra : moz-landing-system : lando
2018-11-30 00:56:49 +00:00
Botond Ballo 3c27a3d1e2 Bug 1509552 - MobileViewportManager::UpdateResolution cleanup, part 1. r=kats
* Introduce helpers for converting between zoom and resolution
* Perform calculations in terms of zoom rather than resolution

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

--HG--
extra : moz-landing-system : lando
2018-11-30 01:01:13 +00:00
Hiroyuki Ikezoe 3b0508eef0 Bug 1423709 - Adapt initial zoom value to fit the wider contents to screen device width. r=botond
What we need to do here is to scale down the document as if the document was pinched in
to fit the contents to screen width when all the following conditions are met.

 - it's the first paint for the document
 - no initial-scale is specified in meta viewport tags
 - no mRestoreResolution hasn't set
 - the content width is wider than the initial viewport width

Depends on D10196

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

--HG--
extra : moz-landing-system : lando
2018-11-20 03:56:44 +00:00
Botond Ballo cd9f025985 Bug 1502566 - When entering fullscreen mode, use the intrinsic resolution rather than a resolution of 1. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D10754

--HG--
extra : moz-landing-system : lando
2018-11-02 21:18:42 +00:00
Arika Arnzen 29454d7afb Bug 1488910 - Rename remaining uses of "SPCSPS" to "visual viewport size". r=botond
--HG--
extra : rebase_source : 8272c090e436d42926bf0e0584ad8f1b402011bb
2018-09-14 15:23:28 -04:00
Jeremy Lempereur 96d35f35bd Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : f67d64ef18a643077d5019048399e68acc722337
2018-07-22 21:49:38 +02:00
Cosmin Sabou 7cf1ac297e Backed out changeset 542243f5f600 (bug 1471708) for failling reftest on gfx/layers/apz/test/reftest/async-scrollbar-1. 2018-08-05 07:57:50 +03:00
Jeremy Lempereur e591a6945a Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
MozReview-Commit-ID: IWPzXSF5jfR

--HG--
extra : rebase_source : 9d13a680ebf76a5f86c9040a5a16981514435dc8
2018-07-22 21:49:38 +02:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Boris Zbarsky 1dce94cf16 Bug 1449631 part 2. Remove nsIDOMEventTarget::RemoveEventListener. r=smaug
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().

MozReview-Commit-ID: 9iAg0ivVqqG
2018-04-05 13:42:40 -04:00
Cameron McCormack 6544b1a53f Bug 1420056 - Use #defines for MobileViewportManager / ZoomConstraintsClient constants. r=kats
MozReview-Commit-ID: 3GrYCi7kwpL

--HG--
extra : rebase_source : 1d4472cd778427bc9ea4d66c8aceb80dd221ffea
2017-11-23 14:06:15 +08:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Jan Henning 3dabcecae3 Bug 1312605 - Part 1 - Don't clobber resolution changes that happen before first paint on Fennec. r=kats
When going back/forward through a tab's session history, the saved resolution from the LayoutHistoryState is set on the PresShell before first paint. On Fennec, this means that it is subsequently going to be overwritten by the MobileViewportManager's default zoom calculation.

To fix this, we make use of the MVM's feature to set a "restored" resolution that will then be taken into account on first paint.

MozReview-Commit-ID: 43o97M6fiaZ

--HG--
extra : rebase_source : 0dda351784f3f5e3d88ec3e176b73974e96b71b7
2017-06-29 09:26:37 -07:00
Jan Henning 22c314f490 Bug 1312605 - Part 0 - Fix indentation in MVM. r=kats
MozReview-Commit-ID: FYAZNhVzPsb

--HG--
extra : rebase_source : 9dc0251763dc574e932b4508564d9ed8065f21c2
2017-06-28 11:23:02 -07:00
Sebastian Hengst 36ddc45095 Backed out changeset 8a07aa497968 (bug 1312605) for failing mobile/android/tests/browser/chrome/test_session_scroll_position.html. r=backout 2017-06-29 05:06:15 +02:00
Sebastian Hengst 37b8fdc065 Backed out changeset e1283673d436 (bug 1312605) 2017-06-29 05:05:05 +02:00
Jan Henning 657e52aaed Bug 1312605 - Part 1 - Don't clobber resolution changes that happen before first paint on Fennec. r=kats
When going back/forward through a tab's session history, the saved resolution from the LayoutHistoryState is set on the PresShell before first paint. On Fennec, this means that it is subsequently going to be overwritten by the MobileViewportManager's default zoom calculation.

To fix this, we make use of the MVM's feature to set a "restored" resolution that will then be taken into account on first paint.

MozReview-Commit-ID: 43o97M6fiaZ

--HG--
extra : rebase_source : 45d29057de137cb306617481311622c6ca620fa3
2017-06-28 16:13:01 -07:00
Jan Henning af9f59581a Bug 1312605 - Part 0 - Fix indentation in MVM. r=kats
MozReview-Commit-ID: FYAZNhVzPsb

--HG--
extra : rebase_source : 9dc0251763dc574e932b4508564d9ed8065f21c2
2017-06-28 11:23:02 -07:00
Timothy Nikkel 5587bb56c5 Bug 1346109. Set a displayport base rect in MobileViewportManager::UpdateDisplayPortMargins when we are setting displayport margins. r=botond
It's easy to calculate because it's always a root content document.
2017-03-21 00:16:41 -05:00
Ting-Yu Lin 4174a3a87e Bug 1304598 Part 3 - Rename nsPresShell.h/cpp to PresShell.h/cpp, and move exported header to mozilla/ subdir. r=dholbert
The class PresShell doesn't have ns-prefix, so it's better to drop ns-prefix
in the file names to avoid confusion.

MozReview-Commit-ID: IljxsF5CVjh

--HG--
rename : layout/base/nsPresShell.cpp => layout/base/PresShell.cpp
rename : layout/base/nsPresShell.h => layout/base/PresShell.h
extra : rebase_source : e73a6873f360a7223d87bd22d9854fc9603c499f
2016-11-30 11:14:28 +08:00
Jan Henning 47101d08ae Bug 1282902 - Part 3 - Let the MobileViewportManager recalculate the saved resolution if the display width changed before restoring. r=kats
The mobile session store saves the current document resolution in order to restore the previous zoom level when restoring a page. If the display width has changed since the session data was captured (e.g. because the device was rotated), the resolution might have to be scaled appropriately.
Currently, the session store does this scaling by itself by comparing the stored and current window widths, however this implementation is slightly simplified and doesn't cover all use cases, which means some pages can be restored at a wrong zoom level after rotation. To correctly cover all cases, the session store would have to compare viewport widths, too.

Because the MobileViewportManager doesn't wait for the session store to set the restore resolution, the latter has to call setRestoreResolution() as early as possible in order to guarantee that the restore resolution is set before the first paint of the document. Therefore the session store currently calls this after receiving a LocationChange notification. However at that time, the correct viewport for the current document is not yet available, which means the resolution cannot be recalculated by the session store at that point.

Therefore, this patch changes the approach taken and lets the MVM handle all resolution calculations instead. The session store now simply passes the stored previous display dimensions along with the previous document resolution to the MVM, which can then compare them to the current display and viewport widths and scale the resolution appropriately before using it during first paint.


MozReview-Commit-ID: IGxWw87yftK

--HG--
extra : transplant_source : e%8D%BD%26%D2%C3%8E5%E3%2B%C0t%BA%DB%C1%BBs%3F%13%1F
2016-07-01 21:23:25 +02:00
Jan Henning 070a561665 Bug 1282902 - Part 2 - Extract resolution scaling into separate function. r=kats
We'll want to use this during first-paint, too, in order to correctly scale the resolution as received by the session store if we're restoring a previous tab. Therefore we extract this code into a separate helper function.

MozReview-Commit-ID: KCdvmyrP4mJ

--HG--
extra : transplant_source : c%BD%99%9D%F8%9EW%D2%8B%BD%E0a%82%ED%3B%EE%EF%ACl%D6
2016-07-02 22:15:19 +02:00
Matt Woodrow 58b82b3f90 Bug 881832 - Specify whether the height has changed when calling PresShell::ResizeReflow, since the PresContext size might have already been updated. r=dbaron 2016-05-12 12:06:11 +12:00
Phil Ringnalda 6bb0bc4494 Back out 6 changesets (bug 881832) for failures in test_Debugger.Source.prototype.element.html
CLOSED TREE

Backed out changeset fac50ce10b07 (bug 881832)
Backed out changeset 32e01c144cd4 (bug 881832)
Backed out changeset 779f5336b81e (bug 881832)
Backed out changeset 95efd250e29f (bug 881832)
Backed out changeset 7fe79f07189f (bug 881832)
Backed out changeset 8ee1824f2a57 (bug 881832)
2016-05-23 18:34:49 -07:00
Matt Woodrow 396c2df3ff Bug 881832 - Specify whether the height has changed when calling PresShell::ResizeReflow, since the PresContext size might have already been updated. r=dbaron 2016-05-12 12:06:11 +12:00
Kartikaya Gupta b9e4a263e3 Bug 1270019 - Add a SetRestoreResolution API for fennec's SessionRestore to use. r=rbarker
MozReview-Commit-ID: 7WqmgAkFItQ
2016-05-17 14:50:08 -04:00
Phil Ringnalda c6417cc01e Back out 5 changesets (bug 881832) for failures in browser_html_tooltip-02.js
Backed out changeset 117e8e24d714 (bug 881832)
Backed out changeset 8a0d5df41cfb (bug 881832)
Backed out changeset 6b3c5e185b04 (bug 881832)
Backed out changeset 11106afdcbe7 (bug 881832)
Backed out changeset d711b7c19a43 (bug 881832)
2016-05-11 21:08:08 -07:00
Matt Woodrow 175d6d32b1 Bug 881832 - Specify whether the height has changed when calling PresShell::ResizeReflow, since the PresContext size might have already been updated. r=dbaron
--HG--
extra : rebase_source : 05e6b4100b881848c78a5323d5ada4b65cf9963e
2016-05-12 12:06:11 +12:00
Nathan Froyd 5672bb749c Bug 1259733 - use forward declarations for nsIDocument in a few places; r=dholbert
This is sufficient for nsCSSFrameConstructor.h's needs, and the
corresponding C++ file already includes nsIDocument.h.
2016-04-27 14:48:36 -04:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Kartikaya Gupta 1b8ce76eee Bug 1233468 - If we get the load event before the before-first-paint, make sure the CSS viewport is set up properly for content load listeners. r=tnikkel
--HG--
extra : commitid : 2aMyjyc2i9C
2016-01-12 09:47:29 -05:00
Tooru Fujisawa 4fac62d240 Bug 382721 - Part 0: Add missing includes and namespaces. r=jrmuizel 2015-09-10 19:24:34 +09:00
Botond Ballo b9aee9ebb5 Bug 1194851 - Add helper functions HasDisplayPort() and HasCriticalDisplayPort(). r=kats
This makes it clearer whether we're just checking if a displayport exists,
or we're actually consuming its value.

--HG--
extra : source : 70bb222e860669a6cf6e803dbd57f088ca4fbc04
2015-12-16 17:22:23 -05:00
Kartikaya Gupta 02c2652ed5 Bug 1225508 - Add a displayport on non-scrollable frames which have a resolution. r=botond 2015-11-27 11:20:04 -05:00
Kartikaya Gupta 3f1887d8f0 Bug 1226872 - Remove unnecessary wrapper methods in nsLayoutUtils. r=roc
--HG--
extra : commitid : 6XdZwhzPuoM
2015-11-23 09:14:18 -05:00
Kartikaya Gupta 3bdf2299bb Bug 1225571 - Move the code to update the SPCSPS from repaint request handling to when the resolution is updated in the presShell. r=botond
--HG--
extra : commitid : JglAPUfEC3G
2015-11-18 13:53:14 -05:00
Nathan Froyd 4331d7171e Bug 1217939 - part 1 - remove nsContentUtils::GetViewportInfo; r=smaug
All it was doing was forwarding to the provided document, which is an
unnecessary layer of indirection.
2015-10-23 13:21:57 -04:00
Kartikaya Gupta 5cf75acb53 Bug 1208023 - Ensure the minimum scale is a sane value greater than zero and add a separate flag to track if the default zoom is valid. r=botond
--HG--
extra : commitid : Iy421h6bUZN
2015-10-02 23:08:18 -04:00
Botond Ballo 72a3a301c4 Bug 1205511 - Use nsPresContext::DevToCSSPixelScale() where appropriate. r=kats
--HG--
extra : source : 16ed1b039eb1522f555c35e9df6e5632c69ff0a4
2015-09-28 20:14:26 -04:00