Title: [162937] trunk/Source/WebCore
Revision
162937
Author
ander...@apple.com
Date
2014-01-28 09:28:44 -0800 (Tue, 28 Jan 2014)

Log Message

Add stubbed out VisitedLinkProvider class
https://bugs.webkit.org/show_bug.cgi?id=127744

Reviewed by Andreas Kling.

This is a first step towards moving responsibility of visited links from
the page group to a separate object.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/PageGroup.cpp:
(WebCore::PageGroup::PageGroup):
* page/PageGroup.h:
(WebCore::PageGroup::visitedLinkProvider):
* page/VisitedLinkProvider.cpp: Added.
(WebCore::VisitedLinkProvider::VisitedLinkProvider):
(WebCore::VisitedLinkProvider::~VisitedLinkProvider):
* page/VisitedLinkProvider.h: Added.
(WebCore::VisitedLinkProvider::create):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (162936 => 162937)


--- trunk/Source/WebCore/CMakeLists.txt	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-01-28 17:28:44 UTC (rev 162937)
@@ -1768,6 +1768,7 @@
     page/SuspendableTimer.cpp
     page/UserContentController.cpp
     page/UserContentURLPattern.cpp
+    page/VisitedLinkProvider.cpp
     page/WindowFeatures.cpp
     page/WindowFocusAllowedIndicator.cpp
     page/WorkerNavigator.cpp

Modified: trunk/Source/WebCore/ChangeLog (162936 => 162937)


--- trunk/Source/WebCore/ChangeLog	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/ChangeLog	2014-01-28 17:28:44 UTC (rev 162937)
@@ -1,3 +1,28 @@
+2014-01-28  Anders Carlsson  <ander...@apple.com>
+
+        Add stubbed out VisitedLinkProvider class
+        https://bugs.webkit.org/show_bug.cgi?id=127744
+
+        Reviewed by Andreas Kling.
+
+        This is a first step towards moving responsibility of visited links from 
+        the page group to a separate object.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::PageGroup):
+        * page/PageGroup.h:
+        (WebCore::PageGroup::visitedLinkProvider):
+        * page/VisitedLinkProvider.cpp: Added.
+        (WebCore::VisitedLinkProvider::VisitedLinkProvider):
+        (WebCore::VisitedLinkProvider::~VisitedLinkProvider):
+        * page/VisitedLinkProvider.h: Added.
+        (WebCore::VisitedLinkProvider::create):
+
 2014-01-28  Gurpreet Kaur  <k.gurpr...@samsung.com>
 
         Add support for menclose element

Modified: trunk/Source/WebCore/GNUmakefile.list.am (162936 => 162937)


--- trunk/Source/WebCore/GNUmakefile.list.am	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2014-01-28 17:28:44 UTC (rev 162937)
@@ -4220,6 +4220,8 @@
 	Source/WebCore/page/UserStyleSheetTypes.h \
 	Source/WebCore/page/ValidationMessageClient.h \
 	Source/WebCore/page/ViewState.h \
+	Source/WebCore/page/VisitedLinkProvider.cpp \
+	Source/WebCore/page/VisitedLinkProvider.h \
 	Source/WebCore/page/WebCoreKeyboardUIMode.h \
 	Source/WebCore/page/WebKitPoint.h \
 	Source/WebCore/page/WindowFeatures.cpp \

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (162936 => 162937)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-01-28 17:28:44 UTC (rev 162937)
@@ -7059,6 +7059,7 @@
     <ClCompile Include="..\page\SuspendableTimer.cpp" />
     <ClCompile Include="..\page\UserContentController.cpp" />
     <ClCompile Include="..\page\UserContentURLPattern.cpp" />
+    <ClCompile Include="..\page\VisitedLinkProvider.cpp" />
     <ClCompile Include="..\fileapi\WebKitBlobBuilder.cpp" />
     <ClCompile Include="..\page\WindowFeatures.cpp" />
     <ClCompile Include="..\page\WindowFocusAllowedIndicator.cpp" />
@@ -18830,6 +18831,7 @@
     <ClInclude Include="..\page\UserScriptTypes.h" />
     <ClInclude Include="..\page\UserStyleSheet.h" />
     <ClInclude Include="..\page\UserStyleSheetTypes.h" />
+    <ClInclude Include="..\page\VisitedLinkProvider.h" />
     <ClInclude Include="..\fileapi\WebKitBlobBuilder.h" />
     <ClInclude Include="..\page\WebKitPoint.h" />
     <ClInclude Include="..\page\WindowFeatures.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (162936 => 162937)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-01-28 17:28:44 UTC (rev 162937)
@@ -792,6 +792,9 @@
     <ClCompile Include="..\page\UserContentURLPattern.cpp">
       <Filter>page</Filter>
     </ClCompile>
