gecko-dev/docshell/shistory
Jan Henning 70dd21256f Bug 1498812 - Part 9: Switch session store/session history to use visual viewport for scroll position tracking. r=mikedeboer,snorp
For simplicity's sake, for now we keep storing only one scroll position per
history entry (bug 1499210), so if we have to choose between the layout and the
visual viewport, the latter is a vastly better choice, as it more accurately
represents the scroll position as perceived by the user, especially when the
page has been pinch-zoomed.

This also means that instead of the normal scroll events, the session store now
has to listen for the corresponding events specific to the visual viewport.

We also extend the scroll position test to check that the scroll position isn't
just properly saved, but also actually properly restored in practice as well.
We only add this test now instead of already adding it beforehand like we did
with the rest of the test
- to avoid having to temporarily extend the checkScroll() helper function to
  deal with todo()/todo_is etc.
- because getting that part of the test to complete without timing out (which
  would be one of its natural failure modes, because the expected events would
  be missing) would require faking even more scroll events
- because we already have the todo() tests that are telling us the we didn't
  *store* any scroll position in the first place, so there's no point in trying
  to actually restore anything

For the GeckoView saveAndRestoreState test, we now spin the event loop once
before setting the scroll position in order to give APZ opportunity to settle
down after the initial page load.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 19:50:09 +00:00
..
ChildSHistory.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ChildSHistory.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
moz.build Bug 1488321 - Remove nsISHTransaction. r=nika 2018-09-05 09:02:37 +10:00
nsIBFCacheEntry.idl
nsISHEntry.idl Bug 1498812 - Part 9: Switch session store/session history to use visual viewport for scroll position tracking. r=mikedeboer,snorp 2019-01-11 19:50:09 +00:00
nsISHistory.idl Bug 1490524 - Streamline nsISHistory a little more. r=nika 2018-09-11 16:08:39 +10:00
nsISHistoryListener.idl Bug 1490158 - Add a clarifying comment. r=nika 2018-09-11 15:04:16 +10:00
nsSHEntry.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsSHEntry.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsSHEntryShared.cpp Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
nsSHEntryShared.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
nsSHistory.cpp Bug 1497995 - Make URI a constructor argument of nsDocShellLoadState; r=bzbarsky 2018-12-21 20:17:43 +00:00
nsSHistory.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ParentSHistory.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ParentSHistory.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00