Changeset 144547 in webkit
- Timestamp:
- Mar 2, 2013 4:08:44 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 47 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r144542 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 Update the tests. 9 10 * fast/history/multiple-classes-visited.html: 11 * fast/history/nested-visited-test.html: 12 * fast/history/self-is-visited.html: 13 * fast/history/sibling-visited-test.html: 14 * fast/loader/stateobjects/state-url-sets-links-visited.html: 15 * platform/win/TestExpectations: unskip the tests. 16 * platform/chromium/TestExpectations: 17 1 18 2013-03-02 Rob Buis <rbuis@rim.com> 2 19 -
trunk/LayoutTests/fast/history/multiple-classes-visited.html
r144152 r144547 10 10 function compareStyles() 11 11 { 12 if (window. testRunner) {13 firstStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('one'));14 secondStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('two'));12 if (window.internals) { 13 firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one')); 14 secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two')); 15 15 shouldBecomeEqual('firstStyle.color', 'secondStyle.color', finishJSTest); 16 16 } -
trunk/LayoutTests/fast/history/nested-visited-test.html
r144152 r144547 16 16 document.getElementById('enclosure').appendChild(anchor); 17 17 18 if (window. testRunner) {19 firstStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('one'));20 secondStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('two'));18 if (window.internals) { 19 firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one')); 20 secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two')); 21 21 shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', finishJSTest); 22 22 } -
trunk/LayoutTests/fast/history/self-is-visited.html
r144152 r144547 10 10 function compareStyles() 11 11 { 12 if (window. testRunner) {13 firstStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('one'));14 secondStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('two'));12 if (window.internals) { 13 firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one')); 14 secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two')); 15 15 shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', function() { 16 16 shouldBecomeDifferent('firstStyle.backgroundColor', 'secondStyle.backgroundColor', finishJSTest); -
trunk/LayoutTests/fast/history/sibling-visited-test.html
r144152 r144547 10 10 function compareStyles() 11 11 { 12 if (window. testRunner) {13 firstStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('one'));14 secondStyle = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('two'));12 if (window.internals) { 13 firstStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('one')); 14 secondStyle = internals.computedStyleIncludingVisitedInfo(document.getElementById('two')); 15 15 shouldBecomeDifferent('firstStyle.color', 'secondStyle.color', finishJSTest); 16 16 } -
trunk/LayoutTests/fast/loader/stateobjects/state-url-sets-links-visited.html
r143860 r144547 15 15 window.history.pushState(null, "Title", "pushedURL.html"); 16 16 17 if (window. testRunner) {18 style1 = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('link1'));19 style2 = testRunner.computedStyleIncludingVisitedInfo(document.getElementById('link2'));17 if (window.internals) { 18 style1 = internals.computedStyleIncludingVisitedInfo(document.getElementById('link1')); 19 style2 = internals.computedStyleIncludingVisitedInfo(document.getElementById('link2')); 20 20 21 21 // The style is not necessarily updated synchronously in response to history.replaceState and history.pushState. -
trunk/LayoutTests/platform/chromium/TestExpectations
r144535 r144547 2202 2202 webkit.org/b/37283 fast/overflow/scrollbar-restored-and-then-locked.html [ Failure ] 2203 2203 2204 webkit.org/b/37297 fast/history/nested-visited-test.html [ Failure Timeout ] 2205 webkit.org/b/37297 fast/history/self-is-visited.html [ Failure Timeout ] 2206 webkit.org/b/37297 fast/history/sibling-visited-test.html [ Failure Timeout ] 2207 webkit.org/b/37297 fast/loader/stateobjects/state-url-sets-links-visited.html [ Failure Timeout ] 2208 webkit.org/b/58000 [ Mac Android ] fast/history/visited-link-background-color.html [ Failure ] 2209 2210 # Added in http://trac.webkit.org/changeset/57476. Fails in Chromium because 2211 # LayoutTestController::computedStyleWithVisitedInfo() is missing. 2212 crbug.com/41206 fast/history/multiple-classes-visited.html [ Failure Timeout ] 2204 # Chromium DumpRenderTree does not have support for visited links. 2205 # It always return false in response to isLinkVisited(). 2206 webkit.org/b/111031 fast/history/multiple-classes-visited.html [ Failure ] 2207 webkit.org/b/111031 fast/history/nested-visited-test.html [ Failure ] 2208 webkit.org/b/111031 fast/history/self-is-visited.html [ Failure ] 2209 webkit.org/b/111031 fast/history/sibling-visited-test.html [ Failure ] 2210 webkit.org/b/111031 fast/loader/stateobjects/state-url-sets-links-visited.html [ Failure ] 2211 webkit.org/b/111031 [ Mac Android ] fast/history/visited-link-background-color.html [ Failure ] 2213 2212 2214 2213 # Tests that work with KURL, but fail with GURL -
trunk/LayoutTests/platform/win/TestExpectations
r144516 r144547 924 924 # Need to add functionality to DumpRenderTree to handle error pages 925 925 fast/history/back-forward-reset-after-error-handling.html 926 927 # Need to implement computedStyleWithVisitedInfo928 fast/history/multiple-classes-visited.html929 fast/history/nested-visited-test.html930 fast/history/self-is-visited.html931 fast/history/sibling-visited-test.html932 926 933 927 # ACCELERATED_COMPOSITING tests that have incorrect layout -
trunk/Source/WebCore/ChangeLog
r144546 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 The function computedStyleIncludingVisitedInfo() is purely internal to WebCore, 9 it is better defined on Internals than on TestRunner. 10 11 * testing/Internals.cpp: 12 (WebCore::Internals::computedStyleIncludingVisitedInfo): 13 * testing/Internals.h: 14 * testing/Internals.idl: 15 1 16 2013-03-02 David Kilzer <ddkilzer@apple.com> 2 17 -
trunk/Source/WebCore/testing/Internals.cpp
r144524 r144547 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 660 661 } 661 662 663 PassRefPtr<CSSComputedStyleDeclaration> Internals::computedStyleIncludingVisitedInfo(Node* node, ExceptionCode& ec) const 664 { 665 if (!node) { 666 ec = INVALID_ACCESS_ERR; 667 return 0; 668 } 669 670 bool allowVisitedStyle = true; 671 return CSSComputedStyleDeclaration::create(node, allowVisitedStyle); 672 } 673 662 674 Internals::ShadowRootIfShadowDOMEnabledOrNode* Internals::ensureShadowRoot(Element* host, ExceptionCode& ec) 663 675 { -
trunk/Source/WebCore/testing/Internals.h
r144524 r144547 28 28 #define Internals_h 29 29 30 #include "CSSComputedStyleDeclaration.h" 30 31 #include "ContextDestructionObserver.h" 31 32 #include "ExceptionCodePlaceholder.h" … … 77 78 78 79 size_t numberOfScopedHTMLStyleChildren(const Node*, ExceptionCode&) const; 80 PassRefPtr<CSSComputedStyleDeclaration> computedStyleIncludingVisitedInfo(Node*, ExceptionCode&) const; 79 81 80 82 #if ENABLE(SHADOW_DOM) -
trunk/Source/WebCore/testing/Internals.idl
r144524 r144547 35 35 36 36 unsigned long numberOfScopedHTMLStyleChildren(in Node scope) raises(DOMException); 37 CSSStyleDeclaration computedStyleIncludingVisitedInfo(in Node node) raises(DOMException); 37 38 38 39 #if defined(ENABLE_SHADOW_DOM) && ENABLE_SHADOW_DOM -
trunk/Source/WebKit/blackberry/ChangeLog
r144515 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebKitSupport/DumpRenderTreeSupport.cpp: 9 * WebKitSupport/DumpRenderTreeSupport.h: 10 (DumpRenderTreeSupport): 11 1 12 2013-03-01 Iris Wu <shuwu@rim.com> 2 13 -
trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.cpp
r144274 r144547 21 21 #include "DumpRenderTreeSupport.h" 22 22 23 #include "CSSComputedStyleDeclaration.h"24 23 #include "DeviceOrientationClientMock.h" 25 24 #include "DeviceOrientationController.h" … … 123 122 } 124 123 125 JSValueRef DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)126 {127 ExecState* exec = toJS(context);128 JSLockHolder lock(exec);129 if (!value)130 return JSValueMakeUndefined(context);131 JSValue jsValue = toJS(exec, value);132 if (!jsValue.inherits(&JSElement::s_info))133 return JSValueMakeUndefined(context);134 JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));135 Element* element = jsElement->impl();136 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);137 return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));138 }139 140 124 #if ENABLE(DEVICE_ORIENTATION) 141 125 DeviceOrientationClientMock* toDeviceOrientationClientMock(DeviceOrientationClient* client) -
trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.h
r144274 r144547 59 59 static void setMockDeviceOrientation(BlackBerry::WebKit::WebPage*, bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma); 60 60 static void scalePageBy(BlackBerry::WebKit::WebPage*, float, float, float); 61 static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);62 61 63 62 private: -
trunk/Source/WebKit/efl/ChangeLog
r144530 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebCoreSupport/DumpRenderTreeSupportEfl.cpp: 9 * WebCoreSupport/DumpRenderTreeSupportEfl.h: 10 1 11 2013-02-28 Alexey Proskuryakov <ap@apple.com> 2 12 -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
r144530 r144547 31 31 #include <APICast.h> 32 32 #include <AnimationController.h> 33 #include <CSSComputedStyleDeclaration.h>34 33 #include <DocumentLoader.h> 35 34 #include <EditorClientEfl.h> … … 557 556 } 558 557 559 JSValueRef DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)560 {561 if (!value)562 return JSValueMakeUndefined(context);563 564 JSC::ExecState* exec = toJS(context);565 JSC::JSValue jsValue = toJS(exec, value);566 if (!jsValue.inherits(&WebCore::JSElement::s_info))567 return JSValueMakeUndefined(context);568 569 WebCore::JSElement* jsElement = static_cast<WebCore::JSElement*>(asObject(jsValue));570 WebCore::Element* element = jsElement->impl();571 RefPtr<WebCore::CSSComputedStyleDeclaration> style = WebCore::CSSComputedStyleDeclaration::create(element, true);572 return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));573 }574 575 558 void DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool enabled) 576 559 { -
trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
r144524 r144547 110 110 static void setInteractiveFormValidationEnabled(Evas_Object* ewkView, bool enabled); 111 111 static void setValidationMessageTimerMagnification(Evas_Object* ewkView, int value); 112 static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);113 112 static void setAuthorAndUserStylesEnabled(Evas_Object* ewkView, bool); 114 113 static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String& scheme); -
trunk/Source/WebKit/gtk/ChangeLog
r144530 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: 9 * WebCoreSupport/DumpRenderTreeSupportGtk.h: 10 (DumpRenderTreeSupportGtk): 11 1 12 2013-02-28 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r144524 r144547 29 29 #include "AnimationController.h" 30 30 #include "ApplicationCacheStorage.h" 31 #include "CSSComputedStyleDeclaration.h"32 31 #include "Chrome.h" 33 32 #include "ChromeClientGtk.h" … … 695 694 } 696 695 697 JSValueRef DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef nodeObject)698 {699 JSC::ExecState* exec = toJS(context);700 if (!nodeObject)701 return JSValueMakeUndefined(context);702 703 JSValue jsValue = toJS(exec, nodeObject);704 if (!jsValue.inherits(&JSElement::s_info))705 return JSValueMakeUndefined(context);706 707 JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));708 Element* element = jsElement->impl();709 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);710 return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));711 }712 713 696 void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary() 714 697 { -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
r144524 r144547 71 71 static bool shouldClose(WebKitWebFrame*); 72 72 static bool elementDoesAutoCompleteForElementWithId(WebKitWebFrame*, JSStringRef); 73 static JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);74 73 75 74 // WebKitWebView -
trunk/Source/WebKit/mac/ChangeLog
r144545 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebView/WebView.mm: 9 * WebView/WebViewPrivate.h: 10 1 11 2013-03-02 David Kilzer <ddkilzer@apple.com> 2 12 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r144495 r144547 117 117 #import <WebCore/MemoryCache.h> 118 118 #import <WebCore/ColorMac.h> 119 #import <WebCore/CSSComputedStyleDeclaration.h>120 119 #import <WebCore/Cursor.h> 121 120 #import <WebCore/DatabaseManager.h> … … 6709 6708 @end 6710 6709 6711 @implementation WebView (WebViewPrivateStyleInfo)6712 6713 - (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value6714 {6715 ExecState* exec = toJS(context);6716 JSLockHolder lock(exec);6717 if (!value)6718 return JSValueMakeUndefined(context);6719 JSC::JSValue jsValue = toJS(exec, value);6720 if (!jsValue.inherits(&JSElement::s_info))6721 return JSValueMakeUndefined(context);6722 JSElement* jsElement = static_cast<JSElement*>(asObject(jsValue));6723 Element* element = jsElement->impl();6724 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(element, true);6725 return toRef(exec, toJS(exec, jsElement->globalObject(), style.get()));6726 }6727 6728 @end6729 6730 6710 @implementation WebView (WebViewFullScreen) 6731 6711 -
trunk/Source/WebKit/mac/WebView/WebViewPrivate.h
r144495 r144547 748 748 @end 749 749 750 @interface WebView (WebViewPrivateStyleInfo)751 - (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value;752 @end753 754 750 @interface NSObject (WebViewFrameLoadDelegatePrivate) 755 751 - (void)webView:(WebView *)sender didFirstLayoutInFrame:(WebFrame *)frame; -
trunk/Source/WebKit/qt/ChangeLog
r144530 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 9 * WebCoreSupport/DumpRenderTreeSupportQt.h: 10 1 11 2013-02-28 Alexey Proskuryakov <ap@apple.com> 2 12 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r144524 r144547 26 26 #include "APICast.h" 27 27 #include "ApplicationCacheStorage.h" 28 #include "CSSComputedStyleDeclaration.h"29 28 #include "ChromeClientQt.h" 30 29 #include "ContainerNode.h" … … 376 375 } 377 376 378 static QString convertToPropertyName(const QString& name)379 {380 QStringList parts = name.split(QLatin1Char('-'));381 QString camelCaseName;382 for (int j = 0; j < parts.count(); ++j) {383 QString part = parts.at(j);384 if (j)385 camelCaseName.append(part.replace(0, 1, part.left(1).toUpper()));386 else387 camelCaseName.append(part);388 }389 return camelCaseName;390 }391 392 QVariantMap DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(const QWebElement& element)393 {394 QVariantMap res;395 396 WebCore::Element* webElement = element.m_element;397 if (!webElement)398 return res;399 400 RefPtr<WebCore::CSSComputedStyleDeclaration> computedStyleDeclaration = CSSComputedStyleDeclaration::create(webElement, true);401 CSSStyleDeclaration* style = static_cast<WebCore::CSSStyleDeclaration*>(computedStyleDeclaration.get());402 for (unsigned i = 0; i < style->length(); i++) {403 QString name = style->item(i);404 QString value = style->getPropertyValue(name);405 res[convertToPropertyName(name)] = QVariant(value);406 }407 return res;408 }409 410 377 QVariantList DumpRenderTreeSupportQt::selectedRange(QWebPageAdapter *adapter) 411 378 { -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r144524 r144547 139 139 static void setMockGeolocationPositionUnavailableError(QWebPageAdapter*, const QString& message); 140 140 static int numberOfPendingGeolocationPermissionRequests(QWebPageAdapter*); 141 142 static QVariantMap computedStyleIncludingVisitedInfo(const QWebElement&);143 141 144 142 static void dumpFrameLoader(bool); -
trunk/Source/WebKit2/ChangeLog
r144530 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: 9 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: 10 * WebProcess/WebPage/WebFrame.cpp: 11 * WebProcess/WebPage/WebFrame.h: 12 (WebFrame): 13 1 14 2013-03-01 Kiran Muppala <cmuppala@apple.com> 2 15 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
r144530 r144547 124 124 } 125 125 126 JSValueRef WKBundleFrameGetComputedStyleIncludingVisitedInfo(WKBundleFrameRef frameRef, JSObjectRef element)127 {128 return toImpl(frameRef)->computedStyleIncludingVisitedInfo(element);129 }130 131 126 WKStringRef WKBundleFrameCopyCounterValue(WKBundleFrameRef frameRef, JSObjectRef element) 132 127 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
r144524 r144547 40 40 WK_EXPORT WKStringRef WKBundleFrameCopyInnerText(WKBundleFrameRef frame); 41 41 WK_EXPORT WKStringRef WKBundleFrameCopyCounterValue(WKBundleFrameRef frame, JSObjectRef element); 42 WK_EXPORT JSValueRef WKBundleFrameGetComputedStyleIncludingVisitedInfo(WKBundleFrameRef frame, JSObjectRef element);43 42 WK_EXPORT unsigned WKBundleFrameGetPendingUnloadCount(WKBundleFrameRef frame); 44 43 WK_EXPORT WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frame); -
trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
r144524 r144547 44 44 #include <JavaScriptCore/JSValueRef.h> 45 45 #include <WebCore/ArchiveResource.h> 46 #include <WebCore/CSSComputedStyleDeclaration.h>47 46 #include <WebCore/Chrome.h> 48 47 #include <WebCore/DocumentLoader.h> … … 622 621 } 623 622 624 JSValueRef WebFrame::computedStyleIncludingVisitedInfo(JSObjectRef element)625 {626 if (!m_coreFrame)627 return 0;628 629 JSDOMWindow* globalObject = m_coreFrame->script()->globalObject(mainThreadNormalWorld());630 ExecState* exec = globalObject->globalExec();631 632 if (!toJS(element)->inherits(&JSElement::s_info))633 return JSValueMakeUndefined(toRef(exec));634 635 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclaration::create(static_cast<JSElement*>(toJS(element))->impl(), true);636 637 JSLockHolder lock(exec);638 return toRef(exec, toJS(exec, globalObject, style.get()));639 }640 641 623 String WebFrame::counterValue(JSObjectRef element) 642 624 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h
r144524 r144547 93 93 WebFrame* parentFrame() const; 94 94 PassRefPtr<ImmutableArray> childFrames(); 95 JSValueRef computedStyleIncludingVisitedInfo(JSObjectRef element);96 95 JSGlobalContextRef jsContext(); 97 96 JSGlobalContextRef jsContextForWorld(InjectedBundleScriptWorld*); -
trunk/Source/autotools/symbols.filter
r144524 r144547 38 38 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ShadowRootE; 39 39 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_14ClientRectListE; 40 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_19CSSStyleDeclarationE; 40 41 _ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_5RangeE; 41 42 _ZN7WebCore5Range6createEN3WTF10PassRefPtrINS_8DocumentEEENS2_INS_4NodeEEEiS6_i; … … 109 110 _ZN7WebCore25computeViewportAttributesENS_17ViewportArgumentsEiiifNS_7IntSizeE; 110 111 _ZN7WebCore25jsStringWithCacheSlowCaseEPN3JSC9ExecStateERN3WTF7HashMapIPNS3_10StringImplENS0_4WeakINS0_8JSStringEEENS3_7PtrHashIS6_EENS3_10HashTraitsIS6_EENSC_IS9_EEEES6_; 112 _ZN7WebCore27CSSComputedStyleDeclarationC1EN3WTF10PassRefPtrINS_4NodeEEEbRKNS1_6StringE; 111 113 _ZN7WebCore28InspectorFrontendClientLocal12moveWindowByEff; 112 114 _ZN7WebCore28InspectorFrontendClientLocal12openInNewTabERKN3WTF6StringE; -
trunk/Tools/ChangeLog
r144527 r144547 1 2013-03-02 Benjamin Poulain <bpoulain@apple.com> 2 3 Move computedStyleIncludingVisitedInfo from TestRunner to Internals 4 https://bugs.webkit.org/show_bug.cgi?id=109772 5 6 Reviewed by Andreas Kling. 7 8 * DumpRenderTree/TestRunner.cpp: 9 (TestRunner::staticFunctions): 10 * DumpRenderTree/TestRunner.h: 11 (TestRunner): 12 * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: 13 * DumpRenderTree/efl/TestRunnerEfl.cpp: 14 * DumpRenderTree/gtk/TestRunnerGtk.cpp: 15 * DumpRenderTree/mac/TestRunnerMac.mm: 16 * DumpRenderTree/qt/TestRunnerQt.cpp: 17 * DumpRenderTree/qt/TestRunnerQt.h: 18 (TestRunner): 19 * DumpRenderTree/win/TestRunnerWin.cpp: 20 * DumpRenderTree/wx/TestRunnerWx.cpp: 21 * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: 22 * WebKitTestRunner/InjectedBundle/TestRunner.cpp: 23 * WebKitTestRunner/InjectedBundle/TestRunner.h: 24 (TestRunner): 25 1 26 2013-03-01 Ilya Tikhonovsky <loislo@chromium.org> 2 27 -
trunk/Tools/DumpRenderTree/TestRunner.cpp
r144524 r144547 681 681 } 682 682 683 static JSValueRef computedStyleIncludingVisitedInfoCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)684 {685 if (argumentCount != 1)686 return JSValueMakeUndefined(context);687 688 // Has mac implementation689 TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));690 return controller->computedStyleIncludingVisitedInfo(context, arguments[0]);691 }692 693 683 static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 694 684 { … … 2071 2061 { "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2072 2062 { "closeWebInspector", closeWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2073 { "computedStyleIncludingVisitedInfo", computedStyleIncludingVisitedInfoCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },2074 2063 { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2075 2064 { "disallowIncreaseForApplicationCacheQuota", disallowIncreaseForApplicationCacheQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/TestRunner.h
r144524 r144547 67 67 bool isCommandEnabled(JSStringRef name); 68 68 void keepWebHistory(); 69 JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);70 69 void notifyDone(); 71 70 int numberOfPendingGeolocationPermissionRequests(); -
trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
r144524 r144547 506 506 } 507 507 508 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)509 {510 return DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(context, value);511 }512 513 508 void TestRunner::setPluginsEnabled(bool flag) 514 509 { -
trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
r144524 r144547 113 113 } 114 114 115 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)116 {117 return DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(context, value);118 }119 120 115 size_t TestRunner::webHistoryItemCount() 121 116 { -
trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
r144524 r144547 107 107 { 108 108 // FIXME: implement 109 }110 111 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)112 {113 return DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(context, value);114 109 } 115 110 -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r144524 r144547 274 274 } 275 275 276 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)277 {278 return [[mainFrame webView] _computedStyleIncludingVisitedInfo:context forElement:value];279 }280 281 276 int TestRunner::numberOfPendingGeolocationPermissionRequests() 282 277 { -
trunk/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
r144524 r144547 746 746 } 747 747 748 QVariantMap TestRunnerQt::computedStyleIncludingVisitedInfo(const QWebElement& element) const749 {750 return DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(element);751 }752 753 748 bool TestRunnerQt::elementDoesAutoCompleteForElementWithId(const QString& elementId) 754 749 { -
trunk/Tools/DumpRenderTree/qt/TestRunnerQt.h
r144524 r144547 248 248 void setScrollbarPolicy(const QString& orientation, const QString& policy); 249 249 250 QVariantMap computedStyleIncludingVisitedInfo(const QWebElement&) const;251 252 250 // Simulate a request an embedding application could make, populating per-session credential storage. 253 251 void authenticateSession(const QString& url, const QString& username, const QString& password); -
trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp
r144524 r144547 161 161 } 162 162 163 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)164 {165 // FIXME: Implement this.166 return JSValueMakeUndefined(context);167 }168 169 163 void TestRunner::waitForPolicyDelegate() 170 164 { -
trunk/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
r144524 r144547 459 459 } 460 460 461 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef)462 {463 return 0;464 }465 466 461 void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef) 467 462 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
r144524 r144547 75 75 // Special DOM functions. 76 76 void clearBackForwardList(); 77 object computedStyleIncludingVisitedInfo(in object element);78 77 void execCommand(in DOMString name, in DOMString argument); 79 78 boolean isCommandEnabled(in DOMString name); -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
r144524 r144547 191 191 } 192 192 193 JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSValueRef element)194 {195 // FIXME: Is it OK this works only for the main frame?196 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());197 JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);198 if (!JSValueIsObject(context, element))199 return JSValueMakeUndefined(context);200 JSValueRef value = WKBundleFrameGetComputedStyleIncludingVisitedInfo(mainFrame, const_cast<JSObjectRef>(element));201 if (!value)202 return JSValueMakeUndefined(context);203 return value;204 }205 206 193 void TestRunner::execCommand(JSStringRef name, JSStringRef argument) 207 194 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
r144524 r144547 118 118 119 119 // Special DOM functions. 120 JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);121 120 void clearBackForwardList(); 122 121 void execCommand(JSStringRef name, JSStringRef argument);
Note: See TracChangeset
for help on using the changeset viewer.