+    <ClCompile Include="..\page\VisitedLinkProvider.cpp">
+      <Filter>page</Filter>
+    </ClCompile>
     <ClCompile Include="..\fileapi\WebKitBlobBuilder.cpp">
       <Filter>page</Filter>
     </ClCompile>
@@ -7649,6 +7652,9 @@
     <ClInclude Include="..\page\UserStyleSheetTypes.h">
       <Filter>page</Filter>
     </ClInclude>
+    <ClCompile Include="..\page\VisitedLinkProvider.h">
+      <Filter>page</Filter>
+    </ClCompile>
     <ClInclude Include="..\fileapi\WebKitBlobBuilder.h">
       <Filter>page</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (162936 => 162937)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-01-28 17:28:44 UTC (rev 162937)
@@ -795,6 +795,8 @@
 		1ABA76C911D20E47004C201C /* ColorData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E406F3FB1198307D009D59D6 /* ColorData.cpp */; };
 		1ABA76CA11D20E50004C201C /* CSSPropertyNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41EA038119836DB00710BC5 /* CSSPropertyNames.cpp */; };
 		1ABA76CB11D20E57004C201C /* CSSValueKeywords.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E41EA0391198374900710BC5 /* CSSValueKeywords.cpp */; };
+		1ABA80001897341200DCE9D6 /* VisitedLinkProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABA7FFF1897341200DCE9D6 /* VisitedLinkProvider.h */; };
+		1ABA80061897355500DCE9D6 /* VisitedLinkProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ABA80051897355500DCE9D6 /* VisitedLinkProvider.cpp */; };
 		1ABC7109170E5E1B00F9A9D6 /* WorkerNavigatorStorageQuota.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABC7108170E5E1B00F9A9D6 /* WorkerNavigatorStorageQuota.h */; };
 		1AC2260C0DB69F190089B669 /* JSDOMApplicationCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC2260A0DB69F190089B669 /* JSDOMApplicationCache.cpp */; };
 		1AC2260D0DB69F190089B669 /* JSDOMApplicationCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC2260B0DB69F190089B669 /* JSDOMApplicationCache.h */; };
@@ -7565,6 +7567,8 @@
 		1AB7FC650A8B92EC00D9D37B /* XPathValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XPathValue.h; sourceTree = "<group>"; };
 		1AB7FC660A8B92EC00D9D37B /* XPathVariableReference.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = XPathVariableReference.cpp; sourceTree = "<group>"; };
 		1AB7FC670A8B92EC00D9D37B /* XPathVariableReference.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = XPathVariableReference.h; sourceTree = "<group>"; };
+		1ABA7FFF1897341200DCE9D6 /* VisitedLinkProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkProvider.h; sourceTree = "<group>"; };
+		1ABA80051897355500DCE9D6 /* VisitedLinkProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VisitedLinkProvider.cpp; sourceTree = "<group>"; };
 		1ABC7108170E5E1B00F9A9D6 /* WorkerNavigatorStorageQuota.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerNavigatorStorageQuota.h; sourceTree = "<group>"; };
 		1AC2260A0DB69F190089B669 /* JSDOMApplicationCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMApplicationCache.cpp; sourceTree = "<group>"; };
 		1AC2260B0DB69F190089B669 /* JSDOMApplicationCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMApplicationCache.h; sourceTree = "<group>"; };
@@ -16186,6 +16190,8 @@
 				BC8BF1591058141800A40A07 /* UserStyleSheetTypes.h */,
 				F513A3E915FF4841001526DB /* ValidationMessageClient.h */,
 				8678D0BA1878E810003ABDE6 /* ViewState.h */,
+				1ABA80051897355500DCE9D6 /* VisitedLinkProvider.cpp */,
+				1ABA7FFF1897341200DCE9D6 /* VisitedLinkProvider.h */,
 				BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */,
 				494BD7930F55C8EE00747828 /* WebKitPoint.h */,
 				494BD7940F55C8EE00747828 /* WebKitPoint.idl */,
@@ -19746,7 +19752,6 @@
 				441AF0A70EBA7BBF0044ED4B /* ios */,
 				B27535490B053814002CE64F /* mac */,
 				FBC220DD1237FBEB00BCF788 /* opengl */,
-				F4EAF4AB10C74268009100D3 /* opentype */,
 				49E911B20EF86D27009D0CAF /* transforms */,
 				490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */,
 				490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */,
@@ -24037,6 +24042,7 @@
 				93B70D6409EB0C7C009D8468 /* JSDOMBinding.h in Headers */,
 				BC60D7C10D29A46300B9918F /* JSDOMCoreException.h in Headers */,
 				40ECAE7E16B8B67200C36103 /* JSDOMError.h in Headers */,
+				1ABA80001897341200DCE9D6 /* VisitedLinkProvider.h in Headers */,
 				2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */,
 				E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */,
 				65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
