Generate Element casting helper functions
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Sep 2014 03:51:55 +0000 (03:51 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Sep 2014 03:51:55 +0000 (03:51 +0000)
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

167 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/plugins/QuickTimePluginReplacement.mm
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp
Source/WebCore/bindings/js/JSBlobCustom.cpp
Source/WebCore/bindings/js/JSCommandLineAPIHostCustom.cpp
Source/WebCore/bindings/js/JSDOMFormDataCustom.cpp
Source/WebCore/bindings/js/JSDOMStringListCustom.cpp
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDictionary.cpp
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/bindings/js/JSEventTargetCustom.cpp
Source/WebCore/bindings/js/JSExceptionBase.cpp
Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp
Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp
Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp
Source/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
Source/WebCore/bindings/js/JSMessageEventCustom.cpp
Source/WebCore/bindings/js/JSMessagePortCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JSNodeFilterCustom.cpp
Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp
Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.h
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSattribute.h
Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
Source/WebCore/bindings/scripts/test/JS/JSreadonly.h
Source/WebCore/dom/Element.h
Source/WebCore/dom/make_names.pl
Source/WebCore/html/HTMLAnchorElement.h
Source/WebCore/html/HTMLAreaElement.h
Source/WebCore/html/HTMLAudioElement.h
Source/WebCore/html/HTMLBaseElement.h
Source/WebCore/html/HTMLBodyElement.h
Source/WebCore/html/HTMLCanvasElement.h
Source/WebCore/html/HTMLDataListElement.h
Source/WebCore/html/HTMLDetailsElement.h
Source/WebCore/html/HTMLDivElement.h
Source/WebCore/html/HTMLEmbedElement.h
Source/WebCore/html/HTMLFieldSetElement.h
Source/WebCore/html/HTMLFormElement.h
Source/WebCore/html/HTMLFrameElement.h
Source/WebCore/html/HTMLFrameSetElement.h
Source/WebCore/html/HTMLHtmlElement.h
Source/WebCore/html/HTMLIFrameElement.h
Source/WebCore/html/HTMLImageElement.h
Source/WebCore/html/HTMLInputElement.h
Source/WebCore/html/HTMLLabelElement.h
Source/WebCore/html/HTMLLegendElement.h
Source/WebCore/html/HTMLLinkElement.h
Source/WebCore/html/HTMLMapElement.h
Source/WebCore/html/HTMLMarqueeElement.h
Source/WebCore/html/HTMLMetaElement.h
Source/WebCore/html/HTMLMeterElement.h
Source/WebCore/html/HTMLOListElement.h
Source/WebCore/html/HTMLObjectElement.h
Source/WebCore/html/HTMLOptGroupElement.h
Source/WebCore/html/HTMLOptionElement.h
Source/WebCore/html/HTMLParamElement.h
Source/WebCore/html/HTMLProgressElement.h
Source/WebCore/html/HTMLScriptElement.h
Source/WebCore/html/HTMLSelectElement.h
Source/WebCore/html/HTMLSourceElement.h
Source/WebCore/html/HTMLStyleElement.h
Source/WebCore/html/HTMLSummaryElement.h
Source/WebCore/html/HTMLTableCaptionElement.h
Source/WebCore/html/HTMLTableElement.h
Source/WebCore/html/HTMLTableRowElement.h
Source/WebCore/html/HTMLTemplateElement.h
Source/WebCore/html/HTMLTextAreaElement.h
Source/WebCore/html/HTMLTitleElement.h
Source/WebCore/html/HTMLTrackElement.h
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/mathml/MathMLMencloseElement.h
Source/WebCore/svg/SVGAltGlyphDefElement.h
Source/WebCore/svg/SVGAltGlyphElement.h
Source/WebCore/svg/SVGAltGlyphItemElement.h
Source/WebCore/svg/SVGAnimateMotionElement.h
Source/WebCore/svg/SVGAnimateTransformElement.h
Source/WebCore/svg/SVGCircleElement.h
Source/WebCore/svg/SVGClipPathElement.h
Source/WebCore/svg/SVGCursorElement.h
Source/WebCore/svg/SVGEllipseElement.h
Source/WebCore/svg/SVGFEDistantLightElement.h
Source/WebCore/svg/SVGFEFuncAElement.h
Source/WebCore/svg/SVGFEFuncBElement.h
Source/WebCore/svg/SVGFEFuncGElement.h
Source/WebCore/svg/SVGFEFuncRElement.h
Source/WebCore/svg/SVGFEMergeNodeElement.h
Source/WebCore/svg/SVGFEPointLightElement.h
Source/WebCore/svg/SVGFESpotLightElement.h
Source/WebCore/svg/SVGFilterElement.h
Source/WebCore/svg/SVGFontElement.h
Source/WebCore/svg/SVGFontFaceElement.h
Source/WebCore/svg/SVGFontFaceNameElement.h
Source/WebCore/svg/SVGFontFaceSrcElement.h
Source/WebCore/svg/SVGFontFaceUriElement.h
Source/WebCore/svg/SVGForeignObjectElement.h
Source/WebCore/svg/SVGGlyphElement.h
Source/WebCore/svg/SVGGlyphRefElement.h
Source/WebCore/svg/SVGHKernElement.h
Source/WebCore/svg/SVGImageElement.h
Source/WebCore/svg/SVGLineElement.h
Source/WebCore/svg/SVGLinearGradientElement.h
Source/WebCore/svg/SVGMPathElement.h
Source/WebCore/svg/SVGMarkerElement.h
Source/WebCore/svg/SVGMaskElement.h
Source/WebCore/svg/SVGMissingGlyphElement.h
Source/WebCore/svg/SVGPathElement.h
Source/WebCore/svg/SVGPatternElement.h
Source/WebCore/svg/SVGPolygonElement.h
Source/WebCore/svg/SVGPolylineElement.h
Source/WebCore/svg/SVGRadialGradientElement.h
Source/WebCore/svg/SVGRectElement.h
Source/WebCore/svg/SVGSVGElement.h
Source/WebCore/svg/SVGScriptElement.h
Source/WebCore/svg/SVGStopElement.h
Source/WebCore/svg/SVGStyleElement.h
Source/WebCore/svg/SVGTextElement.h
Source/WebCore/svg/SVGTextPathElement.h
Source/WebCore/svg/SVGTitleElement.h
Source/WebCore/svg/SVGUseElement.h
Source/WebCore/svg/SVGVKernElement.h
Source/WebCore/svg/SVGViewElement.h
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/DOM/WebDOMOperations.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

index 144d6af..efed152 100644 (file)
@@ -1,3 +1,311 @@
+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
index 369abb1..ead6dc6 100644 (file)
@@ -213,7 +213,7 @@ bool QuickTimePluginReplacement::installReplacement(ShadowRoot* root)
     // 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);
index 874e51e..af0d5ab 100644 (file)
@@ -77,6 +77,7 @@ __ZN7WebCore10FloatPointC1ERK7CGPoint
 __ZN7WebCore10FloatPointC1ERKNS_8IntPointE
 __ZN7WebCore10FontGlyphs15releaseFontDataEv
 __ZN7WebCore10JSDocument6s_infoE
+__ZN7WebCore10JSDocument9toWrappedEN3JSC7JSValueE
 __ZN7WebCore10LayoutRect5scaleEf
 __ZN7WebCore10LayoutRect5uniteERKS0_
 __ZN7WebCore10LayoutRectC1ERKNS_9FloatRectE
@@ -124,7 +125,6 @@ __ZN7WebCore10TimeRangesC1Edd
 __ZN7WebCore10deleteFileERKN3WTF6StringE
 __ZN7WebCore10fileExistsERKN3WTF6StringE
 __ZN7WebCore10setCookiesEPNS_8DocumentERKNS_3URLERKN3WTF6StringE
-__ZN7WebCore10toDocumentEN3JSC7JSValueE
 __ZN7WebCore11BitmapImage13getCGImageRefEv
 __ZN7WebCore11BitmapImageC1EP7CGImagePNS_13ImageObserverE
 __ZN7WebCore11BitmapImageC1EPNS_13ImageObserverE
@@ -667,7 +667,6 @@ __ZN7WebCore15originalURLDataEP5NSURL
 __ZN7WebCore15pathGetFileNameERKN3WTF6StringE
 __ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueEPNS_12CachedScriptE
 __ZN7WebCore15setDOMExceptionEPN3JSC9ExecStateEi
-__ZN7WebCore15toDOMStringListEPN3JSC9ExecStateENS0_7JSValueE
 __ZN7WebCore15visitedLinkHashEPKtj
 __ZN7WebCore15visitedLinkHashERKN3WTF6StringE
 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE
@@ -1242,6 +1241,7 @@ __ZN7WebCore6Editor7commandERKN3WTF6StringE
 __ZN7WebCore6Editor7copyURLERKNS_3URLERKN3WTF6StringE
 __ZN7WebCore6Editor7outdentEv
 __ZN7WebCore6JSNode6s_infoE
+__ZN7WebCore6JSNode9toWrappedEN3JSC7JSValueE
 __ZN7WebCore6LengthC1EN3WTF7PassRefINS_16CalculationValueEEE
 __ZN7WebCore6Region21updateBoundsFromShapeEv
 __ZN7WebCore6Region5uniteERKS0_
@@ -1259,7 +1259,6 @@ __ZN7WebCore6Widget8setFocusEb
 __ZN7WebCore6Widget9setParentEPNS_10ScrollViewE
 __ZN7WebCore6WidgetD2Ev
 __ZN7WebCore6toInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
-__ZN7WebCore6toNodeEN3JSC7JSValueE
 __ZN7WebCore7Element12setAttributeERKN3WTF12AtomicStringES4_Ri
 __ZN7WebCore7Element12setAttributeERKNS_13QualifiedNameERKN3WTF12AtomicStringE
 __ZN7WebCore7Element16createShadowRootERi
@@ -1273,6 +1272,7 @@ __ZN7WebCore7IntRectC1ERKNS_10LayoutRectE
 __ZN7WebCore7IntRectC1ERKNS_9FloatRectE
 __ZN7WebCore7IntSizeC1ERK6CGSize
 __ZN7WebCore7IntSizeC1ERKNS_9FloatSizeE
+__ZN7WebCore7JSRange9toWrappedEN3JSC7JSValueE
 __ZN7WebCore7TextRun19allowsRoundingHacksEv
 __ZN7WebCore7TextRun21s_allowsRoundingHacksE
 __ZN7WebCore7TextRun22setAllowsRoundingHacksEb
@@ -1281,7 +1281,6 @@ __ZN7WebCore7jsArrayEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEN3WTF10PassRefPtrI
 __ZN7WebCore7makeRGBEiii
 __ZN7WebCore7toInt16EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
 __ZN7WebCore7toInt64EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
-__ZN7WebCore7toRangeEN3JSC7JSValueE
 __ZN7WebCore7toUInt8EPN3JSC9ExecStateENS0_7JSValueENS_30IntegerConversionConfigurationE
 __ZN7WebCore8BlobData14setContentTypeERKN3WTF6StringE
 __ZN7WebCore8CSSValue7destroyEv
@@ -1495,6 +1494,7 @@ __ZN7WebCore9InlineBox14dirtyLineBoxesEv
 __ZN7WebCore9InlineBox14selectionStateEv
 __ZN7WebCore9InlineBox16placeEllipsisBoxEbfffRfRb
 __ZN7WebCore9JSElement6s_infoE
+__ZN7WebCore9JSElement9toWrappedEN3JSC7JSValueE
 __ZN7WebCore9LayerPoolC1Ev
 __ZN7WebCore9LayerPoolD1Ev
 __ZN7WebCore9PageCache11setCapacityEi
@@ -1535,7 +1535,6 @@ __ZN7WebCore9fontCacheEv
 __ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
 __ZN7WebCore9pageCacheEv
 __ZN7WebCore9plainTextEPKNS_5RangeEtb
-__ZN7WebCore9toElementEN3JSC7JSValueE
 __ZN7WebCore9unionRectERKN3WTF6VectorINS_9FloatRectELm0ENS0_15CrashOnOverflowEEE
 __ZNK3JSC8Bindings10RootObject12globalObjectEv
 __ZNK3WTF6String14createCFStringEv
@@ -3205,7 +3204,7 @@ __ZN7WebCore8Document13getTouchRectsERN3WTF6VectorINS_7IntRectELm0ENS1_15CrashOn
 
 #if ENABLE(MEDIA_SOURCE)
 __ZN7WebCore12SourceBuffer25bufferedSamplesForTrackIDERKN3WTF12AtomicStringE
-__ZN7WebCore14toSourceBufferEN3JSC7JSValueE
+__ZN7WebCore14JSSourceBuffer9toWrappedEN3JSC7JSValueE
 __ZN7WebCore26MockMediaPlayerMediaSource19registerMediaEngineEPFvPFN3WTF10PassOwnPtrINS_27MediaPlayerPrivateInterfaceEEEPNS_11MediaPlayerEEPFvRNS1_7HashSetINS1_6StringENS1_10StringHashENS1_10HashTraitsISA_EEEEEPFNS5_12SupportsTypeERKNS_28MediaEngineSupportParametersEEPFvRNS1_6VectorISA_Lm0ENS1_15CrashOnOverflowEEEEPFvvEPFvRKSA_EPFbSX_SX_EE
 #endif
 
@@ -3257,7 +3256,7 @@ __ZN7WebCore12Notification18dispatchErrorEventEv
 __ZN7WebCore12Notification8finalizeEv
 __ZN7WebCore12NotificationC1Ev
 __ZN7WebCore12NotificationD1Ev
-__ZN7WebCore14toNotificationEN3JSC7JSValueE
+__ZN7WebCore14JSNotification9toWrappedEN3JSC7JSValueE
 __ZN7WebCore19provideNotificationEPNS_4PageEPNS_18NotificationClientE
 __ZN7WebCore22NotificationController10clientFromEPNS_4PageE
 #endif
@@ -3369,7 +3368,7 @@ __ZN7WebCore12EventHandler16handleTouchEventERKNS_18PlatformTouchEventE
 #if ENABLE(VIDEO)
 .objc_class_name_WebVideoFullscreenController
 __ZN7WebCore10TimeRanges3addEdd
-__ZN7WebCore12toTimeRangesEN3JSC7JSValueE
+__ZN7WebCore12JSTimeRanges9toWrappedEN3JSC7JSValueE
 __ZN7WebCore16HTMLMediaElement12endScrubbingEv
 __ZN7WebCore16HTMLMediaElement14beginScrubbingEv
 __ZN7WebCore16HTMLMediaElement14exitFullscreenEv
index e6b5064..f3d9dbf 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore {
 
 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;
index 293afb3..ade5a0a 100644 (file)
@@ -121,7 +121,7 @@ EncodedJSValue JSC_HOST_CALL constructJSBlob(ExecState* exec)
             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);
index 79548e8..7e86db6 100644 (file)
@@ -113,7 +113,7 @@ JSValue JSCommandLineAPIHost::getEventListeners(ExecState* exec)
     if (!value.isObject() || value.isNull())
         return jsUndefined();
 
-    Node* node = toNode(value);
+    Node* node = JSNode::toWrapped(value);
     if (!node)
         return jsUndefined();
 
@@ -149,7 +149,7 @@ JSValue JSCommandLineAPIHost::databaseId(ExecState* exec)
         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
@@ -162,7 +162,7 @@ JSValue JSCommandLineAPIHost::storageId(ExecState* exec)
     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));
 
