Source/WebCore/ChangeLog

 12018-02-12 Chris Dumez <cdumez@apple.com>
 2
 3 REGRESSION (r228299): Broke reader mode in Safari
 4 https://bugs.webkit.org/show_bug.cgi?id=182697
 5 <rdar://problem/37399012>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Make the fix from r228299 more specific to the bug it was trying to fix by moving the
 10 policyChecker().stopCheck() call from the FrameLoader::stopLoading() to NavigationScheduler::schedule(),
 11 when a previous load gets cancelled. This greatly reduces the chances of bad side effects
 12 from this change. Reader mode works again and the sites fixed by r228299 still work after
 13 this more limited fix.
 14
 15 * loader/FrameLoader.cpp:
 16 (WebCore::FrameLoader::stopLoading):
 17 * loader/NavigationScheduler.cpp:
 18 (WebCore::NavigationScheduler::schedule):
 19
1202018-02-11 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
221
322 [GTK] Scrolling sometimes jumps around

Source/WebCore/loader/FrameLoader.cpp

@@void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
488488 DatabaseManager::singleton().stopDatabases(*document, nullptr);
489489 }
490490
491  policyChecker().stopCheck();
492 
493491 // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
494492 m_frame.navigationScheduler().cancel();
495493}

Source/WebCore/loader/NavigationScheduler.cpp

5050#include "Logging.h"
5151#include "NavigationDisabler.h"
5252#include "Page.h"
 53#include "PolicyChecker.h"
5354#include "ScriptController.h"
5455#include "UserGestureIndicator.h"
5556#include <wtf/CurrentTime.h>

@@void NavigationScheduler::schedule(std::unique_ptr<ScheduledNavigation> redirect
520521 if (redirect->wasDuringLoad()) {
521522 if (DocumentLoader* provisionalDocumentLoader = m_frame.loader().provisionalDocumentLoader())
522523 provisionalDocumentLoader->stopLoading();
 524 m_frame.loader().policyChecker().stopCheck();
523525 m_frame.loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);
524526 }
525527