Changeset 84472 in webkit
- Timestamp:
- Apr 20, 2011 11:33:42 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84471 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Exercise the new layoutTestController methods. 9 10 * fast/dom/shadow/layout-tests-can-access-shadow-expected.txt: Added. 11 * fast/dom/shadow/layout-tests-can-access-shadow.html: Added. 12 1 13 2011-04-20 Dirk Pranke <dpranke@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r84468 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Test: fast/dom/shadow/layout-tests-can-access-shadow.html 9 10 * WebCore.exp.in: Mac DRT needs to see Element::ensure/removeShadowRoot 11 1 12 2011-04-20 Pratik Solanki <psolanki@apple.com> 2 13 -
trunk/Source/WebCore/WebCore.exp.in
r84415 r84472 803 803 __ZN7WebCore7Console21shouldPrintExceptionsEv 804 804 __ZN7WebCore7Console24setShouldPrintExceptionsEb 805 __ZN7WebCore7Element16ensureShadowRootEv 806 __ZN7WebCore7Element16removeShadowRootEv 805 807 __ZN7WebCore7IntRect5scaleEf 806 808 __ZN7WebCore7IntRect5uniteERKS0_ -
trunk/Source/WebKit/chromium/ChangeLog
r84449 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Chromium DRT relies on the Chromium WebKit API 9 10 * public/WebElement.h: 11 * src/WebElement.cpp: 12 (WebKit::WebElement::shadowRoot): don't steal a zero refcount 13 (WebKit::WebElement::ensureShadowRoot): added 14 (WebKit::WebElement::removeShadowRoot): added 15 1 16 2011-04-20 Alexey Marinichev <amarinichev@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/public/WebElement.h
r82469 r84472 59 59 WEBKIT_API WebNamedNodeMap attributes() const; 60 60 WEBKIT_API WebString innerText() const; 61 61 62 WEBKIT_API WebNode shadowRoot(); 63 WEBKIT_API WebNode ensureShadowRoot(); 64 WEBKIT_API void removeShadowRoot(); 62 65 63 66 // Returns the language code specified for this element. This attribute -
trunk/Source/WebKit/chromium/src/WebElement.cpp
r83256 r84472 93 93 WebNode WebElement::shadowRoot() 94 94 { 95 return adoptRef(static_cast<Node*>(unwrap<Element>()->shadowRoot())); 95 return PassRefPtr<Node>(static_cast<Node*>(unwrap<Element>()->shadowRoot())); 96 } 97 98 WebNode WebElement::ensureShadowRoot() 99 { 100 return PassRefPtr<Node>(static_cast<Node*>(unwrap<Element>()->ensureShadowRoot())); 101 } 102 103 void WebElement::removeShadowRoot() 104 { 105 unwrap<Element>()->removeShadowRoot(); 96 106 } 97 107 -
trunk/Source/WebKit/gtk/ChangeLog
r84381 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Support for new methods in GTK DRT. 9 10 * WebCoreSupport/DumpRenderTreeSupportGtk.cpp: 11 (DumpRenderTreeSupportGtk::ensureShadowRoot): 12 (DumpRenderTreeSupportGtk::removeShadowRoot): 13 * WebCoreSupport/DumpRenderTreeSupportGtk.h: 14 1 15 2011-04-20 Carlos Garcia Campos <cgarcia@igalia.com> 2 16 -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r84221 r84472 665 665 } 666 666 667 JSValueRef DumpRenderTreeSupportGtk::ensureShadowRoot(JSContextRef context, JSValueRef value) 668 { 669 JSLock lock(SilenceAssertionsOnly); 670 JSC::ExecState* exec = toJS(context); 671 Element* element = toElement(toJS(exec, value)); 672 if (!element) 673 return JSValueMakeNull(context); 674 675 return toRef(exec, toJS(exec, element->ensureShadowRoot())); 676 } 677 678 void DumpRenderTreeSupportGtk::removeShadowRoot(JSContextRef context, JSValueRef value) 679 { 680 JSLock lock(SilenceAssertionsOnly); 681 JSC::ExecState* exec = toJS(context); 682 Element* element = toElement(toJS(exec, value)); 683 if (!element) 684 return; 685 686 element->removeShadowRoot(); 687 } 688 667 689 unsigned int DumpRenderTreeSupportGtk::workerThreadCount() 668 690 { -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
r84221 r84472 61 61 62 62 static JSValueRef shadowRoot(JSContextRef, JSValueRef); 63 static JSValueRef ensureShadowRoot(JSContextRef, JSValueRef); 64 static void removeShadowRoot(JSContextRef, JSValueRef); 65 63 66 static WebKitDOMRange* jsValueToDOMRange(JSContextRef, JSValueRef); 64 67 -
trunk/Source/WebKit/mac/ChangeLog
r84415 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Support for new methods in Mac DRT. 9 10 * DOM/WebDOMOperations.mm: 11 (-[DOMElement _ensureShadowRoot:]): 12 (-[DOMElement _removeShadowRoot]): 13 * DOM/WebDOMOperationsPrivate.h: 14 1 15 2011-04-20 Eric Carlson <eric.carlson@apple.com> 2 16 -
trunk/Source/WebKit/mac/DOM/WebDOMOperations.mm
r82536 r84472 82 82 } 83 83 84 - (JSValueRef)_ensureShadowRoot:(JSContextRef)context 85 { 86 JSLock lock(SilenceAssertionsOnly); 87 ExecState* execState = toJS(context); 88 return toRef(execState, toJS(execState, core(self)->ensureShadowRoot())); 89 } 90 91 - (void)_removeShadowRoot 92 { 93 core(self)->removeShadowRoot(); 94 } 95 84 96 @end 85 97 -
trunk/Source/WebKit/mac/DOM/WebDOMOperationsPrivate.h
r82536 r84472 34 34 - (NSString *)_markerTextForListItem; 35 35 - (JSValueRef)_shadowRoot:(JSContextRef)context; 36 - (JSValueRef)_ensureShadowRoot:(JSContextRef)context; 37 - (void)_removeShadowRoot; 36 38 @end 37 39 -
trunk/Source/WebKit/qt/ChangeLog
r84364 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Support for new methods in Qt DRT. 9 10 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 11 (DumpRenderTreeSupportQt::ensureShadowRoot): 12 (DumpRenderTreeSupportQt::removeShadowRoot): 13 * WebCoreSupport/DumpRenderTreeSupportQt.h: 14 1 15 2011-04-20 Balazs Kelemen <kbalazs@webkit.org> 2 16 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r84139 r84472 1078 1078 } 1079 1079 1080 QVariant DumpRenderTreeSupportQt::ensureShadowRoot(const QWebElement& element) 1081 { 1082 WebCore::Element* webElement = element.m_element; 1083 if (!webElement) 1084 return QVariant(); 1085 1086 return QVariant::fromValue(QDRTNode(webElement->ensureShadowRoot())); 1087 } 1088 1089 void DumpRenderTreeSupportQt::removeShadowRoot(const QWebElement& element) 1090 { 1091 WebCore::Element* webElement = element.m_element; 1092 if (!webElement) 1093 return; 1094 webElement->removeShadowRoot(); 1095 } 1096 1080 1097 // Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release 1081 1098 -
trunk/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r84139 r84472 203 203 204 204 static QVariant shadowRoot(const QWebElement&); 205 static QVariant ensureShadowRoot(const QWebElement&); 206 static void removeShadowRoot(const QWebElement&); 205 207 }; 206 208 -
trunk/Source/WebKit2/ChangeLog
r84437 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Support for new methods in WK2 WebKitTestRunner. 9 10 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: 11 (WKBundleNodeHandleCopyElementEnsureShadowRoot): 12 (WKBundleNodeHandleRemoveShadowRoot): 13 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: 14 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: 15 (WebKit::InjectedBundleNodeHandle::elementShadowRoot): 16 (WebKit::InjectedBundleNodeHandle::elementEnsureShadowRoot): 17 (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot): 18 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: 19 1 20 2011-04-20 Anders Carlsson <andersca@apple.com> 2 21 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp
r82719 r84472 68 68 } 69 69 70 WKBundleNodeHandleRef WKBundleNodeHandleCopyElementEnsureShadowRoot(WKBundleNodeHandleRef elementHandleRef) 71 { 72 RefPtr<InjectedBundleNodeHandle> nodeHandle = toImpl(elementHandleRef)->elementEnsureShadowRoot(); 73 return toAPI(nodeHandle.release().releaseRef()); 74 } 75 76 void WKBundleNodeHandleRemoveShadowRoot(WKBundleNodeHandleRef elementHandleRef) 77 { 78 toImpl(elementHandleRef)->elementRemoveShadowRoot(); 79 } 80 70 81 void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandleRef, WKStringRef valueRef) 71 82 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h
r82719 r84472 48 48 WK_EXPORT WKRect WKBundleNodeHandleGetElementBounds(WKBundleNodeHandleRef elementHandle); 49 49 WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCopyElementShadowRoot(WKBundleNodeHandleRef elementHandle); 50 WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCopyElementEnsureShadowRoot(WKBundleNodeHandleRef elementHandle); 51 WK_EXPORT void WKBundleNodeHandleRemoveShadowRoot(WKBundleNodeHandleRef elementHandle); 50 52 51 53 /* HTMLInputElement Specific Operations */ -
trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
r82719 r84472 174 174 } 175 175 176 PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::elementEnsureShadowRoot() 177 { 178 if (!m_node->isElementNode()) 179 return 0; 180 181 return getOrCreate(static_cast<Element*>(m_node.get())->ensureShadowRoot()); 182 } 183 184 void InjectedBundleNodeHandle::elementRemoveShadowRoot() 185 { 186 if (!m_node->isElementNode()) 187 return; 188 189 static_cast<Element*>(m_node.get())->removeShadowRoot(); 190 } 191 176 192 PassRefPtr<WebFrame> InjectedBundleNodeHandle::documentFrame() 177 193 { -
trunk/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h
r82719 r84472 70 70 71 71 PassRefPtr<InjectedBundleNodeHandle> elementShadowRoot(); 72 PassRefPtr<InjectedBundleNodeHandle> elementEnsureShadowRoot(); 73 void elementRemoveShadowRoot(); 72 74 73 75 PassRefPtr<WebFrame> documentFrame(); -
trunk/Tools/ChangeLog
r84467 r84472 1 2011-04-20 Dominic Cooney <dominicc@chromium.org> 2 3 Reviewed by Dimitri Glazkov. 4 5 layoutTestController can create and destroy shadow DOM 6 https://bugs.webkit.org/show_bug.cgi?id=59058 7 8 Chromium, Mac, GTK and Qt DRT; and WK2 test runner. 9 10 * DumpRenderTree/LayoutTestController.cpp: 11 (ensureShadowRootCallback): 12 (removeShadowRootCallback): 13 (LayoutTestController::staticFunctions): 14 * DumpRenderTree/LayoutTestController.h: 15 * DumpRenderTree/chromium/LayoutTestController.cpp: 16 (LayoutTestController::LayoutTestController): 17 (LayoutTestController::ensureShadowRoot): 18 (LayoutTestController::removeShadowRoot): 19 * DumpRenderTree/chromium/LayoutTestController.h: 20 * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: 21 (LayoutTestController::ensureShadowRoot): 22 (LayoutTestController::removeShadowRoot): 23 * DumpRenderTree/mac/LayoutTestControllerMac.mm: 24 (LayoutTestController::shadowRoot): 25 (LayoutTestController::ensureShadowRoot): 26 (LayoutTestController::removeShadowRoot): 27 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 28 (LayoutTestController::ensureShadowRoot): 29 (LayoutTestController::removeShadowRoot): 30 * DumpRenderTree/qt/LayoutTestControllerQt.h: 31 * DumpRenderTree/win/LayoutTestControllerWin.cpp: 32 (LayoutTestController::ensureShadowRoot): 33 (LayoutTestController::removeShadowRoot): 34 * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: 35 * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: 36 (WTR::LayoutTestController::shadowRoot): 37 (WTR::LayoutTestController::ensureShadowRoot): 38 (WTR::LayoutTestController::removeShadowRoot): 39 * WebKitTestRunner/InjectedBundle/LayoutTestController.h: 40 1 41 2011-04-20 Dirk Pranke <dpranke@chromium.org> 2 42 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r83138 r84472 1716 1716 } 1717 1717 1718 static JSValueRef ensureShadowRootCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1719 { 1720 if (argumentCount != 1) 1721 return JSValueMakeUndefined(context); 1722 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1723 return controller->ensureShadowRoot(context, arguments[0]); 1724 } 1725 1726 static JSValueRef removeShadowRootCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1727 { 1728 if (argumentCount != 1) 1729 return JSValueMakeUndefined(context); 1730 1731 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 1732 controller->removeShadowRoot(context, arguments[0]); 1733 1734 return JSValueMakeUndefined(context); 1735 } 1736 1718 1737 static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 1719 1738 { … … 2197 2216 { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2198 2217 { "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2218 { "ensureShadowRoot", ensureShadowRootCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2199 2219 { "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2200 2220 { "evaluateScriptInIsolatedWorld", evaluateScriptInIsolatedWorldCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, … … 2217 2237 { "suspendAnimations", suspendAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2218 2238 { "resumeAnimations", resumeAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2239 { "removeShadowRoot", removeShadowRootCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2219 2240 { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2220 2241 { "pageNumberForElementById", pageNumberForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r83138 r84472 123 123 void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy); 124 124 void setEditingBehavior(const char* editingBehavior); 125 125 126 JSValueRef shadowRoot(JSContextRef, JSValueRef); 127 JSValueRef ensureShadowRoot(JSContextRef, JSValueRef); 128 void removeShadowRoot(JSContextRef, JSValueRef); 126 129 127 130 void waitForPolicyDelegate(); -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r84199 r84472 106 106 bindMethod("dumpTitleChanges", &LayoutTestController::dumpTitleChanges); 107 107 bindMethod("elementDoesAutoCompleteForElementWithId", &LayoutTestController::elementDoesAutoCompleteForElementWithId); 108 bindMethod("ensureShadowRoot", &LayoutTestController::ensureShadowRoot); 108 109 bindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector); 109 110 bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld); … … 132 133 bindMethod("queueReload", &LayoutTestController::queueReload); 133 134 bindMethod("removeOriginAccessWhitelistEntry", &LayoutTestController::removeOriginAccessWhitelistEntry); 135 bindMethod("removeShadowRoot", &LayoutTestController::removeShadowRoot); 134 136 bindMethod("repaintSweepHorizontally", &LayoutTestController::repaintSweepHorizontally); 135 137 bindMethod("resumeAnimations", &LayoutTestController::resumeAnimations); … … 671 673 672 674 result->set(WebBindings::makeNode(shadowRoot)); 675 } 676 677 void LayoutTestController::ensureShadowRoot(const CppArgumentList& arguments, CppVariant* result) 678 { 679 if (arguments.size() != 1 || !arguments[0].isObject()) { 680 result->setNull(); 681 return; 682 } 683 684 WebElement element; 685 if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) { 686 result->setNull(); 687 return; 688 } 689 690 result->set(WebBindings::makeNode(element.ensureShadowRoot())); 691 } 692 693 void LayoutTestController::removeShadowRoot(const CppArgumentList& arguments, CppVariant* result) 694 { 695 if (arguments.size() != 1 || !arguments[0].isObject()) 696 return; 697 698 WebElement element; 699 if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) 700 return; 701 702 element.removeShadowRoot(); 673 703 } 674 704 -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r84199 r84472 273 273 274 274 void shadowRoot(const CppArgumentList&, CppVariant*); 275 void ensureShadowRoot(const CppArgumentList&, CppVariant*); 276 void removeShadowRoot(const CppArgumentList&, CppVariant*); 275 277 276 278 // The fallback method is called when a nonexistent method is called on -
trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r82878 r84472 925 925 } 926 926 927 JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef element) 928 { 929 return DumpRenderTreeSupportGtk::ensureShadowRoot(context, element); 930 } 931 932 void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef element) 933 { 934 DumpRenderTreeSupportGtk::removeShadowRoot(context, element); 935 } 936 927 937 void LayoutTestController::abortModal() 928 938 { -
trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r83333 r84472 1071 1071 JSValueRef LayoutTestController::shadowRoot(JSContextRef context, JSValueRef jsElement) 1072 1072 { 1073 DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:jsElement];1073 DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement]; 1074 1074 if (!element) 1075 1075 return JSValueMakeNull(context); … … 1077 1077 } 1078 1078 1079 JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef jsElement) 1080 { 1081 DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement]; 1082 if (!element) 1083 return JSValueMakeNull(context); 1084 return [element _ensureShadowRoot:context]; 1085 } 1086 1087 void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef jsElement) 1088 { 1089 DOMElement* element = [DOMElement _DOMElementFromJSContext:context value:jsElement]; 1090 if (!element) 1091 return; 1092 [element _removeShadowRoot]; 1093 } 1094 1079 1095 void LayoutTestController::abortModal() 1080 1096 { -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r84139 r84472 786 786 } 787 787 788 QVariant LayoutTestController::ensureShadowRoot(const QWebElement& element) 789 { 790 return DumpRenderTreeSupportQt::ensureShadowRoot(element); 791 } 792 793 void LayoutTestController::removeShadowRoot(const QWebElement& element) 794 { 795 DumpRenderTreeSupportQt::removeShadowRoot(element); 796 } 797 788 798 int LayoutTestController::numberOfPendingGeolocationPermissionRequests() 789 799 { -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
r84139 r84472 251 251 252 252 QVariant shadowRoot(const QWebElement&); 253 QVariant ensureShadowRoot(const QWebElement&); 254 void removeShadowRoot(const QWebElement&); 253 255 254 256 void evaluateScriptInIsolatedWorld(int worldID, const QString& script); -
trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r82536 r84472 1448 1448 } 1449 1449 1450 JSValueRef LayoutTestController::ensureShadowRoot(JSContextRef context, JSValueRef jsElement) 1451 { 1452 // FIXME: Implement this. 1453 return JSValueMakeUndefined(context); 1454 } 1455 1456 void LayoutTestController::removeShadowRoot(JSContextRef context, JSValueRef jsElement) 1457 { 1458 // FIXME: Implement this. 1459 } 1460 1450 1461 void LayoutTestController::abortModal() 1451 1462 { -
trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
r84262 r84472 59 59 DOMString markerTextForListItem(in object element); 60 60 unsigned long windowCount(); 61 62 // Shadow DOM. 61 63 object shadowRoot(in object element); 64 object ensureShadowRoot(in object element); 65 void removeShadowRoot(in object element); 62 66 63 67 // Repaint testing. -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
r84262 r84472 368 368 return JSValueMakeNull(context); 369 369 370 WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMElement = adoptWK(WKBundleNodeHandleCopyElementShadowRoot(domElement.get())); 371 if (!shadowRootDOMElement) 372 return JSValueMakeNull(context); 373 374 return WKBundleFrameGetJavaScriptWrapperForNodeForWorld(mainFrame, shadowRootDOMElement.get(), WKBundleScriptWorldNormalWorld()); 370 WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMNode = adoptWK(WKBundleNodeHandleCopyElementShadowRoot(domElement.get())); 371 if (!shadowRootDOMNode) 372 return JSValueMakeNull(context); 373 374 return WKBundleFrameGetJavaScriptWrapperForNodeForWorld(mainFrame, shadowRootDOMNode.get(), WKBundleScriptWorldNormalWorld()); 375 } 376 377 JSValueRef LayoutTestController::ensureShadowRoot(JSValueRef element) 378 { 379 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page()); 380 JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame); 381 382 if (!element || !JSValueIsObject(context, element)) 383 return JSValueMakeNull(context); 384 385 WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element))); 386 if (!domElement) 387 return JSValueMakeNull(context); 388 389 WKRetainPtr<WKBundleNodeHandleRef> shadowRootDOMNode = adoptWK(WKBundleNodeHandleCopyElementEnsureShadowRoot(domElement.get())); 390 if (!shadowRootDOMNode) 391 return JSValueMakeNull(context); 392 393 return WKBundleFrameGetJavaScriptWrapperForNodeForWorld(mainFrame, shadowRootDOMNode.get(), WKBundleScriptWorldNormalWorld()); 394 } 395 396 void LayoutTestController::removeShadowRoot(JSValueRef element) 397 { 398 WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page()); 399 JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame); 400 401 if (!element || !JSValueIsObject(context, element)) 402 return; 403 404 WKRetainPtr<WKBundleNodeHandleRef> domElement = adoptWK(WKBundleNodeHandleCreate(context, const_cast<JSObjectRef>(element))); 405 if (!domElement) 406 return; 407 408 WKBundleNodeHandleRemoveShadowRoot(domElement.get()); 375 409 } 376 410 -
trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
r84262 r84472 87 87 JSRetainPtr<JSStringRef> markerTextForListItem(JSValueRef element); 88 88 unsigned windowCount(); 89 90 // Shadow DOM. 89 91 JSValueRef shadowRoot(JSValueRef element); 92 JSValueRef ensureShadowRoot(JSValueRef element); 93 void removeShadowRoot(JSValueRef element); 90 94 91 95 // Repaint testing.
Note: See TracChangeset
for help on using the changeset viewer.