Diff
Modified: trunk/Source/WebCore/ChangeLog (208803 => 208804)
--- trunk/Source/WebCore/ChangeLog 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/ChangeLog 2016-11-16 20:43:14 UTC (rev 208804)
@@ -1,3 +1,20 @@
+2016-11-16 Brady Eidson <[email protected]>
+
+ Re-indent some old headers.
+
+ Rubberstamped by Alex Christensen
+
+ No new tests (No behavior change).
+
+ (Also #pragma once a few of them)
+
+ * loader/DocumentLoader.h:
+ * loader/FrameLoaderClient.h:
+ * page/Frame.h:
+ * page/FrameTree.h:
+ * page/PageGroup.h:
+ * platform/Cursor.h:
+
2016-11-16 Darin Adler <[email protected]>
REGRESSION (r208672): Crash in com.apple.WebCore: WebCore::DatabaseContext::stopDatabases + 34
Modified: trunk/Source/WebCore/loader/DocumentLoader.h (208803 => 208804)
--- trunk/Source/WebCore/loader/DocumentLoader.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/loader/DocumentLoader.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -61,422 +61,422 @@
namespace WebCore {
- class ApplicationCacheHost;
- class Archive;
- class ArchiveResource;
- class ArchiveResourceCollection;
- class CachedRawResource;
- class CachedResourceLoader;
- class ContentFilter;
- class FormState;
- class Frame;
- class FrameLoader;
- class Page;
- class ResourceLoader;
- class SharedBuffer;
- class SubresourceLoader;
- class SubstituteResource;
+class ApplicationCacheHost;
+class Archive;
+class ArchiveResource;
+class ArchiveResourceCollection;
+class CachedRawResource;
+class CachedResourceLoader;
+class ContentFilter;
+class FormState;
+class Frame;
+class FrameLoader;
+class Page;
+class ResourceLoader;
+class SharedBuffer;
+class SubresourceLoader;
+class SubstituteResource;
- typedef HashMap<unsigned long, RefPtr<ResourceLoader>> ResourceLoaderMap;
- typedef Vector<ResourceResponse> ResponseVector;
+typedef HashMap<unsigned long, RefPtr<ResourceLoader>> ResourceLoaderMap;
+typedef Vector<ResourceResponse> ResponseVector;
- class DocumentLoader : public RefCounted<DocumentLoader>, private CachedRawResourceClient {
- WTF_MAKE_FAST_ALLOCATED;
- friend class ContentFilter;
- public:
- static Ref<DocumentLoader> create(const ResourceRequest& request, const SubstituteData& data)
- {
- return adoptRef(*new DocumentLoader(request, data));
- }
- WEBCORE_EXPORT virtual ~DocumentLoader();
+class DocumentLoader : public RefCounted<DocumentLoader>, private CachedRawResourceClient {
+ WTF_MAKE_FAST_ALLOCATED;
+ friend class ContentFilter;
+public:
+ static Ref<DocumentLoader> create(const ResourceRequest& request, const SubstituteData& data)
+ {
+ return adoptRef(*new DocumentLoader(request, data));
+ }
+ WEBCORE_EXPORT virtual ~DocumentLoader();
- void attachToFrame(Frame&);
- Frame* frame() const { return m_frame; }
+ void attachToFrame(Frame&);
+ Frame* frame() const { return m_frame; }
- WEBCORE_EXPORT virtual void detachFromFrame();
+ WEBCORE_EXPORT virtual void detachFromFrame();
- WEBCORE_EXPORT FrameLoader* frameLoader() const;
- WEBCORE_EXPORT SubresourceLoader* mainResourceLoader() const;
- WEBCORE_EXPORT RefPtr<SharedBuffer> mainResourceData() const;
-
- DocumentWriter& writer() const { return m_writer; }
+ WEBCORE_EXPORT FrameLoader* frameLoader() const;
+ WEBCORE_EXPORT SubresourceLoader* mainResourceLoader() const;
+ WEBCORE_EXPORT RefPtr<SharedBuffer> mainResourceData() const;
+
+ DocumentWriter& writer() const { return m_writer; }
- WEBCORE_EXPORT const ResourceRequest& originalRequest() const;
- WEBCORE_EXPORT const ResourceRequest& originalRequestCopy() const;
+ WEBCORE_EXPORT const ResourceRequest& originalRequest() const;
+ WEBCORE_EXPORT const ResourceRequest& originalRequestCopy() const;
- WEBCORE_EXPORT const ResourceRequest& request() const;
- WEBCORE_EXPORT ResourceRequest& request();
+ WEBCORE_EXPORT const ResourceRequest& request() const;
+ WEBCORE_EXPORT ResourceRequest& request();
- CachedResourceLoader& cachedResourceLoader() { return m_cachedResourceLoader; }
+ CachedResourceLoader& cachedResourceLoader() { return m_cachedResourceLoader; }
- const SubstituteData& substituteData() const { return m_substituteData; }
+ const SubstituteData& substituteData() const { return m_substituteData; }
- WEBCORE_EXPORT const URL& url() const;
- WEBCORE_EXPORT const URL& unreachableURL() const;
+ WEBCORE_EXPORT const URL& url() const;
+ WEBCORE_EXPORT const URL& unreachableURL() const;
- const URL& originalURL() const;
- WEBCORE_EXPORT const URL& responseURL() const;
- WEBCORE_EXPORT const String& responseMIMEType() const;
+ const URL& originalURL() const;
+ WEBCORE_EXPORT const URL& responseURL() const;
+ WEBCORE_EXPORT const String& responseMIMEType() const;
#if PLATFORM(IOS)
- // FIXME: This method seems to violate the encapsulation of this class.
- WEBCORE_EXPORT void setResponseMIMEType(const String&);
+ // FIXME: This method seems to violate the encapsulation of this class.
+ WEBCORE_EXPORT void setResponseMIMEType(const String&);
#endif
- const String& currentContentType() const;
- void replaceRequestURLForSameDocumentNavigation(const URL&);
- bool isStopping() const { return m_isStopping; }
- void stopLoading();
- void setCommitted(bool committed) { m_committed = committed; }
- bool isCommitted() const { return m_committed; }
- WEBCORE_EXPORT bool isLoading() const;
+ const String& currentContentType() const;
+ void replaceRequestURLForSameDocumentNavigation(const URL&);
+ bool isStopping() const { return m_isStopping; }
+ void stopLoading();
+ void setCommitted(bool committed) { m_committed = committed; }
+ bool isCommitted() const { return m_committed; }
+ WEBCORE_EXPORT bool isLoading() const;
- const ResourceError& mainDocumentError() const { return m_mainDocumentError; }
+ const ResourceError& mainDocumentError() const { return m_mainDocumentError; }
- const ResourceResponse& response() const { return m_response; }
+ const ResourceResponse& response() const { return m_response; }
#if PLATFORM(IOS)
- // FIXME: This method seems to violate the encapsulation of this class.
- void setResponse(const ResourceResponse& response) { m_response = response; }
+ // FIXME: This method seems to violate the encapsulation of this class.
+ void setResponse(const ResourceResponse& response) { m_response = response; }
#endif
- bool isClientRedirect() const { return m_isClientRedirect; }
- void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isClientRedirect; }
- void dispatchOnloadEvents();
- bool wasOnloadDispatched() { return m_wasOnloadDispatched; }
- WEBCORE_EXPORT bool isLoadingInAPISense() const;
- WEBCORE_EXPORT void setTitle(const StringWithDirection&);
- const String& overrideEncoding() const { return m_overrideEncoding; }
+ bool isClientRedirect() const { return m_isClientRedirect; }
+ void setIsClientRedirect(bool isClientRedirect) { m_isClientRedirect = isClientRedirect; }
+ void dispatchOnloadEvents();
+ bool wasOnloadDispatched() { return m_wasOnloadDispatched; }
+ WEBCORE_EXPORT bool isLoadingInAPISense() const;
+ WEBCORE_EXPORT void setTitle(const StringWithDirection&);
+ const String& overrideEncoding() const { return m_overrideEncoding; }
#if PLATFORM(COCOA) && !USE(CFURLCONNECTION)
- void schedule(SchedulePair&);
- void unschedule(SchedulePair&);
+ void schedule(SchedulePair&);
+ void unschedule(SchedulePair&);
#endif
#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
- void setArchive(PassRefPtr<Archive>);
- WEBCORE_EXPORT void addAllArchiveResources(Archive*);
- WEBCORE_EXPORT void addArchiveResource(Ref<ArchiveResource>&&);
- PassRefPtr<Archive> popArchiveForSubframe(const String& frameName, const URL&);
- WEBCORE_EXPORT SharedBuffer* parsedArchiveData() const;
+ void setArchive(PassRefPtr<Archive>);
+ WEBCORE_EXPORT void addAllArchiveResources(Archive*);
+ WEBCORE_EXPORT void addArchiveResource(Ref<ArchiveResource>&&);
+ PassRefPtr<Archive> popArchiveForSubframe(const String& frameName, const URL&);
+ WEBCORE_EXPORT SharedBuffer* parsedArchiveData() const;
- WEBCORE_EXPORT bool scheduleArchiveLoad(ResourceLoader&, const ResourceRequest&);
+ WEBCORE_EXPORT bool scheduleArchiveLoad(ResourceLoader&, const ResourceRequest&);
#endif
- void scheduleSubstituteResourceLoad(ResourceLoader&, SubstituteResource&);
+ void scheduleSubstituteResourceLoad(ResourceLoader&, SubstituteResource&);
- // Return the ArchiveResource for the URL only when loading an Archive
- WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(const URL&) const;
+ // Return the ArchiveResource for the URL only when loading an Archive
+ WEBCORE_EXPORT ArchiveResource* archiveResourceForURL(const URL&) const;
- WEBCORE_EXPORT RefPtr<ArchiveResource> mainResource() const;
+ WEBCORE_EXPORT RefPtr<ArchiveResource> mainResource() const;
- // Return an ArchiveResource for the URL, either creating from live data or
- // pulling from the ArchiveResourceCollection
- WEBCORE_EXPORT PassRefPtr<ArchiveResource> subresource(const URL&) const;
- WEBCORE_EXPORT Vector<RefPtr<ArchiveResource>> subresources() const;
+ // Return an ArchiveResource for the URL, either creating from live data or
+ // pulling from the ArchiveResourceCollection
+ WEBCORE_EXPORT PassRefPtr<ArchiveResource> subresource(const URL&) const;
+ WEBCORE_EXPORT Vector<RefPtr<ArchiveResource>> subresources() const;
#ifndef NDEBUG
- bool isSubstituteLoadPending(ResourceLoader*) const;
+ bool isSubstituteLoadPending(ResourceLoader*) const;
#endif
- void cancelPendingSubstituteLoad(ResourceLoader*);
-
- void addResponse(const ResourceResponse&);
- const ResponseVector& responses() const { return m_responses; }
+ void cancelPendingSubstituteLoad(ResourceLoader*);
+
+ void addResponse(const ResourceResponse&);
+ const ResponseVector& responses() const { return m_responses; }
- const NavigationAction& triggeringAction() const { return m_triggeringAction; }
- void setTriggeringAction(const NavigationAction&);
- void setOverrideEncoding(const String& encoding) { m_overrideEncoding = encoding; }
- void setLastCheckedRequest(const ResourceRequest& request) { m_lastCheckedRequest = request; }
- const ResourceRequest& lastCheckedRequest() { return m_lastCheckedRequest; }
+ const NavigationAction& triggeringAction() const { return m_triggeringAction; }
+ void setTriggeringAction(const NavigationAction&);
+ void setOverrideEncoding(const String& encoding) { m_overrideEncoding = encoding; }
+ void setLastCheckedRequest(const ResourceRequest& request) { m_lastCheckedRequest = request; }
+ const ResourceRequest& lastCheckedRequest() { return m_lastCheckedRequest; }
- void stopRecordingResponses();
- const StringWithDirection& title() const { return m_pageTitle; }
+ void stopRecordingResponses();
+ const StringWithDirection& title() const { return m_pageTitle; }
- WEBCORE_EXPORT URL urlForHistory() const;
- WEBCORE_EXPORT bool urlForHistoryReflectsFailure() const;
+ WEBCORE_EXPORT URL urlForHistory() const;
+ WEBCORE_EXPORT bool urlForHistoryReflectsFailure() const;
- // These accessors accommodate WebCore's somewhat fickle custom of creating history
- // items for redirects, but only sometimes. For "source" and "destination",
- // these accessors return the URL that would have been used if a history
- // item were created. This allows WebKit to link history items reflecting
- // redirects into a chain from start to finish.
- String clientRedirectSourceForHistory() const { return m_clientRedirectSourceForHistory; } // null if no client redirect occurred.
- String clientRedirectDestinationForHistory() const { return urlForHistory(); }
- void setClientRedirectSourceForHistory(const String& clientRedirectSourceForHistory) { m_clientRedirectSourceForHistory = clientRedirectSourceForHistory; }
-
- String serverRedirectSourceForHistory() const { return (urlForHistory() == url() || url() == blankURL()) ? String() : urlForHistory().string(); } // null if no server redirect occurred.
- String serverRedirectDestinationForHistory() const { return url(); }
+ // These accessors accommodate WebCore's somewhat fickle custom of creating history
+ // items for redirects, but only sometimes. For "source" and "destination",
+ // these accessors return the URL that would have been used if a history
+ // item were created. This allows WebKit to link history items reflecting
+ // redirects into a chain from start to finish.
+ String clientRedirectSourceForHistory() const { return m_clientRedirectSourceForHistory; } // null if no client redirect occurred.
+ String clientRedirectDestinationForHistory() const { return urlForHistory(); }
+ void setClientRedirectSourceForHistory(const String& clientRedirectSourceForHistory) { m_clientRedirectSourceForHistory = clientRedirectSourceForHistory; }
+
+ String serverRedirectSourceForHistory() const { return (urlForHistory() == url() || url() == blankURL()) ? String() : urlForHistory().string(); } // null if no server redirect occurred.
+ String serverRedirectDestinationForHistory() const { return url(); }
- bool didCreateGlobalHistoryEntry() const { return m_didCreateGlobalHistoryEntry; }
- void setDidCreateGlobalHistoryEntry(bool didCreateGlobalHistoryEntry) { m_didCreateGlobalHistoryEntry = didCreateGlobalHistoryEntry; }
+ bool didCreateGlobalHistoryEntry() const { return m_didCreateGlobalHistoryEntry; }
+ void setDidCreateGlobalHistoryEntry(bool didCreateGlobalHistoryEntry) { m_didCreateGlobalHistoryEntry = didCreateGlobalHistoryEntry; }
- bool subresourceLoadersArePageCacheAcceptable() const { return m_subresourceLoadersArePageCacheAcceptable; }
+ bool subresourceLoadersArePageCacheAcceptable() const { return m_subresourceLoadersArePageCacheAcceptable; }
- void setDefersLoading(bool);
- void setMainResourceDataBufferingPolicy(DataBufferingPolicy);
+ void setDefersLoading(bool);
+ void setMainResourceDataBufferingPolicy(DataBufferingPolicy);
- void startLoadingMainResource();
- WEBCORE_EXPORT void cancelMainResourceLoad(const ResourceError&);
- void willContinueMainResourceLoadAfterRedirect(const ResourceRequest&);
+ void startLoadingMainResource();
+ WEBCORE_EXPORT void cancelMainResourceLoad(const ResourceError&);
+ void willContinueMainResourceLoadAfterRedirect(const ResourceRequest&);
- // Support iconDatabase in synchronous mode.
- void iconLoadDecisionAvailable();
-
- // Support iconDatabase in asynchronous mode.
- void continueIconLoadWithDecision(IconLoadDecision);
- void getIconLoadDecisionForIconURL(const String&);
- void getIconDataForIconURL(const String&);
+ // Support iconDatabase in synchronous mode.
+ void iconLoadDecisionAvailable();
+
+ // Support iconDatabase in asynchronous mode.
+ void continueIconLoadWithDecision(IconLoadDecision);
+ void getIconLoadDecisionForIconURL(const String&);
+ void getIconDataForIconURL(const String&);
- bool isLoadingMainResource() const { return m_loadingMainResource; }
- bool isLoadingMultipartContent() const { return m_isLoadingMultipartContent; }
+ bool isLoadingMainResource() const { return m_loadingMainResource; }
+ bool isLoadingMultipartContent() const { return m_isLoadingMultipartContent; }
- void stopLoadingPlugIns();
- void stopLoadingSubresources();
+ void stopLoadingPlugIns();
+ void stopLoadingSubresources();
- bool userContentExtensionsEnabled() const { return m_userContentExtensionsEnabled; }
- void setUserContentExtensionsEnabled(bool enabled) { m_userContentExtensionsEnabled = enabled; }
+ bool userContentExtensionsEnabled() const { return m_userContentExtensionsEnabled; }
+ void setUserContentExtensionsEnabled(bool enabled) { m_userContentExtensionsEnabled = enabled; }
- void addSubresourceLoader(ResourceLoader*);
- void removeSubresourceLoader(ResourceLoader*);
- void addPlugInStreamLoader(ResourceLoader&);
- void removePlugInStreamLoader(ResourceLoader&);
+ void addSubresourceLoader(ResourceLoader*);
+ void removeSubresourceLoader(ResourceLoader*);
+ void addPlugInStreamLoader(ResourceLoader&);
+ void removePlugInStreamLoader(ResourceLoader&);
- void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*);
+ void subresourceLoaderFinishedLoadingOnePart(ResourceLoader*);
- void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataLoad = defer; }
-
- void didTellClientAboutLoad(const String& url)
- {
+ void setDeferMainResourceDataLoad(bool defer) { m_deferMainResourceDataLoad = defer; }
+
+ void didTellClientAboutLoad(const String& url)
+ {
#if !PLATFORM(COCOA)
- // Don't include data urls here, as if a lot of data is loaded
- // that way, we hold on to the (large) url string for too long.
- if (protocolIs(url, "data"))
- return;
+ // Don't include data urls here, as if a lot of data is loaded
+ // that way, we hold on to the (large) url string for too long.
+ if (protocolIs(url, "data"))
+ return;
#endif
- if (!url.isEmpty())
- m_resourcesClientKnowsAbout.add(url);
- }
- bool haveToldClientAboutLoad(const String& url) { return m_resourcesClientKnowsAbout.contains(url); }
- void recordMemoryCacheLoadForFutureClientNotification(const ResourceRequest&);
- void takeMemoryCacheLoadsForClientNotification(Vector<ResourceRequest>& loads);
+ if (!url.isEmpty())
+ m_resourcesClientKnowsAbout.add(url);
+ }
+ bool haveToldClientAboutLoad(const String& url) { return m_resourcesClientKnowsAbout.contains(url); }
+ void recordMemoryCacheLoadForFutureClientNotification(const ResourceRequest&);
+ void takeMemoryCacheLoadsForClientNotification(Vector<ResourceRequest>& loads);
- LoadTiming& timing() { return m_loadTiming; }
- void resetTiming() { m_loadTiming = LoadTiming(); }
+ LoadTiming& timing() { return m_loadTiming; }
+ void resetTiming() { m_loadTiming = LoadTiming(); }
- // The WebKit layer calls this function when it's ready for the data to
- // actually be added to the document.
- WEBCORE_EXPORT void commitData(const char* bytes, size_t length);
+ // The WebKit layer calls this function when it's ready for the data to
+ // actually be added to the document.
+ WEBCORE_EXPORT void commitData(const char* bytes, size_t length);
- ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); }
+ ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); }
- void checkLoadComplete();
+ void checkLoadComplete();
- // The URL of the document resulting from this DocumentLoader.
- URL documentURL() const;
+ // The URL of the document resulting from this DocumentLoader.
+ URL documentURL() const;
#if USE(QUICK_LOOK)
- void setQuickLookHandle(std::unique_ptr<QuickLookHandle> quickLookHandle) { m_quickLookHandle = WTFMove(quickLookHandle); }
- QuickLookHandle* quickLookHandle() const { return m_quickLookHandle.get(); }
+ void setQuickLookHandle(std::unique_ptr<QuickLookHandle> quickLookHandle) { m_quickLookHandle = WTFMove(quickLookHandle); }
+ QuickLookHandle* quickLookHandle() const { return m_quickLookHandle.get(); }
#endif
#if ENABLE(CONTENT_EXTENSIONS)
- void addPendingContentExtensionSheet(const String& identifier, StyleSheetContents&);
- void addPendingContentExtensionDisplayNoneSelector(const String& identifier, const String& selector, uint32_t selectorID);
+ void addPendingContentExtensionSheet(const String& identifier, StyleSheetContents&);
+ void addPendingContentExtensionDisplayNoneSelector(const String& identifier, const String& selector, uint32_t selectorID);
#endif
- void setShouldOpenExternalURLsPolicy(ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy) { m_shouldOpenExternalURLsPolicy = shouldOpenExternalURLsPolicy; }
- ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToPropagate() const;
+ void setShouldOpenExternalURLsPolicy(ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy) { m_shouldOpenExternalURLsPolicy = shouldOpenExternalURLsPolicy; }
+ ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicyToPropagate() const;
#if ENABLE(CONTENT_FILTERING)
- ContentFilter* contentFilter() const;
+ ContentFilter* contentFilter() const;
#endif
- bool isAlwaysOnLoggingAllowed() const;
+ bool isAlwaysOnLoggingAllowed() const;
- protected:
- WEBCORE_EXPORT DocumentLoader(const ResourceRequest&, const SubstituteData&);
+protected:
+ WEBCORE_EXPORT DocumentLoader(const ResourceRequest&, const SubstituteData&);
- WEBCORE_EXPORT virtual void attachToFrame();
+ WEBCORE_EXPORT virtual void attachToFrame();
- bool m_deferMainResourceDataLoad;
+ bool m_deferMainResourceDataLoad;
- private:
- Document* document() const;
+private:
+ Document* document() const;
- void setRequest(const ResourceRequest&);
+ void setRequest(const ResourceRequest&);
- void commitIfReady();
- void setMainDocumentError(const ResourceError&);
- void commitLoad(const char*, int);
- void clearMainResourceLoader();
+ void commitIfReady();
+ void setMainDocumentError(const ResourceError&);
+ void commitLoad(const char*, int);
+ void clearMainResourceLoader();
- void setupForReplace();
- void maybeFinishLoadingMultipartContent();
-
- bool maybeCreateArchive();
+ void setupForReplace();
+ void maybeFinishLoadingMultipartContent();
+
+ bool maybeCreateArchive();
#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
- void clearArchiveResources();
+ void clearArchiveResources();
#endif
- void willSendRequest(ResourceRequest&, const ResourceResponse&);
- void finishedLoading(double finishTime);
- void mainReceivedError(const ResourceError&);
- WEBCORE_EXPORT void redirectReceived(CachedResource&, ResourceRequest&, const ResourceResponse&) override;
- WEBCORE_EXPORT void responseReceived(CachedResource&, const ResourceResponse&) override;
- WEBCORE_EXPORT void dataReceived(CachedResource&, const char* data, int length) override;
- WEBCORE_EXPORT void notifyFinished(CachedResource&) override;
+ void willSendRequest(ResourceRequest&, const ResourceResponse&);
+ void finishedLoading(double finishTime);
+ void mainReceivedError(const ResourceError&);
+ WEBCORE_EXPORT void redirectReceived(CachedResource&, ResourceRequest&, const ResourceResponse&) override;
+ WEBCORE_EXPORT void responseReceived(CachedResource&, const ResourceResponse&) override;
+ WEBCORE_EXPORT void dataReceived(CachedResource&, const char* data, int length) override;
+ WEBCORE_EXPORT void notifyFinished(CachedResource&) override;
- void responseReceived(const ResourceResponse&);
- void dataReceived(const char* data, int length);
+ void responseReceived(const ResourceResponse&);
+ void dataReceived(const char* data, int length);
- bool maybeLoadEmpty();
+ bool maybeLoadEmpty();
- bool isMultipartReplacingLoad() const;
- bool isPostOrRedirectAfterPost(const ResourceRequest&, const ResourceResponse&);
+ bool isMultipartReplacingLoad() const;
+ bool isPostOrRedirectAfterPost(const ResourceRequest&, const ResourceResponse&);
- void continueAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
- void continueAfterContentPolicy(PolicyAction);
+ void continueAfterNavigationPolicy(const ResourceRequest&, bool shouldContinue);
+ void continueAfterContentPolicy(PolicyAction);
- void stopLoadingForPolicyChange();
- ResourceError interruptedForPolicyChangeError() const;
+ void stopLoadingForPolicyChange();
+ ResourceError interruptedForPolicyChangeError() const;
- void stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(unsigned long identifier, const ResourceResponse&);
+ void stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied(unsigned long identifier, const ResourceResponse&);
#if HAVE(RUNLOOP_TIMER)
- typedef RunLoopTimer<DocumentLoader> DocumentLoaderTimer;
+ typedef RunLoopTimer<DocumentLoader> DocumentLoaderTimer;
#else
- typedef Timer DocumentLoaderTimer;
+ typedef Timer DocumentLoaderTimer;
#endif
- void handleSubstituteDataLoadSoon();
- void handleSubstituteDataLoadNow();
- void startDataLoadTimer();
+ void handleSubstituteDataLoadSoon();
+ void handleSubstituteDataLoadNow();
+ void startDataLoadTimer();
- void deliverSubstituteResourcesAfterDelay();
- void substituteResourceDeliveryTimerFired();
+ void deliverSubstituteResourcesAfterDelay();
+ void substituteResourceDeliveryTimerFired();
- void clearMainResource();
+ void clearMainResource();
- void cancelPolicyCheckIfNeeded();
- void becomeMainResourceClient();
+ void cancelPolicyCheckIfNeeded();
+ void becomeMainResourceClient();
- Frame* m_frame;
- Ref<CachedResourceLoader> m_cachedResourceLoader;
+ Frame* m_frame;
+ Ref<CachedResourceLoader> m_cachedResourceLoader;
- CachedResourceHandle<CachedRawResource> m_mainResource;
- ResourceLoaderMap m_subresourceLoaders;
- ResourceLoaderMap m_multipartSubresourceLoaders;
- ResourceLoaderMap m_plugInStreamLoaders;
-
- mutable DocumentWriter m_writer;
+ CachedResourceHandle<CachedRawResource> m_mainResource;
+ ResourceLoaderMap m_subresourceLoaders;
+ ResourceLoaderMap m_multipartSubresourceLoaders;
+ ResourceLoaderMap m_plugInStreamLoaders;
+
+ mutable DocumentWriter m_writer;
- // A reference to actual request used to create the data source.
- // This should only be used by the resourceLoadDelegate's
- // identifierForInitialRequest:fromDatasource: method. It is
- // not guaranteed to remain unchanged, as requests are mutable.
- ResourceRequest m_originalRequest;
+ // A reference to actual request used to create the data source.
+ // This should only be used by the resourceLoadDelegate's
+ // identifierForInitialRequest:fromDatasource: method. It is
+ // not guaranteed to remain unchanged, as requests are mutable.
+ ResourceRequest m_originalRequest;
- SubstituteData m_substituteData;
+ SubstituteData m_substituteData;
- // A copy of the original request used to create the data source.
- // We have to copy the request because requests are mutable.
- ResourceRequest m_originalRequestCopy;
-
- // The 'working' request. It may be mutated
- // several times from the original request to include additional
- // headers, cookie information, canonicalization and redirects.
- ResourceRequest m_request;
-
- ResourceResponse m_response;
+ // A copy of the original request used to create the data source.
+ // We have to copy the request because requests are mutable.
+ ResourceRequest m_originalRequestCopy;
- ResourceError m_mainDocumentError;
+ // The 'working' request. It may be mutated
+ // several times from the original request to include additional
+ // headers, cookie information, canonicalization and redirects.
+ ResourceRequest m_request;
- bool m_originalSubstituteDataWasValid;
- bool m_committed;
- bool m_isStopping;
- bool m_gotFirstByte;
- bool m_isClientRedirect;
- bool m_isLoadingMultipartContent;
+ ResourceResponse m_response;
- // FIXME: Document::m_processingLoadEvent and DocumentLoader::m_wasOnloadDispatched are roughly the same
- // and should be merged.
- bool m_wasOnloadDispatched;
+ ResourceError m_mainDocumentError;
- StringWithDirection m_pageTitle;
+ bool m_originalSubstituteDataWasValid;
+ bool m_committed;
+ bool m_isStopping;
+ bool m_gotFirstByte;
+ bool m_isClientRedirect;
+ bool m_isLoadingMultipartContent;
- String m_overrideEncoding;
+ // FIXME: Document::m_processingLoadEvent and DocumentLoader::m_wasOnloadDispatched are roughly the same
+ // and should be merged.
+ bool m_wasOnloadDispatched;
- // The action that triggered loading - we keep this around for the
- // benefit of the various policy handlers.
- NavigationAction m_triggeringAction;
+ StringWithDirection m_pageTitle;
- // The last request that we checked click policy for - kept around
- // so we can avoid asking again needlessly.
- ResourceRequest m_lastCheckedRequest;
+ String m_overrideEncoding;
- // We retain all the received responses so we can play back the
- // WebResourceLoadDelegate messages if the item is loaded from the
- // page cache.
- ResponseVector m_responses;
- bool m_stopRecordingResponses;
-
- typedef HashMap<RefPtr<ResourceLoader>, RefPtr<SubstituteResource>> SubstituteResourceMap;
- SubstituteResourceMap m_pendingSubstituteResources;
- Timer m_substituteResourceDeliveryTimer;
+ // The action that triggered loading - we keep this around for the
+ // benefit of the various policy handlers.
+ NavigationAction m_triggeringAction;
- std::unique_ptr<ArchiveResourceCollection> m_archiveResourceCollection;
+ // The last request that we checked click policy for - kept around
+ // so we can avoid asking again needlessly.
+ ResourceRequest m_lastCheckedRequest;
+
+ // We retain all the received responses so we can play back the
+ // WebResourceLoadDelegate messages if the item is loaded from the
+ // page cache.
+ ResponseVector m_responses;
+ bool m_stopRecordingResponses;
+
+ typedef HashMap<RefPtr<ResourceLoader>, RefPtr<SubstituteResource>> SubstituteResourceMap;
+ SubstituteResourceMap m_pendingSubstituteResources;
+ Timer m_substituteResourceDeliveryTimer;
+
+ std::unique_ptr<ArchiveResourceCollection> m_archiveResourceCollection;
#if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
- RefPtr<Archive> m_archive;
- RefPtr<SharedBuffer> m_parsedArchiveData;
+ RefPtr<Archive> m_archive;
+ RefPtr<SharedBuffer> m_parsedArchiveData;
#endif
- HashSet<String> m_resourcesClientKnowsAbout;
- Vector<ResourceRequest> m_resourcesLoadedFromMemoryCacheForClientNotification;
-
- String m_clientRedirectSourceForHistory;
- bool m_didCreateGlobalHistoryEntry;
+ HashSet<String> m_resourcesClientKnowsAbout;
+ Vector<ResourceRequest> m_resourcesLoadedFromMemoryCacheForClientNotification;
+
+ String m_clientRedirectSourceForHistory;
+ bool m_didCreateGlobalHistoryEntry;
- bool m_loadingMainResource;
- LoadTiming m_loadTiming;
+ bool m_loadingMainResource;
+ LoadTiming m_loadTiming;
- double m_timeOfLastDataReceived;
- unsigned long m_identifierForLoadWithoutResourceLoader;
+ double m_timeOfLastDataReceived;
+ unsigned long m_identifierForLoadWithoutResourceLoader;
- DocumentLoaderTimer m_dataLoadTimer;
- bool m_waitingForContentPolicy { false };
- bool m_waitingForNavigationPolicy { false };
+ DocumentLoaderTimer m_dataLoadTimer;
+ bool m_waitingForContentPolicy { false };
+ bool m_waitingForNavigationPolicy { false };
- RefPtr<IconLoadDecisionCallback> m_iconLoadDecisionCallback;
- RefPtr<IconDataCallback> m_iconDataCallback;
+ RefPtr<IconLoadDecisionCallback> m_iconLoadDecisionCallback;
+ RefPtr<IconDataCallback> m_iconDataCallback;
- bool m_subresourceLoadersArePageCacheAcceptable;
- ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow };
+ bool m_subresourceLoadersArePageCacheAcceptable;
+ ShouldOpenExternalURLsPolicy m_shouldOpenExternalURLsPolicy { ShouldOpenExternalURLsPolicy::ShouldNotAllow };
- std::unique_ptr<ApplicationCacheHost> m_applicationCacheHost;
+ std::unique_ptr<ApplicationCacheHost> m_applicationCacheHost;
#if ENABLE(CONTENT_FILTERING)
- std::unique_ptr<ContentFilter> m_contentFilter;
+ std::unique_ptr<ContentFilter> m_contentFilter;
#endif
#if USE(QUICK_LOOK)
- std::unique_ptr<QuickLookHandle> m_quickLookHandle;
+ std::unique_ptr<QuickLookHandle> m_quickLookHandle;
#endif
#if ENABLE(CONTENT_EXTENSIONS)
- HashMap<String, RefPtr<StyleSheetContents>> m_pendingNamedContentExtensionStyleSheets;
- HashMap<String, Vector<std::pair<String, uint32_t>>> m_pendingContentExtensionDisplayNoneSelectors;
+ HashMap<String, RefPtr<StyleSheetContents>> m_pendingNamedContentExtensionStyleSheets;
+ HashMap<String, Vector<std::pair<String, uint32_t>>> m_pendingContentExtensionDisplayNoneSelectors;
#endif
- bool m_userContentExtensionsEnabled { true };
+ bool m_userContentExtensionsEnabled { true };
#ifndef NDEBUG
- bool m_hasEverBeenAttached { false };
+ bool m_hasEverBeenAttached { false };
#endif
- };
+};
- inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification(const ResourceRequest& request)
- {
- m_resourcesLoadedFromMemoryCacheForClientNotification.append(request);
- }
+inline void DocumentLoader::recordMemoryCacheLoadForFutureClientNotification(const ResourceRequest& request)
+{
+ m_resourcesLoadedFromMemoryCacheForClientNotification.append(request);
+}
- inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector<ResourceRequest>& loadsSet)
- {
- loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification);
- m_resourcesLoadedFromMemoryCacheForClientNotification.clear();
- }
+inline void DocumentLoader::takeMemoryCacheLoadsForClientNotification(Vector<ResourceRequest>& loadsSet)
+{
+ loadsSet.swap(m_resourcesLoadedFromMemoryCacheForClientNotification);
+ m_resourcesLoadedFromMemoryCacheForClientNotification.clear();
+}
}
Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (208803 => 208804)
--- trunk/Source/WebCore/loader/FrameLoaderClient.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -59,301 +59,301 @@
namespace WebCore {
- class AuthenticationChallenge;
- class CachedFrame;
- class CachedResourceRequest;
- class Color;
- class DOMWindowExtension;
- class DOMWrapperWorld;
- class DocumentLoader;
- class Element;
- class FormState;
- class Frame;
- class FrameLoader;
- class FrameNetworkingContext;
- class HistoryItem;
- class HTMLAppletElement;
- class HTMLFormElement;
- class HTMLFrameOwnerElement;
- class HTMLPlugInElement;
- class IntSize;
- class URL;
- class MessageEvent;
- class NavigationAction;
- class Page;
- class ProtectionSpace;
- class PluginViewBase;
- class PolicyChecker;
- class ResourceError;
- class ResourceHandle;
- class ResourceRequest;
- class ResourceResponse;
+class AuthenticationChallenge;
+class CachedFrame;
+class CachedResourceRequest;
+class Color;
+class DOMWindowExtension;
+class DOMWrapperWorld;
+class DocumentLoader;
+class Element;
+class FormState;
+class Frame;
+class FrameLoader;
+class FrameNetworkingContext;
+class HistoryItem;
+class HTMLAppletElement;
+class HTMLFormElement;
+class HTMLFrameOwnerElement;
+class HTMLPlugInElement;
+class IntSize;
+class URL;
+class MessageEvent;
+class NavigationAction;
+class Page;
+class ProtectionSpace;
+class PluginViewBase;
+class PolicyChecker;
+class ResourceError;
+class ResourceHandle;
+class ResourceRequest;
+class ResourceResponse;
#if ENABLE(WEB_RTC)
- class RTCPeerConnectionHandler;
+class RTCPeerConnectionHandler;
#endif
- class SecurityOrigin;
- class SessionID;
- class SharedBuffer;
- class StringWithDirection;
- class SubstituteData;
- class Widget;
+class SecurityOrigin;
+class SessionID;
+class SharedBuffer;
+class StringWithDirection;
+class SubstituteData;
+class Widget;
#if USE(QUICK_LOOK)
- class QuickLookHandle;
+class QuickLookHandle;
#endif
- typedef std::function<void (PolicyAction)> FramePolicyFunction;
+typedef std::function<void (PolicyAction)> FramePolicyFunction;
- class WEBCORE_EXPORT FrameLoaderClient {
- public:
- // An inline function cannot be the first non-abstract virtual function declared
- // in the class as it results in the vtable being generated as a weak symbol.
- // This hurts performance (in Mac OS X at least, when loadig frameworks), so we
- // don't want to do it in WebKit.
- virtual bool hasHTMLView() const;
+class WEBCORE_EXPORT FrameLoaderClient {
+public:
+ // An inline function cannot be the first non-abstract virtual function declared
+ // in the class as it results in the vtable being generated as a weak symbol.
+ // This hurts performance (in Mac OS X at least, when loadig frameworks), so we
+ // don't want to do it in WebKit.
+ virtual bool hasHTMLView() const;
- virtual ~FrameLoaderClient() { }
+ virtual ~FrameLoaderClient() { }
- virtual void frameLoaderDestroyed() = 0;
+ virtual void frameLoaderDestroyed() = 0;
- virtual bool hasWebView() const = 0; // mainly for assertions
+ virtual bool hasWebView() const = 0; // mainly for assertions
- virtual void makeRepresentation(DocumentLoader*) = 0;
-
+ virtual void makeRepresentation(DocumentLoader*) = 0;
+
#if PLATFORM(IOS)
- // Returns true if the client forced the layout.
- virtual bool forceLayoutOnRestoreFromPageCache() = 0;
+ // Returns true if the client forced the layout.
+ virtual bool forceLayoutOnRestoreFromPageCache() = 0;
#endif
- virtual void forceLayoutForNonHTML() = 0;
+ virtual void forceLayoutForNonHTML() = 0;
- virtual void setCopiesOnScroll() = 0;
+ virtual void setCopiesOnScroll() = 0;
- virtual void detachedFromParent2() = 0;
- virtual void detachedFromParent3() = 0;
+ virtual void detachedFromParent2() = 0;
+ virtual void detachedFromParent3() = 0;
- virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&) = 0;
+ virtual void assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&) = 0;
- virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse) = 0;
- virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier) = 0;
- virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) = 0;
+ virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse) = 0;
+ virtual bool shouldUseCredentialStorage(DocumentLoader*, unsigned long identifier) = 0;
+ virtual void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long identifier, const AuthenticationChallenge&) = 0;
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
- virtual bool canAuthenticateAgainstProtectionSpace(DocumentLoader*, unsigned long identifier, const ProtectionSpace&) = 0;
+ virtual bool canAuthenticateAgainstProtectionSpace(DocumentLoader*, unsigned long identifier, const ProtectionSpace&) = 0;
#endif
#if PLATFORM(IOS)
- virtual RetainPtr<CFDictionaryRef> connectionProperties(DocumentLoader*, unsigned long identifier) = 0;
+ virtual RetainPtr<CFDictionaryRef> connectionProperties(DocumentLoader*, unsigned long identifier) = 0;
#endif
- virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&) = 0;
- virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int dataLength) = 0;
- virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) = 0;
- virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&) = 0;
- virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) = 0;
+ virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&) = 0;
+ virtual void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long identifier, int dataLength) = 0;
+ virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier) = 0;
+ virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&) = 0;
+ virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length) = 0;
- virtual void dispatchDidDispatchOnloadEvents() = 0;
- virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
- virtual void dispatchDidChangeProvisionalURL() { }
- virtual void dispatchDidCancelClientRedirect() = 0;
- virtual void dispatchWillPerformClientRedirect(const URL&, double interval, double fireDate) = 0;
- virtual void dispatchDidNavigateWithinPage() { }
- virtual void dispatchDidChangeLocationWithinPage() = 0;
- virtual void dispatchDidPushStateWithinPage() = 0;
- virtual void dispatchDidReplaceStateWithinPage() = 0;
- virtual void dispatchDidPopStateWithinPage() = 0;
- virtual void dispatchWillClose() = 0;
- virtual void dispatchDidReceiveIcon() = 0;
- virtual void dispatchDidStartProvisionalLoad() = 0;
- virtual void dispatchDidReceiveTitle(const StringWithDirection&) = 0;
- virtual void dispatchDidCommitLoad(Optional<HasInsecureContent>) = 0;
- virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
- virtual void dispatchDidFailLoad(const ResourceError&) = 0;
- virtual void dispatchDidFinishDocumentLoad() = 0;
- virtual void dispatchDidFinishLoad() = 0;
+ virtual void dispatchDidDispatchOnloadEvents() = 0;
+ virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() = 0;
+ virtual void dispatchDidChangeProvisionalURL() { }
+ virtual void dispatchDidCancelClientRedirect() = 0;
+ virtual void dispatchWillPerformClientRedirect(const URL&, double interval, double fireDate) = 0;
+ virtual void dispatchDidNavigateWithinPage() { }
+ virtual void dispatchDidChangeLocationWithinPage() = 0;
+ virtual void dispatchDidPushStateWithinPage() = 0;
+ virtual void dispatchDidReplaceStateWithinPage() = 0;
+ virtual void dispatchDidPopStateWithinPage() = 0;
+ virtual void dispatchWillClose() = 0;
+ virtual void dispatchDidReceiveIcon() = 0;
+ virtual void dispatchDidStartProvisionalLoad() = 0;
+ virtual void dispatchDidReceiveTitle(const StringWithDirection&) = 0;
+ virtual void dispatchDidCommitLoad(Optional<HasInsecureContent>) = 0;
+ virtual void dispatchDidFailProvisionalLoad(const ResourceError&) = 0;
+ virtual void dispatchDidFailLoad(const ResourceError&) = 0;
+ virtual void dispatchDidFinishDocumentLoad() = 0;
+ virtual void dispatchDidFinishLoad() = 0;
#if ENABLE(DATA_DETECTION)
- virtual void dispatchDidFinishDataDetection(NSArray *detectionResults) = 0;
+ virtual void dispatchDidFinishDataDetection(NSArray *detectionResults) = 0;
#endif
- virtual void dispatchDidLayout() { }
- virtual void dispatchDidReachLayoutMilestone(LayoutMilestones) { }
+ virtual void dispatchDidLayout() { }
+ virtual void dispatchDidReachLayoutMilestone(LayoutMilestones) { }
- virtual Frame* dispatchCreatePage(const NavigationAction&) = 0;
- virtual void dispatchShow() = 0;
+ virtual Frame* dispatchCreatePage(const NavigationAction&) = 0;
+ virtual void dispatchShow() = 0;
- virtual void dispatchDecidePolicyForResponse(const ResourceResponse&, const ResourceRequest&, FramePolicyFunction) = 0;
- virtual void dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, FramePolicyFunction) = 0;
- virtual void dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, FramePolicyFunction) = 0;
- virtual void cancelPolicyCheck() = 0;
+ virtual void dispatchDecidePolicyForResponse(const ResourceResponse&, const ResourceRequest&, FramePolicyFunction) = 0;
+ virtual void dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName, FramePolicyFunction) = 0;
+ virtual void dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, FramePolicyFunction) = 0;
+ virtual void cancelPolicyCheck() = 0;
- virtual void dispatchUnableToImplementPolicy(const ResourceError&) = 0;
+ virtual void dispatchUnableToImplementPolicy(const ResourceError&) = 0;
- virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) = 0;
- virtual void dispatchWillSubmitForm(PassRefPtr<FormState>, FramePolicyFunction) = 0;
+ virtual void dispatchWillSendSubmitEvent(PassRefPtr<FormState>) = 0;
+ virtual void dispatchWillSubmitForm(PassRefPtr<FormState>, FramePolicyFunction) = 0;
- virtual void revertToProvisionalState(DocumentLoader*) = 0;
- virtual void setMainDocumentError(DocumentLoader*, const ResourceError&) = 0;
+ virtual void revertToProvisionalState(DocumentLoader*) = 0;
+ virtual void setMainDocumentError(DocumentLoader*, const ResourceError&) = 0;
- virtual void setMainFrameDocumentReady(bool) = 0;
+ virtual void setMainFrameDocumentReady(bool) = 0;
- virtual void startDownload(const ResourceRequest&, const String& suggestedName = String()) = 0;
+ virtual void startDownload(const ResourceRequest&, const String& suggestedName = String()) = 0;
- virtual void willChangeTitle(DocumentLoader*) = 0;
- virtual void didChangeTitle(DocumentLoader*) = 0;
+ virtual void willChangeTitle(DocumentLoader*) = 0;
+ virtual void didChangeTitle(DocumentLoader*) = 0;
- virtual void willReplaceMultipartContent() = 0;
- virtual void didReplaceMultipartContent() = 0;
+ virtual void willReplaceMultipartContent() = 0;
+ virtual void didReplaceMultipartContent() = 0;
- virtual void committedLoad(DocumentLoader*, const char*, int) = 0;
- virtual void finishedLoading(DocumentLoader*) = 0;
-
- virtual void updateGlobalHistory() = 0;
- virtual void updateGlobalHistoryRedirectLinks() = 0;
+ virtual void committedLoad(DocumentLoader*, const char*, int) = 0;
+ virtual void finishedLoading(DocumentLoader*) = 0;
+
+ virtual void updateGlobalHistory() = 0;
+ virtual void updateGlobalHistoryRedirectLinks() = 0;
- virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0;
- virtual void updateGlobalHistoryItemForPage() { }
+ virtual bool shouldGoToHistoryItem(HistoryItem*) const = 0;
+ virtual void updateGlobalHistoryItemForPage() { }
- // This frame has set its opener to null, disowning it for the lifetime of the frame.
- // See http://html.spec.whatwg.org/#dom-opener.
- // FIXME: JSC should allow disowning opener. - <https://bugs.webkit.org/show_bug.cgi?id=103913>.
- virtual void didDisownOpener() { }
+ // This frame has set its opener to null, disowning it for the lifetime of the frame.
+ // See http://html.spec.whatwg.org/#dom-opener.
+ // FIXME: JSC should allow disowning opener. - <https://bugs.webkit.org/show_bug.cgi?id=103913>.
+ virtual void didDisownOpener() { }
- // This frame has displayed inactive content (such as an image) from an
- // insecure source. Inactive content cannot spread to other frames.
- virtual void didDisplayInsecureContent() = 0;
+ // This frame has displayed inactive content (such as an image) from an
+ // insecure source. Inactive content cannot spread to other frames.
+ virtual void didDisplayInsecureContent() = 0;
- // The indicated security origin has run active content (such as a
- // script) from an insecure source. Note that the insecure content can
- // spread to other frames in the same origin.
- virtual void didRunInsecureContent(SecurityOrigin*, const URL&) = 0;
- virtual void didDetectXSS(const URL&, bool didBlockEntirePage) = 0;
+ // The indicated security origin has run active content (such as a
+ // script) from an insecure source. Note that the insecure content can
+ // spread to other frames in the same origin.
+ virtual void didRunInsecureContent(SecurityOrigin*, const URL&) = 0;
+ virtual void didDetectXSS(const URL&, bool didBlockEntirePage) = 0;
- virtual ResourceError cancelledError(const ResourceRequest&) = 0;
- virtual ResourceError blockedError(const ResourceRequest&) = 0;
- virtual ResourceError blockedByContentBlockerError(const ResourceRequest&) = 0;
- virtual ResourceError cannotShowURLError(const ResourceRequest&) = 0;
- virtual ResourceError interruptedForPolicyChangeError(const ResourceRequest&) = 0;
+ virtual ResourceError cancelledError(const ResourceRequest&) = 0;
+ virtual ResourceError blockedError(const ResourceRequest&) = 0;
+ virtual ResourceError blockedByContentBlockerError(const ResourceRequest&) = 0;
+ virtual ResourceError cannotShowURLError(const ResourceRequest&) = 0;
+ virtual ResourceError interruptedForPolicyChangeError(const ResourceRequest&) = 0;
#if ENABLE(CONTENT_FILTERING)
- virtual ResourceError blockedByContentFilterError(const ResourceRequest&) = 0;
+ virtual ResourceError blockedByContentFilterError(const ResourceRequest&) = 0;
#endif
- virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&) = 0;
- virtual ResourceError fileDoesNotExistError(const ResourceResponse&) = 0;
- virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&) = 0;
+ virtual ResourceError cannotShowMIMETypeError(const ResourceResponse&) = 0;
+ virtual ResourceError fileDoesNotExistError(const ResourceResponse&) = 0;
+ virtual ResourceError pluginWillHandleLoadError(const ResourceResponse&) = 0;
- virtual bool shouldFallBack(const ResourceError&) = 0;
+ virtual bool shouldFallBack(const ResourceError&) = 0;
- virtual bool canHandleRequest(const ResourceRequest&) const = 0;
- virtual bool canShowMIMEType(const String& MIMEType) const = 0;
- virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const = 0;
- virtual bool representationExistsForURLScheme(const String& URLScheme) const = 0;
- virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const = 0;
+ virtual bool canHandleRequest(const ResourceRequest&) const = 0;
+ virtual bool canShowMIMEType(const String& MIMEType) const = 0;
+ virtual bool canShowMIMETypeAsHTML(const String& MIMEType) const = 0;
+ virtual bool representationExistsForURLScheme(const String& URLScheme) const = 0;
+ virtual String generatedMIMETypeForURLScheme(const String& URLScheme) const = 0;
- virtual void frameLoadCompleted() = 0;
- virtual void saveViewStateToItem(HistoryItem&) = 0;
- virtual void restoreViewState() = 0;
- virtual void provisionalLoadStarted() = 0;
- virtual void didFinishLoad() = 0;
- virtual void prepareForDataSourceReplacement() = 0;
+ virtual void frameLoadCompleted() = 0;
+ virtual void saveViewStateToItem(HistoryItem&) = 0;
+ virtual void restoreViewState() = 0;
+ virtual void provisionalLoadStarted() = 0;
+ virtual void didFinishLoad() = 0;
+ virtual void prepareForDataSourceReplacement() = 0;
- virtual Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
- virtual void updateCachedDocumentLoader(DocumentLoader&) = 0;
- virtual void setTitle(const StringWithDirection&, const URL&) = 0;
+ virtual Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) = 0;
+ virtual void updateCachedDocumentLoader(DocumentLoader&) = 0;
+ virtual void setTitle(const StringWithDirection&, const URL&) = 0;
- virtual String userAgent(const URL&) = 0;
-
- virtual void savePlatformDataToCachedFrame(CachedFrame*) = 0;
- virtual void transitionToCommittedFromCachedFrame(CachedFrame*) = 0;
+ virtual String userAgent(const URL&) = 0;
+
+ virtual void savePlatformDataToCachedFrame(CachedFrame*) = 0;
+ virtual void transitionToCommittedFromCachedFrame(CachedFrame*) = 0;
#if PLATFORM(IOS)
- virtual void didRestoreFrameHierarchyForCachedFrame() = 0;
+ virtual void didRestoreFrameHierarchyForCachedFrame() = 0;
#endif
- virtual void transitionToCommittedForNewPage() = 0;
+ virtual void transitionToCommittedForNewPage() = 0;
- virtual void didSaveToPageCache() = 0;
- virtual void didRestoreFromPageCache() = 0;
+ virtual void didSaveToPageCache() = 0;
+ virtual void didRestoreFromPageCache() = 0;
- virtual void dispatchDidBecomeFrameset(bool) = 0; // Can change due to navigation or DOM modification.
+ virtual void dispatchDidBecomeFrameset(bool) = 0; // Can change due to navigation or DOM modification.
- virtual bool canCachePage() const = 0;
- virtual void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) = 0;
+ virtual bool canCachePage() const = 0;
+ virtual void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) = 0;
- virtual RefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
- virtual RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
- virtual void recreatePlugin(Widget*) = 0;
- virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
+ virtual RefPtr<Frame> createFrame(const URL&, const String& name, HTMLFrameOwnerElement*, const String& referrer, bool allowsScrolling, int marginWidth, int marginHeight) = 0;
+ virtual RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement*, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool loadManually) = 0;
+ virtual void recreatePlugin(Widget*) = 0;
+ virtual void redirectDataToPlugin(Widget* pluginWidget) = 0;
- virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
+ virtual PassRefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement*, const URL& baseURL, const Vector<String>& paramNames, const Vector<String>& paramValues) = 0;
- virtual void dispatchDidFailToStartPlugin(const PluginViewBase*) const { }
+ virtual void dispatchDidFailToStartPlugin(const PluginViewBase*) const { }
- virtual ObjectContentType objectContentType(const URL&, const String& mimeType) = 0;
- virtual String overrideMediaType() const = 0;
+ virtual ObjectContentType objectContentType(const URL&, const String& mimeType) = 0;
+ virtual String overrideMediaType() const = 0;
- virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&) = 0;
+ virtual void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&) = 0;
- virtual void registerForIconNotification(bool listen = true) = 0;
+ virtual void registerForIconNotification(bool listen = true) = 0;
#if PLATFORM(COCOA)
- // Allow an accessibility object to retrieve a Frame parent if there's no PlatformWidget.
- virtual RemoteAXObjectRef accessibilityRemoteObject() = 0;
- virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
- virtual NSDictionary *dataDetectionContext() { return nullptr; }
+ // Allow an accessibility object to retrieve a Frame parent if there's no PlatformWidget.
+ virtual RemoteAXObjectRef accessibilityRemoteObject() = 0;
+ virtual NSCachedURLResponse* willCacheResponse(DocumentLoader*, unsigned long identifier, NSCachedURLResponse*) const = 0;
+ virtual NSDictionary *dataDetectionContext() { return nullptr; }
#endif
#if PLATFORM(WIN) && USE(CFURLCONNECTION)
- // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
- virtual bool shouldCacheResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const unsigned char* data, unsigned long long length) = 0;
+ // FIXME: Windows should use willCacheResponse - <https://bugs.webkit.org/show_bug.cgi?id=57257>.
+ virtual bool shouldCacheResponse(DocumentLoader*, unsigned long identifier, const ResourceResponse&, const unsigned char* data, unsigned long long length) = 0;
#endif
- virtual bool shouldAlwaysUsePluginDocument(const String& /*mimeType*/) const { return false; }
- virtual bool shouldLoadMediaElementURL(const URL&) const { return true; }
+ virtual bool shouldAlwaysUsePluginDocument(const String& /*mimeType*/) const { return false; }
+ virtual bool shouldLoadMediaElementURL(const URL&) const { return true; }
- virtual void didChangeScrollOffset() { }
+ virtual void didChangeScrollOffset() { }
- virtual bool allowScript(bool enabledPerSettings) { return enabledPerSettings; }
+ virtual bool allowScript(bool enabledPerSettings) { return enabledPerSettings; }
- // Clients that generally disallow universal access can make exceptions for particular URLs.
- virtual bool shouldForceUniversalAccessFromLocalURL(const URL&) { return false; }
+ // Clients that generally disallow universal access can make exceptions for particular URLs.
+ virtual bool shouldForceUniversalAccessFromLocalURL(const URL&) { return false; }
- virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext() = 0;
+ virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext() = 0;
#if ENABLE(REQUEST_AUTOCOMPLETE)
- virtual void didRequestAutocomplete(PassRefPtr<FormState>) = 0;
+ virtual void didRequestAutocomplete(PassRefPtr<FormState>) = 0;
#endif
- virtual bool shouldPaintBrokenImage(const URL&) const { return true; }
+ virtual bool shouldPaintBrokenImage(const URL&) const { return true; }
- virtual void dispatchGlobalObjectAvailable(DOMWrapperWorld&) { }
- virtual void dispatchWillDisconnectDOMWindowExtensionFromGlobalObject(DOMWindowExtension*) { }
- virtual void dispatchDidReconnectDOMWindowExtensionToGlobalObject(DOMWindowExtension*) { }
- virtual void dispatchWillDestroyGlobalObjectForDOMWindowExtension(DOMWindowExtension*) { }
+ virtual void dispatchGlobalObjectAvailable(DOMWrapperWorld&) { }
+ virtual void dispatchWillDisconnectDOMWindowExtensionFromGlobalObject(DOMWindowExtension*) { }
+ virtual void dispatchDidReconnectDOMWindowExtensionToGlobalObject(DOMWindowExtension*) { }
+ virtual void dispatchWillDestroyGlobalObjectForDOMWindowExtension(DOMWindowExtension*) { }
#if ENABLE(WEB_RTC)
- virtual void dispatchWillStartUsingPeerConnectionHandler(RTCPeerConnectionHandler*) { }
+ virtual void dispatchWillStartUsingPeerConnectionHandler(RTCPeerConnectionHandler*) { }
#endif
#if ENABLE(WEBGL)
- virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings; }
- // Informs the embedder that a WebGL canvas inside this frame received a lost context
- // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h).
- virtual void didLoseWebGLContext(int) { }
- virtual WebGLLoadPolicy webGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
- virtual WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
+ virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings; }
+ // Informs the embedder that a WebGL canvas inside this frame received a lost context
+ // notification with the given GL_ARB_robustness guilt/innocence code (see Extensions3D.h).
+ virtual void didLoseWebGLContext(int) { }
+ virtual WebGLLoadPolicy webGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
+ virtual WebGLLoadPolicy resolveWebGLPolicyForURL(const String&) const { return WebGLAllowCreation; }
#endif
- virtual void forcePageTransitionIfNeeded() { }
+ virtual void forcePageTransitionIfNeeded() { }
- // FIXME (bug 116233): We need to get rid of EmptyFrameLoaderClient completely, then this will no longer be needed.
- virtual bool isEmptyFrameLoaderClient() { return false; }
+ // FIXME (bug 116233): We need to get rid of EmptyFrameLoaderClient completely, then this will no longer be needed.
+ virtual bool isEmptyFrameLoaderClient() { return false; }
#if USE(QUICK_LOOK)
- virtual void didCreateQuickLookHandle(QuickLookHandle&) { }
+ virtual void didCreateQuickLookHandle(QuickLookHandle&) { }
#endif
#if ENABLE(CONTENT_FILTERING)
- virtual void contentFilterDidBlockLoad(ContentFilterUnblockHandler) { }
+ virtual void contentFilterDidBlockLoad(ContentFilterUnblockHandler) { }
#endif
- virtual void prefetchDNS(const String&) = 0;
+ virtual void prefetchDNS(const String&) = 0;
- virtual void didRestoreScrollPosition() { }
- };
+ virtual void didRestoreScrollPosition() { }
+};
} // namespace WebCore
Modified: trunk/Source/WebCore/page/Frame.h (208803 => 208804)
--- trunk/Source/WebCore/page/Frame.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/page/Frame.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -60,353 +60,353 @@
namespace WebCore {
- class AnimationController;
- class Color;
- class Document;
- class Editor;
- class Element;
- class EventHandler;
- class FloatSize;
- class FrameDestructionObserver;
- class FrameSelection;
- class FrameView;
- class HTMLFrameOwnerElement;
- class HTMLTableCellElement;
- class HitTestResult;
- class ImageBuffer;
- class IntRect;
- class MainFrame;
- class Node;
- class Range;
- class RenderLayer;
- class RenderView;
- class RenderWidget;
- class ScriptController;
- class Settings;
- class VisiblePosition;
- class Widget;
+class AnimationController;
+class Color;
+class Document;
+class Editor;
+class Element;
+class EventHandler;
+class FloatSize;
+class FrameDestructionObserver;
+class FrameSelection;
+class FrameView;
+class HTMLFrameOwnerElement;
+class HTMLTableCellElement;
+class HitTestResult;
+class ImageBuffer;
+class IntRect;
+class MainFrame;
+class Node;
+class Range;
+class RenderLayer;
+class RenderView;
+class RenderWidget;
+class ScriptController;
+class Settings;
+class VisiblePosition;
+class Widget;
#if PLATFORM(IOS)
- enum {
- OverflowScrollNone = 0,
- OverflowScrollLeft = 1 << 0,
- OverflowScrollRight = 1 << 1,
- OverflowScrollUp = 1 << 2,
- OverflowScrollDown = 1 << 3
- };
+enum {
+ OverflowScrollNone = 0,
+ OverflowScrollLeft = 1 << 0,
+ OverflowScrollRight = 1 << 1,
+ OverflowScrollUp = 1 << 2,
+ OverflowScrollDown = 1 << 3
+};
- enum OverflowScrollAction { DoNotPerformOverflowScroll, PerformOverflowScroll };
- typedef Node* (*NodeQualifier)(const HitTestResult&, Node* terminationNode, IntRect* nodeBounds);
+enum OverflowScrollAction { DoNotPerformOverflowScroll, PerformOverflowScroll };
+typedef Node* (*NodeQualifier)(const HitTestResult&, Node* terminationNode, IntRect* nodeBounds);
#endif
- enum {
- LayerTreeFlagsIncludeDebugInfo = 1 << 0,
- LayerTreeFlagsIncludeVisibleRects = 1 << 1,
- LayerTreeFlagsIncludeTileCaches = 1 << 2,
- LayerTreeFlagsIncludeRepaintRects = 1 << 3,
- LayerTreeFlagsIncludePaintingPhases = 1 << 4,
- LayerTreeFlagsIncludeContentLayers = 1 << 5
- };
- typedef unsigned LayerTreeFlags;
+enum {
+ LayerTreeFlagsIncludeDebugInfo = 1 << 0,
+ LayerTreeFlagsIncludeVisibleRects = 1 << 1,
+ LayerTreeFlagsIncludeTileCaches = 1 << 2,
+ LayerTreeFlagsIncludeRepaintRects = 1 << 3,
+ LayerTreeFlagsIncludePaintingPhases = 1 << 4,
+ LayerTreeFlagsIncludeContentLayers = 1 << 5
+};
+typedef unsigned LayerTreeFlags;
- class Frame : public ThreadSafeRefCounted<Frame> {
- public:
- WEBCORE_EXPORT static Ref<Frame> create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
+class Frame : public ThreadSafeRefCounted<Frame> {
+public:
+ WEBCORE_EXPORT static Ref<Frame> create(Page*, HTMLFrameOwnerElement*, FrameLoaderClient*);
- void init();
+ void init();
#if PLATFORM(IOS)
- // Creates <html><body style="..."></body></html> doing minimal amount of work.
- WEBCORE_EXPORT void initWithSimpleHTMLDocument(const String& style, const URL&);
+ // Creates <html><body style="..."></body></html> doing minimal amount of work.
+ WEBCORE_EXPORT void initWithSimpleHTMLDocument(const String& style, const URL&);
#endif
- WEBCORE_EXPORT void setView(RefPtr<FrameView>&&);
- WEBCORE_EXPORT void createView(const IntSize&, const Color&, bool,
- const IntSize& fixedLayoutSize = IntSize(), const IntRect& fixedVisibleContentRect = IntRect(),
- bool useFixedLayout = false, ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
- ScrollbarMode = ScrollbarAuto, bool verticalLock = false);
+ WEBCORE_EXPORT void setView(RefPtr<FrameView>&&);
+ WEBCORE_EXPORT void createView(const IntSize&, const Color&, bool,
+ const IntSize& fixedLayoutSize = IntSize(), const IntRect& fixedVisibleContentRect = IntRect(),
+ bool useFixedLayout = false, ScrollbarMode = ScrollbarAuto, bool horizontalLock = false,
+ ScrollbarMode = ScrollbarAuto, bool verticalLock = false);
- WEBCORE_EXPORT virtual ~Frame();
+ WEBCORE_EXPORT virtual ~Frame();
- void addDestructionObserver(FrameDestructionObserver*);
- void removeDestructionObserver(FrameDestructionObserver*);
+ void addDestructionObserver(FrameDestructionObserver*);
+ void removeDestructionObserver(FrameDestructionObserver*);
- void willDetachPage();
- void detachFromPage();
- void disconnectOwnerElement();
+ void willDetachPage();
+ void detachFromPage();
+ void disconnectOwnerElement();
- MainFrame& mainFrame() const;
- bool isMainFrame() const { return this == static_cast<void*>(&m_mainFrame); }
+ MainFrame& mainFrame() const;
+ bool isMainFrame() const { return this == static_cast<void*>(&m_mainFrame); }
- Page* page() const;
- HTMLFrameOwnerElement* ownerElement() const;
+ Page* page() const;
+ HTMLFrameOwnerElement* ownerElement() const;
- Document* document() const;
- FrameView* view() const;
+ Document* document() const;
+ FrameView* view() const;
- Editor& editor() const;
- EventHandler& eventHandler() const;
- EventHandler* eventHandlerPtr() const;
- FrameLoader& loader() const;
- NavigationScheduler& navigationScheduler() const;
- FrameSelection& selection() const;
- FrameTree& tree() const;
- AnimationController& animation() const;
- ScriptController& script();
-
- WEBCORE_EXPORT RenderView* contentRenderer() const; // Root of the render tree for the document contained in this frame.
- WEBCORE_EXPORT RenderWidget* ownerRenderer() const; // Renderer for the element that contains this frame.
+ Editor& editor() const;
+ EventHandler& eventHandler() const;
+ EventHandler* eventHandlerPtr() const;
+ FrameLoader& loader() const;
+ NavigationScheduler& navigationScheduler() const;
+ FrameSelection& selection() const;
+ FrameTree& tree() const;
+ AnimationController& animation() const;
+ ScriptController& script();
+
+ WEBCORE_EXPORT RenderView* contentRenderer() const; // Root of the render tree for the document contained in this frame.
+ WEBCORE_EXPORT RenderWidget* ownerRenderer() const; // Renderer for the element that contains this frame.
- // ======== All public functions below this point are candidates to move out of Frame into another class. ========
+// ======== All public functions below this point are candidates to move out of Frame into another class. ========
- void injectUserScripts(UserScriptInjectionTime);
-
- WEBCORE_EXPORT String layerTreeAsText(LayerTreeFlags = 0) const;
- WEBCORE_EXPORT String trackedRepaintRectsAsText() const;
+ void injectUserScripts(UserScriptInjectionTime);
+
+ WEBCORE_EXPORT String layerTreeAsText(LayerTreeFlags = 0) const;
+ WEBCORE_EXPORT String trackedRepaintRectsAsText() const;
- WEBCORE_EXPORT static Frame* frameForWidget(const Widget*);
+ WEBCORE_EXPORT static Frame* frameForWidget(const Widget*);
- Settings& settings() const { return *m_settings; }
+ Settings& settings() const { return *m_settings; }
- void setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot);
- bool shouldUsePrintingLayout() const;
- WEBCORE_EXPORT FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, const FloatSize& expectedSize);
+ void setPrinting(bool printing, const FloatSize& pageSize, const FloatSize& originalPageSize, float maximumShrinkRatio, AdjustViewSizeOrNot);
+ bool shouldUsePrintingLayout() const;
+ WEBCORE_EXPORT FloatSize resizePageRectsKeepingRatio(const FloatSize& originalSize, const FloatSize& expectedSize);
- void setDocument(RefPtr<Document>&&);
+ void setDocument(RefPtr<Document>&&);
- WEBCORE_EXPORT void setPageZoomFactor(float);
- float pageZoomFactor() const { return m_pageZoomFactor; }
- WEBCORE_EXPORT void setTextZoomFactor(float);
- float textZoomFactor() const { return m_textZoomFactor; }
- WEBCORE_EXPORT void setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor);
+ WEBCORE_EXPORT void setPageZoomFactor(float);
+ float pageZoomFactor() const { return m_pageZoomFactor; }
+ WEBCORE_EXPORT void setTextZoomFactor(float);
+ float textZoomFactor() const { return m_textZoomFactor; }
+ WEBCORE_EXPORT void setPageAndTextZoomFactors(float pageZoomFactor, float textZoomFactor);
- // Scale factor of this frame with respect to the container.
- WEBCORE_EXPORT float frameScaleFactor() const;
+ // Scale factor of this frame with respect to the container.
+ WEBCORE_EXPORT float frameScaleFactor() const;
- void deviceOrPageScaleFactorChanged();
-
+ void deviceOrPageScaleFactorChanged();
+
#if ENABLE(DATA_DETECTION)
- void setDataDetectionResults(NSArray *results) { m_dataDetectionResults = results; }
- NSArray *dataDetectionResults() const { return m_dataDetectionResults.get(); }
+ void setDataDetectionResults(NSArray *results) { m_dataDetectionResults = results; }
+ NSArray *dataDetectionResults() const { return m_dataDetectionResults.get(); }
#endif
#if PLATFORM(IOS)
- const ViewportArguments& viewportArguments() const;
- WEBCORE_EXPORT void setViewportArguments(const ViewportArguments&);
+ const ViewportArguments& viewportArguments() const;
+ WEBCORE_EXPORT void setViewportArguments(const ViewportArguments&);
- WEBCORE_EXPORT Node* deepestNodeAtLocation(const FloatPoint& viewportLocation);
- WEBCORE_EXPORT Node* nodeRespondingToClickEvents(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);
- WEBCORE_EXPORT Node* nodeRespondingToScrollWheelEvents(const FloatPoint& viewportLocation);
+ WEBCORE_EXPORT Node* deepestNodeAtLocation(const FloatPoint& viewportLocation);
+ WEBCORE_EXPORT Node* nodeRespondingToClickEvents(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation);
+ WEBCORE_EXPORT Node* nodeRespondingToScrollWheelEvents(const FloatPoint& viewportLocation);
- WEBCORE_EXPORT NSArray *wordsInCurrentParagraph() const;
- WEBCORE_EXPORT CGRect renderRectForPoint(CGPoint, bool* isReplaced, float* fontSize) const;
+ WEBCORE_EXPORT NSArray *wordsInCurrentParagraph() const;
+ WEBCORE_EXPORT CGRect renderRectForPoint(CGPoint, bool* isReplaced, float* fontSize) const;
- WEBCORE_EXPORT void setSelectionChangeCallbacksDisabled(bool = true);
- bool selectionChangeCallbacksDisabled() const;
+ WEBCORE_EXPORT void setSelectionChangeCallbacksDisabled(bool = true);
+ bool selectionChangeCallbacksDisabled() const;
- enum ViewportOffsetChangeType { IncrementalScrollOffset, CompletedScrollOffset };
- WEBCORE_EXPORT void viewportOffsetChanged(ViewportOffsetChangeType);
- bool containsTiledBackingLayers() const;
+ enum ViewportOffsetChangeType { IncrementalScrollOffset, CompletedScrollOffset };
+ WEBCORE_EXPORT void viewportOffsetChanged(ViewportOffsetChangeType);
+ bool containsTiledBackingLayers() const;
- WEBCORE_EXPORT void overflowScrollPositionChangedForNode(const IntPoint&, Node*, bool isUserScroll);
+ WEBCORE_EXPORT void overflowScrollPositionChangedForNode(const IntPoint&, Node*, bool isUserScroll);
- WEBCORE_EXPORT void resetAllGeolocationPermission();
+ WEBCORE_EXPORT void resetAllGeolocationPermission();
#endif
#if ENABLE(ORIENTATION_EVENTS)
- // Orientation is the interface orientation in degrees. Some examples are:
- // 0 is straight up; -90 is when the device is rotated 90 clockwise;
- // 90 is when rotated counter clockwise.
- WEBCORE_EXPORT void orientationChanged();
- int orientation() const;
+ // Orientation is the interface orientation in degrees. Some examples are:
+ // 0 is straight up; -90 is when the device is rotated 90 clockwise;
+ // 90 is when rotated counter clockwise.
+ WEBCORE_EXPORT void orientationChanged();
+ int orientation() const;
#endif
- void clearTimers();
- static void clearTimers(FrameView*, Document*);
+ void clearTimers();
+ static void clearTimers(FrameView*, Document*);
- WEBCORE_EXPORT String displayStringModifiedByEncoding(const String&) const;
+ WEBCORE_EXPORT String displayStringModifiedByEncoding(const String&) const;
- WEBCORE_EXPORT VisiblePosition visiblePositionForPoint(const IntPoint& framePoint) const;
- Document* documentAtPoint(const IntPoint& windowPoint);
- WEBCORE_EXPORT RefPtr<Range> rangeForPoint(const IntPoint& framePoint);
+ WEBCORE_EXPORT VisiblePosition visiblePositionForPoint(const IntPoint& framePoint) const;
+ Document* documentAtPoint(const IntPoint& windowPoint);
+ WEBCORE_EXPORT RefPtr<Range> rangeForPoint(const IntPoint& framePoint);
- WEBCORE_EXPORT String searchForLabelsAboveCell(const JSC::Yarr::RegularExpression&, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
- String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
- String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
+ WEBCORE_EXPORT String searchForLabelsAboveCell(const JSC::Yarr::RegularExpression&, HTMLTableCellElement*, size_t* resultDistanceFromStartOfCell);
+ String searchForLabelsBeforeElement(const Vector<String>& labels, Element*, size_t* resultDistance, bool* resultIsInCellAbove);
+ String matchLabelsAgainstElement(const Vector<String>& labels, Element*);
#if PLATFORM(IOS)
- // Scroll the selection in an overflow layer.
- void scrollOverflowLayer(RenderLayer*, const IntRect& visibleRect, const IntRect& exposeRect);
+ // Scroll the selection in an overflow layer.
+ void scrollOverflowLayer(RenderLayer*, const IntRect& visibleRect, const IntRect& exposeRect);
- WEBCORE_EXPORT int preferredHeight() const;
- WEBCORE_EXPORT void updateLayout() const;
- WEBCORE_EXPORT NSRect caretRect() const;
- WEBCORE_EXPORT NSRect rectForScrollToVisible() const;
- WEBCORE_EXPORT unsigned formElementsCharacterCount() const;
+ WEBCORE_EXPORT int preferredHeight() const;
+ WEBCORE_EXPORT void updateLayout() const;
+ WEBCORE_EXPORT NSRect caretRect() const;
+ WEBCORE_EXPORT NSRect rectForScrollToVisible() const;
+ WEBCORE_EXPORT unsigned formElementsCharacterCount() const;
- // This function is used by Legacy WebKit.
- WEBCORE_EXPORT void setTimersPaused(bool);
+ // This function is used by Legacy WebKit.
+ WEBCORE_EXPORT void setTimersPaused(bool);
- WEBCORE_EXPORT void dispatchPageHideEventBeforePause();
- WEBCORE_EXPORT void dispatchPageShowEventBeforeResume();
- WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelection();
- WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelectionStart();
- WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelectionEnd();
- WEBCORE_EXPORT void clearRangedSelectionInitialExtent();
- WEBCORE_EXPORT void setRangedSelectionInitialExtentToCurrentSelectionStart();
- WEBCORE_EXPORT void setRangedSelectionInitialExtentToCurrentSelectionEnd();
- WEBCORE_EXPORT VisibleSelection rangedSelectionBase() const;
- WEBCORE_EXPORT VisibleSelection rangedSelectionInitialExtent() const;
- WEBCORE_EXPORT void recursiveSetUpdateAppearanceEnabled(bool);
- WEBCORE_EXPORT NSArray *interpretationsForCurrentRoot() const;
+ WEBCORE_EXPORT void dispatchPageHideEventBeforePause();
+ WEBCORE_EXPORT void dispatchPageShowEventBeforeResume();
+ WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelection();
+ WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelectionStart();
+ WEBCORE_EXPORT void setRangedSelectionBaseToCurrentSelectionEnd();
+ WEBCORE_EXPORT void clearRangedSelectionInitialExtent();
+ WEBCORE_EXPORT void setRangedSelectionInitialExtentToCurrentSelectionStart();
+ WEBCORE_EXPORT void setRangedSelectionInitialExtentToCurrentSelectionEnd();
+ WEBCORE_EXPORT VisibleSelection rangedSelectionBase() const;
+ WEBCORE_EXPORT VisibleSelection rangedSelectionInitialExtent() const;
+ WEBCORE_EXPORT void recursiveSetUpdateAppearanceEnabled(bool);
+ WEBCORE_EXPORT NSArray *interpretationsForCurrentRoot() const;
#endif
- void suspendActiveDOMObjectsAndAnimations();
- void resumeActiveDOMObjectsAndAnimations();
- bool activeDOMObjectsAndAnimationsSuspended() const { return m_activeDOMObjectsAndAnimationsSuspendedCount > 0; }
+ void suspendActiveDOMObjectsAndAnimations();
+ void resumeActiveDOMObjectsAndAnimations();
+ bool activeDOMObjectsAndAnimationsSuspended() const { return m_activeDOMObjectsAndAnimationsSuspendedCount > 0; }
- bool isURLAllowed(const URL&) const;
- WEBCORE_EXPORT bool isAlwaysOnLoggingAllowed() const;
+ bool isURLAllowed(const URL&) const;
+ WEBCORE_EXPORT bool isAlwaysOnLoggingAllowed() const;
- // ========
+// ========
- protected:
- Frame(Page&, HTMLFrameOwnerElement*, FrameLoaderClient&);
- void setMainFrameWasDestroyed();
+protected:
+ Frame(Page&, HTMLFrameOwnerElement*, FrameLoaderClient&);
+ void setMainFrameWasDestroyed();
- private:
- HashSet<FrameDestructionObserver*> m_destructionObservers;
+private:
+ HashSet<FrameDestructionObserver*> m_destructionObservers;
- MainFrame& m_mainFrame;
- Page* m_page;
- const RefPtr<Settings> m_settings;
- mutable FrameTree m_treeNode;
- mutable FrameLoader m_loader;
- mutable NavigationScheduler m_navigationScheduler;
+ MainFrame& m_mainFrame;
+ Page* m_page;
+ const RefPtr<Settings> m_settings;
+ mutable FrameTree m_treeNode;
+ mutable FrameLoader m_loader;
+ mutable NavigationScheduler m_navigationScheduler;
- HTMLFrameOwnerElement* m_ownerElement;
- RefPtr<FrameView> m_view;
- RefPtr<Document> m_doc;
+ HTMLFrameOwnerElement* m_ownerElement;
+ RefPtr<FrameView> m_view;
+ RefPtr<Document> m_doc;
- const std::unique_ptr<ScriptController> m_script;
- const std::unique_ptr<Editor> m_editor;
- const std::unique_ptr<FrameSelection> m_selection;
- const std::unique_ptr<AnimationController> m_animationController;
+ const std::unique_ptr<ScriptController> m_script;
+ const std::unique_ptr<Editor> m_editor;
+ const std::unique_ptr<FrameSelection> m_selection;
+ const std::unique_ptr<AnimationController> m_animationController;
#if ENABLE(DATA_DETECTION)
- RetainPtr<NSArray> m_dataDetectionResults;
+ RetainPtr<NSArray> m_dataDetectionResults;
#endif
#if PLATFORM(IOS)
- void betterApproximateNode(const IntPoint& testPoint, NodeQualifier, Node*& best, Node* failedNode, IntPoint& bestPoint, IntRect& bestRect, const IntRect& testRect);
- bool hitTestResultAtViewportLocation(const FloatPoint& viewportLocation, HitTestResult&, IntPoint& center);
- Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, NodeQualifier, bool shouldApproximate);
+ void betterApproximateNode(const IntPoint& testPoint, NodeQualifier, Node*& best, Node* failedNode, IntPoint& bestPoint, IntRect& bestRect, const IntRect& testRect);
+ bool hitTestResultAtViewportLocation(const FloatPoint& viewportLocation, HitTestResult&, IntPoint& center);
+ Node* qualifyingNodeAtViewportLocation(const FloatPoint& viewportLocation, FloatPoint& adjustedViewportLocation, NodeQualifier, bool shouldApproximate);
- void overflowAutoScrollTimerFired();
- void startOverflowAutoScroll(const IntPoint&);
- int checkOverflowScroll(OverflowScrollAction);
+ void overflowAutoScrollTimerFired();
+ void startOverflowAutoScroll(const IntPoint&);
+ int checkOverflowScroll(OverflowScrollAction);
- void setTimersPausedInternal(bool);
+ void setTimersPausedInternal(bool);
- Timer m_overflowAutoScrollTimer;
- float m_overflowAutoScrollDelta;
- IntPoint m_overflowAutoScrollPos;
- ViewportArguments m_viewportArguments;
- bool m_selectionChangeCallbacksDisabled;
- VisibleSelection m_rangedSelectionBase;
- VisibleSelection m_rangedSelectionInitialExtent;
+ Timer m_overflowAutoScrollTimer;
+ float m_overflowAutoScrollDelta;
+ IntPoint m_overflowAutoScrollPos;
+ ViewportArguments m_viewportArguments;
+ bool m_selectionChangeCallbacksDisabled;
+ VisibleSelection m_rangedSelectionBase;
+ VisibleSelection m_rangedSelectionInitialExtent;
#endif
- float m_pageZoomFactor;
- float m_textZoomFactor;
+ float m_pageZoomFactor;
+ float m_textZoomFactor;
- int m_activeDOMObjectsAndAnimationsSuspendedCount;
- bool m_mainFrameWasDestroyed { false };
+ int m_activeDOMObjectsAndAnimationsSuspendedCount;
+ bool m_mainFrameWasDestroyed { false };
- protected:
- std::unique_ptr<EventHandler> m_eventHandler;
- };
+protected:
+ std::unique_ptr<EventHandler> m_eventHandler;
+};
- inline void Frame::init()
- {
- m_loader.init();
- }
+inline void Frame::init()
+{
+ m_loader.init();
+}
- inline FrameLoader& Frame::loader() const
- {
- return m_loader;
- }
+inline FrameLoader& Frame::loader() const
+{
+ return m_loader;
+}
- inline NavigationScheduler& Frame::navigationScheduler() const
- {
- return m_navigationScheduler;
- }
+inline NavigationScheduler& Frame::navigationScheduler() const
+{
+ return m_navigationScheduler;
+}
- inline FrameView* Frame::view() const
- {
- return m_view.get();
- }
+inline FrameView* Frame::view() const
+{
+ return m_view.get();
+}
- inline ScriptController& Frame::script()
- {
- return *m_script;
- }
+inline ScriptController& Frame::script()
+{
+ return *m_script;
+}
- inline Document* Frame::document() const
- {
- return m_doc.get();
- }
+inline Document* Frame::document() const
+{
+ return m_doc.get();
+}
- inline FrameSelection& Frame::selection() const
- {
- return *m_selection;
- }
+inline FrameSelection& Frame::selection() const
+{
+ return *m_selection;
+}
- inline Editor& Frame::editor() const
- {
- return *m_editor;
- }
+inline Editor& Frame::editor() const
+{
+ return *m_editor;
+}
- inline AnimationController& Frame::animation() const
- {
- return *m_animationController;
- }
+inline AnimationController& Frame::animation() const
+{
+ return *m_animationController;
+}
- inline HTMLFrameOwnerElement* Frame::ownerElement() const
- {
- return m_ownerElement;
- }
+inline HTMLFrameOwnerElement* Frame::ownerElement() const
+{
+ return m_ownerElement;
+}
- inline FrameTree& Frame::tree() const
- {
- return m_treeNode;
- }
+inline FrameTree& Frame::tree() const
+{
+ return m_treeNode;
+}
- inline Page* Frame::page() const
- {
- return m_page;
- }
+inline Page* Frame::page() const
+{
+ return m_page;
+}
- inline void Frame::detachFromPage()
- {
- m_page = nullptr;
- }
+inline void Frame::detachFromPage()
+{
+ m_page = nullptr;
+}
- inline EventHandler& Frame::eventHandler() const
- {
- return *m_eventHandler;
- }
+inline EventHandler& Frame::eventHandler() const
+{
+ return *m_eventHandler;
+}
- inline EventHandler* Frame::eventHandlerPtr() const
- {
- return m_eventHandler.get();
- }
+inline EventHandler* Frame::eventHandlerPtr() const
+{
+ return m_eventHandler.get();
+}
- inline MainFrame& Frame::mainFrame() const
- {
- ASSERT_WITH_SECURITY_IMPLICATION(!m_mainFrameWasDestroyed);
- return m_mainFrame;
- }
+inline MainFrame& Frame::mainFrame() const
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!m_mainFrameWasDestroyed);
+ return m_mainFrame;
+}
- inline void Frame::setMainFrameWasDestroyed()
- {
- m_mainFrameWasDestroyed = false;
- }
+inline void Frame::setMainFrameWasDestroyed()
+{
+ m_mainFrameWasDestroyed = false;
+}
} // namespace WebCore
Modified: trunk/Source/WebCore/page/FrameTree.h (208803 => 208804)
--- trunk/Source/WebCore/page/FrameTree.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/page/FrameTree.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -23,89 +23,89 @@
namespace WebCore {
- class Frame;
- class TreeScope;
+class Frame;
+class TreeScope;
- class FrameTree {
- WTF_MAKE_NONCOPYABLE(FrameTree);
- public:
- const static unsigned invalidCount = static_cast<unsigned>(-1);
+class FrameTree {
+ WTF_MAKE_NONCOPYABLE(FrameTree);
+public:
+ const static unsigned invalidCount = static_cast<unsigned>(-1);
- FrameTree(Frame& thisFrame, Frame* parentFrame)
- : m_thisFrame(thisFrame)
- , m_parent(parentFrame)
- , m_previousSibling(nullptr)
- , m_lastChild(nullptr)
- , m_scopedChildCount(invalidCount)
- {
- }
+ FrameTree(Frame& thisFrame, Frame* parentFrame)
+ : m_thisFrame(thisFrame)
+ , m_parent(parentFrame)
+ , m_previousSibling(nullptr)
+ , m_lastChild(nullptr)
+ , m_scopedChildCount(invalidCount)
+ {
+ }
- ~FrameTree();
+ ~FrameTree();
- const AtomicString& name() const { return m_name; }
- const AtomicString& uniqueName() const { return m_uniqueName; }
- WEBCORE_EXPORT void setName(const AtomicString&);
- WEBCORE_EXPORT void clearName();
- WEBCORE_EXPORT Frame* parent() const;
- void setParent(Frame* parent) { m_parent = parent; }
-
- Frame* nextSibling() const { return m_nextSibling.get(); }
- Frame* previousSibling() const { return m_previousSibling; }
- Frame* firstChild() const { return m_firstChild.get(); }
- Frame* lastChild() const { return m_lastChild; }
+ const AtomicString& name() const { return m_name; }
+ const AtomicString& uniqueName() const { return m_uniqueName; }
+ WEBCORE_EXPORT void setName(const AtomicString&);
+ WEBCORE_EXPORT void clearName();
+ WEBCORE_EXPORT Frame* parent() const;
+ void setParent(Frame* parent) { m_parent = parent; }
+
+ Frame* nextSibling() const { return m_nextSibling.get(); }
+ Frame* previousSibling() const { return m_previousSibling; }
+ Frame* firstChild() const { return m_firstChild.get(); }
+ Frame* lastChild() const { return m_lastChild; }
- Frame* firstRenderedChild() const;
- Frame* nextRenderedSibling() const;
+ Frame* firstRenderedChild() const;
+ Frame* nextRenderedSibling() const;
- WEBCORE_EXPORT bool isDescendantOf(const Frame* ancestor) const;
-
- WEBCORE_EXPORT Frame* traverseNext(const Frame* stayWithin = nullptr) const;
- // Rendered means being the main frame or having an ownerRenderer. It may not have been parented in the Widget tree yet (see WidgetHierarchyUpdatesSuspensionScope).
- WEBCORE_EXPORT Frame* traverseNextRendered(const Frame* stayWithin = nullptr) const;
- WEBCORE_EXPORT Frame* traverseNextWithWrap(bool) const;
- WEBCORE_EXPORT Frame* traversePreviousWithWrap(bool) const;
-
- WEBCORE_EXPORT void appendChild(PassRefPtr<Frame>);
- bool transferChild(PassRefPtr<Frame>);
- void detachFromParent() { m_parent = nullptr; }
- void removeChild(Frame*);
+ WEBCORE_EXPORT bool isDescendantOf(const Frame* ancestor) const;
+
+ WEBCORE_EXPORT Frame* traverseNext(const Frame* stayWithin = nullptr) const;
+ // Rendered means being the main frame or having an ownerRenderer. It may not have been parented in the Widget tree yet (see WidgetHierarchyUpdatesSuspensionScope).
+ WEBCORE_EXPORT Frame* traverseNextRendered(const Frame* stayWithin = nullptr) const;
+ WEBCORE_EXPORT Frame* traverseNextWithWrap(bool) const;
+ WEBCORE_EXPORT Frame* traversePreviousWithWrap(bool) const;
+
+ WEBCORE_EXPORT void appendChild(PassRefPtr<Frame>);
+ bool transferChild(PassRefPtr<Frame>);
+ void detachFromParent() { m_parent = nullptr; }
+ void removeChild(Frame*);
- Frame* child(unsigned index) const;
- Frame* child(const AtomicString& name) const;
- WEBCORE_EXPORT Frame* find(const AtomicString& name) const;
- WEBCORE_EXPORT unsigned childCount() const;
+ Frame* child(unsigned index) const;
+ Frame* child(const AtomicString& name) const;
+ WEBCORE_EXPORT Frame* find(const AtomicString& name) const;
+ WEBCORE_EXPORT unsigned childCount() const;
- AtomicString uniqueChildName(const AtomicString& requestedName) const;
+ AtomicString uniqueChildName(const AtomicString& requestedName) const;
- WEBCORE_EXPORT Frame& top() const;
+ WEBCORE_EXPORT Frame& top() const;
- WEBCORE_EXPORT Frame* scopedChild(unsigned index) const;
- WEBCORE_EXPORT Frame* scopedChild(const AtomicString& name) const;
- unsigned scopedChildCount() const;
+ WEBCORE_EXPORT Frame* scopedChild(unsigned index) const;
+ WEBCORE_EXPORT Frame* scopedChild(const AtomicString& name) const;
+ unsigned scopedChildCount() const;
- unsigned indexInParent() const;
+ unsigned indexInParent() const;
- private:
- Frame* deepLastChild() const;
- void actuallyAppendChild(PassRefPtr<Frame>);
+private:
+ Frame* deepLastChild() const;
+ void actuallyAppendChild(PassRefPtr<Frame>);
- bool scopedBy(TreeScope*) const;
- Frame* scopedChild(unsigned index, TreeScope*) const;
- Frame* scopedChild(const AtomicString& name, TreeScope*) const;
- unsigned scopedChildCount(TreeScope*) const;
+ bool scopedBy(TreeScope*) const;
+ Frame* scopedChild(unsigned index, TreeScope*) const;
+ Frame* scopedChild(const AtomicString& name, TreeScope*) const;
+ unsigned scopedChildCount(TreeScope*) const;
- Frame& m_thisFrame;
+ Frame& m_thisFrame;
- Frame* m_parent;
- AtomicString m_name; // The actual frame name (may be empty).
- AtomicString m_uniqueName;
+ Frame* m_parent;
+ AtomicString m_name; // The actual frame name (may be empty).
+ AtomicString m_uniqueName;
- RefPtr<Frame> m_nextSibling;
- Frame* m_previousSibling;
- RefPtr<Frame> m_firstChild;
- Frame* m_lastChild;
- mutable unsigned m_scopedChildCount;
- };
+ RefPtr<Frame> m_nextSibling;
+ Frame* m_previousSibling;
+ RefPtr<Frame> m_firstChild;
+ Frame* m_lastChild;
+ mutable unsigned m_scopedChildCount;
+};
} // namespace WebCore
Modified: trunk/Source/WebCore/page/PageGroup.h (208803 => 208804)
--- trunk/Source/WebCore/page/PageGroup.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/page/PageGroup.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -32,42 +32,42 @@
namespace WebCore {
- class Page;
+class Page;
#if ENABLE(VIDEO_TRACK)
- class CaptionUserPreferences;
+class CaptionUserPreferences;
#endif
- class PageGroup {
- WTF_MAKE_NONCOPYABLE(PageGroup); WTF_MAKE_FAST_ALLOCATED;
- public:
- WEBCORE_EXPORT explicit PageGroup(const String& name);
- explicit PageGroup(Page&);
- ~PageGroup();
+class PageGroup {
+ WTF_MAKE_NONCOPYABLE(PageGroup); WTF_MAKE_FAST_ALLOCATED;
+public:
+ WEBCORE_EXPORT explicit PageGroup(const String& name);
+ explicit PageGroup(Page&);
+ ~PageGroup();
- WEBCORE_EXPORT static PageGroup* pageGroup(const String& groupName);
+ WEBCORE_EXPORT static PageGroup* pageGroup(const String& groupName);
- const HashSet<Page*>& pages() const { return m_pages; }
+ const HashSet<Page*>& pages() const { return m_pages; }
- void addPage(Page&);
- void removePage(Page&);
+ void addPage(Page&);
+ void removePage(Page&);
- const String& name() { return m_name; }
- unsigned identifier() { return m_identifier; }
+ const String& name() { return m_name; }
+ unsigned identifier() { return m_identifier; }
#if ENABLE(VIDEO_TRACK)
- WEBCORE_EXPORT void captionPreferencesChanged();
- WEBCORE_EXPORT CaptionUserPreferences& captionPreferences();
+ WEBCORE_EXPORT void captionPreferencesChanged();
+ WEBCORE_EXPORT CaptionUserPreferences& captionPreferences();
#endif
- private:
- String m_name;
- HashSet<Page*> m_pages;
+private:
+ String m_name;
+ HashSet<Page*> m_pages;
- unsigned m_identifier;
+ unsigned m_identifier;
#if ENABLE(VIDEO_TRACK)
- std::unique_ptr<CaptionUserPreferences> m_captionPreferences;
+ std::unique_ptr<CaptionUserPreferences> m_captionPreferences;
#endif
- };
+};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/Cursor.h (208803 => 208804)
--- trunk/Source/WebCore/platform/Cursor.h 2016-11-16 20:26:59 UTC (rev 208803)
+++ trunk/Source/WebCore/platform/Cursor.h 2016-11-16 20:43:14 UTC (rev 208804)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef Cursor_h
-#define Cursor_h
+#pragma once
#include "Image.h"
#include "IntPoint.h"
@@ -52,183 +51,181 @@
namespace WebCore {
- class Image;
+class Image;
#if PLATFORM(WIN)
- class SharedCursor : public RefCounted<SharedCursor> {
- public:
- static Ref<SharedCursor> create(HCURSOR nativeCursor) { return adoptRef(*new SharedCursor(nativeCursor)); }
- ~SharedCursor();
- HCURSOR nativeCursor() const { return m_nativeCursor; }
- private:
- SharedCursor(HCURSOR nativeCursor) : m_nativeCursor(nativeCursor) { }
- HCURSOR m_nativeCursor;
- };
- typedef RefPtr<SharedCursor> PlatformCursor;
+class SharedCursor : public RefCounted<SharedCursor> {
+public:
+ static Ref<SharedCursor> create(HCURSOR nativeCursor) { return adoptRef(*new SharedCursor(nativeCursor)); }
+ ~SharedCursor();
+ HCURSOR nativeCursor() const { return m_nativeCursor; }
+private:
+ SharedCursor(HCURSOR nativeCursor) : m_nativeCursor(nativeCursor) { }
+ HCURSOR m_nativeCursor;
+};
+typedef RefPtr<SharedCursor> PlatformCursor;
#elif USE(APPKIT)
- typedef NSCursor *PlatformCursor;
+typedef NSCursor *PlatformCursor;
#elif PLATFORM(GTK)
- typedef GRefPtr<GdkCursor> PlatformCursor;
+typedef GRefPtr<GdkCursor> PlatformCursor;
#elif PLATFORM(EFL)
- typedef const char* PlatformCursor;
+typedef const char* PlatformCursor;
#else
- typedef void* PlatformCursor;
+typedef void* PlatformCursor;
#endif
- class Cursor {
- WTF_MAKE_FAST_ALLOCATED;
- public:
- enum Type {
- Pointer = 0,
- Cross,
- Hand,
- IBeam,
- Wait,
- Help,
- EastResize,
- NorthResize,
- NorthEastResize,
- NorthWestResize,
- SouthResize,
- SouthEastResize,
- SouthWestResize,
- WestResize,
- NorthSouthResize,
- EastWestResize,
- NorthEastSouthWestResize,
- NorthWestSouthEastResize,
- ColumnResize,
- RowResize,
- MiddlePanning,
- EastPanning,
- NorthPanning,
- NorthEastPanning,
- NorthWestPanning,
- SouthPanning,
- SouthEastPanning,
- SouthWestPanning,
- WestPanning,
- Move,
- VerticalText,
- Cell,
- ContextMenu,
- Alias,
- Progress,
- NoDrop,
- Copy,
- None,
- NotAllowed,
- ZoomIn,
- ZoomOut,
- Grab,
- Grabbing,
- Custom
- };
+class Cursor {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ enum Type {
+ Pointer = 0,
+ Cross,
+ Hand,
+ IBeam,
+ Wait,
+ Help,
+ EastResize,
+ NorthResize,
+ NorthEastResize,
+ NorthWestResize,
+ SouthResize,
+ SouthEastResize,
+ SouthWestResize,
+ WestResize,
+ NorthSouthResize,
+ EastWestResize,
+ NorthEastSouthWestResize,
+ NorthWestSouthEastResize,
+ ColumnResize,
+ RowResize,
+ MiddlePanning,
+ EastPanning,
+ NorthPanning,
+ NorthEastPanning,
+ NorthWestPanning,
+ SouthPanning,
+ SouthEastPanning,
+ SouthWestPanning,
+ WestPanning,
+ Move,
+ VerticalText,
+ Cell,
+ ContextMenu,
+ Alias,
+ Progress,
+ NoDrop,
+ Copy,
+ None,
+ NotAllowed,
+ ZoomIn,
+ ZoomOut,
+ Grab,
+ Grabbing,
+ Custom
+ };
- WEBCORE_EXPORT static const Cursor& fromType(Cursor::Type);
+ WEBCORE_EXPORT static const Cursor& fromType(Cursor::Type);
- Cursor()
+ Cursor()
#if !PLATFORM(IOS)
- // This is an invalid Cursor and should never actually get used.
- : m_type(static_cast<Type>(-1))
+ // This is an invalid Cursor and should never actually get used.
+ : m_type(static_cast<Type>(-1))
#if ENABLE(MOUSE_CURSOR_SCALE)
- , m_imageScaleFactor(1)
+ , m_imageScaleFactor(1)
#endif
- , m_platformCursor(0)
+ , m_platformCursor(0)
#endif // !PLATFORM(IOS)
- {
- }
+ {
+ }
#if !PLATFORM(IOS)
- WEBCORE_EXPORT Cursor(Image*, const IntPoint& hotSpot);
- WEBCORE_EXPORT Cursor(const Cursor&);
+ WEBCORE_EXPORT Cursor(Image*, const IntPoint& hotSpot);
+ WEBCORE_EXPORT Cursor(const Cursor&);
#if ENABLE(MOUSE_CURSOR_SCALE)
- // Hot spot is in image pixels.
- WEBCORE_EXPORT Cursor(Image*, const IntPoint& hotSpot, float imageScaleFactor);
+ // Hot spot is in image pixels.
+ WEBCORE_EXPORT Cursor(Image*, const IntPoint& hotSpot, float imageScaleFactor);
#endif
- WEBCORE_EXPORT ~Cursor();
- WEBCORE_EXPORT Cursor& operator=(const Cursor&);
+ WEBCORE_EXPORT ~Cursor();
+ WEBCORE_EXPORT Cursor& operator=(const Cursor&);
- explicit Cursor(Type);
- Type type() const
- {
- ASSERT(m_type >= 0 && m_type <= Custom);
- return m_type;
- }
- Image* image() const { return m_image.get(); }
- const IntPoint& hotSpot() const { return m_hotSpot; }
+ explicit Cursor(Type);
+ Type type() const
+ {
+ ASSERT(m_type >= 0 && m_type <= Custom);
+ return m_type;
+ }
+ Image* image() const { return m_image.get(); }
+ const IntPoint& hotSpot() const { return m_hotSpot; }
#if ENABLE(MOUSE_CURSOR_SCALE)
- // Image scale in image pixels per logical (UI) pixel.
- float imageScaleFactor() const { return m_imageScaleFactor; }
+ // Image scale in image pixels per logical (UI) pixel.
+ float imageScaleFactor() const { return m_imageScaleFactor; }
#endif
- WEBCORE_EXPORT PlatformCursor platformCursor() const;
+ WEBCORE_EXPORT PlatformCursor platformCursor() const;
- private:
- void ensurePlatformCursor() const;
+ private:
+ void ensurePlatformCursor() const;
- Type m_type;
- RefPtr<Image> m_image;
- IntPoint m_hotSpot;
+ Type m_type;
+ RefPtr<Image> m_image;
+ IntPoint m_hotSpot;
#if ENABLE(MOUSE_CURSOR_SCALE)
- float m_imageScaleFactor;
+ float m_imageScaleFactor;
#endif
#if !USE(APPKIT)
- mutable PlatformCursor m_platformCursor;
+ mutable PlatformCursor m_platformCursor;
#else
- mutable RetainPtr<NSCursor> m_platformCursor;
+ mutable RetainPtr<NSCursor> m_platformCursor;
#endif
#endif // !PLATFORM(IOS)
- };
+};
- IntPoint determineHotSpot(Image*, const IntPoint& specifiedHotSpot);
-
- WEBCORE_EXPORT const Cursor& pointerCursor();
- const Cursor& crossCursor();
- WEBCORE_EXPORT const Cursor& handCursor();
- const Cursor& moveCursor();
- WEBCORE_EXPORT const Cursor& iBeamCursor();
- const Cursor& waitCursor();
- const Cursor& helpCursor();
- const Cursor& eastResizeCursor();
- const Cursor& northResizeCursor();
- const Cursor& northEastResizeCursor();
- const Cursor& northWestResizeCursor();
- const Cursor& southResizeCursor();
- const Cursor& southEastResizeCursor();
- const Cursor& southWestResizeCursor();
- const Cursor& westResizeCursor();
- const Cursor& northSouthResizeCursor();
- const Cursor& eastWestResizeCursor();
- const Cursor& northEastSouthWestResizeCursor();
- const Cursor& northWestSouthEastResizeCursor();
- const Cursor& columnResizeCursor();
- const Cursor& rowResizeCursor();
- const Cursor& middlePanningCursor();
- const Cursor& eastPanningCursor();
- const Cursor& northPanningCursor();
- const Cursor& northEastPanningCursor();
- const Cursor& northWestPanningCursor();
- const Cursor& southPanningCursor();
- const Cursor& southEastPanningCursor();
- const Cursor& southWestPanningCursor();
- const Cursor& westPanningCursor();
- const Cursor& verticalTextCursor();
- const Cursor& cellCursor();
- const Cursor& contextMenuCursor();
- const Cursor& noDropCursor();
- const Cursor& notAllowedCursor();
- const Cursor& progressCursor();
- const Cursor& aliasCursor();
- const Cursor& zoomInCursor();
- const Cursor& zoomOutCursor();
- const Cursor& copyCursor();
- const Cursor& noneCursor();
- const Cursor& grabCursor();
- const Cursor& grabbingCursor();
+IntPoint determineHotSpot(Image*, const IntPoint& specifiedHotSpot);
+WEBCORE_EXPORT const Cursor& pointerCursor();
+const Cursor& crossCursor();
+WEBCORE_EXPORT const Cursor& handCursor();
+const Cursor& moveCursor();
+WEBCORE_EXPORT const Cursor& iBeamCursor();
+const Cursor& waitCursor();
+const Cursor& helpCursor();
+const Cursor& eastResizeCursor();
+const Cursor& northResizeCursor();
+const Cursor& northEastResizeCursor();
+const Cursor& northWestResizeCursor();
+const Cursor& southResizeCursor();
+const Cursor& southEastResizeCursor();
+const Cursor& southWestResizeCursor();
+const Cursor& westResizeCursor();
+const Cursor& northSouthResizeCursor();
+const Cursor& eastWestResizeCursor();
+const Cursor& northEastSouthWestResizeCursor();
+const Cursor& northWestSouthEastResizeCursor();
+const Cursor& columnResizeCursor();
+const Cursor& rowResizeCursor();
+const Cursor& middlePanningCursor();
+const Cursor& eastPanningCursor();
+const Cursor& northPanningCursor();
+const Cursor& northEastPanningCursor();
+const Cursor& northWestPanningCursor();
+const Cursor& southPanningCursor();
+const Cursor& southEastPanningCursor();
+const Cursor& southWestPanningCursor();
+const Cursor& westPanningCursor();
+const Cursor& verticalTextCursor();
+const Cursor& cellCursor();
+const Cursor& contextMenuCursor();
+const Cursor& noDropCursor();
+const Cursor& notAllowedCursor();
+const Cursor& progressCursor();
+const Cursor& aliasCursor();
+const Cursor& zoomInCursor();
+const Cursor& zoomOutCursor();
+const Cursor& copyCursor();
+const Cursor& noneCursor();
+const Cursor& grabCursor();
+const Cursor& grabbingCursor();
+
} // namespace WebCore
-
-#endif // Cursor_h