https://bugs.webkit.org/show_bug.cgi?id=136839
Reviewed by Darin Adler.
Source/WebCore:
Generate Element casting helper functions instead of requiring explicit
use of NODE_TYPE_CASTS() macro. Casting is now done using the following
form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().
The previous form (i.e. toHTMLDivElement()) is still supported for now
by generating macros that convert these calls into the new form, until
the code base is ported to the new casting helpers.
The plan is also to use is<HTMLDivElement>() instead of
isHTMLDivElement() for consistency but this was not changed in this
patch to avoid blowing up the size.
This CL also updates the way we convert a JSValue into an
implementation pointer. Instead of using toHTMLDivElement(), which
looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
avoids conflicting with the toXXXElement() macros and makes it
clearer this is not a simple cast.
No new tests, no behavior change.
* Modules/plugins/QuickTimePluginReplacement.mm:
(WebCore::QuickTimePluginReplacement::installReplacement):
* WebCore.exp.in:
* bindings/js/JSAudioBufferSourceNodeCustom.cpp:
(WebCore::JSAudioBufferSourceNode::setBuffer):
* bindings/js/JSBlobCustom.cpp:
(WebCore::constructJSBlob):
* bindings/js/JSCommandLineAPIHostCustom.cpp:
(WebCore::JSCommandLineAPIHost::getEventListeners):
(WebCore::JSCommandLineAPIHost::databaseId):
(WebCore::JSCommandLineAPIHost::storageId):
* bindings/js/JSDOMFormDataCustom.cpp:
(WebCore::toHTMLFormElementOrNull):
(WebCore::constructJSDOMFormData):
(WebCore::JSDOMFormData::append):
(WebCore::toHTMLFormElement): Deleted.
* bindings/js/JSDOMStringListCustom.cpp:
(WebCore::JSDOMStringList::toWrapped):
(WebCore::toDOMStringList): Deleted.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::toWrapped):
(WebCore::toDOMWindow): Deleted.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::createTouchList):
* bindings/js/JSEventTargetCustom.cpp:
(WebCore::JSEventTarget::toWrapped):
(WebCore::toEventTarget): Deleted.
* bindings/js/JSExceptionBase.cpp:
(WebCore::toExceptionBase):
* bindings/js/JSHTMLMediaElementCustom.cpp:
(WebCore::JSHTMLMediaElement::setController):
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::add):
(WebCore::JSHTMLOptionsCollection::remove):
* bindings/js/JSHTMLSelectElementCustom.cpp:
(WebCore::JSHTMLSelectElement::remove):
(WebCore::selectIndexSetter):
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::showContextMenu):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::fillMessagePortArray):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::insertBefore):
(WebCore::JSNode::replaceChild):
(WebCore::JSNode::removeChild):
(WebCore::JSNode::appendChild):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::toWrapped):
(WebCore::toNodeFilter): Deleted.
* bindings/js/JSSubtleCryptoCustom.cpp:
(WebCore::JSSubtleCrypto::encrypt):
(WebCore::JSSubtleCrypto::decrypt):
(WebCore::JSSubtleCrypto::sign):
(WebCore::JSSubtleCrypto::verify):
(WebCore::JSSubtleCrypto::exportKey):
(WebCore::JSSubtleCrypto::wrapKey):
(WebCore::JSSubtleCrypto::unwrapKey):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(JSValueToNative):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
(WebCore::JSTestActiveDOMObject::toWrapped):
(WebCore::toTestActiveDOMObject): Deleted.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetter::toWrapped):
(WebCore::toTestCustomNamedGetter): Deleted.
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructor::toWrapped):
(WebCore::toTestEventConstructor): Deleted.
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
(WebCore::JSTestEventTarget::toWrapped):
(WebCore::toTestEventTarget): Deleted.
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestException::toWrapped):
(WebCore::toTestException): Deleted.
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachable::toWrapped):
(WebCore::toTestGenerateIsReachable): Deleted.
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::setJSTestInterfaceImplementsNode):
(WebCore::setJSTestInterfaceSupplementalNode):
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
(WebCore::JSTestInterface::toWrapped):
(WebCore::toTestInterface): Deleted.
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::toWrapped):
(WebCore::toTestMediaQueryListListener): Deleted.
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructor::toWrapped):
(WebCore::toTestNamedConstructor): Deleted.
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministic::toWrapped):
(WebCore::toTestNondeterministic): Deleted.
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::setJSTestObjTestObjAttr):
(WebCore::setJSTestObjXMLObjAttr):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
(WebCore::setJSTestObjMutablePoint):
(WebCore::setJSTestObjImmutablePoint):
(WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
(WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore::jsTestObjPrototypeFunctionConvert1):
(WebCore::jsTestObjPrototypeFunctionConvert2):
(WebCore::jsTestObjPrototypeFunctionConvert4):
(WebCore::jsTestObjPrototypeFunctionConvert5):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
(WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
(WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
(WebCore::JSTestObj::toWrapped):
(WebCore::toTestObj): Deleted.
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
(WebCore::JSTestOverloadedConstructors::toWrapped):
(WebCore::toTestOverloadedConstructors): Deleted.
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::toWrapped):
(WebCore::toTestSerializedScriptValueInterface): Deleted.
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
(WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
(WebCore::JSTestTypedefs::toWrapped):
(WebCore::toTestTypedefs): Deleted.
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattribute::toWrapped):
(WebCore::toattribute): Deleted.
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonly::toWrapped):
(WebCore::toreadonly): Deleted.
* bindings/scripts/test/JS/JSreadonly.h:
* dom/Element.h:
(WebCore::downcast):
* dom/make_names.pl:
(printTypeHelpers):
* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLAudioElement.h:
* html/HTMLBaseElement.h:
* html/HTMLBodyElement.h:
* html/HTMLCanvasElement.h:
* html/HTMLDataListElement.h:
* html/HTMLDetailsElement.h:
* html/HTMLDivElement.h:
* html/HTMLEmbedElement.h:
* html/HTMLFieldSetElement.h:
* html/HTMLFormElement.h:
* html/HTMLFrameElement.h:
* html/HTMLFrameSetElement.h:
* html/HTMLHtmlElement.h:
* html/HTMLIFrameElement.h:
* html/HTMLImageElement.h:
* html/HTMLInputElement.h:
* html/HTMLLabelElement.h:
* html/HTMLLegendElement.h:
* html/HTMLLinkElement.h:
* html/HTMLMapElement.h:
* html/HTMLMarqueeElement.h:
* html/HTMLMetaElement.h:
* html/HTMLMeterElement.h:
* html/HTMLOListElement.h:
* html/HTMLObjectElement.h:
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.h:
* html/HTMLParamElement.h:
* html/HTMLProgressElement.h:
* html/HTMLScriptElement.h:
* html/HTMLSelectElement.h:
* html/HTMLSourceElement.h:
* html/HTMLStyleElement.h:
* html/HTMLSummaryElement.h:
* html/HTMLTableCaptionElement.h:
* html/HTMLTableElement.h:
* html/HTMLTableRowElement.h:
* html/HTMLTemplateElement.h:
* html/HTMLTextAreaElement.h:
* html/HTMLTitleElement.h:
* html/HTMLTrackElement.h:
* html/HTMLVideoElement.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::scriptValueAsNode):
* mathml/MathMLMencloseElement.h:
* svg/SVGAltGlyphDefElement.h:
* svg/SVGAltGlyphElement.h:
* svg/SVGAltGlyphItemElement.h:
* svg/SVGAnimateMotionElement.h:
* svg/SVGAnimateTransformElement.h:
* svg/SVGCircleElement.h:
* svg/SVGClipPathElement.h:
* svg/SVGCursorElement.h:
* svg/SVGEllipseElement.h:
* svg/SVGFEDistantLightElement.h:
* svg/SVGFEFuncAElement.h:
* svg/SVGFEFuncBElement.h:
* svg/SVGFEFuncGElement.h:
* svg/SVGFEFuncRElement.h:
* svg/SVGFEMergeNodeElement.h:
* svg/SVGFEPointLightElement.h:
* svg/SVGFESpotLightElement.h:
* svg/SVGFilterElement.h:
* svg/SVGFontElement.h:
* svg/SVGFontFaceElement.h:
* svg/SVGFontFaceNameElement.h:
* svg/SVGFontFaceSrcElement.h:
* svg/SVGFontFaceUriElement.h:
* svg/SVGForeignObjectElement.h:
* svg/SVGGlyphElement.h:
* svg/SVGGlyphRefElement.h:
* svg/SVGHKernElement.h:
* svg/SVGImageElement.h:
* svg/SVGLineElement.h:
* svg/SVGLinearGradientElement.h:
* svg/SVGMPathElement.h:
* svg/SVGMarkerElement.h:
* svg/SVGMaskElement.h:
* svg/SVGMissingGlyphElement.h:
* svg/SVGPathElement.h:
* svg/SVGPatternElement.h:
* svg/SVGPolygonElement.h:
* svg/SVGPolylineElement.h:
* svg/SVGRadialGradientElement.h:
* svg/SVGRectElement.h:
* svg/SVGSVGElement.h:
* svg/SVGScriptElement.h:
* svg/SVGStopElement.h:
* svg/SVGStyleElement.h:
* svg/SVGTextElement.h:
* svg/SVGTextPathElement.h:
* svg/SVGTitleElement.h:
* svg/SVGUseElement.h:
* svg/SVGVKernElement.h:
* svg/SVGViewElement.h:
Source/WebKit:
Update some of the exported symbols on Windows for functions that were
renamed.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Source/WebKit/mac:
Use JSXXX::toWrapped() instead of toXXX() function.
* DOM/WebDOMOperations.mm:
* WebView/WebView.mm:
(-[WebView _notificationIDForTesting:]):
Source/WebKit/win:
Use JSXXX::toWrapped() instead of toXXX() function.
* WebView.cpp:
(WebView::elementFromJS):
Source/WebKit2:
Use JSXXX::toWrapped() instead of toXXX() function.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::getOrCreate):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::webNotificationID):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173804
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-09-21 Chris Dumez <cdumez@apple.com>
+
+ Generate Element casting helper functions
+ https://bugs.webkit.org/show_bug.cgi?id=136839
+
+ Reviewed by Darin Adler.
+
+ Generate Element casting helper functions instead of requiring explicit
+ use of NODE_TYPE_CASTS() macro. Casting is now done using the following
+ form: downcast<HTMLDivElement>(), instead of toHTMLDivElement().
+
+ The previous form (i.e. toHTMLDivElement()) is still supported for now
+ by generating macros that convert these calls into the new form, until
+ the code base is ported to the new casting helpers.
+
+ The plan is also to use is<HTMLDivElement>() instead of
+ isHTMLDivElement() for consistency but this was not changed in this
+ patch to avoid blowing up the size.
+
+ This CL also updates the way we convert a JSValue into an
+ implementation pointer. Instead of using toHTMLDivElement(), which
+ looked like a cast, we now use JSHTMLDivElement::toWrapped(). This
+ avoids conflicting with the toXXXElement() macros and makes it
+ clearer this is not a simple cast.
+
+ No new tests, no behavior change.
+
+ * Modules/plugins/QuickTimePluginReplacement.mm:
+ (WebCore::QuickTimePluginReplacement::installReplacement):
+ * WebCore.exp.in:
+ * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
+ (WebCore::JSAudioBufferSourceNode::setBuffer):
+ * bindings/js/JSBlobCustom.cpp:
+ (WebCore::constructJSBlob):
+ * bindings/js/JSCommandLineAPIHostCustom.cpp:
+ (WebCore::JSCommandLineAPIHost::getEventListeners):
+ (WebCore::JSCommandLineAPIHost::databaseId):
+ (WebCore::JSCommandLineAPIHost::storageId):
+ * bindings/js/JSDOMFormDataCustom.cpp:
+ (WebCore::toHTMLFormElementOrNull):
+ (WebCore::constructJSDOMFormData):
+ (WebCore::JSDOMFormData::append):
+ (WebCore::toHTMLFormElement): Deleted.
+ * bindings/js/JSDOMStringListCustom.cpp:
+ (WebCore::JSDOMStringList::toWrapped):
+ (WebCore::toDOMStringList): Deleted.
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::toWrapped):
+ (WebCore::toDOMWindow): Deleted.
+ * bindings/js/JSDictionary.cpp:
+ (WebCore::JSDictionary::convertValue):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::createTouchList):
+ * bindings/js/JSEventTargetCustom.cpp:
+ (WebCore::JSEventTarget::toWrapped):
+ (WebCore::toEventTarget): Deleted.
+ * bindings/js/JSExceptionBase.cpp:
+ (WebCore::toExceptionBase):
+ * bindings/js/JSHTMLMediaElementCustom.cpp:
+ (WebCore::JSHTMLMediaElement::setController):
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::add):
+ (WebCore::JSHTMLOptionsCollection::remove):
+ * bindings/js/JSHTMLSelectElementCustom.cpp:
+ (WebCore::JSHTMLSelectElement::remove):
+ (WebCore::selectIndexSetter):
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ (WebCore::JSInspectorFrontendHost::showContextMenu):
+ * bindings/js/JSMessageEventCustom.cpp:
+ (WebCore::handleInitMessageEvent):
+ * bindings/js/JSMessagePortCustom.cpp:
+ (WebCore::fillMessagePortArray):
+ * bindings/js/JSNodeCustom.cpp:
+ (WebCore::JSNode::insertBefore):
+ (WebCore::JSNode::replaceChild):
+ (WebCore::JSNode::removeChild):
+ (WebCore::JSNode::appendChild):
+ * bindings/js/JSNodeFilterCustom.cpp:
+ (WebCore::JSNodeFilter::toWrapped):
+ (WebCore::toNodeFilter): Deleted.
+ * bindings/js/JSSubtleCryptoCustom.cpp:
+ (WebCore::JSSubtleCrypto::encrypt):
+ (WebCore::JSSubtleCrypto::decrypt):
+ (WebCore::JSSubtleCrypto::sign):
+ (WebCore::JSSubtleCrypto::verify):
+ (WebCore::JSSubtleCrypto::exportKey):
+ (WebCore::JSSubtleCrypto::wrapKey):
+ (WebCore::JSSubtleCrypto::unwrapKey):
+ * bindings/js/JSWebGLRenderingContextCustom.cpp:
+ (WebCore::JSWebGLRenderingContext::getAttachedShaders):
+ (WebCore::JSWebGLRenderingContext::getProgramParameter):
+ (WebCore::JSWebGLRenderingContext::getShaderParameter):
+ (WebCore::JSWebGLRenderingContext::getUniform):
+ (WebCore::dataFunctionf):
+ (WebCore::dataFunctioni):
+ (WebCore::dataFunctionMatrix):
+ * bindings/js/JSXMLHttpRequestCustom.cpp:
+ (WebCore::JSXMLHttpRequest::send):
+ * bindings/js/SerializedScriptValue.cpp:
+ (WebCore::CloneSerializer::dumpIfTerminal):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader):
+ (GenerateImplementation):
+ (GenerateParametersCheck):
+ (JSValueToNative):
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
+ (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
+ (WebCore::JSTestActiveDOMObject::toWrapped):
+ (WebCore::toTestActiveDOMObject): Deleted.
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
+ (WebCore::JSTestCustomNamedGetter::toWrapped):
+ (WebCore::toTestCustomNamedGetter): Deleted.
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+ * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
+ (WebCore::JSTestEventConstructor::toWrapped):
+ (WebCore::toTestEventConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestEventConstructor.h:
+ * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+ (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
+ (WebCore::JSTestEventTarget::toWrapped):
+ (WebCore::toTestEventTarget): Deleted.
+ * bindings/scripts/test/JS/JSTestEventTarget.h:
+ * bindings/scripts/test/JS/JSTestException.cpp:
+ (WebCore::JSTestException::toWrapped):
+ (WebCore::toTestException): Deleted.
+ * bindings/scripts/test/JS/JSTestException.h:
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
+ (WebCore::JSTestGenerateIsReachable::toWrapped):
+ (WebCore::toTestGenerateIsReachable): Deleted.
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+ * bindings/scripts/test/JS/JSTestInterface.cpp:
+ (WebCore::setJSTestInterfaceImplementsNode):
+ (WebCore::setJSTestInterfaceSupplementalNode):
+ (WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
+ (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
+ (WebCore::JSTestInterface::toWrapped):
+ (WebCore::toTestInterface): Deleted.
+ * bindings/scripts/test/JS/JSTestInterface.h:
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+ (WebCore::JSTestMediaQueryListListener::toWrapped):
+ (WebCore::toTestMediaQueryListListener): Deleted.
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+ * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
+ (WebCore::JSTestNamedConstructor::toWrapped):
+ (WebCore::toTestNamedConstructor): Deleted.
+ * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+ * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
+ (WebCore::JSTestNondeterministic::toWrapped):
+ (WebCore::toTestNondeterministic): Deleted.
+ * bindings/scripts/test/JS/JSTestNondeterministic.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::setJSTestObjTestObjAttr):
+ (WebCore::setJSTestObjXMLObjAttr):
+ (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
+ (WebCore::setJSTestObjWithScriptStateAttributeRaises):
+ (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
+ (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
+ (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
+ (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
+ (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
+ (WebCore::setJSTestObjMutablePoint):
+ (WebCore::setJSTestObjImmutablePoint):
+ (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionByteMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionOctetMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
+ (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
+ (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
+ (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
+ (WebCore::jsTestObjPrototypeFunctionConvert1):
+ (WebCore::jsTestObjPrototypeFunctionConvert2):
+ (WebCore::jsTestObjPrototypeFunctionConvert4):
+ (WebCore::jsTestObjPrototypeFunctionConvert5):
+ (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithSequence):
+ (WebCore::jsTestObjPrototypeFunctionStrictFunctionWithArray):
+ (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
+ (WebCore::JSTestObj::toWrapped):
+ (WebCore::toTestObj): Deleted.
+ * bindings/scripts/test/JS/JSTestObj.h:
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+ (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
+ (WebCore::JSTestOverloadedConstructors::toWrapped):
+ (WebCore::toTestOverloadedConstructors): Deleted.
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+ (WebCore::JSTestSerializedScriptValueInterface::toWrapped):
+ (WebCore::toTestSerializedScriptValueInterface): Deleted.
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
+ (WebCore::jsTestTypedefsPrototypeFunctionCallWithSequenceThatRequiresInclude):
+ (WebCore::JSTestTypedefs::toWrapped):
+ (WebCore::toTestTypedefs): Deleted.
+ * bindings/scripts/test/JS/JSTestTypedefs.h:
+ * bindings/scripts/test/JS/JSattribute.cpp:
+ (WebCore::JSattribute::toWrapped):
+ (WebCore::toattribute): Deleted.
+ * bindings/scripts/test/JS/JSattribute.h:
+ * bindings/scripts/test/JS/JSreadonly.cpp:
+ (WebCore::JSreadonly::toWrapped):
+ (WebCore::toreadonly): Deleted.
+ * bindings/scripts/test/JS/JSreadonly.h:
+ * dom/Element.h:
+ (WebCore::downcast):
+ * dom/make_names.pl:
+ (printTypeHelpers):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLAreaElement.h:
+ * html/HTMLAudioElement.h:
+ * html/HTMLBaseElement.h:
+ * html/HTMLBodyElement.h:
+ * html/HTMLCanvasElement.h:
+ * html/HTMLDataListElement.h:
+ * html/HTMLDetailsElement.h:
+ * html/HTMLDivElement.h:
+ * html/HTMLEmbedElement.h:
+ * html/HTMLFieldSetElement.h:
+ * html/HTMLFormElement.h:
+ * html/HTMLFrameElement.h:
+ * html/HTMLFrameSetElement.h:
+ * html/HTMLHtmlElement.h:
+ * html/HTMLIFrameElement.h:
+ * html/HTMLImageElement.h:
+ * html/HTMLInputElement.h:
+ * html/HTMLLabelElement.h:
+ * html/HTMLLegendElement.h:
+ * html/HTMLLinkElement.h:
+ * html/HTMLMapElement.h:
+ * html/HTMLMarqueeElement.h:
+ * html/HTMLMetaElement.h:
+ * html/HTMLMeterElement.h:
+ * html/HTMLOListElement.h:
+ * html/HTMLObjectElement.h:
+ * html/HTMLOptGroupElement.h:
+ * html/HTMLOptionElement.h:
+ * html/HTMLParamElement.h:
+ * html/HTMLProgressElement.h:
+ * html/HTMLScriptElement.h:
+ * html/HTMLSelectElement.h:
+ * html/HTMLSourceElement.h:
+ * html/HTMLStyleElement.h:
+ * html/HTMLSummaryElement.h:
+ * html/HTMLTableCaptionElement.h:
+ * html/HTMLTableElement.h:
+ * html/HTMLTableRowElement.h:
+ * html/HTMLTemplateElement.h:
+ * html/HTMLTextAreaElement.h:
+ * html/HTMLTitleElement.h:
+ * html/HTMLTrackElement.h:
+ * html/HTMLVideoElement.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::scriptValueAsNode):
+ * mathml/MathMLMencloseElement.h:
+ * svg/SVGAltGlyphDefElement.h:
+ * svg/SVGAltGlyphElement.h:
+ * svg/SVGAltGlyphItemElement.h:
+ * svg/SVGAnimateMotionElement.h:
+ * svg/SVGAnimateTransformElement.h:
+ * svg/SVGCircleElement.h:
+ * svg/SVGClipPathElement.h:
+ * svg/SVGCursorElement.h:
+ * svg/SVGEllipseElement.h:
+ * svg/SVGFEDistantLightElement.h:
+ * svg/SVGFEFuncAElement.h:
+ * svg/SVGFEFuncBElement.h:
+ * svg/SVGFEFuncGElement.h:
+ * svg/SVGFEFuncRElement.h:
+ * svg/SVGFEMergeNodeElement.h:
+ * svg/SVGFEPointLightElement.h:
+ * svg/SVGFESpotLightElement.h:
+ * svg/SVGFilterElement.h:
+ * svg/SVGFontElement.h:
+ * svg/SVGFontFaceElement.h:
+ * svg/SVGFontFaceNameElement.h:
+ * svg/SVGFontFaceSrcElement.h:
+ * svg/SVGFontFaceUriElement.h:
+ * svg/SVGForeignObjectElement.h:
+ * svg/SVGGlyphElement.h:
+ * svg/SVGGlyphRefElement.h:
+ * svg/SVGHKernElement.h:
+ * svg/SVGImageElement.h:
+ * svg/SVGLineElement.h:
+ * svg/SVGLinearGradientElement.h:
+ * svg/SVGMPathElement.h:
+ * svg/SVGMarkerElement.h:
+ * svg/SVGMaskElement.h:
+ * svg/SVGMissingGlyphElement.h:
+ * svg/SVGPathElement.h:
+ * svg/SVGPatternElement.h:
+ * svg/SVGPolygonElement.h:
+ * svg/SVGPolylineElement.h:
+ * svg/SVGRadialGradientElement.h:
+ * svg/SVGRectElement.h:
+ * svg/SVGSVGElement.h:
+ * svg/SVGScriptElement.h:
+ * svg/SVGStopElement.h:
+ * svg/SVGStyleElement.h:
+ * svg/SVGTextElement.h:
+ * svg/SVGTextPathElement.h:
+ * svg/SVGTitleElement.h:
+ * svg/SVGUseElement.h:
+ * svg/SVGVKernElement.h:
+ * svg/SVGViewElement.h:
+
2014-09-21 Christophe Dumez <cdumez@apple.com>
Fix post-mortem nits for r173724
// Get the <video> created to replace the plug-in.
JSC::JSValue value = replacement.get(exec, JSC::Identifier(exec, "video"));
if (!exec->hadException() && !value.isUndefinedOrNull())
- m_mediaElement = toHTMLVideoElement(value);
+ m_mediaElement = JSHTMLVideoElement::toWrapped(value);
if (!m_mediaElement) {
LOG(Plugins, "%p - Failed to find <video> element created by QuickTime plugin replacement script.", this);
__ZN7WebCore10FloatPointC1ERKNS_8IntPointE
__ZN7WebCore10FontGlyphs15releaseFontDataEv
__ZN7WebCore10JSDocument6s_infoE
+__ZN7WebCore10JSDocument9toWrappedEN3JSC7JSValueE
__ZN7WebCore10LayoutRect5scaleEf
__ZN7WebCore10LayoutRect5uniteERKS0_
__ZN7WebCore10LayoutRectC1ERKNS_9FloatRectE
__ZN7WebCore10deleteFileERKN3WTF6StringE
__ZN7WebCore10fileExistsERKN3WTF6StringE
__ZN7WebCore10setCookiesEPNS_8DocumentERKNS_3URLERKN3WTF6StringE
-__ZN7WebCore10toDocumentEN3JSC7JSValueE
__ZN7WebCore11BitmapImage13getCGImageRefEv
__ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE
__ZN7WebCore11BitmapImageC1EPNS_13ImageObserverE
__ZN7WebCore15pathGetFileNameERKN3WTF6StringE
__ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueEPNS_12CachedScriptE
__ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi
-__ZN7WebCore15toDOMStringListEPN3JSC9ExecStateENS0_7JSValueE
__ZN7WebCore15visitedLinkHashEPKtj
__ZN7WebCore15visitedLinkHashERKN3WTF6StringE
__ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE
__ZN7WebCore6Editor7copyURLERKNS_3URLERKN3WTF6StringE
__ZN7WebCore6Editor7outdentEv
__ZN7WebCore6JSNode6s_infoE
+__ZN7WebCore6JSNode9toWrappedEN3JSC7JSValueE
__ZN7WebCore6LengthC1EN3WTF7PassRefINS_16CalculationValueEEE
__ZN7WebCore6Region21updateBoundsFromShapeEv
__ZN7WebCore6Region5uniteERKS0_
__ZN7WebCore6Widget9setParentEPNS_10ScrollViewE
__ZN7WebCore6WidgetD2Ev
__ZN7WebCore6toInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
-__ZN7WebCore6toNodeEN3JSC7JSValueE
__ZN7WebCore7Element12setAttributeERKN3WTF12AtomicStringES4_Ri
__ZN7WebCore7Element12setAttributeERKNS_13QualifiedNameERKN3WTF12AtomicStringE
__ZN7WebCore7Element16createShadowRootERi
__ZN7WebCore7IntRectC1ERKNS_9FloatRectE
__ZN7WebCore7IntSizeC1ERK6CGSize
__ZN7WebCore7IntSizeC1ERKNS_9FloatSizeE
+__ZN7WebCore7JSRange9toWrappedEN3JSC7JSValueE
__ZN7WebCore7TextRun19allowsRoundingHacksEv
__ZN7WebCore7TextRun21s_allowsRoundingHacksE
__ZN7WebCore7TextRun22setAllowsRoundingHacksEb
__ZN7WebCore7makeRGBEiii
__ZN7WebCore7toInt16EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
__ZN7WebCore7toInt64EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
-__ZN7WebCore7toRangeEN3JSC7JSValueE
__ZN7WebCore7toUInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
__ZN7WebCore8BlobData14setContentTypeERKN3WTF6StringE
__ZN7WebCore8CSSValue7destroyEv
__ZN7WebCore9InlineBox14selectionStateEv
__ZN7WebCore9InlineBox16placeEllipsisBoxEbfffRfRb
__ZN7WebCore9JSElement6s_infoE
+__ZN7WebCore9JSElement9toWrappedEN3JSC7JSValueE
__ZN7WebCore9LayerPoolC1Ev
__ZN7WebCore9LayerPoolD1Ev
__ZN7WebCore9PageCache11setCapacityEi
__ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
__ZN7WebCore9pageCacheEv
__ZN7WebCore9plainTextEPKNS_5RangeEtb
-__ZN7WebCore9toElementEN3JSC7JSValueE
__ZN7WebCore9unionRectERKN3WTF6VectorINS_9FloatRectELm0ENS0_15CrashOnOverflowEEE
__ZNK3JSC8Bindings10RootObject12globalObjectEv
__ZNK3WTF6String14createCFStringEv
#if ENABLE(MEDIA_SOURCE)
__ZN7WebCore12SourceBuffer25bufferedSamplesForTrackIDERKN3WTF12AtomicStringE
-__ZN7WebCore14toSourceBufferEN3JSC7JSValueE
+__ZN7WebCore14JSSourceBuffer9toWrappedEN3JSC7JSValueE
__ZN7WebCore26MockMediaPlayerMediaSource19registerMediaEngineEPFvPFN3WTF10PassOwnPtrINS_27MediaPlayerPrivateInterfaceEEEPNS_11MediaPlayerEEPFvRNS1_7HashSetINS1_6StringENS1_10StringHashENS1_10HashTraitsISA_EEEEEPFNS5_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNS1_6VectorISA_Lm0ENS1_15CrashOnOverflowEEEEPFvvEPFvRKSA_EPFbSX_SX_EE
#endif
__ZN7WebCore12Notification8finalizeEv
__ZN7WebCore12NotificationC1Ev
__ZN7WebCore12NotificationD1Ev
-__ZN7WebCore14toNotificationEN3JSC7JSValueE
+__ZN7WebCore14JSNotification9toWrappedEN3JSC7JSValueE
__ZN7WebCore19provideNotificationEPNS_4PageEPNS_18NotificationClientE
__ZN7WebCore22NotificationController10clientFromEPNS_4PageE
#endif
#if ENABLE(VIDEO)
.objc_class_name_WebVideoFullscreenController
__ZN7WebCore10TimeRanges3addEdd
-__ZN7WebCore12toTimeRangesEN3JSC7JSValueE
+__ZN7WebCore12JSTimeRanges9toWrappedEN3JSC7JSValueE
__ZN7WebCore16HTMLMediaElement12endScrubbingEv
__ZN7WebCore16HTMLMediaElement14beginScrubbingEv
__ZN7WebCore16HTMLMediaElement14exitFullscreenEv
void JSAudioBufferSourceNode::setBuffer(ExecState* exec, JSValue value)
{
- AudioBuffer* buffer = toAudioBuffer(value);
+ AudioBuffer* buffer = JSAudioBuffer::toWrapped(value);
if (!buffer) {
exec->vm().throwException(exec, createTypeError(exec, "Value is not of type AudioBuffer"));
return;
blobBuilder.append(arrayBuffer);
else if (RefPtr<ArrayBufferView> arrayBufferView = toArrayBufferView(item))
blobBuilder.append(arrayBufferView.release());
- else if (Blob* blob = toBlob(item))
+ else if (Blob* blob = JSBlob::toWrapped(item))
blobBuilder.append(blob);
else {
String string = item.toString(exec)->value(exec);
if (!value.isObject() || value.isNull())
return jsUndefined();
- Node* node = toNode(value);
+ Node* node = JSNode::toWrapped(value);
if (!node)
return jsUndefined();
return jsUndefined();
#if ENABLE(SQL_DATABASE)
- Database* database = toDatabase(exec->uncheckedArgument(0));
+ Database* database = JSDatabase::toWrapped(exec->uncheckedArgument(0));
if (database)
return jsStringWithCache(exec, impl().databaseIdImpl(database));
#endif
if (exec->argumentCount() < 1)
return jsUndefined();
- Storage* storage = toStorage(exec->uncheckedArgument(0));
+ Storage* storage = JSStorage::toWrapped(exec->uncheckedArgument(0));
if (storage)
return jsStringWithCache(exec, impl().storageIdImpl(storage));
namespace WebCore {
-static HTMLFormElement* toHTMLFormElement(JSC::JSValue value)
+static HTMLFormElement* toHTMLFormElementOrNull(JSC::JSValue value)
{
- return value.inherits(JSHTMLFormElement::info()) ? &jsCast<JSHTMLFormElement*>(asObject(value))->impl() : 0;
+ return value.inherits(JSHTMLFormElement::info()) ? &jsCast<JSHTMLFormElement*>(asObject(value))->impl() : nullptr;
}
EncodedJSValue JSC_HOST_CALL constructJSDOMFormData(ExecState* exec)
{
DOMConstructorObject* jsConstructor = jsCast<DOMConstructorObject*>(exec->callee());
- HTMLFormElement* form = 0;
- if (exec->argumentCount() > 0)
- form = toHTMLFormElement(exec->argument(0));
+ HTMLFormElement* form = toHTMLFormElementOrNull(exec->argument(0));
RefPtr<DOMFormData> domFormData = DOMFormData::create(form);
return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), domFormData.get())));
}
String filename;
if (exec->argumentCount() >= 3 && !exec->argument(2).isUndefinedOrNull())
filename = exec->argument(2).toString(exec)->value(exec);
- impl().append(name, toBlob(value), filename);
+ impl().append(name, JSBlob::toWrapped(value), filename);
} else
impl().append(name, value.toString(exec)->value(exec));
}
namespace WebCore {
-PassRefPtr<DOMStringList> toDOMStringList(ExecState* exec, JSValue value)
+PassRefPtr<DOMStringList> JSDOMStringList::toWrapped(ExecState* exec, JSValue value)
{
if (value.inherits(JSDOMStringList::info()))
return &jsCast<JSDOMStringList*>(asObject(value))->impl();
return jsUndefined();
}
-DOMWindow* toDOMWindow(JSValue value)
+DOMWindow* JSDOMWindow::toWrapped(JSValue value)
{
if (!value.isObject())
return 0;
void JSDictionary::convertValue(ExecState*, JSValue value, RefPtr<DOMWindow>& result)
{
- result = toDOMWindow(value);
+ result = JSDOMWindow::toWrapped(value);
}
void JSDictionary::convertValue(ExecState*, JSValue value, RefPtr<EventTarget>& result)
{
- result = toEventTarget(value);
+ result = JSEventTarget::toWrapped(value);
}
void JSDictionary::convertValue(ExecState*, JSValue value, RefPtr<Node>& result)
{
- result = toNode(value);
+ result = JSNode::toWrapped(value);
}
void JSDictionary::convertValue(ExecState*, JSValue value, RefPtr<Storage>& result)
{
- result = toStorage(value);
+ result = JSStorage::toWrapped(value);
}
void JSDictionary::convertValue(ExecState* exec, JSValue value, MessagePortArray& result)
#if ENABLE(ENCRYPTED_MEDIA)
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<MediaKeyError>& result)
{
- result = toMediaKeyError(value);
+ result = JSMediaKeyError::toWrapped(value);
}
#endif
#if ENABLE(MEDIA_STREAM)
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<MediaStream>& result)
{
- result = toMediaStream(value);
+ result = JSMediaStream::toWrapped(value);
}
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<MediaStreamTrack>& result)
{
- result = toMediaStreamTrack(value);
+ result = JSMediaStreamTrack::toWrapped(value);
}
#endif
#if ENABLE(FONT_LOAD_EVENTS)
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<CSSFontFaceRule>& result)
{
- result = toCSSFontFaceRule(value);
+ result = JSCSSFontFaceRule::toWrapped(value);
}
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<DOMError>& result)
{
- result = toDOMError(value);
+ result = JSDOMError::toWrapped(value);
}
void JSDictionary::convertValue(JSC::ExecState* exec, JSC::JSValue value, RefPtr<VoidCallback>& result)
#if ENABLE(GAMEPAD)
void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<Gamepad>& result)
{
- result = toGamepad(value);
+ result = JSGamepad::toWrapped(value);
}
#endif
RefPtr<TouchList> touchList = TouchList::create();
for (size_t i = 0; i < exec->argumentCount(); i++)
- touchList->append(toTouch(exec->argument(i)));
+ touchList->append(JSTouch::toWrapped(exec->argument(i)));
return toJS(exec, globalObject(), touchList.release());
}
if (value.inherits(JS##interfaceName::info())) \
return &jsCast<JS##interfaceName*>(asObject(value))->impl();
-EventTarget* toEventTarget(JSC::JSValue value)
+EventTarget* JSEventTarget::toWrapped(JSC::JSValue value)
{
TRY_TO_UNWRAP_WITH_INTERFACE(DOMWindowShell)
TRY_TO_UNWRAP_WITH_INTERFACE(EventTarget)
ExceptionBase* toExceptionBase(JSC::JSValue value)
{
- if (DOMCoreException* domException = toDOMCoreException(value))
+ if (DOMCoreException* domException = JSDOMCoreException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(domException);
- if (RangeException* rangeException = toRangeException(value))
+ if (RangeException* rangeException = JSRangeException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(rangeException);
- if (EventException* eventException = toEventException(value))
+ if (EventException* eventException = JSEventException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(eventException);
- if (XMLHttpRequestException* xmlHttpException = toXMLHttpRequestException(value))
+ if (XMLHttpRequestException* xmlHttpException = JSXMLHttpRequestException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(xmlHttpException);
- if (SVGException* svgException = toSVGException(value))
+ if (SVGException* svgException = JSSVGException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(svgException);
- if (XPathException* pathException = toXPathException(value))
+ if (XPathException* pathException = JSXPathException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(pathException);
#if ENABLE(SQL_DATABASE)
- if (SQLException* pathException = toSQLException(value))
+ if (SQLException* pathException = JSSQLException::toWrapped(value))
return reinterpret_cast<ExceptionBase*>(pathException);
#endif
// On setting, it must first remove the element's mediagroup attribute, if any,
impl().setMediaGroup(String());
// and then set the current media controller to the given value.
- impl().setController(toMediaController(value));
+ impl().setController(JSMediaController::toWrapped(value));
}
}
JSValue JSHTMLOptionsCollection::add(ExecState* exec)
{
HTMLOptionsCollection& imp = impl();
- HTMLOptionElement* option = toHTMLOptionElement(exec->argument(0));
+ HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(exec->argument(0));
ExceptionCode ec = 0;
if (exec->argumentCount() < 2)
imp.add(option, ec);
{
// The argument can be an HTMLOptionElement or an index.
JSValue argument = exec->argument(0);
- if (HTMLOptionElement* option = toHTMLOptionElement(argument))
+ if (HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(argument))
impl().remove(option);
else
impl().remove(argument.toInt32(exec));
setDOMException(exec, ec);
} else {
// The HTMLSelectElement::remove() function can take either an option object or the index of an option.
- if (HTMLOptionElement* option = toHTMLOptionElement(exec->argument(0)))
+ if (HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(exec->argument(0)))
select.remove(option);
else
select.removeByIndex(exec->argument(0).toInt32(exec));
select->removeByIndex(index);
else {
ExceptionCode ec = 0;
- HTMLOptionElement* option = toHTMLOptionElement(value);
+ HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(value);
if (!option)
ec = TYPE_MISMATCH_ERR;
else
#if ENABLE(CONTEXT_MENUS)
if (exec->argumentCount() < 2)
return jsUndefined();
- Event* event = toEvent(exec->argument(0));
+ Event* event = JSEvent::toWrapped(exec->argument(0));
JSArray* array = asArray(exec->argument(1));
ContextMenu menu;
bool cancelableArg = exec->argument(2).toBoolean(exec);
const String originArg = exec->argument(4).toString(exec)->value(exec);
const String lastEventIdArg = exec->argument(5).toString(exec)->value(exec);
- DOMWindow* sourceArg = toDOMWindow(exec->argument(6));
+ DOMWindow* sourceArg = JSDOMWindow::toWrapped(exec->argument(6));
std::unique_ptr<MessagePortArray> messagePorts;
OwnPtr<ArrayBufferArray> arrayBuffers;
if (!exec->argument(7).isUndefinedOrNull()) {
}
// Validation of Objects implementing an interface, per WebIDL spec 4.1.15.
- RefPtr<MessagePort> port = toMessagePort(value);
+ RefPtr<MessagePort> port = JSMessagePort::toWrapped(value);
if (port) {
// Check for duplicate ports.
if (portArray.contains(port)) {
JSValue JSNode::insertBefore(ExecState* exec)
{
ExceptionCode ec = 0;
- bool ok = impl().insertBefore(toNode(exec->argument(0)), toNode(exec->argument(1)), ec);
+ bool ok = impl().insertBefore(JSNode::toWrapped(exec->argument(0)), JSNode::toWrapped(exec->argument(1)), ec);
setDOMException(exec, ec);
if (ok)
return exec->argument(0);
JSValue JSNode::replaceChild(ExecState* exec)
{
ExceptionCode ec = 0;
- bool ok = impl().replaceChild(toNode(exec->argument(0)), toNode(exec->argument(1)), ec);
+ bool ok = impl().replaceChild(JSNode::toWrapped(exec->argument(0)), JSNode::toWrapped(exec->argument(1)), ec);
setDOMException(exec, ec);
if (ok)
return exec->argument(1);
JSValue JSNode::removeChild(ExecState* exec)
{
ExceptionCode ec = 0;
- bool ok = impl().removeChild(toNode(exec->argument(0)), ec);
+ bool ok = impl().removeChild(JSNode::toWrapped(exec->argument(0)), ec);
setDOMException(exec, ec);
if (ok)
return exec->argument(0);
JSValue JSNode::appendChild(ExecState* exec)
{
ExceptionCode ec = 0;
- bool ok = impl().appendChild(toNode(exec->argument(0)), ec);
+ bool ok = impl().appendChild(JSNode::toWrapped(exec->argument(0)), ec);
setDOMException(exec, ec);
if (ok)
return exec->argument(0);
visitor.addOpaqueRoot(&impl());
}
-PassRefPtr<NodeFilter> toNodeFilter(JSC::VM& vm, JSC::JSValue value)
+PassRefPtr<NodeFilter> JSNodeFilter::toWrapped(JSC::VM& vm, JSC::JSValue value)
{
if (value.inherits(JSNodeFilter::info()))
return &JSC::jsCast<JSNodeFilter*>(asObject(value))->impl();
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+ RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
if (!key)
return throwTypeError(exec);
- RefPtr<CryptoKey> wrappingKey = toCryptoKey(exec->uncheckedArgument(2));
+ RefPtr<CryptoKey> wrappingKey = JSCryptoKey::toWrapped(exec->uncheckedArgument(2));
if (!key)
return throwTypeError(exec);
return jsUndefined();
}
- RefPtr<CryptoKey> unwrappingKey = toCryptoKey(exec->uncheckedArgument(2));
+ RefPtr<CryptoKey> unwrappingKey = JSCryptoKey::toWrapped(exec->uncheckedArgument(2));
if (!unwrappingKey)
return throwTypeError(exec);
return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
WebGLRenderingContext& context = impl();
- WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
+ WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
Vector<RefPtr<WebGLShader>> shaders;
ExceptionCode ec = 0;
WebGLRenderingContext& context = impl();
- WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
+ WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
WebGLRenderingContext& context = impl();
if (!exec->uncheckedArgument(0).isUndefinedOrNull() && !exec->uncheckedArgument(0).inherits(JSWebGLShader::info()))
return throwTypeError(exec);
- WebGLShader* shader = toWebGLShader(exec->uncheckedArgument(0));
+ WebGLShader* shader = JSWebGLShader::toWrapped(exec->uncheckedArgument(0));
unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
if (exec->hadException())
return jsUndefined();
ExceptionCode ec = 0;
WebGLRenderingContext& context = impl();
- WebGLProgram* program = toWebGLProgram(exec->uncheckedArgument(0));
+ WebGLProgram* program = JSWebGLProgram::toWrapped(exec->uncheckedArgument(0));
if (!program && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
- WebGLUniformLocation* location = toWebGLUniformLocation(exec->uncheckedArgument(1));
+ WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(1));
if (!location && !exec->uncheckedArgument(1).isUndefinedOrNull())
return throwTypeError(exec);
WebGLGetInfo info = context.getUniform(program, location, ec);
long index = -1;
if (functionForUniform(f)) {
- location = toWebGLUniformLocation(exec->uncheckedArgument(0));
+ location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
} else
if (exec->argumentCount() != 2)
return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
- WebGLUniformLocation* location = toWebGLUniformLocation(exec->uncheckedArgument(0));
+ WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
if (exec->argumentCount() != 3)
return exec->vm().throwException(exec, createNotEnoughArgumentsError(exec));
- WebGLUniformLocation* location = toWebGLUniformLocation(exec->uncheckedArgument(0));
+ WebGLUniformLocation* location = JSWebGLUniformLocation::toWrapped(exec->uncheckedArgument(0));
if (!location && !exec->uncheckedArgument(0).isUndefinedOrNull())
return throwTypeError(exec);
if (val.isUndefinedOrNull())
impl().send(ec);
else if (val.inherits(JSDocument::info()))
- impl().send(toDocument(val), ec);
+ impl().send(JSDocument::toWrapped(val), ec);
else if (val.inherits(JSBlob::info()))
- impl().send(toBlob(val), ec);
+ impl().send(JSBlob::toWrapped(val), ec);
else if (val.inherits(JSDOMFormData::info()))
- impl().send(toDOMFormData(val), ec);
+ impl().send(JSDOMFormData::toWrapped(val), ec);
else if (val.inherits(JSArrayBuffer::info()))
impl().send(toArrayBuffer(val), ec);
else if (val.inherits(JSArrayBufferView::info())) {
write(obj->internalValue().asNumber());
return true;
}
- if (File* file = toFile(obj)) {
+ if (File* file = JSFile::toWrapped(obj)) {
write(FileTag);
write(file);
return true;
}
- if (FileList* list = toFileList(obj)) {
+ if (FileList* list = JSFileList::toWrapped(obj)) {
write(FileListTag);
unsigned length = list->length();
write(length);
write(list->item(i));
return true;
}
- if (Blob* blob = toBlob(obj)) {
+ if (Blob* blob = JSBlob::toWrapped(obj)) {
write(BlobTag);
m_blobURLs.append(blob->url());
write(blob->url());
write(blob->size());
return true;
}
- if (ImageData* data = toImageData(obj)) {
+ if (ImageData* data = JSImageData::toWrapped(obj)) {
write(ImageDataTag);
write(data->width());
write(data->height());
return success;
}
#if ENABLE(SUBTLE_CRYPTO)
- if (CryptoKey* key = toCryptoKey(obj)) {
+ if (CryptoKey* key = JSCryptoKey::toWrapped(obj)) {
write(CryptoKeyTag);
Vector<uint8_t> serializedKey;
Vector<String> dummyBlobURLs;
push(@headerContent, " static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);\n");
}
+ # JSValue to implementation type
+ if (!$hasParent || $interface->extendedAttributes->{"JSGenerateToNativeObject"}) {
+ if ($interfaceName eq "NodeFilter") {
+ push(@headerContent, " static PassRefPtr<NodeFilter> toWrapped(JSC::VM&, JSC::JSValue);\n");
+ } elsif ($interfaceName eq "DOMStringList") {
+ push(@headerContent, " static PassRefPtr<DOMStringList> toWrapped(JSC::ExecState*, JSC::JSValue);\n");
+ } else {
+ push(@headerContent, " static $implType* toWrapped(JSC::JSValue);\n");
+ }
+ }
+
$headerTrailingIncludes{"${className}Custom.h"} = 1 if $interface->extendedAttributes->{"JSCustomHeader"};
my $namedGetterFunction = GetNamedGetterFunction($interface);
if (ShouldGenerateToJSDeclaration($hasParent, $interface)) {
push(@headerContent, "WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
}
- if (!$hasParent || $interface->extendedAttributes->{"JSGenerateToNativeObject"}) {
- if ($interfaceName eq "NodeFilter") {
- push(@headerContent, "PassRefPtr<NodeFilter> toNodeFilter(JSC::VM&, JSC::JSValue);\n");
- } elsif ($interfaceName eq "DOMStringList") {
- push(@headerContent, "PassRefPtr<DOMStringList> toDOMStringList(JSC::ExecState*, JSC::JSValue);\n");
- } else {
- push(@headerContent, "WEBCORE_EXPORT $implType* to${interfaceName}(JSC::JSValue);\n");
- }
- }
if ($usesToJSNewlyCreated{$interfaceName}) {
push(@headerContent, "JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName*);\n");
}
}
if ((!$hasParent or $interface->extendedAttributes->{"JSGenerateToNativeObject"}) and !$interface->extendedAttributes->{"JSCustomToNativeObject"}) {
- push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
+ push(@implContent, "$implType* ${className}::toWrapped(JSC::JSValue value)\n");
push(@implContent, "{\n");
push(@implContent, " if (auto* wrapper = " . GetCastingHelperForThisObject($interface) . "(value))\n");
push(@implContent, " return &wrapper->impl();\n");
if ($argType eq "XPathNSResolver") {
push(@$outputArray, " RefPtr<XPathNSResolver> customResolver;\n");
- push(@$outputArray, " XPathNSResolver* resolver = toXPathNSResolver(exec->argument($argsIndex));\n");
+ push(@$outputArray, " XPathNSResolver* resolver = JSXPathNSResolver::toWrapped(exec->argument($argsIndex));\n");
push(@$outputArray, " if (!resolver) {\n");
push(@$outputArray, " customResolver = JSCustomXPathNSResolver::create(exec, exec->argument($argsIndex));\n");
push(@$outputArray, " if (UNLIKELY(exec->hadException()))\n");
push(@$outputArray, " for (unsigned i = $argsIndex, count = exec->argumentCount(); i < count; ++i) {\n");
push(@$outputArray, " if (!exec->uncheckedArgument(i).inherits(JS${argType}::info()))\n");
push(@$outputArray, " return throwArgumentTypeError(*exec, i, \"$name\", \"$interfaceName\", $quotedFunctionName, \"$argType\");\n");
- push(@$outputArray, " $name.append(to$argType(exec->uncheckedArgument(i)));\n");
+ push(@$outputArray, " $name.append(JS${argType}::toWrapped(exec->uncheckedArgument(i)));\n");
push(@$outputArray, " }\n")
} else {
push(@$outputArray, " Vector<$nativeElementType> $name = toNativeArguments<$nativeElementType>(exec, $argsIndex);\n");
if ($type eq "NodeFilter") {
AddToImplIncludes("JS$type.h", $conditional);
- return "to$type(exec->vm(), $value)";
+ return "JS${type}::toWrapped(exec->vm(), $value)";
}
if ($type eq "SerializedScriptValue") {
if ($arrayOrSequenceType) {
if ($codeGenerator->IsRefPtrType($arrayOrSequenceType)) {
AddToImplIncludes("JS${arrayOrSequenceType}.h");
- return "(toRefPtrNativeArray<${arrayOrSequenceType}, JS${arrayOrSequenceType}>(exec, $value, &to${arrayOrSequenceType}))";
+ return "(toRefPtrNativeArray<${arrayOrSequenceType}, JS${arrayOrSequenceType}>(exec, $value, &JS${arrayOrSequenceType}::toWrapped))";
}
return "toNativeArray<" . GetNativeVectorInnerType($arrayOrSequenceType) . ">(exec, $value)";
}
# Default, assume autogenerated type conversion routines
AddToImplIncludes("JS$type.h", $conditional);
- return "to$type($value)";
+ return "JS${type}::toWrapped($value)";
}
sub NativeToJSValue
TestActiveDOMObject& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Node* nextChild(toNode(exec->argument(0)));
+ Node* nextChild(JSNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.excitingFunction(nextChild);
return createNewWrapper<JSTestActiveDOMObject>(globalObject, impl);
}
-TestActiveDOMObject* toTestActiveDOMObject(JSC::JSValue value)
+TestActiveDOMObject* JSTestActiveDOMObject::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestActiveDOMObject*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestActiveDOMObject* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestActiveDOMObject();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
-WEBCORE_EXPORT TestActiveDOMObject* toTestActiveDOMObject(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestCustomNamedGetter>(globalObject, impl);
}
-TestCustomNamedGetter* toTestCustomNamedGetter(JSC::JSValue value)
+TestCustomNamedGetter* JSTestCustomNamedGetter::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestCustomNamedGetter*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestCustomNamedGetter* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
-WEBCORE_EXPORT TestCustomNamedGetter* toTestCustomNamedGetter(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestEventConstructor>(globalObject, impl);
}
-TestEventConstructor* toTestEventConstructor(JSC::JSValue value)
+TestEventConstructor* JSTestEventConstructor::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestEventConstructor*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestEventConstructor* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestEventConstructor();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
-WEBCORE_EXPORT TestEventConstructor* toTestEventConstructor(JSC::JSValue);
bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
ExceptionCode ec = 0;
- Event* evt(toEvent(exec->argument(0)));
+ Event* evt(JSEvent::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsBoolean(impl.dispatchEvent(evt, ec));
return createNewWrapper<JSTestEventTarget>(globalObject, impl);
}
-TestEventTarget* toTestEventTarget(JSC::JSValue value)
+TestEventTarget* JSTestEventTarget::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestEventTarget*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestEventTarget* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
-WEBCORE_EXPORT TestEventTarget* toTestEventTarget(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestException>(globalObject, impl);
}
-TestException* toTestException(JSC::JSValue value)
+TestException* JSTestException::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestException*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestException* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestException();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
-WEBCORE_EXPORT TestException* toTestException(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestGenerateIsReachable>(globalObject, impl);
}
-TestGenerateIsReachable* toTestGenerateIsReachable(JSC::JSValue value)
+TestGenerateIsReachable* JSTestGenerateIsReachable::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestGenerateIsReachable*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestGenerateIsReachable* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestGenerateIsReachable();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
-WEBCORE_EXPORT TestGenerateIsReachable* toTestGenerateIsReachable(JSC::JSValue);
} // namespace WebCore
return;
}
TestInterface& impl = castedThis->impl();
- Node* nativeValue(toNode(value));
+ Node* nativeValue(JSNode::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setImplementsNode(nativeValue);
return;
}
TestInterface& impl = castedThis->impl();
- Node* nativeValue(toNode(value));
+ Node* nativeValue(JSNode::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
TestSupplemental::setSupplementalNode(&impl, nativeValue);
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(1)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.implementsMethod2(scriptContext, strArg, objArg, ec)));
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(1)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalMethod2(&impl, scriptContext, strArg, objArg, ec)));
return createNewWrapper<JSTestInterface>(globalObject, impl);
}
-TestInterface* toTestInterface(JSC::JSValue value)
+TestInterface* JSTestInterface::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestInterface*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestInterface* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
static void putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
-WEBCORE_EXPORT TestInterface* toTestInterface(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestMediaQueryListListener>(globalObject, impl);
}
-TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue value)
+TestMediaQueryListListener* JSTestMediaQueryListListener::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestMediaQueryListListener*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestMediaQueryListListener* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestMediaQueryListListener();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
-WEBCORE_EXPORT TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestNamedConstructor>(globalObject, impl);
}
-TestNamedConstructor* toTestNamedConstructor(JSC::JSValue value)
+TestNamedConstructor* JSTestNamedConstructor::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestNamedConstructor*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestNamedConstructor* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestNamedConstructor();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
-WEBCORE_EXPORT TestNamedConstructor* toTestNamedConstructor(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestNondeterministic>(globalObject, impl);
}
-TestNondeterministic* toTestNondeterministic(JSC::JSValue value)
+TestNondeterministic* JSTestNondeterministic::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestNondeterministic*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestNondeterministic* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestNondeterministic();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
-WEBCORE_EXPORT TestNondeterministic* toTestNondeterministic(JSC::JSValue);
} // namespace WebCore
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setTestObjAttr(nativeValue);
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setXMLObjAttr(nativeValue);
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setWithScriptStateAttributeRaises(exec, nativeValue);
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
ScriptExecutionContext* scriptContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
return;
}
TestObj& impl = castedThis->impl();
- TestObj* nativeValue(toTestObj(value));
+ TestObj* nativeValue(JSTestObj::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setWithScriptArgumentsAndCallStackAttribute(nativeValue);
return;
}
TestObj& impl = castedThis->impl();
- SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
+ SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setMutablePoint(nativeValue);
return;
}
TestObj& impl = castedThis->impl();
- SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
+ SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
if (UNLIKELY(exec->hadException()))
return;
impl.setImmutablePoint(nativeValue);
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.voidMethodWithArgs(longArg, strArg, objArg);
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.byteMethodWithArgs(byteArg, strArg, objArg));
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.octetMethodWithArgs(octetArg, strArg, objArg));
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.longMethodWithArgs(longArg, strArg, objArg));
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(2)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(2)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.objMethodWithArgs(longArg, strArg, objArg)));
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Vector<RefPtr<ScriptProfile>> sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &toScriptProfile)));
+ Vector<RefPtr<ScriptProfile>> sequenceArg((toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(exec, exec->argument(0), &JSScriptProfile::toWrapped)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.methodWithSequenceArg(sequenceArg);
const String& strArg(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
- TestObj* objArg(toTestObj(exec->argument(1)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(1)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.methodThatRequiresAllArgsAndThrows(strArg, objArg, ec)));
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 2)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestObj* objArg(toTestObj(exec->argument(0)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
const String& strArg(exec->argument(1).isEmpty() ? String() : exec->argument(1).toString(exec)->value(exec));
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestObj* objArg(toTestObj(exec->argument(0)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestObj* objArg(toTestObj(exec->argument(0)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.overloadedMethod(objArg);
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestNode* value(toTestNode(exec->argument(0)));
+ TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert1(value);
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestNode* value(toTestNode(exec->argument(0)));
+ TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert2(value);
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestNode* value(toTestNode(exec->argument(0)));
+ TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert4(value);
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- TestNode* value(toTestNode(exec->argument(0)));
+ TestNode* value(JSTestNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
impl.convert5(value);
ExceptionCode ec = 0;
if (!exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSTestObj::info()))
return throwArgumentTypeError(*exec, 0, "objArg", "TestObj", "strictFunctionWithSequence", "TestObj");
- TestObj* objArg(toTestObj(exec->argument(0)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<unsigned> a(toNativeArray<unsigned>(exec, exec->argument(1)));
ExceptionCode ec = 0;
if (!exec->argument(0).isUndefinedOrNull() && !exec->argument(0).inherits(JSTestObj::info()))
return throwArgumentTypeError(*exec, 0, "objArg", "TestObj", "strictFunctionWithArray", "TestObj");
- TestObj* objArg(toTestObj(exec->argument(0)));
+ TestObj* objArg(JSTestObj::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<int> array(toNativeArray<int>(exec, exec->argument(1)));
TestObj& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Node* head(toNode(exec->argument(0)));
+ Node* head(JSNode::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
Vector<Node*> tail;
for (unsigned i = 1, count = exec->argumentCount(); i < count; ++i) {
if (!exec->uncheckedArgument(i).inherits(JSNode::info()))
return throwArgumentTypeError(*exec, i, "tail", "TestObj", "variadicNodeMethod", "Node");
- tail.append(toNode(exec->uncheckedArgument(i)));
+ tail.append(JSNode::toWrapped(exec->uncheckedArgument(i)));
}
impl.variadicNodeMethod(head, tail);
return JSValue::encode(jsUndefined());
return createNewWrapper<JSTestObj>(globalObject, impl);
}
-TestObj* toTestObj(JSC::JSValue value)
+TestObj* JSTestObj::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestObj*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestObj* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestObj();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
-WEBCORE_EXPORT TestObj* toTestObj(JSC::JSValue);
} // namespace WebCore
JSTestOverloadedConstructorsConstructor* castedThis = jsCast<JSTestOverloadedConstructorsConstructor*>(exec->callee());
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Blob* blob(toBlob(exec->argument(0)));
+ Blob* blob(JSBlob::toWrapped(exec->argument(0)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
RefPtr<TestOverloadedConstructors> object = TestOverloadedConstructors::create(blob);
return createNewWrapper<JSTestOverloadedConstructors>(globalObject, impl);
}
-TestOverloadedConstructors* toTestOverloadedConstructors(JSC::JSValue value)
+TestOverloadedConstructors* JSTestOverloadedConstructors::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestOverloadedConstructors*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestOverloadedConstructors* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestOverloadedConstructors();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
-WEBCORE_EXPORT TestOverloadedConstructors* toTestOverloadedConstructors(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSTestSerializedScriptValueInterface>(globalObject, impl);
}
-TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue value)
+TestSerializedScriptValueInterface* JSTestSerializedScriptValueInterface::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestSerializedScriptValueInterface*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestSerializedScriptValueInterface* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSTestSerializedScriptValueInterface();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
-WEBCORE_EXPORT TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
} // namespace WebCore
TestTypedefs& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &toSerializedScriptValue)));
+ Vector<RefPtr<SerializedScriptValue>> sequenceArg((toRefPtrNativeArray<SerializedScriptValue, JSSerializedScriptValue>(exec, exec->argument(0), &JSSerializedScriptValue::toWrapped)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsNumber(impl.methodWithSequenceArg(sequenceArg));
TestTypedefs& impl = castedThis->impl();
if (exec->argumentCount() < 1)
return throwVMError(exec, createNotEnoughArgumentsError(exec));
- Vector<RefPtr<TestEventTarget>> sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &toTestEventTarget)));
+ Vector<RefPtr<TestEventTarget>> sequenceArg((toRefPtrNativeArray<TestEventTarget, JSTestEventTarget>(exec, exec->argument(0), &JSTestEventTarget::toWrapped)));
if (UNLIKELY(exec->hadException()))
return JSValue::encode(jsUndefined());
JSValue result = jsBoolean(impl.callWithSequenceThatRequiresInclude(sequenceArg));
return createNewWrapper<JSTestTypedefs>(globalObject, impl);
}
-TestTypedefs* toTestTypedefs(JSC::JSValue value)
+TestTypedefs* JSTestTypedefs::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSTestTypedefs*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static TestTypedefs* toWrapped(JSC::JSValue);
static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
static void destroy(JSC::JSCell*);
~JSTestTypedefs();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
-WEBCORE_EXPORT TestTypedefs* toTestTypedefs(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSattribute>(globalObject, impl);
}
-attribute* toattribute(JSC::JSValue value)
+attribute* JSattribute::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSattribute*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static attribute* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSattribute();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
-WEBCORE_EXPORT attribute* toattribute(JSC::JSValue);
} // namespace WebCore
return createNewWrapper<JSreadonly>(globalObject, impl);
}
-readonly* toreadonly(JSC::JSValue value)
+readonly* JSreadonly::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSreadonly*>(value))
return &wrapper->impl();
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
+ static readonly* toWrapped(JSC::JSValue);
static void destroy(JSC::JSCell*);
~JSreadonly();
}
WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
-WEBCORE_EXPORT readonly* toreadonly(JSC::JSValue);
} // namespace WebCore
static bool is(ExpectedType&) { return true; }
};
+// Downcasting functions for Element types.
+template<typename Target, typename Source>
+inline typename std::conditional<std::is_const<Source>::value, const Target&, Target&>::type downcast(Source& source)
+{
+ static_assert(!std::is_base_of<Target, Source>::value, "Unnecessary cast");
+ ASSERT_WITH_SECURITY_IMPLICATION(isElementOfType<const Target>(source));
+ return static_cast<typename std::conditional<std::is_const<Source>::value, const Target&, Target&>::type>(source);
+}
+template<typename Target, typename Source> inline typename std::conditional<std::is_const<Source>::value, const Target*, Target*>::type downcast(Source* source)
+{
+ static_assert(!std::is_base_of<Target, Source>::value, "Unnecessary cast");
+ ASSERT_WITH_SECURITY_IMPLICATION(!source || isElementOfType<const Target>(*source));
+ return static_cast<typename std::conditional<std::is_const<Source>::value, const Target*, Target*>::type>(source);
+}
+
inline bool Node::hasAttributes() const
{
return isElementNode() && toElement(this)->hasAttributes();
}
my $class = $parsedTags{$name}{interfaceName};
+ # FIXME: Rename these helpers to is<*Element>().
my $checkHelper = "is$class";
print F <<END
struct ElementTypeCastTraits<const $class, ArgType> {
static bool is(ArgType& node) { return $checkHelper(node); }
};
+
+// FIXME: Remove these macros once the code has been ported to using
+// downcast<*Element>().
+#define to$class(x) WebCore::downcast<WebCore::$class>(x)
END
;
bool isLinkClick(Event*);
bool shouldProhibitLinks(Element*);
-NODE_TYPE_CASTS(HTMLAnchorElement)
-
} // namespace WebCore
#endif // HTMLAnchorElement_h
Shape m_shape;
};
-NODE_TYPE_CASTS(HTMLAreaElement)
-
} //namespace
#endif
HTMLAudioElement(const QualifiedName&, Document&, bool);
};
-NODE_TYPE_CASTS(HTMLAudioElement)
-
} //namespace
#endif
virtual void removedFrom(ContainerNode&) override;
};
-NODE_TYPE_CASTS(HTMLBaseElement)
-
} // namespace
#endif
virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
};
-NODE_TYPE_CASTS(HTMLBodyElement)
-
} //namespace
#endif
mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platforms that have to copy the image buffer to render (and for CSSCanvasValue).
};
-NODE_TYPE_CASTS(HTMLCanvasElement)
-
} //namespace
#endif
HTMLDataListElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(HTMLDataListElement)
-
} // namespace WebCore
#endif // ENABLE(DATALIST_ELEMENT)
bool m_isOpen;
};
-NODE_TYPE_CASTS(HTMLDetailsElement)
-
} // namespace WebCore
#endif // HTMLDetailsElement_h
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
};
-NODE_TYPE_CASTS(HTMLDivElement)
-
} // namespace WebCore
#endif // HTMLDivElement_h
void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues);
};
-NODE_TYPE_CASTS(HTMLEmbedElement)
-
}
#endif
mutable uint64_t m_documentVersion;
};
-NODE_TYPE_CASTS(HTMLFieldSetElement)
-
} // namespace
#endif
#endif
};
-NODE_TYPE_CASTS(HTMLFormElement)
-
} // namespace WebCore
#endif // HTMLFormElement_h
bool m_frameBorderSet;
};
-NODE_TYPE_CASTS(HTMLFrameElement)
-
} // namespace WebCore
#endif // HTMLFrameElement_h
bool m_noresize;
};
-NODE_TYPE_CASTS(HTMLFrameSetElement)
-
} // namespace WebCore
#endif // HTMLFrameSetElement_h
virtual bool isURLAttribute(const Attribute&) const override;
};
-NODE_TYPE_CASTS(HTMLHtmlElement)
-
} // namespace
#endif
virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
};
-NODE_TYPE_CASTS(HTMLIFrameElement)
-
} // namespace WebCore
#endif // HTMLIFrameElement_h
#endif
};
-NODE_TYPE_CASTS(HTMLImageElement)
-
} //namespace
#endif
#endif
};
-NODE_TYPE_CASTS(HTMLInputElement)
-
} //namespace
#endif
virtual void focus(bool restorePreviousSelection, FocusDirection) override;
};
-NODE_TYPE_CASTS(HTMLLabelElement)
-
} //namespace
#endif
virtual HTMLFormElement* virtualForm() const override;
};
-NODE_TYPE_CASTS(HTMLLegendElement)
-
} //namespace
#endif
PendingSheetType m_pendingSheetType;
};
-NODE_TYPE_CASTS(HTMLLinkElement)
-
} //namespace
#endif
AtomicString m_name;
};
-NODE_TYPE_CASTS(HTMLMapElement)
-
} // namespaces
#endif
RenderMarquee* renderMarquee() const;
};
-NODE_TYPE_CASTS(HTMLMarqueeElement)
-
} // namespace WebCore
#endif // HTMLMarqueeElement_h
void process();
};
-NODE_TYPE_CASTS(HTMLMetaElement)
-
} // namespace WebCore
#endif
RefPtr<MeterValueElement> m_value;
};
-NODE_TYPE_CASTS(HTMLMeterElement)
-
} // namespace
#endif
bool m_shouldRecalculateItemCount : 1;
};
-NODE_TYPE_CASTS(HTMLOListElement)
-
} //namespace
#endif
bool m_useFallbackContent : 1;
};
-NODE_TYPE_CASTS(HTMLObjectElement)
-
}
#endif
void recalcSelectOptions();
};
-NODE_TYPE_CASTS(HTMLOptGroupElement)
-
} //namespace
#endif
bool m_isSelected;
};
-NODE_TYPE_CASTS(HTMLOptionElement)
-
} // namespace
#endif
virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
};
-NODE_TYPE_CASTS(HTMLParamElement)
-
} // namespace WebCore
#endif
ProgressValueElement* m_value;
};
-NODE_TYPE_CASTS(HTMLProgressElement)
-
} // namespace
#endif
virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() override;
};
-NODE_TYPE_CASTS(HTMLScriptElement)
-
} //namespace
#endif
mutable bool m_shouldRecalcListItems;
};
-NODE_TYPE_CASTS(HTMLSelectElement)
-
} // namespace
#endif
Timer<HTMLSourceElement> m_errorEventTimer;
};
-NODE_TYPE_CASTS(HTMLSourceElement)
-
} //namespace
#endif
bool m_loadedSheet;
};
-NODE_TYPE_CASTS(HTMLStyleElement)
-
} //namespace
#endif
bool supportsFocus() const override;
};
-NODE_TYPE_CASTS(HTMLSummaryElement)
-
}
#endif // HTMLSummaryElement_h
virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
};
-NODE_TYPE_CASTS(HTMLTableCaptionElement)
-
} // namespace
#endif
RefPtr<StyleProperties> m_sharedCellStyle;
};
-NODE_TYPE_CASTS(HTMLTableElement)
-
} //namespace
#endif
HTMLTableRowElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(HTMLTableRowElement)
-
} // namespace
#endif
mutable RefPtr<TemplateContentDocumentFragment> m_content;
};
-NODE_TYPE_CASTS(HTMLTemplateElement)
-
} // namespace WebCore
#endif // ENABLE(TEMPLATE_ELEMENT)
mutable bool m_wasModifiedByUser;
};
-NODE_TYPE_CASTS(HTMLTextAreaElement)
-
} //namespace
#endif
StringWithDirection m_title;
};
-NODE_TYPE_CASTS(HTMLTitleElement)
-
} //namespace
#endif
Timer<HTMLTrackElement> m_loadTimer;
};
-NODE_TYPE_CASTS(HTMLTrackElement)
-
}
#endif
AtomicString m_defaultPosterURL;
};
-NODE_TYPE_CASTS(HTMLVideoElement)
-
} //namespace
#endif
if (!value.isObject() || value.isNull())
return nullptr;
- return toNode(value.jsValue());
+ return JSNode::toWrapped(value.jsValue());
}
Deprecated::ScriptValue InspectorDOMAgent::nodeAsScriptValue(JSC::ExecState* state, Node* node)
bool m_isRadicalValue;
};
-NODE_TYPE_CASTS(MathMLMencloseElement)
-
}
#endif // ENABLE(MATHML)
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGAltGlyphDefElement)
-
}
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGAltGlyphElement)
-
} // namespace WebCore
#endif
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGAltGlyphItemElement)
-
}
#endif
Path m_path;
Path m_animationPath;
};
-
-NODE_TYPE_CASTS(SVGAnimateMotionElement)
} // namespace WebCore
SVGTransform::SVGTransformType m_type;
};
-NODE_TYPE_CASTS(SVGAnimateTransformElement)
-
} // namespace WebCore
#endif // SVGAnimateTransformElement_h
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGCircleElement)
-
} // namespace WebCore
#endif // SVGCircleElement_h
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGClipPathElement)
-
}
#endif
HashSet<SVGElement*> m_clients;
};
-NODE_TYPE_CASTS(SVGCursorElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGEllipseElement)
-
} // namespace WebCore
#endif
virtual PassRefPtr<LightSource> lightSource() const override;
};
-NODE_TYPE_CASTS(SVGFEDistantLightElement)
-
} // namespace WebCore
#endif
SVGFEFuncAElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGFEFuncAElement)
-
} // namespace WebCore
#endif
SVGFEFuncBElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGFEFuncBElement)
-
} // namespace WebCore
#endif
SVGFEFuncGElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGFEFuncGElement)
-
} // namespace WebCore
#endif
SVGFEFuncRElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGFEFuncRElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGFEMergeNodeElement)
-
} // namespace WebCore
#endif
virtual PassRefPtr<LightSource> lightSource() const override;
};
-NODE_TYPE_CASTS(SVGFEPointLightElement)
-
} // namespace WebCore
#endif
virtual PassRefPtr<LightSource> lightSource() const override;
};
-NODE_TYPE_CASTS(SVGFESpotLightElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGFilterElement)
-
}
#endif
bool m_isGlyphCacheValid;
};
-NODE_TYPE_CASTS(SVGFontElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
SVGFontElement* m_fontElement;
};
-NODE_TYPE_CASTS(SVGFontFaceElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGFontFaceNameElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGFontFaceSrcElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
CachedResourceHandle<CachedFont> m_cachedFont;
};
-NODE_TYPE_CASTS(SVGFontFaceUriElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGForeignObjectElement)
-
} // namespace WebCore
#endif
void invalidateGlyphCache();
};
-NODE_TYPE_CASTS(SVGGlyphElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
float m_dy;
};
-NODE_TYPE_CASTS(SVGGlyphRefElement)
-
}
#endif
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGHKernElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
SVGImageLoader m_imageLoader;
};
-NODE_TYPE_CASTS(SVGImageElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGLineElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGLinearGradientElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGMPathElement)
-
} // namespace WebCore
#endif // SVGMPathElement_h
mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType;
};
-NODE_TYPE_CASTS(SVGMarkerElement)
-
}
#endif
virtual void synchronizeSystemLanguage() override { SVGTests::synchronizeSystemLanguage(this); }
};
-NODE_TYPE_CASTS(SVGMaskElement)
-
}
#endif
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGMissingGlyphElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
bool m_isAnimValObserved;
};
-NODE_TYPE_CASTS(SVGPathElement)
-
} // namespace WebCore
#endif
virtual void synchronizeSystemLanguage() override { SVGTests::synchronizeSystemLanguage(this); }
};
-NODE_TYPE_CASTS(SVGPatternElement)
-
} // namespace WebCore
#endif
SVGPolygonElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGPolygonElement)
-
} // namespace WebCore
#endif
SVGPolylineElement(const QualifiedName&, Document&);
};
-NODE_TYPE_CASTS(SVGPolylineElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGRadialGradientElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGRectElement)
-
} // namespace WebCore
#endif
RefPtr<SVGViewSpec> m_viewSpec;
};
-NODE_TYPE_CASTS(SVGSVGElement)
-
} // namespace WebCore
#endif
Timer<SVGElement> m_svgLoadEventTimer;
};
-NODE_TYPE_CASTS(SVGScriptElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGStopElement)
-
} // namespace WebCore
#endif
Timer<SVGElement> m_svgLoadEventTimer;
};
-NODE_TYPE_CASTS(SVGStyleElement)
-
} // namespace WebCore
#endif // SVGStyleElement_h
virtual bool childShouldCreateRenderer(const Node&) const override;
};
-NODE_TYPE_CASTS(SVGTextElement)
-
} // namespace WebCore
#endif
END_DECLARE_ANIMATED_PROPERTIES
};
-NODE_TYPE_CASTS(SVGTextPathElement)
-
} // namespace WebCore
#endif
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGTitleElement)
-
} // namespace WebCore
#endif
Timer<SVGElement> m_svgLoadEventTimer;
};
-NODE_TYPE_CASTS(SVGUseElement)
-
}
#endif
virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
};
-NODE_TYPE_CASTS(SVGVKernElement)
-
} // namespace WebCore
#endif // ENABLE(SVG_FONTS)
SVGStringList m_viewTarget;
};
-NODE_TYPE_CASTS(SVGViewElement)
-
} // namespace WebCore
#endif
+2014-09-21 Chris Dumez <cdumez@apple.com>
+
+ Generate Element casting helper functions
+ https://bugs.webkit.org/show_bug.cgi?id=136839
+
+ Reviewed by Darin Adler.
+
+ Update some of the exported symbols on Windows for functions that were
+ renamed.
+
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+
2014-09-15 peavo@outlook.com <peavo@outlook.com>
[WinCairo] Make it easier to enable/disable GStreamer.
symbolWithPointer(??0HitTestResult@WebCore@@QAE@ABVLayoutPoint@1@IIII@Z, ??0HitTestResult@WebCore@@QEAA@AEBVLayoutPoint@1@IIII@Z)
symbolWithPointer(?isReplacementObscured@RenderEmbeddedObject@WebCore@@QBE_NXZ, ?isReplacementObscured@RenderEmbeddedObject@WebCore@@QEBA_NXZ)
symbolWithPointer(??1Range@WebCore@@QAE@XZ, ??1Range@WebCore@@QEAA@XZ)
- symbolWithPointer(?toNode@WebCore@@YAPAVNode@1@VJSValue@JSC@@@Z, ?toNode@WebCore@@YAPEAVNode@1@VJSValue@JSC@@@Z)
+ symbolWithPointer(?toWrapped@JSNode@WebCore@@SAPAVNode@2@VJSValue@JSC@@@Z, ?toWrapped@JSNode@WebCore@@SAPAVNode@2@VJSValue@JSC@@@Z)
symbolWithPointer(??0ClientRect@WebCore@@AAE@ABVFloatRect@1@@Z, ??0ClientRect@WebCore@@AEAA@AEBVFloatRect@1@@Z)
symbolWithPointer(??0ClientRect@WebCore@@AAE@ABVIntRect@1@@Z, ??0ClientRect@WebCore@@AEAA@AEBVIntRect@1@@Z)
symbolWithPointer(??0ClientRect@WebCore@@AAE@XZ, ??0ClientRect@WebCore@@AEAA@XZ)
symbolWithPointer(?text@Range@WebCore@@QBE?AVString@WTF@@XZ, ?text@Range@WebCore@@QEBA?AVString@WTF@@XZ)
?textareaTag@HTMLNames@WebCore@@3VHTMLQualifiedName@2@B
symbolWithPointer(?textContent@Node@WebCore@@QBE?AVString@WTF@@_N@Z, ?textContent@Node@WebCore@@QEBA?AVString@WTF@@_N@Z)
- symbolWithPointer(?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z, ?toDocument@WebCore@@YAPEAVDocument@1@VJSValue@JSC@@@Z)
- symbolWithPointer(?toDOMStringList@WebCore@@YA?AV?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@PAVExecState@JSC@@VJSValue@5@@Z, ?toDOMStringList@WebCore@@YA?AV?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@PEAVExecState@JSC@@VJSValue@5@@Z)
- symbolWithPointer(?toElement@WebCore@@YAPAVElement@1@VJSValue@JSC@@@Z, ?toElement@WebCore@@YAPEAVElement@1@VJSValue@JSC@@@Z)
+ symbolWithPointer(?toWrapped@JSDocument@WebCore@@SAPAVDocument@2@VJSValue@JSC@@@Z, ?toWrapped@JSDocument@WebCore@@SAPAVDocument@2@VJSValue@JSC@@@Z)
+ symbolWithPointer(?toWrapped@JSElement@WebCore@@SAPAVElement@2@VJSValue@JSC@@@Z, ?toWrapped@JSElement@WebCore@@SAPAVElement@2@VJSValue@JSC@@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVArrayBuffer@3@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVArrayBuffer@3@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVCSSStyleDeclaration@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVCSSStyleDeclaration@1@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVClientRect@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVClientRect@1@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNode@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVNode@1@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVRange@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVRange@1@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNodeList@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVNodeList@1@@Z)
- symbolWithPointer(?toRange@WebCore@@YAPAVRange@1@VJSValue@JSC@@@Z, ?toRange@WebCore@@YAPEAVRange@1@VJSValue@JSC@@@Z)
+ symbolWithPointer(?toWrapped@JSRange@WebCore@@SAPAVRange@2@VJSValue@JSC@@@Z, ?toWrapped@JSRange@WebCore@@SAPAVRange@2@VJSValue@JSC@@@Z)
symbolWithPointer(?isTreeScope@Node@WebCore@@QBE_NXZ, ?isTreeScope@Node@WebCore@@QEBA_NXZ)
symbolWithPointer(?updateEditorUINowIfScheduled@Editor@WebCore@@QAEXXZ, ?updateEditorUINowIfScheduled@Editor@WebCore@@QEAAXXZ)
symbolWithPointer(?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXW4RunPostLayoutTasks@12@@Z, ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QEAAXW4RunPostLayoutTasks@12@@Z)
symbolWithPointer(?toUInt32EnforceRange@WebCore@@YAIPAVExecState@JSC@@VJSValue@3@@Z, ?toUInt32EnforceRange@WebCore@@YAIPEAVExecState@JSC@@VJSValue@3@@Z)
symbolWithPointer(?toUInt64@WebCore@@YA_KPAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z, ?toUInt64@WebCore@@YA_KPEAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z)
#if ENABLE(VIDEO)
- symbolWithPointer(?toTimeRanges@WebCore@@YAPAVTimeRanges@1@VJSValue@JSC@@@Z, ?toTimeRanges@WebCore@@YAPEAVTimeRanges@1@VJSValue@JSC@@@Z)
+ symbolWithPointer(?toWrapped@JSTimeRanges@WebCore@@SAPAVTimeRanges@2@VJSValue@JSC@@@Z, ?toWrapped@JSTimeRanges@WebCore@@SAPAVTimeRanges@2@VJSValue@JSC@@@Z)
symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVTimeRanges@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVTimeRanges@1@@Z)
symbolWithPointer(?nearest@TimeRanges@WebCore@@QBENN@Z, ?nearest@TimeRanges@WebCore@@QEBANN@Z)
symbolWithPointer(?add@TimeRanges@WebCore@@QAEXNN@Z, ?add@TimeRanges@WebCore@@QEAAXNN@Z)
+2014-09-21 Chris Dumez <cdumez@apple.com>
+
+ Generate Element casting helper functions
+ https://bugs.webkit.org/show_bug.cgi?id=136839
+
+ Reviewed by Darin Adler.
+
+ Use JSXXX::toWrapped() instead of toXXX() function.
+
+ * DOM/WebDOMOperations.mm:
+ * WebView/WebView.mm:
+ (-[WebView _notificationIDForTesting:]):
+
2014-09-21 Joseph Pecoraro <pecoraro@apple.com>
Leak: WebNotificationPrivate ObjC leaks seen on leaks bot
ExecState* exec = toJS(context);
JSLockHolder lock(exec);
- return kit(toElement(toJS(exec, value)));
+ return kit(JSElement::toWrapped(toJS(exec, value)));
}
@end
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
JSContextRef context = [[self mainFrame] globalContext];
- WebCore::Notification* notification = toNotification(toJS(toJS(context), jsNotification));
+ WebCore::Notification* notification = JSNotification::toWrapped(toJS(toJS(context), jsNotification));
return static_cast<WebNotificationClient*>(NotificationController::clientFrom(_private->page))->notificationIDForTesting(notification);
#else
return 0;
+2014-09-21 Chris Dumez <cdumez@apple.com>
+
+ Generate Element casting helper functions
+ https://bugs.webkit.org/show_bug.cgi?id=136839
+
+ Reviewed by Darin Adler.
+
+ Use JSXXX::toWrapped() instead of toXXX() function.
+
+ * WebView.cpp:
+ (WebView::elementFromJS):
+
2014-09-06 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: convert DockSide to an enum class
JSC::ExecState* exec = toJS(context);
JSC::JSLockHolder lock(exec);
- Element* elt = toElement(toJS(exec, nodeObject));
+ Element* elt = JSElement::toWrapped(toJS(exec, nodeObject));
if (!elt)
return E_FAIL;
+2014-09-21 Chris Dumez <cdumez@apple.com>
+
+ Generate Element casting helper functions
+ https://bugs.webkit.org/show_bug.cgi?id=136839
+
+ Reviewed by Darin Adler.
+
+ Use JSXXX::toWrapped() instead of toXXX() function.
+
+ * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
+ (WebKit::InjectedBundleNodeHandle::getOrCreate):
+ * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
+ (WebKit::InjectedBundleRangeHandle::getOrCreate):
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::webNotificationID):
+
2014-09-19 Ryosuke Niwa <rniwa@webkit.org>
WebContent crash in WebKit::WebPage::expandedRangeFromHandle
PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::getOrCreate(JSContextRef, JSObjectRef object)
{
- Node* node = toNode(toJS(object));
+ Node* node = JSNode::toWrapped(toJS(object));
return getOrCreate(node);
}
PassRefPtr<InjectedBundleRangeHandle> InjectedBundleRangeHandle::getOrCreate(JSContextRef, JSObjectRef object)
{
- Range* range = toRange(toJS(object));
+ Range* range = JSRange::toWrapped(toJS(object));
return getOrCreate(range);
}
uint64_t InjectedBundle::webNotificationID(JSContextRef jsContext, JSValueRef jsNotification)
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- WebCore::Notification* notification = toNotification(toJS(toJS(jsContext), jsNotification));
+ WebCore::Notification* notification = JSNotification::toWrapped(toJS(toJS(jsContext), jsNotification));
if (!notification)
return 0;
return WebProcess::shared().supplement<WebNotificationManager>()->notificationIDForTesting(notification);