Changeset 59373 in webkit


Ignore:
Timestamp:
May 13, 2010 10:59:10 AM (14 years ago)
Author:
tonikitoo@webkit.org
Message:

2010-05-13 Antonio Gomes <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com>

Reviewed by Kenneth Christiansen.

[Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
https://bugs.webkit.org/show_bug.cgi?id=37759

WebKit/qt:

  • WebCoreSupport/DumpRenderTreeSupportQt.cpp: (DumpRenderTreeSupportQt::markerTextForListItem): (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo):
  • WebCoreSupport/DumpRenderTreeSupportQt.h:

WebKitTools:

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::computedStyleIncludingVisitedInfo):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:

LayoutTests:

  • platform/qt/Skipped:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r59369 r59373  
     12010-05-13  Antonio Gomes  <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
     6        https://bugs.webkit.org/show_bug.cgi?id=37759
     7
     8        * platform/qt/Skipped:
     9
    1102010-05-13  Martin Robinson  <mrobinson@igalia.com>
    211        Reviewed by Gustavo Noronha.
  • trunk/LayoutTests/platform/qt/Skipped

    r59225 r59373  
    318318# Missing layoutTestController.evaluateScriptInIsolatedWorld()
    319319storage/open-database-creation-callback-isolated-world.html
    320 
    321 # Missing layoutTestController.computedStyleIncludingVisitedInfo()
    322 fast/history/multiple-classes-visited.html
    323 fast/history/nested-visited-test.html
    324 fast/history/self-is-visited.html
    325 fast/history/sibling-visited-test.html
    326320
    327321# Missing layoutTestController.dumpWillCacheResponse
  • trunk/WebKit/qt/ChangeLog

    r59335 r59373  
     12010-05-13  Antonio Gomes  <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
     6        https://bugs.webkit.org/show_bug.cgi?id=37759
     7
     8        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     9        (DumpRenderTreeSupportQt::markerTextForListItem):
     10        (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo):
     11        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     12
    1132010-05-12  Joe Ligman  <joseph.ligman@nokia.com>
    214
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r58527 r59373  
    2424#include "DumpRenderTreeSupportQt.h"
    2525
     26#include "CSSComputedStyleDeclaration.h"
    2627#include "ContextMenu.h"
    2728#include "ContextMenuClientQt.h"
     
    4849#include "WorkerThread.h"
    4950
     51#include "qwebelement.h"
    5052#include "qwebframe.h"
    5153#include "qwebframe_p.h"
     
    378380}
    379381
     382QVariantMap DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(const QWebElement& element)
     383{
     384    QVariantMap res;
     385
     386    WebCore::Element* webElement = element.m_element;
     387    if (!webElement)
     388        return res;
     389
     390    RefPtr<WebCore::CSSComputedStyleDeclaration> style = computedStyle(webElement, true);
     391    for (int i = 0; i < style->length(); i++) {
     392        QString name = style->item(i);
     393        QString value = (static_cast<WebCore::CSSStyleDeclaration*>(style.get()))->getPropertyValue(name);
     394        res[name] = QVariant(value);
     395    }
     396    return res;
     397}
     398
    380399QVariantList DumpRenderTreeSupportQt::selectedRange(QWebPage* page)
    381400{
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r58218 r59373  
    2727#include <QVariant>
    2828
    29 #include "qwebelement.h"
    30 
     29class QWebElement;
     30class QWebFrame;
    3131class QWebPage;
    32 class QWebFrame;
    3332
    3433class QWEBKIT_EXPORT DumpRenderTreeSupportQt {
     
    8685
    8786    static QString markerTextForListItem(const QWebElement& listItem);
     87    static QVariantMap computedStyleIncludingVisitedInfo(const QWebElement& element);
    8888};
    8989
  • trunk/WebKitTools/ChangeLog

    r59371 r59373  
     12010-05-13  Antonio Gomes  <tonikitoo@webkit.org>, Yi Shen <yi.4.shen@nokia.com>
     2
     3        Reviewed by Kenneth Christiansen.
     4
     5        [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
     6        https://bugs.webkit.org/show_bug.cgi?id=37759
     7
     8        WebKitTools:
     9
     10        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     11        (LayoutTestController::computedStyleIncludingVisitedInfo):
     12        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     13
    1142010-05-10  Adam Roben  <aroben@apple.com>
    215
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r58917 r59373  
    625625}
    626626
     627QVariantMap LayoutTestController::computedStyleIncludingVisitedInfo(const QWebElement& element) const
     628{
     629    return DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(element);
     630}
     631
    627632void LayoutTestController::authenticateSession(const QString&, const QString&, const QString&)
    628633{
    629634    // FIXME: If there is a concept per-session (per-process) credential storage, the credentials should be added to it for later use.
    630635}
    631 
    632636
    633637const unsigned LayoutTestController::maxViewWidth = 800;
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r58920 r59373  
    187187
    188188    QString markerTextForListItem(const QWebElement& listItem);
     189    QVariantMap computedStyleIncludingVisitedInfo(const QWebElement& element) const;
    189190
    190191    // Simulate a request an embedding application could make, populating per-session credential storage.
Note: See TracChangeset for help on using the changeset viewer.