Changeset 212587 in webkit


Ignore:
Timestamp:
Feb 17, 2017 3:39:30 PM (7 years ago)
Author:
matthew_hanson@apple.com
Message:

Roll out r212173 via r212500. rdar://problem/29904368

Location:
branches/safari-603-branch
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-603-branch/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html

    r212500 r212587  
    1111    testRunner.setCanOpenWindows();
    1212    testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
     13    testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    1314}
    1415
  • branches/safari-603-branch/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html

    r212500 r212587  
    2323        testRunner.setCanOpenWindows();
    2424        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
     25        testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    2526    }
    2627    log("open page with data urls");
  • branches/safari-603-branch/LayoutTests/fast/harness/use-page-cache.html

    r212500 r212587  
    2929        testRunner.setCanOpenWindows();
    3030        testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
     31        testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    3132    }
    3233    log("open page-1");
  • branches/safari-603-branch/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html

    r212500 r212587  
    1515        testRunner.setCanOpenWindows();
    1616        testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
     17        testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    1718    }
    1819    testWindow = window.open('resources/no-popstate-when-back-to-stateless-entry-1.html');
  • branches/safari-603-branch/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html

    r212500 r212587  
    1515        testRunner.setCanOpenWindows();
    1616        testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1);
     17        testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    1718    }
    1819    testWindow = window.open('resources/popstate-fires-with-page-cache-1.html');
  • branches/safari-603-branch/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html

    r212500 r212587  
    88            testRunner.setCanOpenWindows();
    99            testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1);
     10            testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);
    1011        }
    1112
  • branches/safari-603-branch/Source/WebCore/ChangeLog

    r212586 r212587  
     12017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Rollout r212500. rdar://problem/29904368
     4
    152017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
    26
  • branches/safari-603-branch/Source/WebCore/dom/Document.cpp

    r212586 r212587  
    3737#include "CSSStyleSheet.h"
    3838#include "CachedCSSStyleSheet.h"
    39 #include "CachedFrame.h"
    4039#include "CachedResourceLoader.h"
    4140#include "Chrome.h"
     
    837836}
    838837
     838bool Document::hasEverCalledWindowOpen() const
     839{
     840    auto& topDocument = this->topDocument();
     841    if (&topDocument == this)
     842        return m_hasEverCalledWindowOpen;
     843    return topDocument.hasEverCalledWindowOpen();
     844}
     845
     846void Document::markHasCalledWindowOpen()
     847{
     848    auto& topDocument = this->topDocument();
     849    if (&topDocument == this)
     850        m_hasEverCalledWindowOpen = true;
     851    else
     852        topDocument.markHasCalledWindowOpen();
     853}
     854
    839855DocumentType* Document::doctype() const
    840856{
     
    22072223}
    22082224
     2225void Document::disconnectFromFrame()
     2226{
     2227    observeFrame(nullptr);
     2228}
     2229
    22092230void Document::frameDestroyed()
    22102231{
    2211     // detachFromFrame() must be called before destroying the Frame.
     2232    // disconnectFromFrame() must be called before destroying the Frame.
    22122233    ASSERT_WITH_SECURITY_IMPLICATION(!m_frame);
    22132234    FrameDestructionObserver::frameDestroyed();
    2214 }
    2215 
    2216 void Document::attachToCachedFrame(CachedFrameBase& cachedFrame)
    2217 {
    2218     ASSERT_WITH_SECURITY_IMPLICATION(cachedFrame.document() == this);
    2219     ASSERT(cachedFrame.view());
    2220     ASSERT(m_pageCacheState == Document::InPageCache);
    2221     observeFrame(&cachedFrame.view()->frame());
    2222 }
    2223 
    2224 void Document::detachFromCachedFrame(CachedFrameBase& cachedFrame)
    2225 {
    2226     ASSERT_WITH_SECURITY_IMPLICATION(cachedFrame.document() == this);
    2227     ASSERT(cachedFrame.view());
    2228     ASSERT(m_frame == &cachedFrame.view()->frame());
    2229     ASSERT(m_pageCacheState == Document::InPageCache);
    2230     detachFromFrame();
    22312235}
    22322236
     
    23472351#endif
    23482352
    2349     detachFromFrame();
     2353    disconnectFromFrame();
    23502354
    23512355    m_hasPreparedForDestruction = true;
  • branches/safari-603-branch/Source/WebCore/dom/Document.h

    r212500 r212587  
    8282class CSSStyleSheet;
    8383class CachedCSSStyleSheet;
    84 class CachedFrameBase;
    8584class CachedResourceLoader;
    8685class CachedScript;
     
    377376
    378377    bool hasManifest() const;
     378
     379    bool hasEverCalledWindowOpen() const;
     380    void markHasCalledWindowOpen();
    379381   
    380382    WEBCORE_EXPORT ExceptionOr<Ref<Element>> createElementForBindings(const AtomicString& tagName);
     
    563565    void didBecomeCurrentDocumentInFrame();
    564566    void destroyRenderTree();
     567    void disconnectFromFrame();
    565568    void prepareForDestruction();
    566569
     
    13001303    const HashSet<ShadowRoot*>& inDocumentShadowRoots() const { return m_inDocumentShadowRoots; }
    13011304
    1302     void attachToCachedFrame(CachedFrameBase&);
    1303     void detachFromCachedFrame(CachedFrameBase&);
    1304 
    13051305protected:
    13061306    enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 << 1 };
     
    13151315    friend class IgnoreDestructiveWriteCountIncrementer;
    13161316    friend class IgnoreOpensDuringUnloadCountIncrementer;
    1317 
    1318     void detachFromFrame() { observeFrame(nullptr); }
    13191317
    13201318    void updateTitleElement(Element* newTitleElement);
     
    14961494
    14971495    Timer m_styleRecalcTimer;
     1496    bool m_hasEverCalledWindowOpen { false };
    14981497    bool m_pendingStyleRecalcShouldForce;
    14991498    bool m_inStyleRecalc;
  • branches/safari-603-branch/Source/WebCore/history/CachedFrame.cpp

    r212500 r212587  
    7676}
    7777
    78 void CachedFrameBase::pruneDetachedChildFrames()
    79 {
    80     for (size_t i = m_childFrames.size(); i;) {
    81         --i;
    82         if (m_childFrames[i]->view()->frame().page())
    83             continue;
    84         m_childFrames[i]->destroy();
    85         m_childFrames.remove(i);
    86     }
    87 }
    88 
    8978void CachedFrameBase::restore()
    9079{
     
    11099    frame.loader().client().didRestoreFromPageCache();
    111100
    112     pruneDetachedChildFrames();
    113 
    114101    // Reconstruct the FrameTree. And open the child CachedFrames in their respective FrameLoaders.
    115102    for (unsigned i = 0; i < m_childFrames.size(); ++i) {
    116         ASSERT(m_childFrames[i]->view()->frame().page());
    117103        frame.tree().appendChild(&m_childFrames[i]->view()->frame());
    118104        m_childFrames[i]->open();
     
    206192#endif
    207193
    208     m_document->detachFromCachedFrame(*this);
    209 
    210194    ASSERT_WITH_SECURITY_IMPLICATION(!m_documentLoader->isLoading());
    211195}
     
    214198{
    215199    ASSERT(m_view);
    216     ASSERT(m_document);
    217200    if (!m_isMainFrame)
    218201        m_view->frame().page()->incrementSubframeCount();
    219 
    220     m_document->attachToCachedFrame(*this);
    221202
    222203    m_view->frame().loader().open(*this);
     
    255236    ASSERT(m_document->pageCacheState() == Document::InPageCache);
    256237    ASSERT(m_view);
    257     ASSERT(!m_document->frame());
     238    ASSERT(m_document->frame() == &m_view->frame());
    258239
    259240    m_document->domWindow()->willDestroyCachedFrame();
    260241
    261     if (!m_isMainFrame && m_view->frame().page()) {
     242    if (!m_isMainFrame) {
    262243        m_view->frame().loader().detachViewsAndDocumentLoader();
    263244        m_view->frame().detachFromPage();
     
    271252
    272253    Frame::clearTimers(m_view.get(), m_document.get());
    273 
    274     m_view->frame().animation().detachFromDocument(m_document.get());
    275254
    276255    // FIXME: Why do we need to call removeAllEventListeners here? When the document is in page cache, this method won't work
  • branches/safari-603-branch/Source/WebCore/history/CachedFrame.h

    r212500 r212587  
    5353    CachedFrameBase(Frame&);
    5454    ~CachedFrameBase();
    55 
    56     void pruneDetachedChildFrames();
    57 
     55   
    5856    RefPtr<Document> m_document;
    5957    RefPtr<DocumentLoader> m_documentLoader;
  • branches/safari-603-branch/Source/WebCore/history/PageCache.cpp

    r212500 r212587  
    194194    DiagnosticLoggingClient& diagnosticLoggingClient = page.diagnosticLoggingClient();
    195195    bool isCacheable = canCacheFrame(page.mainFrame(), diagnosticLoggingClient, indentLevel + 1);
     196
     197    if (page.openedByWindowOpen() && !page.settings().allowsPageCacheWithWindowOpener()) {
     198        PCLOG("   -Page has been opened via window.open()");
     199        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasOpenerKey());
     200        isCacheable = false;
     201    }
     202
     203    auto* topDocument = page.mainFrame().document();
     204    if (topDocument && topDocument->hasEverCalledWindowOpen()) {
     205        PCLOG("   -Page has called window.open()");
     206        logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasCalledWindowOpenKey());
     207        isCacheable = false;
     208    }
    196209   
    197210    if (!page.settings().usesPageCache() || page.isResourceCachingDisabled()) {
  • branches/safari-603-branch/Source/WebCore/html/HTMLFrameElementBase.cpp

    r212532 r212587  
    152152        return;
    153153
    154     // DocumentFragments don't kick off any loads.
     154    // DocumentFragments don't kick of any loads.
    155155    if (!document().frame())
    156156        return;
  • branches/safari-603-branch/Source/WebCore/loader/FrameLoader.cpp

    r212500 r212587  
    25122512void FrameLoader::frameDetached()
    25132513{
    2514     // Calling stopAllLoaders() can cause the frame to be deallocated, including the frame loader.
     2514    // Calling stopAllLoaders can cause the frame to be deallocated, including the frame loader.
    25152515    Ref<Frame> protectedFrame(m_frame);
    25162516
    2517     if (m_frame.document()->pageCacheState() != Document::InPageCache) {
    2518         stopAllLoaders();
    2519         m_frame.document()->stopActiveDOMObjects();
    2520     }
    2521 
     2517    stopAllLoaders();
     2518    m_frame.document()->stopActiveDOMObjects();
    25222519    detachFromParent();
    25232520}
     
    25252522void FrameLoader::detachFromParent()
    25262523{
    2527     // Calling stopAllLoaders() can cause the frame to be deallocated, including the frame loader.
    25282524    Ref<Frame> protect(m_frame);
    25292525
     
    25312527    history().saveScrollPositionAndViewStateToItem(history().currentItem());
    25322528    detachChildren();
    2533     if (m_frame.document()->pageCacheState() != Document::InPageCache) {
    2534         // stopAllLoaders() needs to be called after detachChildren() if the document is not in the page cache,
    2535         // because detachedChildren() will trigger the unload event handlers of any child frames, and those event
    2536         // handlers might start a new subresource load in this frame.
    2537         stopAllLoaders();
    2538     }
     2529    // stopAllLoaders() needs to be called after detachChildren(), because detachedChildren()
     2530    // will trigger the unload event handlers of any child frames, and those event
     2531    // handlers might start a new subresource load in this frame.
     2532    stopAllLoaders();
    25392533
    25402534    InspectorInstrumentation::frameDetachedFromParent(m_frame);
  • branches/safari-603-branch/Source/WebCore/page/DOMWindow.cpp

    r212500 r212587  
    21972197    newFrame->loader().setOpener(&openerFrame);
    21982198    newFrame->page()->setOpenedByDOM();
     2199    if (auto* openerDocument = openerFrame.document())
     2200        openerDocument->markHasCalledWindowOpen();
    21992201
    22002202    if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
  • branches/safari-603-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp

    r212500 r212587  
    664664}
    665665
     666String DiagnosticLoggingKeys::hasCalledWindowOpenKey()
     667{
     668    return ASCIILiteral("hasCalledWindowOpen");
     669}
     670
     671String DiagnosticLoggingKeys::hasOpenerKey()
     672{
     673    return ASCIILiteral("hasOpener");
     674}
     675
    666676String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey()
    667677{
  • branches/safari-603-branch/Source/WebCore/page/DiagnosticLoggingKeys.h

    r212500 r212587  
    5656    static String expiredKey();
    5757    static String fontKey();
     58    static String hasCalledWindowOpenKey();
     59    static String hasOpenerKey();
    5860    static String hasPluginsKey();
    5961    static String httpsNoStoreKey();
  • branches/safari-603-branch/Source/WebCore/page/Page.cpp

    r212500 r212587  
    462462}
    463463
     464bool Page::openedByWindowOpen() const
     465{
     466    auto* document = m_mainFrame->document();
     467    if (!document)
     468        return false;
     469    auto* window = document->domWindow();
     470    if (!window)
     471        return false;
     472    return window->opener();
     473}
     474
    464475void Page::goToItem(HistoryItem& item, FrameLoadType type)
    465476{
  • branches/safari-603-branch/Source/WebCore/page/Page.h

    r212500 r212587  
    181181    void setOpenedByDOM();
    182182
     183    bool openedByWindowOpen() const;
     184
    183185    WEBCORE_EXPORT void goToItem(HistoryItem&, FrameLoadType);
    184186
  • branches/safari-603-branch/Source/WebCore/page/Settings.in

    r212500 r212587  
    298298
    299299shouldSuppressKeyboardInputDuringProvisionalNavigation initial=false
     300
     301allowsPageCacheWithWindowOpener initial=false
  • branches/safari-603-branch/Source/WebKit/mac/ChangeLog

    r212538 r212587  
     12017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Rollout r212500. rdar://problem/29904368
     4
    152017-02-16  Matthew Hanson  <matthew_hanson@apple.com>
    26
  • branches/safari-603-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h

    r212500 r212587  
    8484#define WebKitDOMPasteAllowedPreferenceKey @"WebKitDOMPasteAllowedPreferenceKey"
    8585#define WebKitUsesPageCachePreferenceKey @"WebKitUsesPageCachePreferenceKey"
     86#define WebKitAllowsPageCacheWithWindowOpenerKey @"WebKitAllowsPageCacheWithWindowOpenerKey"
    8687#define WebKitPageCacheSupportsPluginsPreferenceKey @"WebKitPageCacheSupportsPluginsPreferenceKey"
    8788#define WebKitFTPDirectoryTemplatePath @"WebKitFTPDirectoryTemplatePath"
  • branches/safari-603-branch/Source/WebKit/mac/WebView/WebPreferences.mm

    r212500 r212587  
    479479#endif
    480480        [NSNumber numberWithBool:YES],  WebKitUsesPageCachePreferenceKey,
     481        [NSNumber numberWithBool:NO],   WebKitAllowsPageCacheWithWindowOpenerKey,
    481482        [NSNumber numberWithInt:cacheModelForMainBundle()], WebKitCacheModelPreferenceKey,
    482483        [NSNumber numberWithBool:YES],  WebKitPageCacheSupportsPluginsPreferenceKey,
     
    24322433}
    24332434
     2435- (BOOL)allowsPageCacheWithWindowOpener
     2436{
     2437    return [self _boolValueForKey:WebKitAllowsPageCacheWithWindowOpenerKey];
     2438}
     2439
     2440- (void)setAllowsPageCacheWithWindowOpener:(BOOL)flag
     2441{
     2442    [self _setBoolValue:flag forKey:WebKitAllowsPageCacheWithWindowOpenerKey];
     2443}
     2444
    24342445#if PLATFORM(IOS)
    24352446- (void)_invalidateCachedPreferences
  • branches/safari-603-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h

    r212500 r212587  
    296296- (void)setPictographFontFamily:(NSString *)family;
    297297
     298- (BOOL)allowsPageCacheWithWindowOpener;
     299- (void)setAllowsPageCacheWithWindowOpener:(BOOL)flag;
     300
    298301- (BOOL)pageCacheSupportsPlugins;
    299302- (void)setPageCacheSupportsPlugins:(BOOL)flag;
  • branches/safari-603-branch/Source/WebKit/mac/WebView/WebView.mm

    r212500 r212587  
    26682668    settings.setDOMPasteAllowed([preferences isDOMPasteAllowed]);
    26692669    settings.setUsesPageCache([self usesPageCache]);
     2670    settings.setAllowsPageCacheWithWindowOpener([preferences allowsPageCacheWithWindowOpener]);
    26702671    settings.setPageCacheSupportsPlugins([preferences pageCacheSupportsPlugins]);
    26712672    settings.setBackForwardCacheExpirationInterval([preferences _backForwardCacheExpirationInterval]);
  • branches/safari-603-branch/Source/WebKit/win/ChangeLog

    r212585 r212587  
     12017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Rollout r212500. rdar://problem/29904368
     4
    152017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
    26
  • branches/safari-603-branch/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl

    r212500 r212587  
    9191    HRESULT experimentalNotificationsEnabled([out, retval] BOOL *enabled);
    9292    HRESULT setExperimentalNotificationsEnabled([in] BOOL enabled);
     93
     94    HRESULT allowsPageCacheWithWindowOpener([out, retval] BOOL* usesPageCache);
     95    HRESULT setAllowsPageCacheWithWindowOpener([in] BOOL usesPageCache);
    9396
    9497    HRESULT setShouldUseHighResolutionTimers([in] BOOL useHighResolutionTimers);
  • branches/safari-603-branch/Source/WebKit/win/WebPreferenceKeysPrivate.h

    r212500 r212587  
    6969#define WebKitIconDatabaseEnabledPreferenceKey "WebKitIconDatabaseEnabled"
    7070#define WebKitUsesPageCachePreferenceKey "WebKitUsesPageCachePreferenceKey"
     71#define WebKitAllowsPageCacheWithWindowOpenerKey "WebKitAllowsPageCacheWithWindowOpenerKey"
    7172#define WebKitCacheModelPreferenceKey "WebKitCacheModelPreferenceKey"
    7273#define WebKitLocalStorageDatabasePathPreferenceKey "WebKitLocalStorageDatabasePath"
  • branches/safari-603-branch/Source/WebKit/win/WebPreferences.cpp

    r212500 r212587  
    263263    CFDictionaryAddValue(defaults, CFSTR(AllowContinuousSpellCheckingPreferenceKey), kCFBooleanTrue);
    264264    CFDictionaryAddValue(defaults, CFSTR(WebKitUsesPageCachePreferenceKey), kCFBooleanTrue);
     265    CFDictionaryAddValue(defaults, CFSTR(WebKitAllowsPageCacheWithWindowOpenerKey), kCFBooleanFalse);
    265266    CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageDatabasePathPreferenceKey), CFSTR(""));
    266267
     
    16051606}
    16061607
     1608HRESULT WebPreferences::setAllowsPageCacheWithWindowOpener(BOOL value)
     1609{
     1610    setBoolValue(WebKitAllowsPageCacheWithWindowOpenerKey, value);
     1611    return S_OK;
     1612}
     1613
     1614HRESULT WebPreferences::allowsPageCacheWithWindowOpener(_Out_ BOOL* enabled)
     1615{
     1616    if (!enabled)
     1617        return E_POINTER;
     1618    *enabled = boolValueForKey(WebKitAllowsPageCacheWithWindowOpenerKey);
     1619    return S_OK;
     1620}
     1621
    16071622HRESULT WebPreferences::setZoomsTextOnly(BOOL zoomsTextOnly)
    16081623{
  • branches/safari-603-branch/Source/WebKit/win/WebPreferences.h

    r212500 r212587  
    160160    virtual HRESULT STDMETHODCALLTYPE experimentalNotificationsEnabled(_Out_ BOOL*);
    161161    virtual HRESULT STDMETHODCALLTYPE setExperimentalNotificationsEnabled(BOOL);
     162    virtual HRESULT STDMETHODCALLTYPE allowsPageCacheWithWindowOpener(_Out_ BOOL*);
     163    virtual HRESULT STDMETHODCALLTYPE setAllowsPageCacheWithWindowOpener(BOOL);
    162164
    163165    // These two methods are no-ops, and only retained to keep
  • branches/safari-603-branch/Source/WebKit/win/WebView.cpp

    r212500 r212587  
    54025402    settings.setExperimentalNotificationsEnabled(enabled);
    54035403
     5404    hr = prefsPrivate->allowsPageCacheWithWindowOpener(&enabled);
     5405    if (FAILED(hr))
     5406        return hr;
     5407    settings.setAllowsPageCacheWithWindowOpener(enabled);
     5408
    54045409    hr = prefsPrivate->isWebSecurityEnabled(&enabled);
    54055410    if (FAILED(hr))
  • branches/safari-603-branch/Source/WebKit2/ChangeLog

    r212538 r212587  
     12017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Rollout r212500. rdar://problem/29904368
     4
    152017-02-16  Matthew Hanson  <matthew_hanson@apple.com>
    26
  • branches/safari-603-branch/Source/WebKit2/Shared/WebPreferencesDefinitions.h

    r212500 r212587  
    139139    macro(LocalFileContentSniffingEnabled, localFileContentSniffingEnabled, Bool, bool, false, "", "") \
    140140    macro(UsesPageCache, usesPageCache, Bool, bool, true, "", "") \
     141    macro(AllowsPageCacheWithWindowOpener, allowsPageCacheWithWindowOpener, Bool, bool, false, "", "") \
    141142    macro(PageCacheSupportsPlugins, pageCacheSupportsPlugins, Bool, bool, true, "", "") \
    142143    macro(AuthorAndUserStylesEnabled, authorAndUserStylesEnabled, Bool, bool, true, "", "") \
  • branches/safari-603-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r212500 r212587  
    624624}
    625625
     626void WKPreferencesSetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferencesRef, bool enabled)
     627{
     628    toImpl(preferencesRef)->setAllowsPageCacheWithWindowOpener(enabled);
     629}
     630
     631bool WKPreferencesGetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferencesRef)
     632{
     633    return toImpl(preferencesRef)->allowsPageCacheWithWindowOpener();
     634}
     635
    626636void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins)
    627637{
  • branches/safari-603-branch/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h

    r212500 r212587  
    144144WK_EXPORT bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferences);
    145145
     146// Defaults to false.
     147WK_EXPORT void WKPreferencesSetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferences, bool enabled);
     148WK_EXPORT bool WKPreferencesGetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferences);
     149
    146150// Defaults to true.
    147151WK_EXPORT void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferences, bool pageCacheSupportsPlugins);
  • branches/safari-603-branch/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r212500 r212587  
    247247    macro(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled) \
    248248    macro(WebKitUsesPageCachePreferenceKey, UsesPageCache, usesPageCache) \
     249    macro(WebKitAllowsPageCacheWithWindowOpenerKey, AllowsPageCacheWithWindowOpener, allowsPageCacheWithWindowOpener) \
    249250    macro(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled) \
    250251    macro(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled) \
  • branches/safari-603-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r212500 r212587  
    29932993    settings.setLocalFileContentSniffingEnabled(store.getBoolValueForKey(WebPreferencesKey::localFileContentSniffingEnabledKey()));
    29942994    settings.setUsesPageCache(store.getBoolValueForKey(WebPreferencesKey::usesPageCacheKey()));
     2995    settings.setAllowsPageCacheWithWindowOpener(store.getBoolValueForKey(WebPreferencesKey::allowsPageCacheWithWindowOpenerKey()));
    29952996    settings.setPageCacheSupportsPlugins(store.getBoolValueForKey(WebPreferencesKey::pageCacheSupportsPluginsKey()));
    29962997    settings.setAuthorAndUserStylesEnabled(store.getBoolValueForKey(WebPreferencesKey::authorAndUserStylesEnabledKey()));
  • branches/safari-603-branch/Tools/ChangeLog

    r212540 r212587  
     12017-02-17  Matthew Hanson  <matthew_hanson@apple.com>
     2
     3        Rollout r212500. rdar://problem/29904368
     4
    152017-02-16  Matthew Hanson  <matthew_hanson@apple.com>
    26
  • branches/safari-603-branch/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r212540 r212587  
    974974    // So, turn it off for now, but we might want to turn it back on some day.
    975975    [preferences setUsesPageCache:NO];
     976    [preferences setAllowsPageCacheWithWindowOpener:NO];
    976977    [preferences setAcceleratedCompositingEnabled:YES];
    977978#if USE(CA)
  • branches/safari-603-branch/Tools/DumpRenderTree/win/DumpRenderTree.cpp

    r212500 r212587  
    812812    preferences->setTextAreasAreResizable(TRUE);
    813813    preferences->setUsesPageCache(FALSE);
     814    prefsPrivate->setAllowsPageCacheWithWindowOpener(FALSE);
    814815
    815816    preferences->setPrivateBrowsingEnabled(FALSE);
  • branches/safari-603-branch/Tools/WebKitTestRunner/TestController.cpp

    r212500 r212587  
    656656#endif
    657657    WKPreferencesSetPageCacheEnabled(preferences, false);
     658    WKPreferencesSetAllowsPageCacheWithWindowOpener(preferences, false);
    658659    WKPreferencesSetAsynchronousPluginInitializationEnabled(preferences, false);
    659660    WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(preferences, false);
Note: See TracChangeset for help on using the changeset viewer.