Summary: | Update defineCustomElement according to the spec rewrite | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cdumez, commit-queue, esprehn+autocc, gyuyoung.kim, kangil.han, koivisto, kondapallykalyan, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 154907 | ||||||
Attachments: |
|
Description
Ryosuke Niwa
2016-03-03 22:36:07 PST
Created attachment 272835 [details]
Fixes the bug
Comment on attachment 272835 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=272835&action=review r=me with questions > Source/WebCore/dom/CustomElementDefinitions.h:55 > + bool containsInterface(const JSC::JSObject*) const; Would naming this "containsConstructor" make more sense? > Source/WebCore/dom/Document.idl:298 > + void defineElement(DOMString tagName, CustomElementInterface elementInterface); The spec has: void defineElement(DOMString type, Function constructor, optional ElementRegistrationOptions options); Why the mismatch? Comment on attachment 272835 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=272835&action=review Thanks for the review! >> Source/WebCore/dom/CustomElementDefinitions.h:55 >> + bool containsInterface(const JSC::JSObject*) const; > > Would naming this "containsConstructor" make more sense? Renamed. >> Source/WebCore/dom/Document.idl:298 >> + void defineElement(DOMString tagName, CustomElementInterface elementInterface); > > The spec has: > void defineElement(DOMString type, Function constructor, optional ElementRegistrationOptions options); > > Why the mismatch? Changed it to: void defineElement(DOMString localName, Function constructor); since we don't support the optional options argument which is used to subclass subclasses of HTMLElement; e.g. HTMLInputElement. I've also filed a Github issue to rename the first argument to localName: https://github.com/w3c/webcomponents/issues/416 since type is too generic name and doesn't match the argument name of createElement. Committed r197602: <http://trac.webkit.org/changeset/197602> |