Changeset 95604 in webkit


Ignore:
Timestamp:
Sep 21, 2011 1:59:13 AM (13 years ago)
Author:
abecsi@webkit.org
Message:

[Qt] Remove Qt specific code from css/SelectorChecker.cpp
https://bugs.webkit.org/show_bug.cgi?id=67702

Reviewed by Csaba Osztrogonác.

Source/WebCore:

No new tests needed.

  • css/SelectorChecker.cpp: Move Qt-specific code to the Qt-specific WebPlatformStrategies.

(WebCore::SelectorChecker::determineLinkStateSlowCase):

  • platform/VisitedLinkStrategy.h:

Source/WebKit/mac:

  • WebCoreSupport/WebPlatformStrategies.h:
  • WebCoreSupport/WebPlatformStrategies.mm:

(WebPlatformStrategies::isLinkVisited):

Source/WebKit/qt:

  • WebCoreSupport/WebPlatformStrategies.cpp: Check the Qt global history here, instead of a platform independent file.

(WebPlatformStrategies::isLinkVisited):

  • WebCoreSupport/WebPlatformStrategies.h:

Source/WebKit/win:

  • WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.

(WebPlatformStrategies::isLinkVisited):

  • WebCoreSupport/WebPlatformStrategies.h: Ditto.

Source/WebKit/wince:

  • WebCoreSupport/PlatformStrategiesWinCE.cpp:

(PlatformStrategiesWinCE::addVisitedLink):

  • WebCoreSupport/PlatformStrategiesWinCE.h:

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.