index 31b180b..7ec2495 100644 (file)
@@ -41,18 +41,16 @@ using namespace JSC;
 
 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())));
 }
@@ -66,7 +64,7 @@ JSValue JSDOMFormData::append(ExecState* exec)
             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));
     }
index 23337b2..00e141b 100644 (file)
@@ -25,7 +25,7 @@ using namespace JSC;
 
 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();
index 5f3b517..b0fdf65 100644 (file)
@@ -684,7 +684,7 @@ JSValue JSDOMWindow::removeEventListener(ExecState* exec)
     return jsUndefined();
 }
 
-DOMWindow* toDOMWindow(JSValue value)
+DOMWindow* JSDOMWindow::toWrapped(JSValue value)
 {
     if (!value.isObject())
         return 0;
index 1af026d..20d8f83 100644 (file)
@@ -155,22 +155,22 @@ void JSDictionary::convertValue(ExecState* exec, JSValue value, RefPtr<Serialize
 
 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)
@@ -222,31 +222,31 @@ void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<Uint
 #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)
@@ -261,7 +261,7 @@ void JSDictionary::convertValue(JSC::ExecState* exec, JSC::JSValue value, RefPtr
 #if ENABLE(GAMEPAD)
 void JSDictionary::convertValue(JSC::ExecState*, JSC::JSValue value, RefPtr<Gamepad>& result)
 {
-    result = toGamepad(value);
+    result = JSGamepad::toWrapped(value);
 }
 #endif
 
index fa24443..6bf1674 100644 (file)
@@ -121,7 +121,7 @@ JSValue JSDocument::createTouchList(ExecState* exec)
     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());
 }