@@ -27488,6 +27494,7 @@
 				BC6D44BE0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp in Sources */,
 				1AE2AA260A1CDAB400B42B25 /* JSHTMLFieldSetElement.cpp in Sources */,
 				1AE2AA280A1CDAB400B42B25 /* JSHTMLFontElement.cpp in Sources */,
+				1ABA80061897355500DCE9D6 /* VisitedLinkProvider.cpp in Sources */,
 				9BF9A8801648DD2F001C6B23 /* JSHTMLFormControlsCollection.cpp in Sources */,
 				9B1AB07C1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp in Sources */,
 				A8D064FB0A23C0CC005E7203 /* JSHTMLFormElement.cpp in Sources */,

Modified: trunk/Source/WebCore/page/PageGroup.cpp (162936 => 162937)


--- trunk/Source/WebCore/page/PageGroup.cpp	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/page/PageGroup.cpp	2014-01-28 17:28:44 UTC (rev 162937)
@@ -39,6 +39,7 @@
 #include "Settings.h"
 #include "StorageNamespace.h"
 #include "UserContentController.h"
+#include "VisitedLinkProvider.h"
 #include <wtf/StdLibExtras.h>
 
 #if ENABLE(VIDEO_TRACK)
@@ -63,6 +64,7 @@
 
 PageGroup::PageGroup(const String& name)
     : m_name(name)
+    , m_visitedLinkProvider(VisitedLinkProvider::create())
     , m_visitedLinksPopulated(false)
     , m_identifier(getUniqueIdentifier())
     , m_userContentController(UserContentController::create())
@@ -71,7 +73,8 @@
 }
 
 PageGroup::PageGroup(Page& page)
-    : m_visitedLinksPopulated(false)
+    : m_visitedLinkProvider(VisitedLinkProvider::create())
+    , m_visitedLinksPopulated(false)
     , m_identifier(getUniqueIdentifier())
     , m_userContentController(UserContentController::create())
     , m_groupSettings(std::make_unique<GroupSettings>())

Modified: trunk/Source/WebCore/page/PageGroup.h (162936 => 162937)


--- trunk/Source/WebCore/page/PageGroup.h	2014-01-28 17:19:05 UTC (rev 162936)
+++ trunk/Source/WebCore/page/PageGroup.h	2014-01-28 17:28:44 UTC (rev 162937)
@@ -42,6 +42,7 @@
     class Page;
     class SecurityOrigin;
     class StorageNamespace;
+    class VisitedLinkProvider;
     class UserContentController;
 
 #if ENABLE(VIDEO_TRACK)
@@ -71,6 +72,8 @@
         void addPage(Page&);
         void removePage(Page&);
 
+        VisitedLinkProvider& visitedLinkProvider() { return *m_visitedLinkProvider; }
+
         bool isLinkVisited(LinkHash);
 
         void addVisitedLink(const URL&);
@@ -111,6 +114,8 @@
         String m_name;
         HashSet<Page*> m_pages;
 
+        RefPtr<VisitedLinkProvider> m_visitedLinkProvider;
+
         HashSet<LinkHash, LinkHashHash> m_visitedLinkHashes;
         bool m_visitedLinksPopulated;
 

Added: trunk/Source/WebCore/page/VisitedLinkProvider.cpp (0 => 162937)


--- trunk/Source/WebCore/page/VisitedLinkProvider.cpp	                        (rev 0)
+++ trunk/Source/WebCore/page/VisitedLinkProvider.cpp	2014-01-28 17:28:44 UTC (rev 162937)
@@ -0,0 +1,39 @@
+/*
+ * 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 "VisitedLinkProvider.h"
+
+namespace WebCore {
+
+VisitedLinkProvider::VisitedLinkProvider()
+{
+}
+
+VisitedLinkProvider::~VisitedLinkProvider()
+{
+}
+
+}

Added: trunk/Source/WebCore/page/VisitedLinkProvider.h (0 => 162937)


--- trunk/Source/WebCore/page/VisitedLinkProvider.h	                        (rev 0)
+++ trunk/Source/WebCore/page/VisitedLinkProvider.h	2014-01-28 17:28:44 UTC (rev 162937)
@@ -0,0 +1,53 @@
+/*
+ * 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 VisitedLinkProvider_h
+#define VisitedLinkProvider_h
+
+#include <wtf/Forward.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+typedef uint64_t LinkHash;
+class Page;
+class URL;
+
+class VisitedLinkProvider : public RefCounted<VisitedLinkProvider> {
+public:
+    static PassRefPtr<VisitedLinkProvider> create()
+    {
+        return adoptRef(new VisitedLinkProvider);
+    }
+    ~VisitedLinkProvider();
+
+private:
+    VisitedLinkProvider();
+};
+
+}
+
+#endif // VisitedLinkProvider_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to