Changeset 64518 in webkit
- Timestamp:
- Aug 2, 2010 6:08:28 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64517 r64518 1 2010-08-02 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Add VisitedLinkStrategy for each platform to implement 6 https://bugs.webkit.org/show_bug.cgi?id=43393 7 8 No new tests. (No change in behavior) 9 10 * WebCore.exp.in: 11 * WebCore.xcodeproj/project.pbxproj: 12 13 * css/CSSStyleSelector.cpp: 14 (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase): Use VisitedLinkStrategy if it's enabled. 15 16 * loader/HistoryController.cpp: 17 (WebCore::addVisitedLink): Choose VisitedLinkStrategy if it's enabled, else fallback to PageGroup. 18 (WebCore::HistoryController::updateForStandardLoad): Use addVisitedLink helper. 19 (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList): Ditto. 20 (WebCore::HistoryController::updateForClientRedirect): Ditto. 21 (WebCore::HistoryController::updateForSameDocumentNavigation): Ditto. 22 23 * platform/PlatformStrategies.h: 24 (WebCore::PlatformStrategies::visitedLinkStrategy): 25 (WebCore::PlatformStrategies::PlatformStrategies): 26 1 27 2010-08-02 Chris Fleizach <cfleizach@apple.com> 2 28 -
trunk/WebCore/WebCore.exp.in
r64513 r64518 816 816 __ZN7WebCore9PageCache11setCapacityEi 817 817 __ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv 818 __ZN7WebCore9PageGroup13isLinkVisitedEy 818 819 __ZN7WebCore9PageGroup14addVisitedLinkEPKtm 819 820 __ZN7WebCore9PageGroup17closeLocalStorageEv -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r64517 r64518 1112 1112 514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C76690CE923A1007EF3CD /* ResourceResponseBase.cpp */; }; 1113 1113 514C767F0CE923A1007EF3CD /* ResourceResponseBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C766A0CE923A1007EF3CD /* ResourceResponseBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1114 515788C11207852C00A37C4A /* VisitedLinkStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 515788C01207852C00A37C4A /* VisitedLinkStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1114 1115 515B03990CD1642A00B7EA9C /* SQLStatement.h in Headers */ = {isa = PBXBuildFile; fileRef = 515B03970CD1642A00B7EA9C /* SQLStatement.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1115 1116 515B039A0CD1642A00B7EA9C /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 515B03980CD1642A00B7EA9C /* SQLStatement.cpp */; }; … … 6877 6878 5150C2A10702629000AF642C /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 6878 6879 5150C2A50702629800AF642C /* WebDashboardRegion.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDashboardRegion.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 6880 515788C01207852C00A37C4A /* VisitedLinkStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisitedLinkStrategy.h; sourceTree = "<group>"; }; 6879 6881 515B03970CD1642A00B7EA9C /* SQLStatement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLStatement.h; sourceTree = "<group>"; }; 6880 6882 515B03980CD1642A00B7EA9C /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLStatement.cpp; sourceTree = "<group>"; }; … … 16380 16382 2E3BBF051162DA1100B9409A /* UUID.cpp */, 16381 16383 2E3BBF061162DA1100B9409A /* UUID.h */, 16384 515788C01207852C00A37C4A /* VisitedLinkStrategy.h */, 16382 16385 9380F47109A11AB4001FDB34 /* Widget.cpp */, 16383 16386 9380F47209A11AB4001FDB34 /* Widget.h */, … … 19963 19966 97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */, 19964 19967 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 19968 515788C11207852C00A37C4A /* VisitedLinkStrategy.h in Headers */, 19965 19969 D39D006D11F8E308006041F2 /* PopupMenuMac.h in Headers */, 19966 19970 D39D009D11F907E6006041F2 /* SearchPopupMenuMac.h in Headers */, -
trunk/WebCore/css/CSSStyleSelector.cpp
r63957 r64518 98 98 #include <wtf/Vector.h> 99 99 100 #if USE(PLATFORM_STRATEGIES) 101 #include "PlatformStrategies.h" 102 #include "VisitedLinkStrategy.h" 103 #endif 104 100 105 #if ENABLE(DASHBOARD_SUPPORT) 101 106 #include "DashboardRegion.h" … … 930 935 931 936 m_linksCheckedForVisitedState.add(hash); 937 938 #if USE(PLATFORM_STRATEGIES) 939 return platformStrategies()->visitedLinkStrategy()->isLinkVisited(page, hash) ? InsideVisitedLink : InsideUnvisitedLink; 940 #else 932 941 return page->group().isLinkVisited(hash) ? InsideVisitedLink : InsideUnvisitedLink; 942 #endif 933 943 } 934 944 -
trunk/WebCore/loader/HistoryController.cpp
r64402 r64518 49 49 #include <wtf/text/CString.h> 50 50 51 #if USE(PLATFORM_STRATEGIES) 52 #include "PlatformStrategies.h" 53 #include "VisitedLinkStrategy.h" 54 #endif 55 51 56 namespace WebCore { 57 58 static inline void addVisitedLink(Page* page, const KURL& url) 59 { 60 #if USE(PLATFORM_STRATEGIES) 61 platformStrategies()->visitedLinkStrategy()->addVisitedLink(page, visitedLinkHash(url.string().characters(), url.string().length())); 62 #else 63 page->group().addVisitedLink(url); 64 #endif 65 } 52 66 53 67 HistoryController::HistoryController(Frame* frame) … … 291 305 if (!historyURL.isEmpty() && !needPrivacy) { 292 306 if (Page* page = m_frame->page()) 293 page->group().addVisitedLink(historyURL);307 addVisitedLink(page, historyURL); 294 308 295 309 if (!frameLoader->documentLoader()->didCreateGlobalHistoryEntry() && frameLoader->documentLoader()->unreachableURL().isEmpty() && !frameLoader->url().isEmpty()) … … 335 349 if (!historyURL.isEmpty() && !needPrivacy) { 336 350 if (Page* page = m_frame->page()) 337 page->group().addVisitedLink(historyURL);351 addVisitedLink(page, historyURL); 338 352 339 353 if (!m_frame->loader()->documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader()->documentLoader()->unreachableURL().isEmpty() && !m_frame->loader()->url().isEmpty()) … … 362 376 if (!historyURL.isEmpty() && !needPrivacy) { 363 377 if (Page* page = m_frame->page()) 364 page->group().addVisitedLink(historyURL);378 addVisitedLink(page, historyURL); 365 379 } 366 380 } … … 400 414 return; 401 415 402 page->group().addVisitedLink(m_frame->loader()->url());416 addVisitedLink(page, m_frame->loader()->url()); 403 417 } 404 418 -
trunk/WebCore/platform/PlatformStrategies.h
r63911 r64518 33 33 class PluginStrategy; 34 34 class LocalizationStrategy; 35 class VisitedLinkStrategy; 35 36 36 37 class PlatformStrategies { … … 50 51 } 51 52 53 VisitedLinkStrategy* visitedLinkStrategy() 54 { 55 if (!m_visitedLinkStrategy) 56 m_visitedLinkStrategy = createVisitedLinkStrategy(); 57 return m_visitedLinkStrategy; 58 } 59 52 60 protected: 53 61 PlatformStrategies() 54 : m_pluginStrategy(0), 55 m_localizationStrategy(0) 62 : m_pluginStrategy(0) 63 , m_localizationStrategy(0) 64 , m_visitedLinkStrategy(0) 56 65 { 57 66 } … … 64 73 virtual PluginStrategy* createPluginStrategy() = 0; 65 74 virtual LocalizationStrategy* createLocalizationStrategy() = 0; 75 virtual VisitedLinkStrategy* createVisitedLinkStrategy() = 0; 66 76 67 77 PluginStrategy* m_pluginStrategy; 68 78 LocalizationStrategy* m_localizationStrategy; 79 VisitedLinkStrategy* m_visitedLinkStrategy; 69 80 }; 70 81 -
trunk/WebKit/mac/ChangeLog
r64513 r64518 1 2010-08-02 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Add VisitedLinkStrategy for each platform to implement 6 https://bugs.webkit.org/show_bug.cgi?id=43393 7 8 * WebCoreSupport/WebPlatformStrategies.h: 9 * WebCoreSupport/WebPlatformStrategies.mm: 10 (WebPlatformStrategies::createVisitedLinkStrategy): 11 (WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links. 12 (WebPlatformStrategies::addVisitedLink): Ditto. 13 1 14 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 15 -
trunk/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
r63904 r64518 30 30 #include <WebCore/PluginStrategy.h> 31 31 #include <WebCore/LocalizationStrategy.h> 32 #include <WebCore/VisitedLinkStrategy.h> 32 33 33 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy {34 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { 34 35 public: 35 36 static void initialize(); … … 41 42 virtual WebCore::PluginStrategy* createPluginStrategy(); 42 43 virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); 44 virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); 43 45 44 46 // WebCore::PluginStrategy … … 149 151 virtual WebCore::String validationMessageRangeOverflowText(); 150 152 virtual WebCore::String validationMessageStepMismatchText(); 153 154 // WebCore::VisitedLinkStrategy 155 virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); 156 virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); 151 157 }; 152 158 -
trunk/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
r63904 r64518 31 31 #import <WebCore/BlockExceptions.h> 32 32 #import <WebCore/IntSize.h> 33 #import <WebCore/Page.h> 34 #import <WebCore/PageGroup.h> 33 35 #import <wtf/StdLibExtras.h> 34 36 … … 57 59 58 60 LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() 61 { 62 return this; 63 } 64 65 VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() 59 66 { 60 67 return this; … … 763 770 } 764 771 772 // VisitedLinkStrategy 773 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash) 774 { 775 return page->group().isLinkVisited(hash); 776 } 777 778 void WebPlatformStrategies::addVisitedLink(Page* page, LinkHash hash) 779 { 780 return page->group().addVisitedLinkHash(hash); 781 } -
trunk/WebKit2/ChangeLog
r64513 r64518 1 2010-08-02 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders Carlsson. 4 5 Add VisitedLinkStrategy for each platform to implement 6 https://bugs.webkit.org/show_bug.cgi?id=43393 7 8 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 9 (WebKit::WebPlatformStrategies::createVisitedLinkStrategy): 10 (WebKit::WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links, for now. 11 (WebKit::WebPlatformStrategies::addVisitedLink): Ditto. 12 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 13 1 14 2010-07-27 Luiz Agostini <luiz.agostini@openbossa.org> 2 15 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r63904 r64518 33 33 #include "WebProcess.h" 34 34 #include "WebProcessProxyMessageKinds.h" 35 #include <WebCore/Page.h> 36 #include <WebCore/PageGroup.h> 35 37 #include <wtf/MathExtras.h> 36 38 #include <wtf/text/CString.h> … … 64 66 65 67 LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() 68 { 69 return this; 70 } 71 72 VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() 66 73 { 67 74 return this; … … 801 808 } 802 809 810 // VisitedLinkStrategy 811 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash) 812 { 813 // FIXME: Have WebKit2 manage its own visited links 814 return page->group().isLinkVisited(hash); 815 } 816 817 void WebPlatformStrategies::addVisitedLink(Page* page, LinkHash hash) 818 { 819 // FIXME: Have WebKit2 manage its own visited links 820 return page->group().addVisitedLinkHash(hash); 821 } 822 803 823 } // namespace WebKit 804 824 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
r63904 r64518 32 32 #include <WebCore/PluginStrategy.h> 33 33 #include <WebCore/LocalizationStrategy.h> 34 #include <WebCore/VisitedLinkStrategy.h> 34 35 35 36 namespace WebKit { 36 37 37 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy {38 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { 38 39 public: 39 40 static void initialize(); … … 45 46 virtual WebCore::PluginStrategy* createPluginStrategy(); 46 47 virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); 48 virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); 47 49 48 50 // WebCore::PluginStrategy … … 171 173 bool m_shouldRefreshPlugins; 172 174 Vector<WebCore::PluginInfo> m_cachedPlugins; 175 176 // WebCore::VisitedLinkStrategy 177 virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); 178 virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); 173 179 }; 174 180
Note: See TracChangeset
for help on using the changeset viewer.