Title: [116840] trunk/Source
Revision
116840
Author
[email protected]
Date
2012-05-11 23:45:37 -0700 (Fri, 11 May 2012)

Log Message

[Chromium] Call isLinkVisited directly
https://bugs.webkit.org/show_bug.cgi?id=85412

Reviewed by Adam Barth.

Part of a refactoring series. See tracking bug 82948.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* page/PageGroup.cpp:
(WebCore::PageGroup::isLinkVisited):
* platform/VisitedLinks.cpp: Added.
(WebCore):
(WebCore::VisitedLinks::isLinkVisited):
* platform/VisitedLinks.h: Added.
(WebCore):
(VisitedLinks):
* platform/chromium/PlatformSupport.h:
* platform/chromium/VisitedLinksChromium.cpp: Added.
(WebCore):
(WebCore::VisitedLinks::isLinkVisited):

Source/WebKit/chromium:

* src/PlatformSupport.cpp:
(WebCore):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (116839 => 116840)


--- trunk/Source/WebCore/CMakeLists.txt	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-05-12 06:45:37 UTC (rev 116840)
@@ -1137,6 +1137,7 @@
     platform/ThreadTimers.cpp
     platform/Timer.cpp
     platform/UUID.cpp
+    platform/VisitedLinks.cpp
     platform/Widget.cpp
 
     platform/animation/Animation.cpp

Modified: trunk/Source/WebCore/ChangeLog (116839 => 116840)


--- trunk/Source/WebCore/ChangeLog	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/ChangeLog	2012-05-12 06:45:37 UTC (rev 116840)
@@ -1,3 +1,31 @@
+2012-05-11  Mark Pilgrim  <[email protected]>
+
+        [Chromium] Call isLinkVisited directly
+        https://bugs.webkit.org/show_bug.cgi?id=85412
+
+        Reviewed by Adam Barth.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/PageGroup.cpp:
+        (WebCore::PageGroup::isLinkVisited):
+        * platform/VisitedLinks.cpp: Added.
+        (WebCore):
+        (WebCore::VisitedLinks::isLinkVisited):
+        * platform/VisitedLinks.h: Added.
+        (WebCore):
+        (VisitedLinks):
+        * platform/chromium/PlatformSupport.h:
+        * platform/chromium/VisitedLinksChromium.cpp: Added.
+        (WebCore):
+        (WebCore::VisitedLinks::isLinkVisited):
+
 2012-05-11  Martin Robinson  <[email protected]>
 
         [TextureMapper] Tiles are not created for large textures

Modified: trunk/Source/WebCore/GNUmakefile.list.am (116839 => 116840)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-05-12 06:45:37 UTC (rev 116840)
@@ -3670,6 +3670,8 @@
 	Source/WebCore/platform/UUID.cpp \
 	Source/WebCore/platform/UUID.h \
 	Source/WebCore/platform/VisitedLinkStrategy.h \
+	Source/WebCore/platform/VisitedLinks.cpp \
+	Source/WebCore/platform/VisitedLinks.h \
 	Source/WebCore/platform/Widget.cpp \
 	Source/WebCore/platform/Widget.h \
 	Source/WebCore/platform/WindowsKeyboardCodes.h \

Modified: trunk/Source/WebCore/Target.pri (116839 => 116840)


--- trunk/Source/WebCore/Target.pri	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/Target.pri	2012-05-12 06:45:37 UTC (rev 116840)
@@ -1216,6 +1216,7 @@
     platform/text/UnicodeRange.cpp \
     platform/text/transcoder/FontTranscoder.cpp \
     platform/UUID.cpp \
+    platform/VisitedLinks.cpp \
     platform/Widget.cpp \
     platform/PlatformStrategies.cpp \
     plugins/IFrameShimSupport.cpp \

Modified: trunk/Source/WebCore/WebCore.gypi (116839 => 116840)


--- trunk/Source/WebCore/WebCore.gypi	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/WebCore.gypi	2012-05-12 06:45:37 UTC (rev 116840)
@@ -327,6 +327,7 @@
             'platform/Timer.h',
             'platform/TreeShared.h',
             'platform/VisitedLinkStrategy.h',
