Changeset 110960 in webkit


Ignore:
Timestamp:
Mar 16, 2012, 1:00:22 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Gtk] Add computedStyleIncludingVisitedInfo to DumpRenderTreeSupport
https://bugs.webkit.org/show_bug.cgi?id=81232

Patch by Zan Dobersek <zandobersek@gmail.com> on 2012-03-16
Reviewed by Philippe Normand.

Source/WebKit/gtk:

Add computedStyleIncludingVisitedInfo helper method to
DumpRenderTreeSupportGtk.

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp:

(DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo):

  • WebCoreSupport/DumpRenderTreeSupportGtk.h:

(DumpRenderTreeSupportGtk):

Tools:

Use the newly-added helper method in DumpRenderTreeSupportGtk.

  • DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:

(LayoutTestController::computedStyleIncludingVisitedInfo):

LayoutTests:

Unskip now-passing tests.

  • platform/gtk/Skipped:
  • platform/gtk/fast/history/nested-visited-test-expected.txt: Removed.
  • platform/gtk/fast/history/self-is-visited-expected.txt: Removed.
  • platform/gtk/fast/history/sibling-visited-test-expected.txt: Removed.
Location:
trunk
Files:
3 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r110959 r110960  
     12012-03-16  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [Gtk] Add computedStyleIncludingVisitedInfo to DumpRenderTreeSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=81232
     5
     6        Reviewed by Philippe Normand.
     7
     8        Unskip now-passing tests.
     9
     10        * platform/gtk/Skipped:
     11        * platform/gtk/fast/history/nested-visited-test-expected.txt: Removed.
     12        * platform/gtk/fast/history/self-is-visited-expected.txt: Removed.
     13        * platform/gtk/fast/history/sibling-visited-test-expected.txt: Removed.
     14
    1152012-03-16  Zan Dobersek  <zandobersek@gmail.com>
    216
  • trunk/LayoutTests/platform/gtk/Skipped

    r110959 r110960  
    11391139animations/stop-animation-on-suspend.html
    11401140
    1141 # computedStyleIncludingVisitedInfo is not implemented
    1142 # https://bugs.webkit.org/show_bug.cgi?id=37336
    1143 fast/history/nested-visited-test.html
    1144 fast/history/self-is-visited.html
    1145 fast/history/sibling-visited-test.html
    1146 fast/history/multiple-classes-visited.html
    1147 fast/loader/stateobjects/state-url-sets-links-visited.html
    1148 
    11491141# Rounding color problems inside pixman
    11501142# https://bugs.webkit.org/show_bug.cgi?id=49964
  • trunk/Source/WebKit/gtk/ChangeLog

    r110959 r110960  
     12012-03-16  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [Gtk] Add computedStyleIncludingVisitedInfo to DumpRenderTreeSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=81232
     5
     6        Reviewed by Philippe Normand.
     7
     8        Add computedStyleIncludingVisitedInfo helper method to
     9        DumpRenderTreeSupportGtk.
     10
     11        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     12        (DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo):
     13        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
     14        (DumpRenderTreeSupportGtk):
     15
    1162012-03-16  Zan Dobersek  <zandobersek@gmail.com>
    217
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r110595 r110960  
    2727#include "AccessibilityObject.h"
    2828#include "AnimationController.h"
     29#include "CSSComputedStyleDeclaration.h"
    2930#include "DOMWrapperWorld.h"
    3031#include "Document.h"
     
    4243#include "GraphicsContext.h"
    4344#include "HTMLInputElement.h"
     45#include "JSCSSStyleDeclaration.h"
    4446#include "JSDOMWindow.h"
    4547#include "JSDocument.h"
     
    889891}
    890892
     893JSValueRef DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef nodeObject)
     894{
     895    JSC::ExecState* exec = toJS(context);
     896    if (!nodeObject)
     897        return JSValueMakeUndefined(context);
     898
     899    JSValue jsValue = toJS(exec, nodeObject);
     900    if (!jsValue.inherits(&JSElement::s_info))
     901        return JSValueMakeUndefined(context);
     902
     903    JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));
     904    Element* element = jsElement->impl();
     905    RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);
     906    return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));
     907}
     908
    891909void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary()
    892910{
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h

    r110594 r110960  
    8484    static bool shouldClose(WebKitWebFrame*);
    8585    static bool elementDoesAutoCompleteForElementWithId(WebKitWebFrame*, JSStringRef);
     86    static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
    8687
    8788    // WebKitWebView
  • trunk/Tools/ChangeLog

    r110948 r110960  
     12012-03-16  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        [Gtk] Add computedStyleIncludingVisitedInfo to DumpRenderTreeSupport
     4        https://bugs.webkit.org/show_bug.cgi?id=81232
     5
     6        Reviewed by Philippe Normand.
     7
     8        Use the newly-added helper method in DumpRenderTreeSupportGtk.
     9
     10        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
     11        (LayoutTestController::computedStyleIncludingVisitedInfo):
     12
    1132012-03-15  Eric Seidel  <eric@webkit.org>
    214
  • trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp

    r110594 r110960  
    121121JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
    122122{
    123     // FIXME: Implement this.
    124     return JSValueMakeUndefined(context);
     123    return DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(context, value);
    125124}
    126125
Note: See TracChangeset for help on using the changeset viewer.