index 5210f12..c7c7450 100644 (file)
@@ -58,7 +58,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ
     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)
index bde25b0..a9b639e 100644 (file)
@@ -41,20 +41,20 @@ namespace WebCore {
 
 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
 
index 1d40c60..207ab71 100644 (file)
@@ -40,7 +40,7 @@ void JSHTMLMediaElement::setController(ExecState*, JSValue value)
     // 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));
 }
 
 }
index 74a5867..069022b 100644 (file)
@@ -63,7 +63,7 @@ void JSHTMLOptionsCollection::indexSetter(ExecState* exec, unsigned index, JSVal
 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);
@@ -81,7 +81,7 @@ JSValue JSHTMLOptionsCollection::remove(ExecState* exec)
 {
     // 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));
index 43f694b..146e242 100644 (file)
@@ -43,7 +43,7 @@ JSValue JSHTMLSelectElement::remove(ExecState* 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));
@@ -58,7 +58,7 @@ void selectIndexSetter(HTMLSelectElement* select, JSC::ExecState* exec, unsigned
         select->removeByIndex(index);
     else {
         ExceptionCode ec = 0;
-        HTMLOptionElement* option = toHTMLOptionElement(value);
+        HTMLOptionElement* option = JSHTMLOptionElement::toWrapped(value);
         if (!option)
             ec = TYPE_MISMATCH_ERR;
         else
index f4b555f..c250b5f 100644 (file)
@@ -131,7 +131,7 @@ JSValue JSInspectorFrontendHost::showContextMenu(ExecState* exec)
 #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;
index ba9e3cc..d627f0c 100644 (file)
@@ -95,7 +95,7 @@ static JSC::JSValue handleInitMessageEvent(JSMessageEvent* jsEvent, JSC::ExecSta
     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()) {
index 75abe18..98a74b5 100644 (file)
@@ -84,7 +84,7 @@ void fillMessagePortArray(JSC::ExecState* exec, JSC::JSValue value, MessagePortA
         }
 
         // 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)) {
index d3624e1..cb9e9d7 100644 (file)
@@ -135,7 +135,7 @@ bool JSNodeOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, v
 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);
@@ -145,7 +145,7 @@ JSValue JSNode::insertBefore(ExecState* exec)
 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);
@@ -155,7 +155,7 @@ JSValue JSNode::replaceChild(ExecState* exec)
 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);
@@ -165,7 +165,7 @@ JSValue JSNode::removeChild(ExecState* exec)
 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);
index 28c16c1..62d1b1c 100644 (file)
@@ -35,7 +35,7 @@ void JSNodeFilter::visitAdditionalChildren(JSC::SlotVisitor& visitor)
     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();
index f405a03..b2a6488 100644 (file)
@@ -145,7 +145,7 @@ JSValue JSSubtleCrypto::encrypt(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+    RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
     if (!key)
         return throwTypeError(exec);
 
@@ -197,7 +197,7 @@ JSValue JSSubtleCrypto::decrypt(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+    RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
     if (!key)
         return throwTypeError(exec);
 
@@ -248,7 +248,7 @@ JSValue JSSubtleCrypto::sign(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+    RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
     if (!key)
         return throwTypeError(exec);
 
@@ -299,7 +299,7 @@ JSValue JSSubtleCrypto::verify(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+    RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
     if (!key)
         return throwTypeError(exec);
 
@@ -600,7 +600,7 @@ JSValue JSSubtleCrypto::exportKey(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> key = toCryptoKey(exec->uncheckedArgument(1));
+    RefPtr<CryptoKey> key = JSCryptoKey::toWrapped(exec->uncheckedArgument(1));
     if (!key)
         return throwTypeError(exec);
 
@@ -630,11 +630,11 @@ JSValue JSSubtleCrypto::wrapKey(ExecState* 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);
 
@@ -713,7 +713,7 @@ JSValue JSSubtleCrypto::unwrapKey(ExecState* exec)
         return jsUndefined();
     }
 
-    RefPtr<CryptoKey> unwrappingKey = toCryptoKey(exec->uncheckedArgument(2));
+    RefPtr<CryptoKey> unwrappingKey = JSCryptoKey::toWrapped(exec->uncheckedArgument(2));
     if (!unwrappingKey)
         return throwTypeError(exec);
 
index c5f2161..800280d 100644 (file)
@@ -257,7 +257,7 @@ JSValue JSWebGLRenderingContext::getAttachedShaders(ExecState* 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;
@@ -341,7 +341,7 @@ JSValue JSWebGLRenderingContext::getProgramParameter(ExecState* 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);
     unsigned pname = exec->uncheckedArgument(1).toInt32(exec);
@@ -369,7 +369,7 @@ JSValue JSWebGLRenderingContext::getShaderParameter(ExecState* 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();
@@ -405,10 +405,10 @@ JSValue JSWebGLRenderingContext::getUniform(ExecState* 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);
-    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);
@@ -478,7 +478,7 @@ static JSC::JSValue dataFunctionf(DataFunctionToCall f, JSC::ExecState* exec, We
     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
@@ -564,7 +564,7 @@ static JSC::JSValue dataFunctioni(DataFunctionToCall f, JSC::ExecState* exec, We
     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);
   
@@ -624,7 +624,7 @@ static JSC::JSValue dataFunctionMatrix(DataFunctionMatrixToCall f, JSC::ExecStat
     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);
 
index c9edcfa..8161b32 100644 (file)
@@ -148,11 +148,11 @@ JSValue JSXMLHttpRequest::send(ExecState* 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())) {
index 28f22da..41d18e6 100644 (file)
@@ -784,12 +784,12 @@ private:
                 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);
@@ -797,7 +797,7 @@ private:
                     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());
@@ -805,7 +805,7 @@ private:
                 write(blob->size());
                 return true;
             }
-            if (ImageData* data = toImageData(obj)) {
+            if (ImageData* data = JSImageData::toWrapped(obj)) {
                 write(ImageDataTag);
                 write(data->width());
                 write(data->height());
@@ -865,7 +865,7 @@ private:
                 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;
index 8d54da1..bfe81d8 100644 (file)
@@ -874,6 +874,17 @@ sub GenerateHeader
         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);
@@ -1166,15 +1177,6 @@ sub GenerateHeader
     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");
     }
@@ -3112,7 +3114,7 @@ END
     }
 
     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");
@@ -3243,7 +3245,7 @@ sub GenerateParametersCheck
 
         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");
@@ -3296,7 +3298,7 @@ sub GenerateParametersCheck
                 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");
@@ -3849,7 +3851,7 @@ sub JSValueToNative
 
     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") {
@@ -3881,7 +3883,7 @@ sub JSValueToNative
     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)";
     }
