gecko-dev/dom/interfaces/base
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
..
domstubs.idl Bug 1256178 - Drop the moz prefix from the MozCSSKeyframeRule and MozCSSKeyframesRule interfaces; r=bzbarsky 2016-03-15 10:23:01 -04:00
moz.build Bug 909154. Remove the prefixed mozRequestAnimationFrame and its accoutrements. r=bkelly 2015-07-20 10:14:24 -04:00
nsIBrowserDOMWindow.idl Bug 1245124 - window.open() should open a new tab in the same container, r=gijs, r=smaug 2016-02-18 08:33:07 +00:00
nsIContentPermissionPrompt.idl Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
nsIContentPrefService2.idl
nsIContentPrefService.idl Bug 1255576 - Propagate privacy status for removed content preferences to observers. r=adw 2016-04-04 15:25:58 -04:00
nsIContentURIGrouper.idl
nsIDOMChromeWindow.idl
nsIDOMClientRect.idl
nsIDOMClientRectList.idl
nsIDOMConstructor.idl
nsIDOMCrypto.idl
nsIDOMGlobalPropertyInitializer.idl Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
nsIDOMHistory.idl
nsIDOMLocation.idl
nsIDOMModalContentWindow.idl
nsIDOMNavigator.idl
nsIDOMScreen.idl
nsIDOMWindow.idl Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
nsIDOMWindowCollection.idl Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
nsIDOMWindowUtils.idl Bug 1282902 - Part 3 - Let the MobileViewportManager recalculate the saved resolution if the display width changed before restoring. r=kats 2016-07-01 21:23:25 +02:00
nsIFocusManager.idl Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
nsIIdleObserver.idl
nsIQueryContentEventResult.idl Bug 1203871 - Part 4. Implement QUERY_TEXT_RECT_ARRAY to nsIDOMWindowUtils for unit test. r=masayuki,smaug 2016-06-23 10:42:00 +01:00
nsIRemoteBrowser.idl
nsIServiceWorkerManager.idl Bug 1265841 - Implement the notificationclose service worker event. r=wchen,baku 2016-04-19 22:04:09 -07:00
nsIStructuredCloneContainer.idl Bug 1250185 part 1. nsIStructuredCloneContainer.initFromBase64 doesn't need a JSContext argument. r=khuey 2016-02-23 15:02:32 -05:00
nsITabChild.idl Bug 1255138 - Window resize support from JS for e10s. r=mconley 2016-05-11 11:44:57 +02:00
nsITabParent.idl Bug 1271240 - Part 1: Support prerender flag in e10s and implement makePrerenderedBrowserActive(). r=smaug 2016-05-20 11:36:27 +08:00
nsITextInputProcessor.idl Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
nsITextInputProcessorCallback.idl