RESOLVED FIXED Bug 85412
[Chromium] Call isLinkVisited directly
https://bugs.webkit.org/show_bug.cgi?id=85412
Summary [Chromium] Call isLinkVisited directly
Mark Pilgrim (Google)
Reported 2012-05-02 13:16:38 PDT
As part of the PlatformSupport refactoring (see bug 82948), I need to migrate isLinkVisited out of PlatformSupport.cpp/h and into... somewhere. Or do I? Example usage is here: http://trac.webkit.org/browser/trunk/Source/WebCore/page/PageGroup.cpp#L175 As you can see, Chromium is a special case. Every other port uses m_visitedLinkHashes, but Chromium routes through PlatformSupport. Now, if we want to continue special-casing Chromium, I could create a class in platform/VisitedLinksSupport.cpp/h and another in platform/chromium/VisitedLinksSupportChromium.cpp that contained a static isLinkVisited function that routes to WebKit::Platform::current()->isLinkVisited(...). I've followed that pattern numerous times (StatsCounter, MemoryUsageSupport, TraceEventSupport). Or should we discuss removing the special case for Chromium and handling visited links the same way as other ports? (I don't know if this is possible or desirable; I'm just looking for guidance on how to proceed.) PlatformSupport::visitedLinkHash() is probably also affected by this decision.
Attachments
Patch (19.69 KB, patch)
2012-05-09 08:13 PDT, Mark Pilgrim (Google)
no flags
Patch (19.46 KB, patch)
2012-05-10 13:31 PDT, Mark Pilgrim (Google)
no flags
Patch (8.11 KB, patch)
2012-05-11 19:00 PDT, Mark Pilgrim (Google)
no flags
Patch (14.57 KB, patch)
2012-05-11 19:26 PDT, Mark Pilgrim (Google)
no flags
Darin Fisher (:fishd, Google)
Comment 1 2012-05-02 16:17:39 PDT
I'm pretty sure that we need to maintain the Chromium specific code paths. The reason for this is that we use a shared memory buffer on the Chromium-side to implement these functions.
Mark Pilgrim (Google)
Comment 2 2012-05-09 08:13:33 PDT
Mark Pilgrim (Google)
Comment 3 2012-05-09 08:15:47 PDT
OK, new VisitedLinkSupport.cpp/h and VisitedLinkSupportChromium.cpp to house isLinkVisited function inside WebCore. Same pattern as, for example, bug 84376.
Build Bot
Comment 4 2012-05-09 08:22:58 PDT
Early Warning System Bot
Comment 5 2012-05-09 08:24:43 PDT
Early Warning System Bot
Comment 6 2012-05-09 08:31:12 PDT
Gyuyoung Kim
Comment 7 2012-05-09 08:54:54 PDT
Adam Barth
Comment 8 2012-05-09 09:17:58 PDT
Comment on attachment 140949 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140949&action=review Looks like you've got some compile troubles. > Source/WebCore/page/PageGroup.cpp:179 > - return PlatformSupport::isLinkVisited(visitedLinkHash); > + return VisitedLinkSupport::isLinkVisited(visitedLinkHash); I wonder if we should move this into the client. This seems more like something the ChromeClient should worry about... If we are going to keep this as a static, we should use a better name than VisitedLinkSupport though. Perhaps VistedLinks?
Mark Pilgrim (Google)
Comment 9 2012-05-10 13:31:58 PDT
Mark Pilgrim (Google)
Comment 10 2012-05-10 13:33:07 PDT
Comment on attachment 141238 [details] Patch Fixed missing include, should fix compile problems. Also renamed VisitedLinkSupport to VisitedLinks.
Adam Barth
Comment 11 2012-05-10 13:35:38 PDT
Comment on attachment 141238 [details] Patch Did the entry in the header already move?
Mark Pilgrim (Google)
Comment 12 2012-05-11 19:00:09 PDT
Mark Pilgrim (Google)
Comment 13 2012-05-11 19:02:22 PDT
Comment on attachment 141541 [details] Patch Repatch for ToT.
Early Warning System Bot
Comment 14 2012-05-11 19:06:06 PDT
Gyuyoung Kim
Comment 15 2012-05-11 19:06:19 PDT
Early Warning System Bot
Comment 16 2012-05-11 19:06:45 PDT
Build Bot
Comment 17 2012-05-11 19:22:05 PDT
Mark Pilgrim (Google)
Comment 18 2012-05-11 19:26:17 PDT
Mark Pilgrim (Google)
Comment 19 2012-05-11 19:27:19 PDT
Comment on attachment 141545 [details] Patch Well that went badly. Let's try again.
Adam Barth
Comment 20 2012-05-11 23:09:39 PDT
Comment on attachment 141545 [details] Patch That looks a lot greener. :)
WebKit Review Bot
Comment 21 2012-05-11 23:44:56 PDT
Comment on attachment 141545 [details] Patch Clearing flags on attachment: 141545 Committed r116840: <http://trac.webkit.org/changeset/116840>
WebKit Review Bot
Comment 22 2012-05-11 23:45:03 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.