Changeset 212173 in webkit
- Timestamp:
- Feb 10, 2017 6:53:53 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/editing/mac/input/unconfirmed-text-navigation-with-page-cache.html
r211254 r212173 11 11 testRunner.setCanOpenWindows(); 12 12 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 13 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);14 13 } 15 14 -
trunk/LayoutTests/fast/harness/page-cache-crash-on-data-urls.html
r211254 r212173 23 23 testRunner.setCanOpenWindows(); 24 24 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 25 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);26 25 } 27 26 log("open page with data urls"); -
trunk/LayoutTests/fast/harness/use-page-cache.html
r211254 r212173 29 29 testRunner.setCanOpenWindows(); 30 30 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 31 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);32 31 } 33 32 log("open page-1"); -
trunk/LayoutTests/fast/loader/stateobjects/no-popstate-when-back-to-stateless-entry-with-page-cache.html
r211254 r212173 15 15 testRunner.setCanOpenWindows(); 16 16 testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1); 17 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);18 17 } 19 18 testWindow = window.open('resources/no-popstate-when-back-to-stateless-entry-1.html'); -
trunk/LayoutTests/fast/loader/stateobjects/popstate-fires-with-page-cache.html
r211254 r212173 15 15 testRunner.setCanOpenWindows(); 16 16 testRunner.overridePreference('WebKitUsesPageCachePreferenceKey', 1); 17 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);18 17 } 19 18 testWindow = window.open('resources/popstate-fires-with-page-cache-1.html'); -
trunk/LayoutTests/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html
r211254 r212173 8 8 testRunner.setCanOpenWindows(); 9 9 testRunner.overridePreference("WebKitUsesPageCachePreferenceKey", 1); 10 testRunner.overridePreference("WebKitAllowsPageCacheWithWindowOpenerKey", 1);11 10 } 12 11 -
trunk/Source/WebCore/ChangeLog
r212172 r212173 1 2017-02-10 Daniel Bates <dabates@apple.com> 2 3 Detach frame from document when entering page cache 4 https://bugs.webkit.org/show_bug.cgi?id=166774 5 <rdar://problem/29904368> 6 7 Reviewed by Chris Dumez. 8 9 When a page enters the page cache it is unnecessary for it to hold a reference to its 10 associated frame because subsequent interactions with the page do not need to make use 11 of it. Once a page exits the page cache we associate it with its frame. 12 13 * dom/Document.cpp: 14 (WebCore::Document::frameDestroyed): Update comment to reflect the renaming of disconnectFromFrame(). 15 (WebCore::Document::attachToCachedFrame): Added. 16 (WebCore::Document::detachFromCachedFrame): Added. 17 (WebCore::Document::prepareForDestruction): Only call CSSAnimationController::detachFromDocument() if 18 we have a frame. Substitute detachFromFrame() for disconnectFromFrame() as the latter was renamed to 19 the former. 20 (WebCore::Document::hasEverCalledWindowOpen): Deleted. 21 (WebCore::Document::markHasCalledWindowOpen): Deleted. 22 (WebCore::Document::disconnectFromFrame): Renamed to detachFromFrame. 23 * dom/Document.h: 24 (WebCore::Document::detachFromFrame): Renamed; formerly named disconnectFromFrame(). Changed 25 visibility from public to private and made this function inline. 26 * history/CachedFrame.cpp: 27 (WebCore::CachedFrameBase::pruneDetachedChildFrames): Remove cached child frames that were 28 removed from the page when it was in the page cache as there is no need to restore such frames. 29 (WebCore::CachedFrameBase::restore): Call pruneDetachedChildFrames() before restoring the 30 frame tree. 31 (WebCore::CachedFrame::CachedFrame): Detach from the frame. 32 (WebCore::CachedFrame::open): Assert that we have a document and re-attach the frame. 33 (WebCore::CachedFrame::destroy): Update assertion as this function should only be called for a 34 frameless document. Only detach the FrameView, DocumentLoader, and Page when the cached frame is for 35 subframe and is associated with a Page object. Call CSSAnimationController::detachFromDocument() to 36 detach the animation controller from the document as it is being destroyed. We have to do this here 37 because the document does not have a frame. And Document::prepareForDestruction() only calls 38 CSSAnimationController::detachFromDocument() if the document has a frame. 39 * history/CachedFrame.h: 40 * history/PageCache.cpp: 41 (WebCore::canCachePage): Remove logic that prevents caching of a page that called window.open() 42 or has an opener as it is feasible to keep such pages in the page cache. 43 * html/HTMLFrameElementBase.cpp: 44 (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Fix style nit. 45 * loader/FrameLoader.cpp: 46 (WebCore::FrameLoader::frameDetached): Only stop all loaders and stop active DOM objects if the 47 page is not in- or about to enter- the page cache. A page in the page cache has finished loading 48 and its active DOM objects are suspended. Also fix style nit in comment. 49 (WebCore::FrameLoader::detachFromParent): Only stop all loaders if the page is not in- or about to 50 enter- the page cache. A page in the page cache has finished loading. Also added a comment to explain 51 that we protect the frame because stopAllLoaders() can cause the frame to be deallocated. 52 * page/DOMWindow.cpp: 53 (WebCore::DOMWindow::createWindow): Remove logic to call markHasCalledWindowOpen() as this 54 function will be removed. 55 * page/DiagnosticLoggingKeys.cpp: 56 (WebCore::DiagnosticLoggingKeys::hasCalledWindowOpenKey): Deleted. 57 (WebCore::DiagnosticLoggingKeys::hasOpenerKey): Deleted. 58 * page/DiagnosticLoggingKeys.h: 59 * page/Page.cpp: 60 (WebCore::Page::openedByWindowOpen): Deleted. 61 * page/Page.h: 62 * page/Settings.in: Remove setting allowsPageCacheWithWindowOpener. 63 1 64 2017-02-10 Simon Fraser <simon.fraser@apple.com> 2 65 -
trunk/Source/WebCore/dom/Document.cpp
r211966 r212173 37 37 #include "CSSStyleSheet.h" 38 38 #include "CachedCSSStyleSheet.h" 39 #include "CachedFrame.h" 39 40 #include "CachedResourceLoader.h" 40 41 #include "Chrome.h" … … 837 838 } 838 839 839 bool Document::hasEverCalledWindowOpen() const840 {841 auto& topDocument = this->topDocument();842 if (&topDocument == this)843 return m_hasEverCalledWindowOpen;844 return topDocument.hasEverCalledWindowOpen();845 }846 847 void Document::markHasCalledWindowOpen()848 {849 auto& topDocument = this->topDocument();850 if (&topDocument == this)851 m_hasEverCalledWindowOpen = true;852 else853 topDocument.markHasCalledWindowOpen();854 }855 856 840 DocumentType* Document::doctype() const 857 841 { … … 2191 2175 } 2192 2176 2193 void Document::disconnectFromFrame()2194 {2195 observeFrame(nullptr);2196 }2197 2198 2177 void Document::frameDestroyed() 2199 2178 { 2200 // d isconnectFromFrame() must be called before destroying the Frame.2179 // detachFromFrame() must be called before destroying the Frame. 2201 2180 ASSERT_WITH_SECURITY_IMPLICATION(!m_frame); 2202 2181 FrameDestructionObserver::frameDestroyed(); 2182 } 2183 2184 void Document::attachToCachedFrame(CachedFrameBase& cachedFrame) 2185 { 2186 ASSERT_WITH_SECURITY_IMPLICATION(cachedFrame.document() == this); 2187 ASSERT(cachedFrame.view()); 2188 ASSERT(m_pageCacheState == Document::InPageCache); 2189 observeFrame(&cachedFrame.view()->frame()); 2190 } 2191 2192 void Document::detachFromCachedFrame(CachedFrameBase& cachedFrame) 2193 { 2194 ASSERT_WITH_SECURITY_IMPLICATION(cachedFrame.document() == this); 2195 ASSERT(cachedFrame.view()); 2196 ASSERT(m_frame == &cachedFrame.view()->frame()); 2197 ASSERT(m_pageCacheState == Document::InPageCache); 2198 detachFromFrame(); 2203 2199 } 2204 2200 … … 2260 2256 return; 2261 2257 2262 m_frame->animation().detachFromDocument(this); 2258 if (m_frame) 2259 m_frame->animation().detachFromDocument(this); 2263 2260 2264 2261 #if ENABLE(IOS_TOUCH_EVENTS) … … 2325 2322 #endif 2326 2323 2327 d isconnectFromFrame();2324 detachFromFrame(); 2328 2325 2329 2326 m_hasPreparedForDestruction = true; -
trunk/Source/WebCore/dom/Document.h
r211979 r212173 79 79 class CSSStyleSheet; 80 80 class CachedCSSStyleSheet; 81 class CachedFrameBase; 81 82 class CachedResourceLoader; 82 83 class CachedScript; … … 368 369 369 370 bool hasManifest() const; 370 371 bool hasEverCalledWindowOpen() const;372 void markHasCalledWindowOpen();373 371 374 372 WEBCORE_EXPORT ExceptionOr<Ref<Element>> createElementForBindings(const AtomicString& tagName); … … 558 556 void didBecomeCurrentDocumentInFrame(); 559 557 void destroyRenderTree(); 560 void disconnectFromFrame();561 558 void prepareForDestruction(); 562 559 … … 1287 1284 const HashSet<ShadowRoot*>& inDocumentShadowRoots() const { return m_inDocumentShadowRoots; } 1288 1285 1286 void attachToCachedFrame(CachedFrameBase&); 1287 void detachFromCachedFrame(CachedFrameBase&); 1288 1289 1289 protected: 1290 1290 enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 << 1 }; … … 1299 1299 friend class IgnoreDestructiveWriteCountIncrementer; 1300 1300 friend class IgnoreOpensDuringUnloadCountIncrementer; 1301 1302 void detachFromFrame() { observeFrame(nullptr); } 1301 1303 1302 1304 void updateTitleElement(Element* newTitleElement); … … 1476 1478 1477 1479 Timer m_styleRecalcTimer; 1478 bool m_hasEverCalledWindowOpen { false };1479 1480 bool m_pendingStyleRecalcShouldForce; 1480 1481 bool m_inStyleRecalc; -
trunk/Source/WebCore/history/CachedFrame.cpp
r211885 r212173 76 76 } 77 77 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 78 89 void CachedFrameBase::restore() 79 90 { … … 99 110 frame.loader().client().didRestoreFromPageCache(); 100 111 112 pruneDetachedChildFrames(); 113 101 114 // Reconstruct the FrameTree. And open the child CachedFrames in their respective FrameLoaders. 102 115 for (auto& childFrame : m_childFrames) { 116 ASSERT(childFrame->view()->frame().page()); 103 117 frame.tree().appendChild(childFrame->view()->frame()); 104 118 childFrame->open(); … … 184 198 #endif 185 199 200 m_document->detachFromCachedFrame(*this); 201 186 202 ASSERT_WITH_SECURITY_IMPLICATION(!m_documentLoader->isLoading()); 187 203 } … … 190 206 { 191 207 ASSERT(m_view); 208 ASSERT(m_document); 192 209 if (!m_isMainFrame) 193 210 m_view->frame().page()->incrementSubframeCount(); 211 212 m_document->attachToCachedFrame(*this); 194 213 195 214 m_view->frame().loader().open(*this); … … 228 247 ASSERT(m_document->pageCacheState() == Document::InPageCache); 229 248 ASSERT(m_view); 230 ASSERT( m_document->frame() == &m_view->frame());249 ASSERT(!m_document->frame()); 231 250 232 251 m_document->domWindow()->willDestroyCachedFrame(); 233 252 234 if (!m_isMainFrame ) {253 if (!m_isMainFrame && m_view->frame().page()) { 235 254 m_view->frame().loader().detachViewsAndDocumentLoader(); 236 255 m_view->frame().detachFromPage(); … … 244 263 245 264 Frame::clearTimers(m_view.get(), m_document.get()); 265 266 m_view->frame().animation().detachFromDocument(m_document.get()); 246 267 247 268 // FIXME: Why do we need to call removeAllEventListeners here? When the document is in page cache, this method won't work -
trunk/Source/WebCore/history/CachedFrame.h
r210142 r212173 53 53 CachedFrameBase(Frame&); 54 54 ~CachedFrameBase(); 55 55 56 void pruneDetachedChildFrames(); 57 56 58 RefPtr<Document> m_document; 57 59 RefPtr<DocumentLoader> m_documentLoader; -
trunk/Source/WebCore/history/PageCache.cpp
r211676 r212173 192 192 DiagnosticLoggingClient& diagnosticLoggingClient = page.diagnosticLoggingClient(); 193 193 bool isCacheable = canCacheFrame(page.mainFrame(), diagnosticLoggingClient, indentLevel + 1); 194 195 if (page.openedByWindowOpen() && !page.settings().allowsPageCacheWithWindowOpener()) {196 PCLOG(" -Page has been opened via window.open()");197 logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasOpenerKey());198 isCacheable = false;199 }200 201 auto* topDocument = page.mainFrame().document();202 if (topDocument && topDocument->hasEverCalledWindowOpen()) {203 PCLOG(" -Page has called window.open()");204 logPageCacheFailureDiagnosticMessage(diagnosticLoggingClient, DiagnosticLoggingKeys::hasCalledWindowOpenKey());205 isCacheable = false;206 }207 194 208 195 if (!page.settings().usesPageCache() || page.isResourceCachingDisabled()) { -
trunk/Source/WebCore/html/HTMLFrameElementBase.cpp
r211964 r212173 146 146 return; 147 147 148 // DocumentFragments don't kick of any loads.148 // DocumentFragments don't kick off any loads. 149 149 if (!document().frame()) 150 150 return; -
trunk/Source/WebCore/loader/FrameLoader.cpp
r211946 r212173 2497 2497 void FrameLoader::frameDetached() 2498 2498 { 2499 // Calling stopAllLoaders can cause the frame to be deallocated, including the frame loader.2499 // Calling stopAllLoaders() can cause the frame to be deallocated, including the frame loader. 2500 2500 Ref<Frame> protectedFrame(m_frame); 2501 2501 2502 stopAllLoaders(); 2503 m_frame.document()->stopActiveDOMObjects(); 2502 if (m_frame.document()->pageCacheState() != Document::InPageCache) { 2503 stopAllLoaders(); 2504 m_frame.document()->stopActiveDOMObjects(); 2505 } 2506 2504 2507 detachFromParent(); 2505 2508 } … … 2507 2510 void FrameLoader::detachFromParent() 2508 2511 { 2512 // Calling stopAllLoaders() can cause the frame to be deallocated, including the frame loader. 2509 2513 Ref<Frame> protect(m_frame); 2510 2514 … … 2512 2516 history().saveScrollPositionAndViewStateToItem(history().currentItem()); 2513 2517 detachChildren(); 2514 // stopAllLoaders() needs to be called after detachChildren(), because detachedChildren() 2515 // will trigger the unload event handlers of any child frames, and those event 2516 // handlers might start a new subresource load in this frame. 2517 stopAllLoaders(); 2518 if (m_frame.document()->pageCacheState() != Document::InPageCache) { 2519 // stopAllLoaders() needs to be called after detachChildren() if the document is not in the page cache, 2520 // because detachedChildren() will trigger the unload event handlers of any child frames, and those event 2521 // handlers might start a new subresource load in this frame. 2522 stopAllLoaders(); 2523 } 2518 2524 2519 2525 InspectorInstrumentation::frameDetachedFromParent(m_frame); -
trunk/Source/WebCore/page/DOMWindow.cpp
r211889 r212173 2187 2187 newFrame->loader().setOpener(&openerFrame); 2188 2188 newFrame->page()->setOpenedByDOM(); 2189 if (auto* openerDocument = openerFrame.document())2190 openerDocument->markHasCalledWindowOpen();2191 2189 2192 2190 if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp
r211870 r212173 649 649 } 650 650 651 String DiagnosticLoggingKeys::hasCalledWindowOpenKey()652 {653 return ASCIILiteral("hasCalledWindowOpen");654 }655 656 String DiagnosticLoggingKeys::hasOpenerKey()657 {658 return ASCIILiteral("hasOpener");659 }660 661 651 String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey() 662 652 { -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.h
r211870 r212173 57 57 static String expiredKey(); 58 58 static String fontKey(); 59 static String hasCalledWindowOpenKey();60 static String hasOpenerKey();61 59 static String hasPluginsKey(); 62 60 static String httpsNoStoreKey(); -
trunk/Source/WebCore/page/Page.cpp
r211910 r212173 470 470 } 471 471 472 bool Page::openedByWindowOpen() const473 {474 auto* document = m_mainFrame->document();475 if (!document)476 return false;477 auto* window = document->domWindow();478 if (!window)479 return false;480 return window->opener();481 }482 483 472 void Page::goToItem(HistoryItem& item, FrameLoadType type) 484 473 { -
trunk/Source/WebCore/page/Page.h
r211910 r212173 180 180 void setOpenedByDOM(); 181 181 182 bool openedByWindowOpen() const;183 184 182 WEBCORE_EXPORT void goToItem(HistoryItem&, FrameLoadType); 185 183 -
trunk/Source/WebCore/page/Settings.in
r211949 r212173 288 288 289 289 langAttributeAwareFormControlUIEnabled initial=false 290 291 allowsPageCacheWithWindowOpener initial=false -
trunk/Source/WebKit/mac/ChangeLog
r212150 r212173 1 2017-02-10 Daniel Bates <dabates@apple.com> 2 3 Detach frame from document when entering page cache 4 https://bugs.webkit.org/show_bug.cgi?id=166774 5 <rdar://problem/29904368> 6 7 Reviewed by Chris Dumez. 8 9 * WebView/WebPreferenceKeysPrivate.h: 10 * WebView/WebPreferences.mm: 11 (+[WebPreferences initialize]): 12 (-[WebPreferences allowsPageCacheWithWindowOpener]): Deleted. 13 (-[WebPreferences setAllowsPageCacheWithWindowOpener:]): Deleted. 14 * WebView/WebPreferencesPrivate.h: 15 * WebView/WebView.mm: 16 (-[WebView _preferencesChanged:]): 17 1 18 2017-02-10 Joseph Pecoraro <pecoraro@apple.com> 2 19 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r212150 r212173 84 84 #define WebKitDOMPasteAllowedPreferenceKey @"WebKitDOMPasteAllowedPreferenceKey" 85 85 #define WebKitUsesPageCachePreferenceKey @"WebKitUsesPageCachePreferenceKey" 86 #define WebKitAllowsPageCacheWithWindowOpenerKey @"WebKitAllowsPageCacheWithWindowOpenerKey"87 86 #define WebKitPageCacheSupportsPluginsPreferenceKey @"WebKitPageCacheSupportsPluginsPreferenceKey" 88 87 #define WebKitFTPDirectoryTemplatePath @"WebKitFTPDirectoryTemplatePath" -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r212150 r212173 479 479 #endif 480 480 [NSNumber numberWithBool:YES], WebKitUsesPageCachePreferenceKey, 481 [NSNumber numberWithBool:NO], WebKitAllowsPageCacheWithWindowOpenerKey,482 481 [NSNumber numberWithInt:cacheModelForMainBundle()], WebKitCacheModelPreferenceKey, 483 482 [NSNumber numberWithBool:YES], WebKitPageCacheSupportsPluginsPreferenceKey, … … 2449 2448 } 2450 2449 2451 - (BOOL)allowsPageCacheWithWindowOpener2452 {2453 return [self _boolValueForKey:WebKitAllowsPageCacheWithWindowOpenerKey];2454 }2455 2456 - (void)setAllowsPageCacheWithWindowOpener:(BOOL)flag2457 {2458 [self _setBoolValue:flag forKey:WebKitAllowsPageCacheWithWindowOpenerKey];2459 }2460 2461 2450 #if PLATFORM(IOS) 2462 2451 - (void)_invalidateCachedPreferences -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r212150 r212173 299 299 - (void)setPictographFontFamily:(NSString *)family; 300 300 301 - (BOOL)allowsPageCacheWithWindowOpener;302 - (void)setAllowsPageCacheWithWindowOpener:(BOOL)flag;303 304 301 - (BOOL)pageCacheSupportsPlugins; 305 302 - (void)setPageCacheSupportsPlugins:(BOOL)flag; -
trunk/Source/WebKit/mac/WebView/WebView.mm
r212150 r212173 2672 2672 settings.setDOMPasteAllowed([preferences isDOMPasteAllowed]); 2673 2673 settings.setUsesPageCache([self usesPageCache]); 2674 settings.setAllowsPageCacheWithWindowOpener([preferences allowsPageCacheWithWindowOpener]);2675 2674 settings.setPageCacheSupportsPlugins([preferences pageCacheSupportsPlugins]); 2676 2675 settings.setBackForwardCacheExpirationInterval([preferences _backForwardCacheExpirationInterval]); -
trunk/Source/WebKit/win/ChangeLog
r212150 r212173 1 2017-02-10 Daniel Bates <dabates@apple.com> 2 3 Detach frame from document when entering page cache 4 https://bugs.webkit.org/show_bug.cgi?id=166774 5 <rdar://problem/29904368> 6 7 Reviewed by Chris Dumez. 8 9 * Interfaces/IWebPreferencesPrivate.idl: 10 * WebPreferenceKeysPrivate.h: 11 * WebPreferences.cpp: 12 (WebPreferences::initializeDefaultSettings): 13 (WebPreferences::setAllowsPageCacheWithWindowOpener): Deleted. 14 (WebPreferences::allowsPageCacheWithWindowOpener): Deleted. 15 * WebPreferences.h: 16 * WebView.cpp: 17 (WebView::notifyPreferencesChanged): 18 1 19 2017-02-10 Joseph Pecoraro <pecoraro@apple.com> 2 20 -
trunk/Source/WebKit/win/Interfaces/IWebPreferencesPrivate.idl
r212150 r212173 92 92 HRESULT setExperimentalNotificationsEnabled([in] BOOL enabled); 93 93 94 HRESULT allowsPageCacheWithWindowOpener([out, retval] BOOL* usesPageCache);95 HRESULT setAllowsPageCacheWithWindowOpener([in] BOOL usesPageCache);96 97 94 HRESULT setShouldUseHighResolutionTimers([in] BOOL useHighResolutionTimers); 98 95 HRESULT shouldUseHighResolutionTimers([out, retval] BOOL* useHighResolutionTimers); -
trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h
r212150 r212173 69 69 #define WebKitIconDatabaseEnabledPreferenceKey "WebKitIconDatabaseEnabled" 70 70 #define WebKitUsesPageCachePreferenceKey "WebKitUsesPageCachePreferenceKey" 71 #define WebKitAllowsPageCacheWithWindowOpenerKey "WebKitAllowsPageCacheWithWindowOpenerKey"72 71 #define WebKitCacheModelPreferenceKey "WebKitCacheModelPreferenceKey" 73 72 #define WebKitLocalStorageDatabasePathPreferenceKey "WebKitLocalStorageDatabasePath" -
trunk/Source/WebKit/win/WebPreferences.cpp
r212150 r212173 263 263 CFDictionaryAddValue(defaults, CFSTR(AllowContinuousSpellCheckingPreferenceKey), kCFBooleanTrue); 264 264 CFDictionaryAddValue(defaults, CFSTR(WebKitUsesPageCachePreferenceKey), kCFBooleanTrue); 265 CFDictionaryAddValue(defaults, CFSTR(WebKitAllowsPageCacheWithWindowOpenerKey), kCFBooleanFalse);266 265 CFDictionaryAddValue(defaults, CFSTR(WebKitLocalStorageDatabasePathPreferenceKey), CFSTR("")); 267 266 … … 1614 1613 } 1615 1614 1616 HRESULT WebPreferences::setAllowsPageCacheWithWindowOpener(BOOL value)1617 {1618 setBoolValue(WebKitAllowsPageCacheWithWindowOpenerKey, value);1619 return S_OK;1620 }1621 1622 HRESULT WebPreferences::allowsPageCacheWithWindowOpener(_Out_ BOOL* enabled)1623 {1624 if (!enabled)1625 return E_POINTER;1626 *enabled = boolValueForKey(WebKitAllowsPageCacheWithWindowOpenerKey);1627 return S_OK;1628 }1629 1630 1615 HRESULT WebPreferences::setZoomsTextOnly(BOOL zoomsTextOnly) 1631 1616 { -
trunk/Source/WebKit/win/WebPreferences.h
r212150 r212173 160 160 virtual HRESULT STDMETHODCALLTYPE experimentalNotificationsEnabled(_Out_ BOOL*); 161 161 virtual HRESULT STDMETHODCALLTYPE setExperimentalNotificationsEnabled(BOOL); 162 virtual HRESULT STDMETHODCALLTYPE allowsPageCacheWithWindowOpener(_Out_ BOOL*);163 virtual HRESULT STDMETHODCALLTYPE setAllowsPageCacheWithWindowOpener(BOOL);164 162 165 163 // These two methods are no-ops, and only retained to keep -
trunk/Source/WebKit/win/WebView.cpp
r212150 r212173 5415 5415 settings.setExperimentalNotificationsEnabled(enabled); 5416 5416 5417 hr = prefsPrivate->allowsPageCacheWithWindowOpener(&enabled);5418 if (FAILED(hr))5419 return hr;5420 settings.setAllowsPageCacheWithWindowOpener(enabled);5421 5422 5417 hr = prefsPrivate->isWebSecurityEnabled(&enabled); 5423 5418 if (FAILED(hr)) -
trunk/Source/WebKit2/ChangeLog
r212169 r212173 1 2017-02-10 Daniel Bates <dabates@apple.com> 2 3 Detach frame from document when entering page cache 4 https://bugs.webkit.org/show_bug.cgi?id=166774 5 <rdar://problem/29904368> 6 7 Reviewed by Chris Dumez. 8 9 * Shared/WebPreferencesDefinitions.h: 10 * UIProcess/API/C/WKPreferences.cpp: 11 (WKPreferencesSetAllowsPageCacheWithWindowOpener): Deleted. 12 (WKPreferencesGetAllowsPageCacheWithWindowOpener): Deleted. 13 * UIProcess/API/C/WKPreferencesRefPrivate.h: 14 * WebProcess/InjectedBundle/InjectedBundle.cpp: 15 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 16 * WebProcess/WebPage/WebPage.cpp: 17 (WebKit::WebPage::updatePreferences): 18 1 19 2017-02-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 20 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r212150 r212173 138 138 macro(LocalFileContentSniffingEnabled, localFileContentSniffingEnabled, Bool, bool, false, "", "") \ 139 139 macro(UsesPageCache, usesPageCache, Bool, bool, true, "", "") \ 140 macro(AllowsPageCacheWithWindowOpener, allowsPageCacheWithWindowOpener, Bool, bool, false, "", "") \141 140 macro(PageCacheSupportsPlugins, pageCacheSupportsPlugins, Bool, bool, true, "", "") \ 142 141 macro(AuthorAndUserStylesEnabled, authorAndUserStylesEnabled, Bool, bool, true, "", "") \ -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
r212150 r212173 624 624 } 625 625 626 void WKPreferencesSetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferencesRef, bool enabled)627 {628 toImpl(preferencesRef)->setAllowsPageCacheWithWindowOpener(enabled);629 }630 631 bool WKPreferencesGetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferencesRef)632 {633 return toImpl(preferencesRef)->allowsPageCacheWithWindowOpener();634 }635 636 626 void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferencesRef, bool pageCacheSupportsPlugins) 637 627 { -
trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
r212150 r212173 144 144 WK_EXPORT bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferences); 145 145 146 // Defaults to false.147 WK_EXPORT void WKPreferencesSetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferences, bool enabled);148 WK_EXPORT bool WKPreferencesGetAllowsPageCacheWithWindowOpener(WKPreferencesRef preferences);149 150 146 // Defaults to true. 151 147 WK_EXPORT void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferences, bool pageCacheSupportsPlugins); -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r211824 r212173 249 249 macro(WebKitPluginsEnabled, PluginsEnabled, pluginsEnabled) \ 250 250 macro(WebKitUsesPageCachePreferenceKey, UsesPageCache, usesPageCache) \ 251 macro(WebKitAllowsPageCacheWithWindowOpenerKey, AllowsPageCacheWithWindowOpener, allowsPageCacheWithWindowOpener) \252 251 macro(WebKitWebAudioEnabled, WebAudioEnabled, webAudioEnabled) \ 253 252 macro(WebKitWebGLEnabled, WebGLEnabled, webGLEnabled) \ -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r212150 r212173 2986 2986 settings.setLocalFileContentSniffingEnabled(store.getBoolValueForKey(WebPreferencesKey::localFileContentSniffingEnabledKey())); 2987 2987 settings.setUsesPageCache(store.getBoolValueForKey(WebPreferencesKey::usesPageCacheKey())); 2988 settings.setAllowsPageCacheWithWindowOpener(store.getBoolValueForKey(WebPreferencesKey::allowsPageCacheWithWindowOpenerKey()));2989 2988 settings.setPageCacheSupportsPlugins(store.getBoolValueForKey(WebPreferencesKey::pageCacheSupportsPluginsKey())); 2990 2989 settings.setAuthorAndUserStylesEnabled(store.getBoolValueForKey(WebPreferencesKey::authorAndUserStylesEnabledKey())); -
trunk/Tools/ChangeLog
r212167 r212173 1 2017-02-10 Daniel Bates <dabates@apple.com> 2 3 Detach frame from document when entering page cache 4 https://bugs.webkit.org/show_bug.cgi?id=166774 5 <rdar://problem/29904368> 6 7 Reviewed by Chris Dumez. 8 9 * DumpRenderTree/mac/DumpRenderTree.mm: 10 (resetWebPreferencesToConsistentValues): 11 * DumpRenderTree/win/DumpRenderTree.cpp: 12 (resetWebPreferencesToConsistentValues): 13 * WebKitTestRunner/TestController.cpp: 14 (WTR::TestController::resetPreferencesToConsistentValues): 15 1 16 2017-02-10 Tim Horton <timothy_horton@apple.com> 2 17 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r212153 r212173 988 988 // So, turn it off for now, but we might want to turn it back on some day. 989 989 [preferences setUsesPageCache:NO]; 990 [preferences setAllowsPageCacheWithWindowOpener:NO];991 990 [preferences setAcceleratedCompositingEnabled:YES]; 992 991 #if USE(CA) -
trunk/Tools/DumpRenderTree/win/DumpRenderTree.cpp
r212150 r212173 836 836 preferences->setTextAreasAreResizable(TRUE); 837 837 preferences->setUsesPageCache(FALSE); 838 prefsPrivate->setAllowsPageCacheWithWindowOpener(FALSE);839 838 840 839 preferences->setPrivateBrowsingEnabled(FALSE); -
trunk/Tools/WebKitTestRunner/TestController.cpp
r212150 r212173 656 656 #endif 657 657 WKPreferencesSetPageCacheEnabled(preferences, false); 658 WKPreferencesSetAllowsPageCacheWithWindowOpener(preferences, false);659 658 WKPreferencesSetAsynchronousPluginInitializationEnabled(preferences, false); 660 659 WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(preferences, false);
Note: See TracChangeset
for help on using the changeset viewer.