Writing constructorCallback()s in *Custom.cpp is a convention of custom bindings of JSC and V8. We can rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp.
Created attachment 175343 [details] Patch
Comment on attachment 175343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=175343&action=review > Source/WebCore/bindings/v8/custom/V8HTMLImageElementCustom.cpp:80 > + int width; > + int height; > + int* optionalWidth = 0; > + int* optionalHeight = 0; > + if (args.Length() > 0) { > + width = toInt32(args[0]); > + optionalWidth = &width; > + } > + if (args.Length() > 1) { > + height = toInt32(args[1]); > + optionalHeight = &height; > + } > + > + RefPtr<HTMLImageElement> image = HTMLImageElement::createForJSConstructor(document, optionalWidth, optionalHeight); This weird logic prevents me from killing HTMLImageElement's custom constructor... We need to distinguish 'new Image()' from 'new Image(null, null)' and 'new Image(undefined, undefined)'. Maybe we need to support overloaded constructors for NamedConstructor, which would be over-engineering.
Comment on attachment 175343 [details] Patch ok
Comment on attachment 175343 [details] Patch Clearing flags on attachment: 175343 Committed r135358: <http://trac.webkit.org/changeset/135358>
All reviewed patches have been landed. Closing bug.
Reverted r135358 for reason: It broke Chromium/Linux build Committed r135361: <http://trac.webkit.org/changeset/135361>
Created attachment 175382 [details] Patch
Comment on attachment 175382 [details] Patch Clearing flags on attachment: 175382 Committed r135368: <http://trac.webkit.org/changeset/135368>