@@ -3892,7 +3894,7 @@ sub JSValueToNative
 
     # Default, assume autogenerated type conversion routines
     AddToImplIncludes("JS$type.h", $conditional);
-    return "to$type($value)";
+    return "JS${type}::toWrapped($value)";
 }
 
 sub NativeToJSValue
index 71938fb..0dba311 100644 (file)
@@ -214,7 +214,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct
     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);
@@ -289,7 +289,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestActiveDO
     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();
index 55c2ef9..3a43a0e 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
@@ -93,7 +94,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestActiveDOMObject*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
-WEBCORE_EXPORT TestActiveDOMObject* toTestActiveDOMObject(JSC::JSValue);
 
 
 } // namespace WebCore
index 568c9de..14459fb 100644 (file)
@@ -263,7 +263,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestCustomNa
     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();
index 1eb35d8..9c54653 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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*);
@@ -97,7 +98,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestCustomNamedGetter*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
-WEBCORE_EXPORT TestCustomNamedGetter* toTestCustomNamedGetter(JSC::JSValue);
 
 
 } // namespace WebCore
index 8eafa07..f6ac646 100644 (file)
@@ -292,7 +292,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventCon
     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();
index 5bbeec8..c3e3325 100644 (file)
@@ -40,6 +40,7 @@ public:
 
     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();
 
@@ -93,7 +94,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestEventConstructor*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
-WEBCORE_EXPORT TestEventConstructor* toTestEventConstructor(JSC::JSValue);
 
 bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
 
index db333d2..e850da0 100644 (file)
@@ -294,7 +294,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe
     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));
@@ -364,7 +364,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestEventTar
     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();
index eb0a2d9..19a9982 100644 (file)
@@ -39,6 +39,7 @@ public:
 
     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*);
@@ -101,7 +102,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestEventTarget*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
-WEBCORE_EXPORT TestEventTarget* toTestEventTarget(JSC::JSValue);
 
 
 } // namespace WebCore
index 4ade76e..bf8fe12 100644 (file)
@@ -239,7 +239,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestExceptio
     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();
index 3984574..9cf9edd 100644 (file)
@@ -39,6 +39,7 @@ public:
 
     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();
@@ -94,7 +95,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestException*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
-WEBCORE_EXPORT TestException* toTestException(JSC::JSValue);
 
 
 } // namespace WebCore
index 427aba8..eb4b911 100644 (file)
@@ -211,7 +211,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestGenerate
     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();
index df7bddb..d18e10c 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -91,7 +92,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestGenerateIsReachable*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
-WEBCORE_EXPORT TestGenerateIsReachable* toTestGenerateIsReachable(JSC::JSValue);
 
 
 } // namespace WebCore
index b143cc4..e61ac64 100644 (file)
@@ -724,7 +724,7 @@ void setJSTestInterfaceImplementsNode(ExecState* exec, JSObject* baseObject, Enc
         return;
     }
     TestInterface& impl = castedThis->impl();
-    Node* nativeValue(toNode(value));
+    Node* nativeValue(JSNode::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setImplementsNode(nativeValue);
@@ -795,7 +795,7 @@ void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* baseObject, E
         return;
     }
     TestInterface& impl = castedThis->impl();
-    Node* nativeValue(toNode(value));
+    Node* nativeValue(JSNode::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     TestSupplemental::setSupplementalNode(&impl, nativeValue);
@@ -841,7 +841,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionImplementsMethod2(E
     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)));
@@ -907,7 +907,7 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2
     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)));
@@ -973,7 +973,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestInterfac
     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();
index 7dd8d03..9d116ac 100644 (file)
@@ -40,6 +40,7 @@ public:
 
     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);
@@ -120,7 +121,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestInterface*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface*);
-WEBCORE_EXPORT TestInterface* toTestInterface(JSC::JSValue);
 
 
 } // namespace WebCore
index 3e9311e..7d31a15 100644 (file)
@@ -227,7 +227,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestMediaQue
     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();
index 55735eb..52d8d84 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -91,7 +92,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestMediaQueryListListener*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
-WEBCORE_EXPORT TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue);
 
 
 } // namespace WebCore
index 7546dcc..7e59318 100644 (file)
@@ -281,7 +281,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNamedCon
     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();
index ece9887..ef823a2 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -92,7 +93,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestNamedConstructor*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
-WEBCORE_EXPORT TestNamedConstructor* toTestNamedConstructor(JSC::JSValue);
 
 
 } // namespace WebCore
index e173aac..b61bda0 100644 (file)
@@ -534,7 +534,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestNondeter
     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();
index f52ebbd..099117d 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -91,7 +92,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestNondeterministic*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
-WEBCORE_EXPORT TestNondeterministic* toTestNondeterministic(JSC::JSValue);
 
 
 } // namespace WebCore
index e434dec..64fd94b 100644 (file)
@@ -2078,7 +2078,7 @@ void setJSTestObjTestObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSVal
         return;
     }
     TestObj& impl = castedThis->impl();
-    TestObj* nativeValue(toTestObj(value));
+    TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setTestObjAttr(nativeValue);
@@ -2098,7 +2098,7 @@ void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* baseObject, EncodedJSValu
         return;
     }
     TestObj& impl = castedThis->impl();