+            'platform/VisitedLinks.h',
             'platform/Widget.h',
             'platform/WindowsKeyboardCodes.h',
             'platform/animation/Animation.h',
@@ -3357,6 +3358,7 @@
             'platform/chromium/ThemeChromiumMac.h',
             'platform/chromium/ThemeChromiumMac.mm',
             'platform/chromium/TraceEvent.h',
+            'platform/chromium/VisitedLinksChromium.cpp',
             'platform/chromium/WidgetChromium.cpp',
             'platform/cocoa/KeyEventCocoa.h',
             'platform/cocoa/KeyEventCocoa.mm',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (116839 => 116840)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-05-12 06:45:37 UTC (rev 116840)
@@ -28146,6 +28146,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\platform\VisitedLinks.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\platform\VisitedLinks.h"
+				>
+			</File>
+			<File
 				RelativePath="..\platform\Widget.cpp"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (116839 => 116840)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-05-12 06:45:37 UTC (rev 116840)
@@ -20395,6 +20395,8 @@
 				2E3BBF051162DA1100B9409A /* UUID.cpp */,
 				2E3BBF061162DA1100B9409A /* UUID.h */,
 				515788C01207852C00A37C4A /* VisitedLinkStrategy.h */,
+				D6FDAEF2149C06190037B1E5 /* VisitedLinks.cpp */,
+				D630E2AB149BF344005B2F97 /* VisitedLinks.h */,
 				9380F47109A11AB4001FDB34 /* Widget.cpp */,
 				9380F47209A11AB4001FDB34 /* Widget.h */,
 				E1E1BEFF115FF6FB006F52CA /* WindowsKeyboardCodes.h */,
@@ -24719,6 +24721,7 @@
 				93309E20099E64920056E581 /* VisiblePosition.h in Headers */,
 				A883DF280F3D045D00F19BF6 /* VisibleSelection.h in Headers */,
 				515788C11207852C00A37C4A /* VisitedLinkStrategy.h in Headers */,
+				D630E2AC149BF344005B2F97 /* VisitedLinks.h in Headers */,
 				E44613B60CD6344E00FADA75 /* VoidCallback.h in Headers */,
 				FD7F299213D4C0CB00AD9535 /* WaveShaperDSPKernel.h in Headers */,
 				FD7F299413D4C0CB00AD9535 /* WaveShaperNode.h in Headers */,
@@ -27757,6 +27760,7 @@
 				93309E1D099E64920056E581 /* visible_units.cpp in Sources */,
 				93309E1F099E64920056E581 /* VisiblePosition.cpp in Sources */,
 				A883DF270F3D045D00F19BF6 /* VisibleSelection.cpp in Sources */,
+				D6FDAEF3149C06190037B1E5 /* VisitedLinks.cpp in Sources */,
 				FD7F299113D4C0CB00AD9535 /* WaveShaperDSPKernel.cpp in Sources */,
 				FD7F299313D4C0CB00AD9535 /* WaveShaperNode.cpp in Sources */,
 				FD7F299613D4C0CB00AD9535 /* WaveShaperProcessor.cpp in Sources */,

Modified: trunk/Source/WebCore/page/PageGroup.cpp (116839 => 116840)


--- trunk/Source/WebCore/page/PageGroup.cpp	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/page/PageGroup.cpp	2012-05-12 06:45:37 UTC (rev 116840)
@@ -38,7 +38,7 @@
 #include "StorageNamespace.h"
 
 #if PLATFORM(CHROMIUM)
