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

17 Коммитов

Автор SHA1 Сообщение Дата
Daniel Holbert 912ec5051e Bug 1437623 part 2: (layout/base) Add missing includes/namespaces to preemptively fix unified bustage. r=mats
MozReview-Commit-ID: G4ufWWf9qRC

--HG--
extra : rebase_source : d7b814a8b9f5d3a6371eef14280598943a259c99
2018-02-13 09:08:42 -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
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
Daniel Holbert 2bf2cfcd23 (no bug) Tweak some source files in layout to have correct number of newline characters at the end (exactly 1). (no review, whitespace-only, DONTBUILD)
MozReview-Commit-ID: 1hEEkCMy0pL
2017-02-22 08:58:50 -08:00
Ting-Yu Lin 3a0b73989e Bug 1304598 Part 4 - Sort #include statements in TouchManager.cpp and PresShell.h. r=dholbert
Need to add #includes "nsPresContext.h" and "nsThreadUtils.h" in
PresShell.h, and "nsViewportInfo.h" in MobileViewportManager.h to compile.

MozReview-Commit-ID: F8bmOwllOiH

--HG--
extra : rebase_source : cacbb30d854c68ea720f849d03b649bbd3c5da03
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
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
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
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
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
Kartikaya Gupta bb9c2f839d Bug 1188172 - Don't update the resolution/SPCSPS for meta-viewport changes before the first-paint. r=botond 2015-08-02 22:50:54 -04:00
Kartikaya Gupta ed365c4387 Bug 1178847 - Add a MobileViewportManager to manage setting the CSS viewport on B2G. r=botond,tn
The MobileViewportManager ("MVM") is responsible for setting the CSS viewport on
any of the following events:
- a page is painted for the first time (on the before-first-paint event)
- a meta-viewport tag is added (on the DOMMetaAdded event)
- the full-zoom is changed (on the FullZoomChanged event)
- if the window is resized (ResizeReflow gets called as part of normal layout
  processing, and this will pick up a new CSS viewport from MVM)

If the CSS viewport changes or if it is the initial paint, the MVM additionally
calls SetResolutionAndScaleTo on the presShell to update the displayed zoom.
The APZ code in AsyncPanZoomController::NotifyLayersUpdated already has
corresponding code to accept this updated zoom when the CSS viewport changes.
2015-07-21 10:51:55 -04:00
Carsten "Tomcat" Book 214402e410 Backed out changeset 313ea7f814d3 (bug 1178847) 2015-07-21 08:34:57 +02:00
Kartikaya Gupta 86a7ae48ef Bug 1178847 - Add a MobileViewportManager to manage setting the CSS viewport on B2G. r=botond,tn
The MobileViewportManager ("MVM") is responsible for setting the CSS viewport on
any of the following events:
- a page is painted for the first time (on the before-first-paint event)
- a meta-viewport tag is added (on the DOMMetaAdded event)
- the full-zoom is changed (on the FullZoomChanged event)
- if the window is resized (ResizeReflow gets called as part of normal layout
  processing, and this will pick up a new CSS viewport from MVM)

If the CSS viewport changes or if it is the initial paint, the MVM additionally
calls SetResolutionAndScaleTo on the presShell to update the displayed zoom.
The APZ code in AsyncPanZoomController::NotifyLayersUpdated already has
corresponding code to accept this updated zoom when the CSS viewport changes.
2015-07-20 18:19:40 -04:00