-    TestObj* nativeValue(toTestObj(value));
+    TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setXMLObjAttr(nativeValue);
@@ -2454,7 +2454,7 @@ void setJSTestObjWithScriptExecutionContextAttribute(ExecState* exec, JSObject*
         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();
@@ -2477,7 +2477,7 @@ void setJSTestObjWithScriptStateAttributeRaises(ExecState* exec, JSObject* baseO
         return;
     }
     TestObj& impl = castedThis->impl();
-    TestObj* nativeValue(toTestObj(value));
+    TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setWithScriptStateAttributeRaises(exec, nativeValue);
@@ -2497,7 +2497,7 @@ void setJSTestObjWithScriptExecutionContextAttributeRaises(ExecState* exec, JSOb
         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();
@@ -2520,7 +2520,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttribute(ExecState* ex
         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();
@@ -2543,7 +2543,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises(ExecSta
         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();
@@ -2566,7 +2566,7 @@ void setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute(Exe
         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();
@@ -2589,7 +2589,7 @@ void setJSTestObjWithScriptArgumentsAndCallStackAttribute(ExecState* exec, JSObj
         return;
     }
     TestObj& impl = castedThis->impl();
-    TestObj* nativeValue(toTestObj(value));
+    TestObj* nativeValue(JSTestObj::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setWithScriptArgumentsAndCallStackAttribute(nativeValue);
@@ -2740,7 +2740,7 @@ void setJSTestObjMutablePoint(ExecState* exec, JSObject* baseObject, EncodedJSVa
         return;
     }
     TestObj& impl = castedThis->impl();
-    SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
+    SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setMutablePoint(nativeValue);
@@ -2760,7 +2760,7 @@ void setJSTestObjImmutablePoint(ExecState* exec, JSObject* baseObject, EncodedJS
         return;
     }
     TestObj& impl = castedThis->impl();
-    SVGPropertyTearOff<SVGPoint>* nativeValue(toSVGPoint(value));
+    SVGPropertyTearOff<SVGPoint>* nativeValue(JSSVGPoint::toWrapped(value));
     if (UNLIKELY(exec->hadException()))
         return;
     impl.setImmutablePoint(nativeValue);
@@ -2939,7 +2939,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecSt
     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);
@@ -2974,7 +2974,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionByteMethodWithArgs(ExecSt
     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));
@@ -3009,7 +3009,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOctetMethodWithArgs(ExecS
     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));
@@ -3044,7 +3044,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionLongMethodWithArgs(ExecSt
     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));
@@ -3079,7 +3079,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecSta
     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)));
@@ -3096,7 +3096,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(Exe
     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);
@@ -3153,7 +3153,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs
     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)));
@@ -3669,7 +3669,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1(
     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));
@@ -3689,7 +3689,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2(
     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());
 
@@ -3801,7 +3801,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(
     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);
@@ -4121,7 +4121,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec)
     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);
@@ -4138,7 +4138,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec)
     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);
@@ -4155,7 +4155,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
     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);
@@ -4172,7 +4172,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec)
     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);
@@ -4254,7 +4254,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithSequenc
     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)));
@@ -4279,7 +4279,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunctionWithArray(E
     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)));
@@ -4341,14 +4341,14 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVariadicNodeMethod(ExecSt
     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());
@@ -4434,7 +4434,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestObj* imp
     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();
index 3c0bfc5..4402960 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
@@ -106,7 +107,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestObj*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
-WEBCORE_EXPORT TestObj* toTestObj(JSC::JSValue);
 
 
 } // namespace WebCore
index 6308d9e..a6211d3 100644 (file)
@@ -118,7 +118,7 @@ EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJ
     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);
@@ -283,7 +283,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestOverload
     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();
index 9c76bae..e8fe1d6 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -91,7 +92,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestOverloadedConstructors*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
-WEBCORE_EXPORT TestOverloadedConstructors* toTestOverloadedConstructors(JSC::JSValue);
 
 
 } // namespace WebCore
index 867d0c0..8f257bf 100644 (file)
@@ -362,7 +362,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestSerializ
     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();
index a48bc8e..7a57cc6 100644 (file)
@@ -40,6 +40,7 @@ public:
 
     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();
 
@@ -97,7 +98,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestSerializedScriptValueInt
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
-WEBCORE_EXPORT TestSerializedScriptValueInterface* toTestSerializedScriptValueInterface(JSC::JSValue);
 
 
 } // namespace WebCore
index e2a93aa..bb24718 100644 (file)
@@ -574,7 +574,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceAr
     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));
@@ -697,7 +697,7 @@ EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionCallWithSequenceThat
     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));
@@ -769,7 +769,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, TestTypedefs
     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();
index 7e5ec8d..20f246b 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
@@ -93,7 +94,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, TestTypedefs*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
-WEBCORE_EXPORT TestTypedefs* toTestTypedefs(JSC::JSValue);
 
 
 } // namespace WebCore
index ba46d8c..d187633 100644 (file)
@@ -224,7 +224,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, attribute* i
     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();
index 297ad26..9f5cdc9 100644 (file)
@@ -39,6 +39,7 @@ public:
 
     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();
 
@@ -92,7 +93,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, attribute*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
-WEBCORE_EXPORT attribute* toattribute(JSC::JSValue);
 
 
 } // namespace WebCore
index ed4a44b..890145f 100644 (file)
@@ -182,7 +182,7 @@ JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject* globalObject, readonly* im
     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();
index b6efa4a..b5a4094 100644 (file)
@@ -38,6 +38,7 @@ public:
 
     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();
 
@@ -91,7 +92,6 @@ inline void* wrapperContext(DOMWrapperWorld& world, readonly*)
 }
 
 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
-WEBCORE_EXPORT readonly* toreadonly(JSC::JSValue);
 
 
 } // namespace WebCore
index f6c201d..9c8b340 100644 (file)
@@ -689,6 +689,21 @@ struct ElementTypeCastTraits<ExpectedType, ExpectedType> {
     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();
index 389c2b8..ca839e9 100755 (executable)
@@ -633,6 +633,7 @@ sub printTypeHelpers
         }
 
         my $class = $parsedTags{$name}{interfaceName};
+        # FIXME: Rename these helpers to is<*Element>().
         my $checkHelper = "is$class";
 
         print F <<END
@@ -663,6 +664,10 @@ template <typename ArgType>
 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
         ;
 
index 4669163..232b025 100644 (file)
@@ -155,8 +155,6 @@ bool isEnterKeyKeydownEvent(Event*);
 bool isLinkClick(Event*);
 bool shouldProhibitLinks(Element*);
 
-NODE_TYPE_CASTS(HTMLAnchorElement)
-
 } // namespace WebCore
 
 #endif // HTMLAnchorElement_h
index ac07e98..8db7589 100644 (file)
@@ -71,8 +71,6 @@ private:
     Shape m_shape;
 };
 
-NODE_TYPE_CASTS(HTMLAreaElement)
-
 } //namespace
 
 #endif
index 30d2a8f..7e8658c 100644 (file)
@@ -43,8 +43,6 @@ private:
     HTMLAudioElement(const QualifiedName&, Document&, bool);
 };
 
-NODE_TYPE_CASTS(HTMLAudioElement)
-
 } //namespace
 
 #endif
index 4054e17..b799f1f 100644 (file)
@@ -44,8 +44,6 @@ private:
     virtual void removedFrom(ContainerNode&) override;
 };
 
-NODE_TYPE_CASTS(HTMLBaseElement)
-
 } // namespace
 
 #endif
index 017efc2..0d4d60a 100644 (file)
@@ -81,8 +81,6 @@ private:
     virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
 };
 
-NODE_TYPE_CASTS(HTMLBodyElement)
-
 } //namespace
 
 #endif
index 8837d08..8abde77 100644 (file)
@@ -180,8 +180,6 @@ private:
     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
index 67fb1db..cf1d3ff 100644 (file)
@@ -50,8 +50,6 @@ private:
     HTMLDataListElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(HTMLDataListElement)
-
 } // namespace WebCore
 #endif // ENABLE(DATALIST_ELEMENT)
 
index c41f6f4..073cd59 100644 (file)
@@ -44,8 +44,6 @@ private:
     bool m_isOpen;
 };
 
-NODE_TYPE_CASTS(HTMLDetailsElement)
-
 } // namespace WebCore
 
 #endif // HTMLDetailsElement_h
index 1b5d20a..ff81b9b 100644 (file)
@@ -40,8 +40,6 @@ private:
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
 };
 
