Title: [89328] trunk/Source/WebCore
Revision
89328
Author
[email protected]
Date
2011-06-20 18:35:18 -0700 (Mon, 20 Jun 2011)

Log Message

2011-06-20  Eric Seidel  <[email protected]>

        Reviewed by Adam Barth.

        Group load-initiating and stopping functions in FrameLoader.h
        https://bugs.webkit.org/show_bug.cgi?id=63030

        No function change, thus no tests.

        * loader/FrameLoader.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (89327 => 89328)


--- trunk/Source/WebCore/ChangeLog	2011-06-21 01:33:33 UTC (rev 89327)
+++ trunk/Source/WebCore/ChangeLog	2011-06-21 01:35:18 UTC (rev 89328)
@@ -1,3 +1,14 @@
+2011-06-20  Eric Seidel  <[email protected]>
+
+        Reviewed by Adam Barth.
+
+        Group load-initiating and stopping functions in FrameLoader.h
+        https://bugs.webkit.org/show_bug.cgi?id=63030
+
+        No function change, thus no tests.
+
+        * loader/FrameLoader.h:
+
 2011-06-20  Sailesh Agrawal  <[email protected]>
 
         Reviewed by Mihai Parparita.

Modified: trunk/Source/WebCore/loader/FrameLoader.h (89327 => 89328)


--- trunk/Source/WebCore/loader/FrameLoader.h	2011-06-21 01:33:33 UTC (rev 89327)
+++ trunk/Source/WebCore/loader/FrameLoader.h	2011-06-21 01:35:18 UTC (rev 89328)
@@ -103,34 +103,43 @@
     SubframeLoader* subframeLoader() const { return &m_subframeLoader; }
     IconController* icon() const { return &m_icon; }
 
-    // FIXME: This is not cool, people. There are too many different functions that all start loads.
-    // We should aim to consolidate these into a smaller set of functions, and try to reuse more of
-    // the logic by extracting common code paths.
-
     void prepareForLoadStart();
     void setupForReplace();
     void setupForReplaceByMIMEType(const String& newMIMEType);
 
+    // FIXME: These are all functions which start loads. We have too many.
     void loadURLIntoChildFrame(const KURL&, const String& referer, Frame*);
-
     void loadFrameRequest(const FrameLoadRequest&, bool lockHistory, bool lockBackForwardList,  // Called by submitForm, calls loadPostRequest and loadURL.
         PassRefPtr<Event>, PassRefPtr<FormState>, ReferrerPolicy);
 
     void load(const ResourceRequest&, bool lockHistory);                                        // Called by WebFrame, calls load(ResourceRequest, SubstituteData).
     void load(const ResourceRequest&, const SubstituteData&, bool lockHistory);                 // Called both by WebFrame and internally, calls load(DocumentLoader*).
     void load(const ResourceRequest&, const String& frameName, bool lockHistory);               // Called by WebPluginController.
-
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
     void loadArchive(PassRefPtr<Archive>);
 #endif
+    unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data);
 
-    static void reportLocalLoadFailed(Frame*, const String& url);
+    void changeLocation(PassRefPtr<SecurityOrigin>, const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool refresh = false);
+    void urlSelected(const KURL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ReferrerPolicy);
+    void submitForm(PassRefPtr<FormSubmission>);
 
-    unsigned long loadResourceSynchronously(const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data);
+    void reload(bool endToEndReload = false);
+    void reloadWithOverrideEncoding(const String& overrideEncoding);
 
-    // Also not cool.
+    void open(CachedFrameBase&);
+    void loadItem(HistoryItem*, FrameLoadType);
+
+    static void reportLocalLoadFailed(Frame*, const String& url);
+
+    // FIXME: These are all functions which stop loads. We have too many.
     void stopAllLoaders(ClearProvisionalItemPolicy = ShouldClearProvisionalItem);
     void stopForUserCancel(bool deferCheckLoadComplete = false);
+    void stop();
+    void stopLoading(UnloadEventPolicy);
+    bool closeURL();
+    void cancelAndClear();
+    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
 
     bool isLoadingMainResource() const { return m_isLoadingMainResource; }
     bool isLoading() const;
@@ -167,9 +176,6 @@
     bool isHostedByObjectElement() const;
     bool isLoadingMainFrame() const;
 
-    void reload(bool endToEndReload = false);
-    void reloadWithOverrideEncoding(const String& overrideEncoding);
-
     void finishedLoadingDocument(DocumentLoader*);
     bool isReplacing() const;
     void setReplacing();
@@ -184,7 +190,6 @@
     CachePolicy subresourceCachePolicy() const;
 
     void didFirstLayout();
-
     void didFirstVisuallyNonEmptyLayout();
 
     void loadedResourceFromMemoryCache(const CachedResource*);
@@ -203,15 +208,6 @@
 
     void setDefersLoading(bool);
 
-    void changeLocation(PassRefPtr<SecurityOrigin>, const KURL&, const String& referrer, bool lockHistory = true, bool lockBackForwardList = true, bool refresh = false);
-    void urlSelected(const KURL&, const String& target, PassRefPtr<Event>, bool lockHistory, bool lockBackForwardList, ReferrerPolicy);
-
-    void submitForm(PassRefPtr<FormSubmission>);
-
-    void stop();
-    void stopLoading(UnloadEventPolicy);
-    bool closeURL();
-
     void didExplicitOpen();
 
     // Callbacks from DocumentWriter
@@ -258,8 +254,6 @@
 
     bool isComplete() const;
 
-    void cancelAndClear();
-
     void setTitle(const StringWithDirection&);
 
     void commitProvisionalLoad();
@@ -274,15 +268,12 @@
 
     bool shouldInterruptLoadForXFrameOptions(const String&, const KURL&);
 
-    void open(CachedFrameBase&);
-
     // FIXME: Should these really be public?
     void completed();
     bool allAncestorsAreComplete() const; // including this
     bool allChildrenAreComplete() const; // immediate children, not all descendants
     void clientRedirected(const KURL&, double delay, double fireDate, bool lockBackForwardList);
     void clientRedirectCancelledOrFinished(bool cancelWithLoadInProgress);
-    void loadItem(HistoryItem*, FrameLoadType);
 
     // FIXME: This is public because this asynchronous callback from the FrameLoaderClient
     // uses the policy machinery (and therefore is called via the PolicyChecker).  Once we
@@ -293,8 +284,6 @@
 
     static ObjectContentType defaultObjectContentType(const KURL&, const String& mimeType, bool shouldPreferPlugInsForImages);
 
-    void clear(bool clearWindowProperties = true, bool clearScriptObjects = true, bool clearFrameView = true);
-
     bool quickRedirectComing() const { return m_quickRedirectComing; }
 
     bool shouldClose();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to