Changeset 57963 in webkit


Ignore:
Timestamp:
Apr 21, 2010 3:54:46 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-21 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Simon Hausmann.

[Qt] Unskip a bunch of now passing tests, which was skipped because of
missing LayoutTestController::computedStyleIncludingVisitedInfo
https://bugs.webkit.org/show_bug.cgi?id=37759

  • platform/qt/Skipped:

2010-04-21 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Simon Hausmann.

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

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

2010-04-21 Yi Shen <yi.4.shen@nokia.com>

Reviewed by Simon Hausmann.

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

  • DumpRenderTree/qt/LayoutTestControllerQt.cpp: (LayoutTestController::computedStyleIncludingVisitedInfo):
  • DumpRenderTree/qt/LayoutTestControllerQt.h:
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r57958 r57963  
     12010-04-21  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Unskip a bunch of now passing tests, which was skipped because of
     6        missing LayoutTestController::computedStyleIncludingVisitedInfo
     7        https://bugs.webkit.org/show_bug.cgi?id=37759
     8
     9        * platform/qt/Skipped:
     10
    1112010-04-21  Alejandro G. Castro  <alex@igalia.com>
    212
  • trunk/LayoutTests/platform/qt/Skipped

    r57878 r57963  
    337337# Missing layoutTestController.evaluateScriptInIsolatedWorld()
    338338storage/open-database-creation-callback-isolated-world.html
    339 
    340 # Missing layoutTestController.computedStyleIncludingVisitedInfo()
    341 fast/history/multiple-classes-visited.html
    342 fast/history/nested-visited-test.html
    343 fast/history/self-is-visited.html
    344 fast/history/sibling-visited-test.html
    345339
    346340# Missing layoutTestController.dumpWillCacheResponse
  • trunk/WebKit/qt/ChangeLog

    r57961 r57963  
     12010-04-21  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
     6        https://bugs.webkit.org/show_bug.cgi?id=37759
     7
     8        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
     9        (DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo):
     10        * WebCoreSupport/DumpRenderTreeSupportQt.h:
     11
    1122010-04-21  No'am Rosenthal  <noam.rosenthal@nokia.com>
    213
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp

    r57793 r57963  
    2424#include "DumpRenderTreeSupportQt.h"
    2525
     26#include "CSSComputedStyleDeclaration.h"
    2627#include "ContextMenu.h"
    2728#include "ContextMenuClientQt.h"
     
    365366    return page->handle()->page->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
    366367}
     368
     369QVariantMap DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(QWebFrame* frame, const QString& id)
     370{
     371    QVariantMap ret;
     372    Frame* coreFrame = QWebFramePrivate::core(frame);
     373    if (!coreFrame)
     374        return ret;
     375
     376    Element* element = coreFrame->document()->getElementById(AtomicString(id));
     377    if (!element)
     378        return ret;
     379
     380    RefPtr<CSSComputedStyleDeclaration> style = computedStyle(element, true);
     381    for (int i = 0; i < style->length(); i++) {
     382        QString name = style->item(i);
     383        QString value = (static_cast<CSSStyleDeclaration*>(style.get()))->getPropertyValue(name);
     384        ret[name] = QVariant(value);
     385    }
     386    return ret;
     387}
     388
  • trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h

    r57793 r57963  
    2525
    2626#include "qwebkitglobal.h"
     27#include <QVariant>
    2728
    2829class QWebPage;
     
    7980
    8081    static int workerThreadCount();
     82    static QVariantMap computedStyleIncludingVisitedInfo(QWebFrame* frame, const QString& id);
    8183};
    8284
  • trunk/WebKitTools/ChangeLog

    r57960 r57963  
     12010-04-21  Yi Shen  <yi.4.shen@nokia.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        [Qt] Add LayoutTestController interface: computedStyleIncludingVisitedInfo
     6        https://bugs.webkit.org/show_bug.cgi?id=37759
     7
     8        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
     9        (LayoutTestController::computedStyleIncludingVisitedInfo):
     10        * DumpRenderTree/qt/LayoutTestControllerQt.h:
     11
    1122010-04-21  Eric Seidel  <eric@webkit.org>
    213
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp

    r57793 r57963  
    3636#include <QDir>
    3737#include <QLocale>
     38#include <QMap>
    3839#include <qwebsettings.h>
    3940
     
    610611}
    611612
     613QVariantMap LayoutTestController::computedStyleIncludingVisitedInfo(const QVariant& obj) const
     614{
     615    QMap<QString, QVariant> map = obj.toMap();
     616    QString id = map.value("id").toString();
     617
     618    return DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(m_drt->webPage()->mainFrame(), id);
     619}
     620
    612621const unsigned LayoutTestController::maxViewWidth = 800;
    613622const unsigned LayoutTestController::maxViewHeight = 600;
  • trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h

    r57793 r57963  
    176176    int numberOfPages(float width = maxViewWidth, float height = maxViewHeight);
    177177    bool callShouldCloseOnWebView();
     178    QVariantMap computedStyleIncludingVisitedInfo(const QVariant& obj) const;
    178179
    179180    /*
Note: See TracChangeset for help on using the changeset viewer.