-NODE_TYPE_CASTS(HTMLDivElement)
-
 } // namespace WebCore
 
 #endif // HTMLDivElement_h
index d9fd452..cdd3bec 100644 (file)
@@ -52,8 +52,6 @@ private:
     void parametersForPlugin(Vector<String>& paramNames, Vector<String>& paramValues);
 };
 
-NODE_TYPE_CASTS(HTMLEmbedElement)
-
 }
 
 #endif
index 7c13ea0..3a02230 100644 (file)
@@ -64,8 +64,6 @@ private:
     mutable uint64_t m_documentVersion;
 };
 
-NODE_TYPE_CASTS(HTMLFieldSetElement)
-
 } // namespace
 
 #endif
index c469dce..fc3db9d 100644 (file)
@@ -201,8 +201,6 @@ private:
 #endif
 };
 
-NODE_TYPE_CASTS(HTMLFormElement)
-
 } // namespace WebCore
 
 #endif // HTMLFormElement_h
index 5579c98..6e4fb0f 100644 (file)
@@ -54,8 +54,6 @@ private:
     bool m_frameBorderSet;
 };
 
-NODE_TYPE_CASTS(HTMLFrameElement)
-
 } // namespace WebCore
 
 #endif // HTMLFrameElement_h
index 80e7f2a..272938c 100644 (file)
@@ -100,8 +100,6 @@ private:
     bool m_noresize;
 };
 
-NODE_TYPE_CASTS(HTMLFrameSetElement)
-
 } // namespace WebCore
 
 #endif // HTMLFrameSetElement_h
index b966c87..0f83b9a 100644 (file)
@@ -41,8 +41,6 @@ private:
     virtual bool isURLAttribute(const Attribute&) const override;
 };
 
-NODE_TYPE_CASTS(HTMLHtmlElement)
-
 } // namespace
 
 #endif
index 9ae1932..f0ebcec 100644 (file)
@@ -47,8 +47,6 @@ private:
     virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
 };
 
-NODE_TYPE_CASTS(HTMLIFrameElement)
-
 } // namespace WebCore
 
 #endif // HTMLIFrameElement_h
index fd44018..99fe25b 100644 (file)
@@ -143,8 +143,6 @@ private:
 #endif
 };
 
-NODE_TYPE_CASTS(HTMLImageElement)
-
 } //namespace
 
 #endif
index e3885bc..d7a65cd 100644 (file)
@@ -448,7 +448,5 @@ private:
 #endif
 };
 
-NODE_TYPE_CASTS(HTMLInputElement)
-
 } //namespace
 #endif
index aea5237..ca8ee60 100644 (file)
@@ -55,8 +55,6 @@ private:
     virtual void focus(bool restorePreviousSelection, FocusDirection) override;
 };
 
-NODE_TYPE_CASTS(HTMLLabelElement)
-
 } //namespace
 
 #endif
index 24568bd..9104abd 100644 (file)
@@ -45,8 +45,6 @@ private:
     virtual HTMLFormElement* virtualForm() const override;
 };
 
-NODE_TYPE_CASTS(HTMLLegendElement)
-
 } //namespace
 
 #endif
index 49701f8..5cacb77 100644 (file)
@@ -137,8 +137,6 @@ private:
     PendingSheetType m_pendingSheetType;
 };
 
-NODE_TYPE_CASTS(HTMLLinkElement)
-
 } //namespace
 
 #endif
index 9ae4467..617aa13 100644 (file)
@@ -54,8 +54,6 @@ private:
     AtomicString m_name;
 };
 
-NODE_TYPE_CASTS(HTMLMapElement)
-
 } // namespaces
 
 #endif
index d10982b..9639e96 100644 (file)
@@ -64,8 +64,6 @@ private:
     RenderMarquee* renderMarquee() const;
 };
 
-NODE_TYPE_CASTS(HTMLMarqueeElement)
-
 } // namespace WebCore
 
 #endif // HTMLMarqueeElement_h
index 25d1a77..8be6dda 100644 (file)
@@ -44,8 +44,6 @@ private:
     void process();
 };
 
-NODE_TYPE_CASTS(HTMLMetaElement)
-
 } // namespace WebCore
 
 #endif
index 9d82172..a28cb44 100644 (file)
@@ -81,8 +81,6 @@ private:
     RefPtr<MeterValueElement> m_value;
 };
 
-NODE_TYPE_CASTS(HTMLMeterElement)
-
 } // namespace
 
 #endif
index 989d795..1f0aaf1 100644 (file)
@@ -65,8 +65,6 @@ private:
     bool m_shouldRecalculateItemCount : 1;
 };
 
-NODE_TYPE_CASTS(HTMLOListElement)
-
 } //namespace
 
 #endif
index 2c49193..f8e7a6e 100644 (file)
@@ -103,8 +103,6 @@ private:
     bool m_useFallbackContent : 1;
 };
 
-NODE_TYPE_CASTS(HTMLObjectElement)
-
 }
 
 #endif
index 689ce4b..57a3742 100644 (file)
@@ -54,8 +54,6 @@ private:
     void recalcSelectOptions();
 };
 
-NODE_TYPE_CASTS(HTMLOptGroupElement)
-
 } //namespace
 
 #endif
index 647d01e..654ef11 100644 (file)
@@ -87,8 +87,6 @@ private:
     bool m_isSelected;
 };
 
-NODE_TYPE_CASTS(HTMLOptionElement)
-
 } // namespace
 
 #endif
index 4e81d2d..ed9b4eb 100644 (file)
@@ -43,8 +43,6 @@ private:
     virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
 };
 
-NODE_TYPE_CASTS(HTMLParamElement)
-
 } // namespace WebCore
 
 #endif
index eedb880..c7fd955 100644 (file)
@@ -67,8 +67,6 @@ private:
     ProgressValueElement* m_value;
 };
 
-NODE_TYPE_CASTS(HTMLProgressElement)
-
 } // namespace
 
 #endif
index b8501b4..68d96a3 100644 (file)
@@ -67,8 +67,6 @@ private:
     virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() override;
 };
 
-NODE_TYPE_CASTS(HTMLScriptElement)
-
 } //namespace
 
 #endif
index fa9cbe4..27fefd6 100644 (file)
@@ -212,8 +212,6 @@ private:
     mutable bool m_shouldRecalcListItems;
 };
 
-NODE_TYPE_CASTS(HTMLSelectElement)
-
 } // namespace
 
 #endif
index 555875c..522d743 100644 (file)
@@ -57,8 +57,6 @@ private:
     Timer<HTMLSourceElement> m_errorEventTimer;
 };
 
-NODE_TYPE_CASTS(HTMLSourceElement)
-
 } //namespace
 
 #endif
index 9957ba5..91f0b7c 100644 (file)
@@ -70,8 +70,6 @@ private:
     bool m_loadedSheet;
 };
 
-NODE_TYPE_CASTS(HTMLStyleElement)
-
 } //namespace
 
 #endif
index fbabcde..bc22842 100644 (file)
@@ -46,8 +46,6 @@ private:
     bool supportsFocus() const override;
 };
 
-NODE_TYPE_CASTS(HTMLSummaryElement)
-
 }
 
 #endif // HTMLSummaryElement_h
index f064e28..904c327 100644 (file)
@@ -41,8 +41,6 @@ private:
     virtual void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStyleProperties&) override;
 };
 
-NODE_TYPE_CASTS(HTMLTableCaptionElement)
-
 } // namespace
 
 #endif