(WebKit::WebPlatformStrategies::isLinkVisited):
(WebKit::WebPlatformStrategies::addVisitedLink):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
Location:
trunk/Source
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95600 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        No new tests needed.
     9
     10        * css/SelectorChecker.cpp: Move Qt-specific code to the Qt-specific WebPlatformStrategies.
     11        (WebCore::SelectorChecker::determineLinkStateSlowCase):
     12        * platform/VisitedLinkStrategy.h:
     13
    1142011-09-16  MORITA Hajime  <morrita@google.com>
    215
  • trunk/Source/WebCore/css/SelectorChecker.cpp

    r95295 r95604  
    6060#endif
    6161
    62 #if PLATFORM(QT)
    63 //FIXME: Remove this Qt specific code from a platform neutral file.
    64 #include <qwebhistoryinterface.h>
    65 #endif
    66 
    6762namespace WebCore {
    6863   
     
    231226    if (!attr || attr->isNull())
    232227        return NotInsideLink;
    233    
    234 #if PLATFORM(QT)
    235     //FIXME: Remove this Qt specific code from a platform neutral file.
    236     Vector<UChar, 512> url;
    237     visitedURL(m_document->baseURL(), *attr, url);
    238     if (url.isEmpty())
    239         return InsideUnvisitedLink;
    240    
    241     // If the Qt4.4 interface for the history is used, we will have to fallback
    242     // to the old global history.
    243     QWebHistoryInterface* iface = QWebHistoryInterface::defaultInterface();
    244     if (iface)
    245         return iface->historyContains(QString(reinterpret_cast<QChar*>(url.data()), url.size())) ? InsideVisitedLink : InsideUnvisitedLink;
    246    
    247     LinkHash hash = visitedLinkHash(url.data(), url.size());
    248     if (!hash)
    249         return InsideUnvisitedLink;
    250 #else
     228
    251229    LinkHash hash = visitedLinkHash(m_document->baseURL(), *attr);
    252230    if (!hash)
    253231        return InsideUnvisitedLink;
    254 #endif
    255    
     232
    256233    Frame* frame = m_document->frame();
    257234    if (!frame)
     
    265242   
    266243#if USE(PLATFORM_STRATEGIES)
    267     return platformStrategies()->visitedLinkStrategy()->isLinkVisited(page, hash) ? InsideVisitedLink : InsideUnvisitedLink;
     244    return platformStrategies()->visitedLinkStrategy()->isLinkVisited(page, hash, m_document->baseURL(), *attr) ? InsideVisitedLink : InsideUnvisitedLink;
    268245#else
    269246    return page->group().isLinkVisited(hash) ? InsideVisitedLink : InsideUnvisitedLink;
  • trunk/Source/WebCore/platform/VisitedLinkStrategy.h

    r64527 r95604  
    3333typedef uint64_t LinkHash;
    3434class Page;
     35class KURL;
    3536
    3637class VisitedLinkStrategy {
    3738public:
    38     virtual bool isLinkVisited(Page*, LinkHash) = 0;
     39    virtual bool isLinkVisited(Page*, LinkHash, const KURL& baseURL, const AtomicString& attributeURL) = 0;
    3940    virtual void addVisitedLink(Page*, LinkHash) = 0;
    4041
  • trunk/Source/WebKit/mac/ChangeLog

    r95570 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * WebCoreSupport/WebPlatformStrategies.h:
     9        * WebCoreSupport/WebPlatformStrategies.mm:
     10        (WebPlatformStrategies::isLinkVisited):
     11
    1122011-09-20  Anders Carlsson  <andersca@apple.com>
    213
  • trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h

    r83985 r95604  
    5252
    5353    // WebCore::VisitedLinkStrategy
    54     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
     54    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
    5555    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
    5656};
  • trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm

    r83985 r95604  
    8282}
    8383
    84 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash)
     84bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
    8585{
    8686    return page->group().isLinkVisited(hash);
  • trunk/Source/WebKit/qt/ChangeLog

    r95548 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * WebCoreSupport/WebPlatformStrategies.cpp: Check the Qt global history here, instead of a platform independent file.
     9        (WebPlatformStrategies::isLinkVisited):
     10        * WebCoreSupport/WebPlatformStrategies.h:
     11
    1122011-09-20  Jarred Nicholls  <jarred@sencha.com>
    213
  • trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.cpp

    r90101 r95604  
    4040#include <QCoreApplication>
    4141#include <QLocale>
     42#include <qwebhistoryinterface.h>
    4243#include <qwebpage.h>
    4344#include <qwebpluginfactory.h>
     
    744745// VisitedLinkStrategy
    745746
    746 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash)
    747 {
     747bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const KURL& baseURL, const AtomicString& attributeURL)
     748{
     749    ASSERT(hash);
     750
     751    Vector<UChar, 512> url;
     752    visitedURL(baseURL, attributeURL, url);
     753
     754    // If the Qt4.4 interface for the history is used, we will have to fallback
     755    // to the old global history.
     756    QWebHistoryInterface* iface = QWebHistoryInterface::defaultInterface();
     757    if (iface)
     758        return iface->historyContains(QString(reinterpret_cast<QChar*>(url.data()), url.size()));
     759
    748760    return page->group().isLinkVisited(hash);
    749761}
  • trunk/Source/WebKit/qt/WebCoreSupport/WebPlatformStrategies.h

    r90101 r95604  
    154154
    155155    // WebCore::VisitedLinkStrategy
    156     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
     156    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
    157157    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
    158158};
  • trunk/Source/WebKit/win/ChangeLog

    r95387 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
     9        (WebPlatformStrategies::isLinkVisited):
     10        * WebCoreSupport/WebPlatformStrategies.h: Ditto.
     11
    1122011-09-17  Mihai Parparita  <mihaip@chromium.org>
    213
  • trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp

    r84094 r95604  
    100100}
    101101
    102 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash)
     102bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash, const KURL&, const AtomicString&)
    103103{
    104104    return page->group().isLinkVisited(hash);
  • trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h

    r84094 r95604  
    5252
    5353    // WebCore::VisitedLinkStrategy
    54     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
     54    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
    5555    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
    5656};
  • trunk/Source/WebKit/wince/ChangeLog

    r95387 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * WebCoreSupport/PlatformStrategiesWinCE.cpp:
     9        (PlatformStrategiesWinCE::addVisitedLink):
     10        * WebCoreSupport/PlatformStrategiesWinCE.h:
     11
    1122011-09-17  Mihai Parparita  <mihaip@chromium.org>
    213
  • trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp

    r90101 r95604  
    677677}
    678678
    679 void PlatformStrategiesWinCE::addVisitedLink(Page* page, LinkHash hash)
     679void PlatformStrategiesWinCE::addVisitedLink(Page* page, LinkHash hash, const KURL&, const AtomicString&)
    680680{
    681681    page->group().addVisitedLinkHash(hash);
  • trunk/Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h

    r90101 r95604  
    149149
    150150    // WebCore::VisitedLinkStrategy
    151     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
     151    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL&, const WTF::AtomicString&);
    152152    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
    153153};
  • trunk/Source/WebKit2/ChangeLog

    r95585 r95604  
     12011-09-21  Andras Becsi  <andras.becsi@nokia.com>
     2
     3        [Qt] Remove Qt specific code from css/SelectorChecker.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=67702
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Modify to match new prototype.
     9        (WebKit::WebPlatformStrategies::isLinkVisited):
     10        (WebKit::WebPlatformStrategies::addVisitedLink):
     11        * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
     12
    1132011-09-20  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp

    r82465 r95604  
    116116// VisitedLinkStrategy
    117117
    118 bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash linkHash)
     118bool WebPlatformStrategies::isLinkVisited(Page*, LinkHash linkHash, const KURL&, const AtomicString&)
    119119{
    120120    return WebProcess::shared().isLinkVisited(linkHash);
    121121}
    122122
    123 void WebPlatformStrategies::addVisitedLink(Page* page, LinkHash linkHash)
     123void WebPlatformStrategies::addVisitedLink(Page*, LinkHash linkHash)
    124124{
    125125    WebProcess::shared().addVisitedLink(linkHash);
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h

    r82465 r95604  
    5757
    5858    // WebCore::VisitedLinkStrategy
    59     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash);
     59    virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
    6060    virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
    6161
Note: See TracChangeset for help on using the changeset viewer.