Diff
Modified: trunk/Source/WebKit2/ChangeLog (162980 => 162981)
--- trunk/Source/WebKit2/ChangeLog 2014-01-29 00:16:00 UTC (rev 162980)
+++ trunk/Source/WebKit2/ChangeLog 2014-01-29 00:39:42 UTC (rev 162981)
@@ -1,5 +1,25 @@
2014-01-28 Anders Carlsson <ander...@apple.com>
+ Add WebDocumentLoader, a WebCore::DocumentLoader subclass
+ https://bugs.webkit.org/show_bug.cgi?id=127817
+
+ Reviewed by Tim Horton.
+
+ We need a place to store navigation IDs, and since they are per document loader, putting them
+ in a DocumentLoader subclass seems like a good idea.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::createDocumentLoader):
+ * WebProcess/WebPage/WebDocumentLoader.cpp: Added.
+ (WebKit::WebDocumentLoader::WebDocumentLoader):
+ (WebKit::WebDocumentLoader::setNavigationID):
+ * WebProcess/WebPage/WebDocumentLoader.h: Added.
+ (WebKit::WebDocumentLoader::create):
+ (WebKit::WebDocumentLoader::navigationID):
+
+2014-01-28 Anders Carlsson <ander...@apple.com>
+
Simplify WebFrame::isMainFrame
https://bugs.webkit.org/show_bug.cgi?id=127812
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (162980 => 162981)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2014-01-29 00:16:00 UTC (rev 162980)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2014-01-29 00:39:42 UTC (rev 162981)
@@ -179,6 +179,8 @@
1A594ABB112A1FB6009DE7C7 /* WebUIClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */; };
1A5B1C501898606F004FCF9B /* WKNavigation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */; };
1A5B1C511898606F004FCF9B /* WKNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5B1C4F1898606F004FCF9B /* WKNavigation.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 1A5B1C5418987EDF004FCF9B /* WebDocumentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5B1C5218987EDF004FCF9B /* WebDocumentLoader.cpp */; };
+ 1A5B1C5518987EDF004FCF9B /* WebDocumentLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5B1C5318987EDF004FCF9B /* WebDocumentLoader.h */; };
1A5E4DA412D3BD3D0099A2BB /* TextCheckerState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */; };
1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */; };
1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */; };
@@ -1807,6 +1809,8 @@
1A594AB9112A1FB6009DE7C7 /* WebUIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUIClient.h; sourceTree = "<group>"; };
1A5B1C4E1898606F004FCF9B /* WKNavigation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNavigation.mm; sourceTree = "<group>"; };
1A5B1C4F1898606F004FCF9B /* WKNavigation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigation.h; sourceTree = "<group>"; };
+ 1A5B1C5218987EDF004FCF9B /* WebDocumentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebDocumentLoader.cpp; sourceTree = "<group>"; };
+ 1A5B1C5318987EDF004FCF9B /* WebDocumentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDocumentLoader.h; sourceTree = "<group>"; };
1A5E4DA312D3BD3D0099A2BB /* TextCheckerState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCheckerState.h; sourceTree = "<group>"; };
1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShareableBitmap.cpp; sourceTree = "<group>"; };
1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableBitmap.h; sourceTree = "<group>"; };
@@ -4842,6 +4846,8 @@
BC72B9F911E6476B001EB4EA /* WebBackForwardListProxy.h */,
51871B59127CB89D00F76232 /* WebContextMenu.cpp */,
51871B5A127CB89D00F76232 /* WebContextMenu.h */,
+ 1A5B1C5218987EDF004FCF9B /* WebDocumentLoader.cpp */,
+ 1A5B1C5318987EDF004FCF9B /* WebDocumentLoader.h */,
BC111ADC112F5B9300337BAB /* WebFrame.cpp */,
BC032D8910F437A00058C15A /* WebFrame.h */,
1C8E281F1275D15400BC7BD0 /* WebInspector.cpp */,
@@ -6084,6 +6090,7 @@
BC032DA810F437D10058C15A /* ArgumentEncoder.h in Headers */,
BC032DA910F437D10058C15A /* Arguments.h in Headers */,
BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */,
+ 1A5B1C5518987EDF004FCF9B /* WebDocumentLoader.h in Headers */,
E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
51BA24441858EE3000EA2811 /* AsyncTask.h in Headers */,
512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
@@ -7730,6 +7737,7 @@
51217460164C20E30037A5C1 /* ShareableResource.cpp in Sources */,
1A24BF3A120896A600FBB059 /* SharedMemoryMac.cpp in Sources */,
5272B28A1406985D0096A5D0 /* StatisticsData.cpp in Sources */,
+ 1A5B1C5418987EDF004FCF9B /* WebDocumentLoader.cpp in Sources */,
51A4D5A916CAC4FF000E615E /* StatisticsRequest.cpp in Sources */,
1AD3306E16B1D991004F60E7 /* StorageAreaImpl.cpp in Sources */,
1ACECD2417162DB1001FC9EF /* StorageAreaMap.cpp in Sources */,
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (162980 => 162981)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2014-01-29 00:16:00 UTC (rev 162980)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2014-01-29 00:39:42 UTC (rev 162981)
@@ -38,6 +38,7 @@
#include "WebBackForwardListProxy.h"
#include "WebContextMessages.h"
#include "WebCoreArgumentCoders.h"
+#include "WebDocumentLoader.h"
#include "WebErrors.h"
#include "WebEvent.h"
#include "WebFrame.h"
@@ -1132,7 +1133,7 @@
PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& data)
{
- return DocumentLoader::create(request, data);
+ return WebDocumentLoader::create(request, data);
}
void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const URL& url)
Added: trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.cpp (0 => 162981)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.cpp (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.cpp 2014-01-29 00:39:42 UTC (rev 162981)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebDocumentLoader.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebDocumentLoader::WebDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData)
+ : DocumentLoader(request, substituteData)
+ , m_navigationID(0)
+{
+}
+
+void WebDocumentLoader::setNavigationID(uint64_t navigationID)
+{
+ ASSERT(navigationID);
+ ASSERT(!m_navigationID);
+
+ m_navigationID = navigationID;
+}
+
+} // namespace WebKit
Added: trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.h (0 => 162981)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.h (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebDocumentLoader.h 2014-01-29 00:39:42 UTC (rev 162981)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebDocumentLoader_h
+#define WebDocumentLoader_h
+
+#include <WebCore/DocumentLoader.h>
+
+namespace WebKit {
+
+class WebDocumentLoader : public WebCore::DocumentLoader {
+public:
+ static PassRefPtr<WebDocumentLoader> create(const WebCore::ResourceRequest& request, const WebCore::SubstituteData& data)
+ {
+ return adoptRef(new WebDocumentLoader(request, data));
+ }
+
+ uint64_t navigationID() const { return m_navigationID; }
+ void setNavigationID(uint64_t);
+
+private:
+ WebDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
+
+ uint64_t m_navigationID;
+};
+
+} // namespace WebKit
+
+#endif // WebDocumentLoader_h