index e596ab4..873df25 100644 (file)
@@ -101,8 +101,6 @@ private:
     RefPtr<StyleProperties> m_sharedCellStyle;
 };
 
-NODE_TYPE_CASTS(HTMLTableElement)
-
 } //namespace
 
 #endif
index 338b879..c4b0f77 100644 (file)
@@ -52,8 +52,6 @@ private:
     HTMLTableRowElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(HTMLTableRowElement)
-
 } // namespace
 
 #endif
index d7ff951..c81f7a6 100644 (file)
@@ -56,8 +56,6 @@ private:
     mutable RefPtr<TemplateContentDocumentFragment> m_content;
 };
 
-NODE_TYPE_CASTS(HTMLTemplateElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(TEMPLATE_ELEMENT)
index a801f99..bedd0a1 100644 (file)
@@ -126,8 +126,6 @@ private:
     mutable bool m_wasModifiedByUser;
 };
 
-NODE_TYPE_CASTS(HTMLTextAreaElement)
-
 } //namespace
 
 #endif
index ebe1d3c..5de1eb5 100644 (file)
@@ -46,8 +46,6 @@ private:
     StringWithDirection m_title;
 };
 
-NODE_TYPE_CASTS(HTMLTitleElement)
-
 } //namespace
 
 #endif
index 831717b..526dc03 100644 (file)
@@ -94,8 +94,6 @@ private:
     Timer<HTMLTrackElement> m_loadTimer;
 };
 
-NODE_TYPE_CASTS(HTMLTrackElement)
-
 }
 
 #endif
index c4d4f9d..76f0165 100644 (file)
@@ -102,8 +102,6 @@ private:
     AtomicString m_defaultPosterURL;
 };
 
-NODE_TYPE_CASTS(HTMLVideoElement)
-
 } //namespace
 
 #endif
index fd7e923..d2df4a8 100644 (file)
@@ -2010,7 +2010,7 @@ Node* InspectorDOMAgent::scriptValueAsNode(Deprecated::ScriptValue value)
     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)
index dc69c11..ee97335 100755 (executable)
@@ -50,8 +50,6 @@ private:
     bool m_isRadicalValue;
 };
 
-NODE_TYPE_CASTS(MathMLMencloseElement)
-
 }
 
 #endif // ENABLE(MATHML)
index acb2f35..c63e343 100644 (file)
@@ -38,8 +38,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGAltGlyphDefElement)
-
 }
 
 #endif
index 5095ab5..6be9f75 100644 (file)
@@ -55,8 +55,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGAltGlyphElement)
-
 } // namespace WebCore
 
 #endif
index 8249cb8..c7afe69 100644 (file)
@@ -38,8 +38,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGAltGlyphItemElement)
-
 }
 
 #endif
index 3667814..417d5f2 100644 (file)
@@ -70,8 +70,6 @@ private:
     Path m_path;
     Path m_animationPath;
 };
-
-NODE_TYPE_CASTS(SVGAnimateMotionElement)
     
 } // namespace WebCore
 
index bdcff70..b1a44ea 100644 (file)
@@ -47,8 +47,6 @@ private:
     SVGTransform::SVGTransformType m_type;
 };
 
-NODE_TYPE_CASTS(SVGAnimateTransformElement)
-
 } // namespace WebCore
 
 #endif // SVGAnimateTransformElement_h
index 079fa99..ec182db 100644 (file)
@@ -54,8 +54,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGCircleElement)
-
 } // namespace WebCore
 
 #endif // SVGCircleElement_h
index 8fdeb02..938cfb4 100644 (file)
@@ -56,8 +56,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGClipPathElement)
-
 }
 
 #endif
index a5301e4..ea223e8 100644 (file)
@@ -72,8 +72,6 @@ private:
     HashSet<SVGElement*> m_clients;
 };
 
-NODE_TYPE_CASTS(SVGCursorElement)
-
 } // namespace WebCore
 
 #endif
index d6b20f6..5b9f92c 100644 (file)
@@ -55,8 +55,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGEllipseElement)
-
 } // namespace WebCore
 
 #endif
index 799f6d5..60ea443 100644 (file)
@@ -34,8 +34,6 @@ private:
     virtual PassRefPtr<LightSource> lightSource() const override;
 };
 
-NODE_TYPE_CASTS(SVGFEDistantLightElement)
-
 } // namespace WebCore
 
 #endif
index 31ebb4f..a4e6ad5 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGFEFuncAElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGFEFuncAElement)
-
 } // namespace WebCore
 
 #endif
index 35bc448..af49d6f 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGFEFuncBElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGFEFuncBElement)
-
 } // namespace WebCore
 
 #endif
index 39857ed..1afa432 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGFEFuncGElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGFEFuncGElement)
-
 } // namespace WebCore
 
 #endif
index 9e7327c..b0d0eb5 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGFEFuncRElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGFEFuncRElement)
-
 } // namespace WebCore
 
 #endif
index 51597eb..7233f23 100644 (file)
@@ -44,8 +44,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGFEMergeNodeElement)
-
 } // namespace WebCore
 
 #endif
index b701be5..3457924 100644 (file)
@@ -34,8 +34,6 @@ private:
     virtual PassRefPtr<LightSource> lightSource() const override;
 };
 
-NODE_TYPE_CASTS(SVGFEPointLightElement)
-
 } // namespace WebCore
 
 #endif
index 8039af2..ff6b48c 100644 (file)
@@ -34,8 +34,6 @@ private:
     virtual PassRefPtr<LightSource> lightSource() const override;
 };
 
-NODE_TYPE_CASTS(SVGFESpotLightElement)
-
 } // namespace WebCore
 
 #endif
index 8ea73fb..1939e31 100644 (file)
@@ -75,8 +75,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGFilterElement)
-
 }
 
 #endif
index 8e4274d..eb5c46e 100644 (file)
@@ -102,8 +102,6 @@ private:
     bool m_isGlyphCacheValid;
 };
 
-NODE_TYPE_CASTS(SVGFontElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 6a2116a..dcd01f2 100644 (file)
@@ -66,8 +66,6 @@ private:
     SVGFontElement* m_fontElement;
 };
 
-NODE_TYPE_CASTS(SVGFontFaceElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 3f25445..c685f8a 100644 (file)
@@ -39,8 +39,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGFontFaceNameElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 3b0914c..ba5a644 100644 (file)
@@ -40,8 +40,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGFontFaceSrcElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 189a789..350f1fd 100644 (file)
@@ -50,8 +50,6 @@ private:
     CachedResourceHandle<CachedFont> m_cachedFont;
 };
 
-NODE_TYPE_CASTS(SVGFontFaceUriElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 75bb74b..ab4d1af 100644 (file)
@@ -58,8 +58,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGForeignObjectElement)
-
 } // namespace WebCore
 
 #endif
index 7b7d38a..4009fb6 100644 (file)
@@ -57,8 +57,6 @@ private:
     void invalidateGlyphCache();
 };
 
-NODE_TYPE_CASTS(SVGGlyphElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 6d8cac7..464feec 100644 (file)
@@ -61,8 +61,6 @@ private:
     float m_dy;
 };
 
-NODE_TYPE_CASTS(SVGGlyphRefElement)
-
 }
 
 #endif
index e5d8b78..1c19e05 100644 (file)
@@ -42,8 +42,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGHKernElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 1a361c5..176761d 100644 (file)
@@ -72,8 +72,6 @@ private:
     SVGImageLoader m_imageLoader;
 };
 
-NODE_TYPE_CASTS(SVGImageElement)
-
 } // namespace WebCore
 
 #endif
