| Differences between
and this patch
- a/Source/WebCore/ChangeLog +19 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2018-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
1
2018-02-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
20
2018-02-11  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2
21
3
        [GTK] Scrolling sometimes jumps around
22
        [GTK] Scrolling sometimes jumps around
- a/Source/WebCore/loader/FrameLoader.cpp -2 lines
Lines 488-495 void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy) a/Source/WebCore/loader/FrameLoader.cpp_sec1
488
        DatabaseManager::singleton().stopDatabases(*document, nullptr);
488
        DatabaseManager::singleton().stopDatabases(*document, nullptr);
489
    }
489
    }
490
490
491
    policyChecker().stopCheck();
492
493
    // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
491
    // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
494
    m_frame.navigationScheduler().cancel();
492
    m_frame.navigationScheduler().cancel();
495
}
493
}
- a/Source/WebCore/loader/NavigationScheduler.cpp +2 lines
Lines 50-55 a/Source/WebCore/loader/NavigationScheduler.cpp_sec1
50
#include "Logging.h"
50
#include "Logging.h"
51
#include "NavigationDisabler.h"
51
#include "NavigationDisabler.h"
52
#include "Page.h"
52
#include "Page.h"
53
#include "PolicyChecker.h"
53
#include "ScriptController.h"
54
#include "ScriptController.h"
54
#include "UserGestureIndicator.h"
55
#include "UserGestureIndicator.h"
55
#include <wtf/CurrentTime.h>
56
#include <wtf/CurrentTime.h>
Lines 520-525 void NavigationScheduler::schedule(std::unique_ptr<ScheduledNavigation> redirect a/Source/WebCore/loader/NavigationScheduler.cpp_sec2
520
    if (redirect->wasDuringLoad()) {
521
    if (redirect->wasDuringLoad()) {
521
        if (DocumentLoader* provisionalDocumentLoader = m_frame.loader().provisionalDocumentLoader())
522
        if (DocumentLoader* provisionalDocumentLoader = m_frame.loader().provisionalDocumentLoader())
522
            provisionalDocumentLoader->stopLoading();
523
            provisionalDocumentLoader->stopLoading();
524
        m_frame.loader().policyChecker().stopCheck();
523
        m_frame.loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);
525
        m_frame.loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);
524
    }
526
    }
525
527

Return to Bug 182697