WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-151527-20151120165014.patch (text/plain), 24.81 KB, created by
Kat Graff
on 2015-11-20 16:50:26 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kat Graff
Created:
2015-11-20 16:50:26 PST
Size:
24.81 KB
patch
obsolete
>Subversion Revision: 192676 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 085c7f58e4f35ac81c25327132355ceeec281507..739f1cb9e902161bfbbb2ee4f075eb35c4c40e29 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,82 @@ >+2015-11-20 Katlyn Graff <kgraff@apple.com> >+ >+ Safari background tabs should be fully suspended where possible. >+ https://bugs.webkit.org/show_bug.cgi?id=151527 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests because this is simply a refactor. >+ >+ Renamed Element:: and Document:: documentWillSuspendForPageCache(), >+ documentDidResumeFromPageCache(), >+ registerForPageCacheSuspensionCallbacks(), >+ unregisterForPageCacheSuspensionCallbacks() to prepare to support >+ alternate reasons for document-level suspension. >+ >+ * dom/Document.cpp: >+ (WebCore::Document::suspend): >+ (WebCore::Document::resume): >+ (WebCore::Document::registerForDocumentSuspensionCallbacks): >+ (WebCore::Document::unregisterForDocumentSuspensionCallbacks): >+ (WebCore::Document::documentWillSuspendForPageCache): Deleted. >+ (WebCore::Document::documentDidResumeFromPageCache): Deleted. >+ (WebCore::Document::registerForPageCacheSuspensionCallbacks): Deleted. >+ (WebCore::Document::unregisterForPageCacheSuspensionCallbacks): Deleted. >+ * dom/Document.h: >+ * dom/Element.h: >+ (WebCore::Element::prepareForDocumentSuspension): >+ (WebCore::Element::resumeFromDocumentSuspension): >+ (WebCore::Element::documentWillSuspendForPageCache): Deleted. >+ (WebCore::Element::documentDidResumeFromPageCache): Deleted. >+ * history/CachedFrame.cpp: >+ (WebCore::CachedFrameBase::restore): >+ (WebCore::CachedFrame::CachedFrame): >+ * html/HTMLFormElement.cpp: >+ (WebCore::HTMLFormElement::~HTMLFormElement): >+ (WebCore::HTMLFormElement::parseAttribute): >+ (WebCore::HTMLFormElement::resumeFromDocumentSuspension): >+ (WebCore::HTMLFormElement::didMoveToNewDocument): >+ (WebCore::HTMLFormElement::documentDidResumeFromPageCache): Deleted. >+ * html/HTMLFormElement.h: >+ * html/HTMLInputElement.cpp: >+ (WebCore::HTMLInputElement::~HTMLInputElement): >+ (WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded): >+ (WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded): >+ (WebCore::HTMLInputElement::resumeFromDocumentSuspension): >+ (WebCore::HTMLInputElement::prepareForDocumentSuspension): >+ (WebCore::HTMLInputElement::didMoveToNewDocument): >+ (WebCore::HTMLInputElement::documentDidResumeFromPageCache): Deleted. >+ (WebCore::HTMLInputElement::documentWillSuspendForPageCache): Deleted. >+ * html/HTMLInputElement.h: >+ * html/HTMLMediaElement.cpp: >+ (WebCore::HTMLMediaElement::registerWithDocument): >+ (WebCore::HTMLMediaElement::unregisterWithDocument): >+ (WebCore::HTMLMediaElement::prepareForDocumentSuspension): >+ (WebCore::HTMLMediaElement::resumeFromDocumentSuspension): >+ (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): Deleted. >+ (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Deleted. >+ * html/HTMLMediaElement.h: >+ * html/HTMLPlugInImageElement.cpp: >+ (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): >+ (WebCore::HTMLPlugInImageElement::createElementRenderer): >+ (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): >+ (WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): >+ (WebCore::HTMLPlugInImageElement::resumeFromDocumentSuspension): >+ (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Deleted. >+ (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Deleted. >+ * html/HTMLPlugInImageElement.h: >+ * loader/FrameLoader.cpp: >+ (WebCore::FrameLoader::commitProvisionalLoad): >+ * svg/SVGSVGElement.cpp: >+ (WebCore::SVGSVGElement::SVGSVGElement): >+ (WebCore::SVGSVGElement::~SVGSVGElement): >+ (WebCore::SVGSVGElement::didMoveToNewDocument): >+ (WebCore::SVGSVGElement::prepareForDocumentSuspension): >+ (WebCore::SVGSVGElement::resumeFromDocumentSuspension): >+ (WebCore::SVGSVGElement::documentWillSuspendForPageCache): Deleted. >+ (WebCore::SVGSVGElement::documentDidResumeFromPageCache): Deleted. >+ * svg/SVGSVGElement.h: >+ > 2015-11-19 Adam Bergkvist <adam.bergkvist@ericsson.com> > > WebRTC: Initial testing of updated RTCPeerConnection API >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 747ccfebf955c8878e95b581c655a9ae1a0f2d7b..519ffb03dbfa245d863b5101dbe5f713d00d3458 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -4504,12 +4504,12 @@ void Document::documentWillBecomeInactive() > renderView()->setIsInWindow(false); > } > >-void Document::documentWillSuspendForPageCache() >+void Document::suspend() > { > documentWillBecomeInactive(); > > for (auto* element : m_documentSuspensionCallbackElements) >- element->documentWillSuspendForPageCache(); >+ element->prepareForDocumentSuspension(); > > #ifndef NDEBUG > // Clear the update flag to be able to check if the viewport arguments update >@@ -4523,12 +4523,12 @@ void Document::documentWillSuspendForPageCache() > } > } > >-void Document::documentDidResumeFromPageCache() >+void Document::resume() > { > Vector<Element*> elements; > copyToVector(m_documentSuspensionCallbackElements, elements); > for (auto* element : elements) >- element->documentDidResumeFromPageCache(); >+ element->resumeFromDocumentSuspension(); > > if (renderView()) > renderView()->setIsInWindow(true); >@@ -4540,12 +4540,12 @@ void Document::documentDidResumeFromPageCache() > m_frame->loader().client().dispatchDidBecomeFrameset(isFrameSet()); > } > >-void Document::registerForPageCacheSuspensionCallbacks(Element* e) >+void Document::registerForDocumentSuspensionCallbacks(Element* e) > { > m_documentSuspensionCallbackElements.add(e); > } > >-void Document::unregisterForPageCacheSuspensionCallbacks(Element* e) >+void Document::unregisterForDocumentSuspensionCallbacks(Element* e) > { > m_documentSuspensionCallbackElements.remove(e); > } >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index b5ff3d4ec371c21f60e764b2d81539f0e27f405c..f1a0e569f3b0efbae6a1f6f1ec8506e876f83579 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -1002,14 +1002,14 @@ public: > bool inPageCache() const { return m_inPageCache; } > void setInPageCache(bool flag); > >- // Elements can register themselves for the "documentWillSuspendForPageCache()" and >- // "documentDidResumeFromPageCache()" callbacks >- void registerForPageCacheSuspensionCallbacks(Element*); >- void unregisterForPageCacheSuspensionCallbacks(Element*); >+ // Elements can register themselves for the "suspend()" and >+ // "resume()" callbacks >+ void registerForDocumentSuspensionCallbacks(Element*); >+ void unregisterForDocumentSuspensionCallbacks(Element*); > > void documentWillBecomeInactive(); >- void documentWillSuspendForPageCache(); >- void documentDidResumeFromPageCache(); >+ void suspend(); >+ void resume(); > > void registerForMediaVolumeCallbacks(Element*); > void unregisterForMediaVolumeCallbacks(Element*); >diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h >index 9a72407b37f3289ff7f9bc8d48a3eb7f6733c8f2..24180d1a1601740967a71d5acd056d11f6422a0f 100644 >--- a/Source/WebCore/dom/Element.h >+++ b/Source/WebCore/dom/Element.h >@@ -346,8 +346,8 @@ public: > void setMinimumSizeForResizing(const LayoutSize&); > > // Use Document::registerForDocumentActivationCallbacks() to subscribe to these >- virtual void documentWillSuspendForPageCache() { } >- virtual void documentDidResumeFromPageCache() { } >+ virtual void prepareForDocumentSuspension() { } >+ virtual void resumeFromDocumentSuspension() { } > > // Use Document::registerForMediaVolumeCallbacks() to subscribe to this > virtual void mediaVolumeDidChange() { } >diff --git a/Source/WebCore/history/CachedFrame.cpp b/Source/WebCore/history/CachedFrame.cpp >index 38dc969b8a5e3283b9bf3b8d9a98faa4414d9762..45e64bae8ec5ad4c0f6f2b3a0f1f6a681980ff50 100644 >--- a/Source/WebCore/history/CachedFrame.cpp >+++ b/Source/WebCore/history/CachedFrame.cpp >@@ -135,7 +135,7 @@ void CachedFrameBase::restore() > m_document->page()->chrome().client().needTouchEvents(true); > #endif > >- m_document->documentDidResumeFromPageCache(); >+ m_document->resume(); > } > > CachedFrame::CachedFrame(Frame& frame) >@@ -165,7 +165,7 @@ CachedFrame::CachedFrame(Frame& frame) > // but after we've fired the pagehide event, in case that creates more objects. > // Suspending must also happen after we've recursed over child frames, in case > // those create more objects. >- m_document->documentWillSuspendForPageCache(); >+ m_document->suspend(); > m_document->suspendScriptedAnimationControllerCallbacks(); > m_document->suspendActiveDOMObjects(ActiveDOMObject::PageCache); > m_cachedFrameScriptData = std::make_unique<ScriptCachedFrameData>(frame); >@@ -179,7 +179,7 @@ CachedFrame::CachedFrame(Frame& frame) > > frame.view()->clearScrollableAreas(); > >- // documentWillSuspendForPageCache() can set up a layout timer on the FrameView, so clear timers after that. >+ // suspend() can set up a layout timer on the FrameView, so clear timers after that. > frame.clearTimers(); > > // Deconstruct the FrameTree, to restore it later. >diff --git a/Source/WebCore/html/HTMLFormElement.cpp b/Source/WebCore/html/HTMLFormElement.cpp >index 888f0f40bf7667b7d81616b49bdcacf72268e0e9..ef959418e15b63a1b35efb504fa34050c9aa50d8 100644 >--- a/Source/WebCore/html/HTMLFormElement.cpp >+++ b/Source/WebCore/html/HTMLFormElement.cpp >@@ -84,7 +84,7 @@ HTMLFormElement::~HTMLFormElement() > { > document().formController().willDeleteForm(this); > if (!shouldAutocomplete()) >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > > for (auto& associatedElement : m_associatedElements) > associatedElement->formWillBeDestroyed(); >@@ -492,9 +492,9 @@ void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri > m_attributes.setAcceptCharset(value); > else if (name == autocompleteAttr) { > if (!shouldAutocomplete()) >- document().registerForPageCacheSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > else >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > } > else > HTMLElement::parseAttribute(name, value); >@@ -810,7 +810,7 @@ Vector<Ref<Element>> HTMLFormElement::namedElements(const AtomicString& name) > return namedItems; > } > >-void HTMLFormElement::documentDidResumeFromPageCache() >+void HTMLFormElement::resumeFromDocumentSuspension() > { > ASSERT(!shouldAutocomplete()); > >@@ -824,8 +824,8 @@ void HTMLFormElement::didMoveToNewDocument(Document* oldDocument) > { > if (!shouldAutocomplete()) { > if (oldDocument) >- oldDocument->unregisterForPageCacheSuspensionCallbacks(this); >- document().registerForPageCacheSuspensionCallbacks(this); >+ oldDocument->unregisterForDocumentSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > } > > HTMLElement::didMoveToNewDocument(oldDocument); >diff --git a/Source/WebCore/html/HTMLFormElement.h b/Source/WebCore/html/HTMLFormElement.h >index 56462ac01e9b7342c31e2fc9fe7745eab94f2b01..90198b61393fccba46c774e411ad11e8d1331337 100644 >--- a/Source/WebCore/html/HTMLFormElement.h >+++ b/Source/WebCore/html/HTMLFormElement.h >@@ -150,7 +150,7 @@ private: > virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; > virtual bool isURLAttribute(const Attribute&) const override; > >- virtual void documentDidResumeFromPageCache() override; >+ virtual void resumeFromDocumentSuspension() override; > > virtual void didMoveToNewDocument(Document* oldDocument) override; > >diff --git a/Source/WebCore/html/HTMLInputElement.cpp b/Source/WebCore/html/HTMLInputElement.cpp >index b1f8a83ca3722af87a1d62a39d756d4980450489..9706941f4a4b4cb7e8bda505ca4a2ab51ebe3c59 100644 >--- a/Source/WebCore/html/HTMLInputElement.cpp >+++ b/Source/WebCore/html/HTMLInputElement.cpp >@@ -150,7 +150,7 @@ void HTMLInputElement::didAddUserAgentShadowRoot(ShadowRoot*) > HTMLInputElement::~HTMLInputElement() > { > if (needsSuspensionCallback()) >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > > // Need to remove form association while this is still an HTMLInputElement > // so that virtual functions are called correctly. >@@ -1399,13 +1399,13 @@ bool HTMLInputElement::needsSuspensionCallback() > void HTMLInputElement::registerForSuspensionCallbackIfNeeded() > { > if (needsSuspensionCallback()) >- document().registerForPageCacheSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > } > > void HTMLInputElement::unregisterForSuspensionCallbackIfNeeded() > { > if (!needsSuspensionCallback()) >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > } > > bool HTMLInputElement::isRequiredFormControl() const >@@ -1431,12 +1431,12 @@ void HTMLInputElement::onSearch() > dispatchEvent(Event::create(eventNames().searchEvent, true, false)); > } > >-void HTMLInputElement::documentDidResumeFromPageCache() >+void HTMLInputElement::resumeFromDocumentSuspension() > { > ASSERT(needsSuspensionCallback()); > > #if ENABLE(INPUT_TYPE_COLOR) >- // <input type=color> uses documentWillSuspendForPageCache to detach the color picker UI, >+ // <input type=color> uses prepareForDocumentSuspension to detach the color picker UI, > // so it should not be reset when being loaded from page cache. > if (isColorControl()) > return; >@@ -1445,7 +1445,7 @@ void HTMLInputElement::documentDidResumeFromPageCache() > } > > #if ENABLE(INPUT_TYPE_COLOR) >-void HTMLInputElement::documentWillSuspendForPageCache() >+void HTMLInputElement::prepareForDocumentSuspension() > { > if (!isColorControl()) > return; >@@ -1502,7 +1502,7 @@ void HTMLInputElement::didMoveToNewDocument(Document* oldDocument) > if (oldDocument) { > // Always unregister for cache callbacks when leaving a document, even if we would otherwise like to be registered > if (needsSuspensionCallback) >- oldDocument->unregisterForPageCacheSuspensionCallbacks(this); >+ oldDocument->unregisterForDocumentSuspensionCallbacks(this); > if (isRadioButton()) > oldDocument->formController().checkedRadioButtons().removeButton(this); > #if ENABLE(TOUCH_EVENTS) >@@ -1512,7 +1512,7 @@ void HTMLInputElement::didMoveToNewDocument(Document* oldDocument) > } > > if (needsSuspensionCallback) >- document().registerForPageCacheSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > > #if ENABLE(TOUCH_EVENTS) > if (m_hasTouchEventHandler) >diff --git a/Source/WebCore/html/HTMLInputElement.h b/Source/WebCore/html/HTMLInputElement.h >index dd2bd4dac39375789f6b75c15a2b83bccec502ae..e0ee4519fb7dea48d0e20aef10689d8f50d7686d 100644 >--- a/Source/WebCore/html/HTMLInputElement.h >+++ b/Source/WebCore/html/HTMLInputElement.h >@@ -376,9 +376,9 @@ private: > virtual bool isInRange() const override final; > virtual bool isOutOfRange() const override final; > >- virtual void documentDidResumeFromPageCache() override final; >+ virtual void resumeFromDocumentSuspension() override final; > #if ENABLE(INPUT_TYPE_COLOR) >- virtual void documentWillSuspendForPageCache() override final; >+ virtual void prepareForDocumentSuspension() override final; > #endif > > virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override final; >diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp >index 4acad4b1ad6c17532dd49f115faecef640fc24d9..4daf4a6eed477afe809b4a0b9464d705c2765c9f 100644 >--- a/Source/WebCore/html/HTMLMediaElement.cpp >+++ b/Source/WebCore/html/HTMLMediaElement.cpp >@@ -545,7 +545,7 @@ void HTMLMediaElement::registerWithDocument(Document& document) > #endif > > #if ENABLE(WIRELESS_PLAYBACK_TARGET) >- document.registerForPageCacheSuspensionCallbacks(this); >+ document.registerForDocumentSuspensionCallbacks(this); > #endif > > document.registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks(*this); >@@ -579,7 +579,7 @@ void HTMLMediaElement::unregisterWithDocument(Document& document) > #endif > > #if ENABLE(WIRELESS_PLAYBACK_TARGET) >- document.unregisterForPageCacheSuspensionCallbacks(this); >+ document.unregisterForDocumentSuspensionCallbacks(this); > #endif > > document.unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks(*this); >@@ -605,12 +605,12 @@ void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument) > } > > #if ENABLE(WIRELESS_PLAYBACK_TARGET) >-void HTMLMediaElement::documentWillSuspendForPageCache() >+void HTMLMediaElement::prepareForDocumentSuspension() > { > m_mediaSession->unregisterWithDocument(document()); > } > >-void HTMLMediaElement::documentDidResumeFromPageCache() >+void HTMLMediaElement::resumeFromDocumentSuspension() > { > m_mediaSession->registerWithDocument(document()); > } >diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h >index a03f2c4fc6fdef6f2ea7f2f4e3e08565aeeffb59..d4e38d0022af4a21b48505866e37afac540dc4d4 100644 >--- a/Source/WebCore/html/HTMLMediaElement.h >+++ b/Source/WebCore/html/HTMLMediaElement.h >@@ -747,8 +747,8 @@ private: > void updateCaptionContainer(); > > #if ENABLE(WIRELESS_PLAYBACK_TARGET) >- virtual void documentWillSuspendForPageCache() override final; >- virtual void documentDidResumeFromPageCache() override final; >+ virtual void prepareForDocumentSuspension() override final; >+ virtual void resumeFromDocumentSuspension() override final; > > enum class UpdateMediaState { > Asynchronously, >diff --git a/Source/WebCore/html/HTMLPlugInImageElement.cpp b/Source/WebCore/html/HTMLPlugInImageElement.cpp >index 3f6ec4ed8df816ed3b2c714c7f8018208691645c..ee2696fd09fffcd800aa51dec62bb6815ade9978 100644 >--- a/Source/WebCore/html/HTMLPlugInImageElement.cpp >+++ b/Source/WebCore/html/HTMLPlugInImageElement.cpp >@@ -123,7 +123,7 @@ HTMLPlugInImageElement::HTMLPlugInImageElement(const QualifiedName& tagName, Doc > HTMLPlugInImageElement::~HTMLPlugInImageElement() > { > if (m_needsDocumentActivationCallbacks) >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > } > > void HTMLPlugInImageElement::setDisplayState(DisplayState state) >@@ -200,7 +200,7 @@ RenderPtr<RenderElement> HTMLPlugInImageElement::createElementRenderer(Ref<Rende > // inactive or reactivates so it can clear the renderer before going into the page cache. > if (!m_needsDocumentActivationCallbacks) { > m_needsDocumentActivationCallbacks = true; >- document().registerForPageCacheSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > } > > if (displayState() == DisplayingSnapshot) { >@@ -301,8 +301,8 @@ void HTMLPlugInImageElement::finishParsingChildren() > void HTMLPlugInImageElement::didMoveToNewDocument(Document* oldDocument) > { > if (m_needsDocumentActivationCallbacks) { >- oldDocument->unregisterForPageCacheSuspensionCallbacks(this); >- document().registerForPageCacheSuspensionCallbacks(this); >+ oldDocument->unregisterForDocumentSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > } > > if (m_imageLoader) >@@ -311,19 +311,19 @@ void HTMLPlugInImageElement::didMoveToNewDocument(Document* oldDocument) > HTMLPlugInElement::didMoveToNewDocument(oldDocument); > } > >-void HTMLPlugInImageElement::documentWillSuspendForPageCache() >+void HTMLPlugInImageElement::prepareForDocumentSuspension() > { > if (renderer()) > Style::detachRenderTree(*this); > >- HTMLPlugInElement::documentWillSuspendForPageCache(); >+ HTMLPlugInElement::prepareForDocumentSuspension(); > } > >-void HTMLPlugInImageElement::documentDidResumeFromPageCache() >+void HTMLPlugInImageElement::resumeFromDocumentSuspension() > { > setNeedsStyleRecalc(ReconstructRenderTree); > >- HTMLPlugInElement::documentDidResumeFromPageCache(); >+ HTMLPlugInElement::resumeFromDocumentSuspension(); > } > > void HTMLPlugInImageElement::startLoadingImage() >diff --git a/Source/WebCore/html/HTMLPlugInImageElement.h b/Source/WebCore/html/HTMLPlugInImageElement.h >index 41ee86171fe6d9da99e72a041220d969ce2d2881..0e74e5dc018ef0c00a110cf17a8803515e03db54 100644 >--- a/Source/WebCore/html/HTMLPlugInImageElement.h >+++ b/Source/WebCore/html/HTMLPlugInImageElement.h >@@ -120,8 +120,8 @@ private: > virtual void didAttachRenderers() override final; > virtual void willDetachRenderers() override final; > >- virtual void documentWillSuspendForPageCache() override final; >- virtual void documentDidResumeFromPageCache() override final; >+ virtual void prepareForDocumentSuspension() override final; >+ virtual void resumeFromDocumentSuspension() override final; > > virtual void defaultEventHandler(Event*) override final; > virtual void dispatchPendingMouseClick() override final; >diff --git a/Source/WebCore/loader/FrameLoader.cpp b/Source/WebCore/loader/FrameLoader.cpp >index 1bae4a2405912510e8c273973293a0944ca01294..921bbf189f92cb89049005496142f0de70ba0e05 100644 >--- a/Source/WebCore/loader/FrameLoader.cpp >+++ b/Source/WebCore/loader/FrameLoader.cpp >@@ -1820,7 +1820,7 @@ void FrameLoader::commitProvisionalLoad() > if (m_frame.document()->doctype() && m_frame.page()) > m_frame.page()->chrome().didReceiveDocType(&m_frame); > #endif >- m_frame.document()->documentDidResumeFromPageCache(); >+ m_frame.document()->resume(); > > // Force a layout to update view size and thereby update scrollbars. > #if PLATFORM(IOS) >diff --git a/Source/WebCore/svg/SVGSVGElement.cpp b/Source/WebCore/svg/SVGSVGElement.cpp >index 948d2b54b681772c6aef7f4aadf4a30c11a1e1df..62e9dd11527aa3fca04a006112c0ebd48cee9059 100644 >--- a/Source/WebCore/svg/SVGSVGElement.cpp >+++ b/Source/WebCore/svg/SVGSVGElement.cpp >@@ -68,7 +68,7 @@ inline SVGSVGElement::SVGSVGElement(const QualifiedName& tagName, Document& docu > { > ASSERT(hasTagName(SVGNames::svgTag)); > registerAnimatedPropertiesForSVGSVGElement(); >- document.registerForPageCacheSuspensionCallbacks(this); >+ document.registerForDocumentSuspensionCallbacks(this); > } > > Ref<SVGSVGElement> SVGSVGElement::create(const QualifiedName& tagName, Document& document) >@@ -85,15 +85,15 @@ SVGSVGElement::~SVGSVGElement() > { > if (m_viewSpec) > m_viewSpec->resetContextElement(); >- document().unregisterForPageCacheSuspensionCallbacks(this); >+ document().unregisterForDocumentSuspensionCallbacks(this); > document().accessSVGExtensions().removeTimeContainer(this); > } > > void SVGSVGElement::didMoveToNewDocument(Document* oldDocument) > { > if (oldDocument) >- oldDocument->unregisterForPageCacheSuspensionCallbacks(this); >- document().registerForPageCacheSuspensionCallbacks(this); >+ oldDocument->unregisterForDocumentSuspensionCallbacks(this); >+ document().registerForDocumentSuspensionCallbacks(this); > SVGGraphicsElement::didMoveToNewDocument(oldDocument); > } > >@@ -658,12 +658,12 @@ void SVGSVGElement::inheritViewAttributes(const SVGViewElement& viewElement) > view.setZoomAndPanBaseValue(zoomAndPan()); > } > >-void SVGSVGElement::documentWillSuspendForPageCache() >+void SVGSVGElement::prepareForDocumentSuspension() > { > pauseAnimations(); > } > >-void SVGSVGElement::documentDidResumeFromPageCache() >+void SVGSVGElement::resumeFromDocumentSuspension() > { > unpauseAnimations(); > } >diff --git a/Source/WebCore/svg/SVGSVGElement.h b/Source/WebCore/svg/SVGSVGElement.h >index e5958e9239556edaaa5e3ef1d6f16f41fe1ad0a1..28f77acb3265e5774d1c394018e5e5f334cae399 100644 >--- a/Source/WebCore/svg/SVGSVGElement.h >+++ b/Source/WebCore/svg/SVGSVGElement.h >@@ -139,8 +139,8 @@ private: > virtual void removedFrom(ContainerNode&) override; > virtual void svgAttributeChanged(const QualifiedName&) override; > virtual bool selfHasRelativeLengths() const override; >- virtual void documentWillSuspendForPageCache() override; >- virtual void documentDidResumeFromPageCache() override; >+ virtual void prepareForDocumentSuspension() override; >+ virtual void resumeFromDocumentSuspension() override; > virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const override; > > Frame* frameForCurrentScale() const;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 151527
:
266018
|
266019