index 64e7863..53fead6 100644 (file)
@@ -55,8 +55,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGLineElement)
-
 } // namespace WebCore
 
 #endif
index 68ac6b8..46d92de 100644 (file)
@@ -54,8 +54,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGLinearGradientElement)
-
 } // namespace WebCore
 
 #endif
index 9732648..1be64a6 100644 (file)
@@ -68,8 +68,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGMPathElement)
-
 } // namespace WebCore
 
 #endif // SVGMPathElement_h
index 1b930e6..b522cb7 100644 (file)
@@ -164,8 +164,6 @@ private:
     mutable SVGSynchronizableAnimatedProperty<SVGMarkerOrientType> m_orientType;
 };
 
-NODE_TYPE_CASTS(SVGMarkerElement)
-
 }
 
 #endif
index f50a946..22eddbc 100644 (file)
@@ -68,8 +68,6 @@ private:
     virtual void synchronizeSystemLanguage() override { SVGTests::synchronizeSystemLanguage(this); }
 };
 
-NODE_TYPE_CASTS(SVGMaskElement)
-
 }
 
 #endif
index f5637ee..94a4267 100644 (file)
@@ -36,8 +36,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGMissingGlyphElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 021b6f1..b64b4c5 100644 (file)
@@ -129,8 +129,6 @@ private:
     bool m_isAnimValObserved;
 };
 
-NODE_TYPE_CASTS(SVGPathElement)
-
 } // namespace WebCore
 
 #endif
index 22c7c20..492cd68 100644 (file)
@@ -86,8 +86,6 @@ private:
     virtual void synchronizeSystemLanguage() override { SVGTests::synchronizeSystemLanguage(this); }
 };
 
-NODE_TYPE_CASTS(SVGPatternElement)
-
 } // namespace WebCore
 
 #endif
index a62de20..d90ddab 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGPolygonElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGPolygonElement)
-
 } // namespace WebCore
 
 #endif
index 4b5e841..a091ec6 100644 (file)
@@ -33,8 +33,6 @@ private:
     SVGPolylineElement(const QualifiedName&, Document&);
 };
 
-NODE_TYPE_CASTS(SVGPolylineElement)
-
 } // namespace WebCore
 
 #endif
index e56fb2f..12bf4ed 100644 (file)
@@ -56,8 +56,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGRadialGradientElement)
-
 } // namespace WebCore
 
 #endif
index 72eb875..3cee8d9 100644 (file)
@@ -58,8 +58,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGRectElement)
-
 } // namespace WebCore
 
 #endif
index efb42ed..2782272 100644 (file)
@@ -175,8 +175,6 @@ private:
     RefPtr<SVGViewSpec> m_viewSpec;
 };
 
-NODE_TYPE_CASTS(SVGSVGElement)
-
 } // namespace WebCore
 
 #endif
index 572f79d..9acdbdb 100644 (file)
@@ -86,8 +86,6 @@ private:
     Timer<SVGElement> m_svgLoadEventTimer;
 };
 
-NODE_TYPE_CASTS(SVGScriptElement)
-
 } // namespace WebCore
 
 #endif
index d879b4e..7da37c6 100644 (file)
@@ -49,8 +49,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGStopElement)
-
 } // namespace WebCore
 
 #endif
index 6a91e38..1e73175 100644 (file)
@@ -68,8 +68,6 @@ private:
     Timer<SVGElement> m_svgLoadEventTimer;
 };
 
-NODE_TYPE_CASTS(SVGStyleElement)
-
 } // namespace WebCore
 
 #endif // SVGStyleElement_h
index a8c0b72..43084d5 100644 (file)
@@ -38,8 +38,6 @@ private:
     virtual bool childShouldCreateRenderer(const Node&) const override;
 };
 
-NODE_TYPE_CASTS(SVGTextElement)
-
 } // namespace WebCore
 
 #endif
index 0a4ff67..f244bc3 100644 (file)
@@ -143,8 +143,6 @@ private:
     END_DECLARE_ANIMATED_PROPERTIES
 };
 
-NODE_TYPE_CASTS(SVGTextPathElement)
-
 } // namespace WebCore
 
 #endif
index c84a603..075b239 100644 (file)
@@ -40,8 +40,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGTitleElement)
-
 } // namespace WebCore
 
 #endif
index 3f10ee9..b732f18 100644 (file)
@@ -128,8 +128,6 @@ private:
     Timer<SVGElement> m_svgLoadEventTimer;
 };
 
-NODE_TYPE_CASTS(SVGUseElement)
-
 }
 
 #endif
index ce88de5..180bc76 100644 (file)
@@ -41,8 +41,6 @@ private:
     virtual bool rendererIsNeeded(const RenderStyle&) override { return false; }
 };
 
-NODE_TYPE_CASTS(SVGVKernElement)
-
 } // namespace WebCore
 
 #endif // ENABLE(SVG_FONTS)
index 251d730..4b44d9c 100644 (file)
@@ -65,8 +65,6 @@ private:
     SVGStringList m_viewTarget;
 };
 
-NODE_TYPE_CASTS(SVGViewElement)
-
 } // namespace WebCore
 
 #endif
index f14463f..ab515ca 100644 (file)
@@ -1,3 +1,15 @@
+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.
index ed408d6..fbe8394 100644 (file)
@@ -153,7 +153,7 @@ EXPORTS
         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)
@@ -310,9 +310,8 @@ EXPORTS
         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)
@@ -320,7 +319,7 @@ EXPORTS
         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)
@@ -449,7 +448,7 @@ EXPORTS
         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)
index 2919304..3e40d2a 100644 (file)
@@ -1,3 +1,16 @@
+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
index e4fb766..50a9d8f 100644 (file)
@@ -74,7 +74,7 @@ using namespace JSC;
 
     ExecState* exec = toJS(context);
     JSLockHolder lock(exec);
-    return kit(toElement(toJS(exec, value)));
+    return kit(JSElement::toWrapped(toJS(exec, value)));
 }
 
 @end
index 1df4e32..d6edc07 100644 (file)
@@ -8618,7 +8618,7 @@ static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity
 {
 #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;
index 2150f28..51f7c21 100644 (file)
@@ -1,3 +1,15 @@
+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
index 9438375..e3dc6c1 100644 (file)
@@ -5974,7 +5974,7 @@ HRESULT STDMETHODCALLTYPE WebView::elementFromJS(
 
     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;
 
index cfdfef2..781cbd5 100644 (file)
@@ -1,3 +1,19 @@
+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
index cdddc81..1dc0b4b 100644 (file)
@@ -70,7 +70,7 @@ static DOMHandleCache& domHandleCache()
 
 PassRefPtr<InjectedBundleNodeHandle> InjectedBundleNodeHandle::getOrCreate(JSContextRef, JSObjectRef object)
 {
-    Node* node = toNode(toJS(object));
+    Node* node = JSNode::toWrapped(toJS(object));
     return getOrCreate(node);
 }
 
index f63391b..9ac8b3c 100644 (file)
@@ -57,7 +57,7 @@ static DOMHandleCache& domHandleCache()
 
 PassRefPtr<InjectedBundleRangeHandle> InjectedBundleRangeHandle::getOrCreate(JSContextRef, JSObjectRef object)
 {
-    Range* range = toRange(toJS(object));
+    Range* range = JSRange::toWrapped(toJS(object));
     return getOrCreate(range);
 }
 
index 1a6727b..5eb95c0 100644 (file)
@@ -597,7 +597,7 @@ void InjectedBundle::removeAllWebNotificationPermissions(WebPage* page)
 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);