-#include "PlatformSupport.h"
+#include "VisitedLinks.h"
 #endif
 
 namespace WebCore {
@@ -176,7 +176,7 @@
 {
 #if PLATFORM(CHROMIUM)
     // Use Chromium's built-in visited link database.
-    return PlatformSupport::isLinkVisited(visitedLinkHash);
+    return VisitedLinks::isLinkVisited(visitedLinkHash);
 #else
     if (!m_visitedLinksPopulated) {
         m_visitedLinksPopulated = true;

Added: trunk/Source/WebCore/platform/VisitedLinks.cpp (0 => 116840)


--- trunk/Source/WebCore/platform/VisitedLinks.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/VisitedLinks.cpp	2012-05-12 06:45:37 UTC (rev 116840)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "VisitedLinks.h"
+
+namespace WebCore {
+
+bool VisitedLinks::isLinkVisited(LinkHash)
+{
+    return false;
+}
+
+} // namespace WebCore

Added: trunk/Source/WebCore/platform/VisitedLinks.h (0 => 116840)


--- trunk/Source/WebCore/platform/VisitedLinks.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/VisitedLinks.h	2012-05-12 06:45:37 UTC (rev 116840)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 VisitedLinks_h
+#define VisitedLinks_h
+
+#include "LinkHash.h"
+
+namespace WebCore {
+
+class VisitedLinks {
+public:
+    static bool isLinkVisited(LinkHash);
+};
+
+} // namespace WebCore
+
+#endif // VisitedLinks_h

Modified: trunk/Source/WebCore/platform/chromium/PlatformSupport.h (116839 => 116840)


--- trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebCore/platform/chromium/PlatformSupport.h	2012-05-12 06:45:37 UTC (rev 116840)
@@ -368,7 +368,6 @@
     // Visited links ------------------------------------------------------
     static LinkHash visitedLinkHash(const UChar* url, unsigned length);
     static LinkHash visitedLinkHash(const KURL& base, const AtomicString& attributeURL);
-    static bool isLinkVisited(LinkHash);
 
     static void didStartWorkerRunLoop(WorkerRunLoop*);
     static void didStopWorkerRunLoop(WorkerRunLoop*);

Added: trunk/Source/WebCore/platform/chromium/VisitedLinksChromium.cpp (0 => 116840)


--- trunk/Source/WebCore/platform/chromium/VisitedLinksChromium.cpp	                        (rev 0)
+++ trunk/Source/WebCore/platform/chromium/VisitedLinksChromium.cpp	2012-05-12 06:45:37 UTC (rev 116840)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Google 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:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * 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.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "VisitedLinks.h"
+
+#include <public/Platform.h>
+
+namespace WebCore {
+
+bool VisitedLinks::isLinkVisited(LinkHash visitedLinkHash)
+{
+    return WebKit::Platform::current()->isLinkVisited(visitedLinkHash);
+}
+
+} // namespace WebCore

Modified: trunk/Source/WebKit/chromium/ChangeLog (116839 => 116840)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-05-12 06:45:37 UTC (rev 116840)
@@ -1,3 +1,15 @@
+2012-05-11  Mark Pilgrim  <[email protected]>
+
+        [Chromium] Call isLinkVisited directly
+        https://bugs.webkit.org/show_bug.cgi?id=85412
+
+        Reviewed by Adam Barth.
+
+        Part of a refactoring series. See tracking bug 82948.
+
+        * src/PlatformSupport.cpp:
+        (WebCore):
+
 2012-05-11  Tony Chang  <[email protected]>
 
         [chromium] Port gtest WebViewTest.ActiveState from test_shell_tests to webkit_unit_tests

Modified: trunk/Source/WebKit/chromium/src/PlatformSupport.cpp (116839 => 116840)


--- trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-05-12 05:43:35 UTC (rev 116839)
+++ trunk/Source/WebKit/chromium/src/PlatformSupport.cpp	2012-05-12 06:45:37 UTC (rev 116840)
@@ -830,11 +830,6 @@
     return webKitPlatformSupport()->visitedLinkHash(buffer.data(), buffer.length());
 }
 
-bool PlatformSupport::isLinkVisited(LinkHash visitedLinkHash)
-{
-    return webKitPlatformSupport()->isLinkVisited(visitedLinkHash);
-}
-
 // These are temporary methods that the WebKit layer can use to call to the
 // Glue layer. Once the Glue layer moves entirely into the WebKit layer, these
 // methods will be deleted.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to