DescriptionMake HTMLAllCollection named property getter behave more according to spec
Make HTMLAllCollection named property getter behave more according to spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection-0
The following changes were made:
1. namedItem() should be marked as named getter in IDL as per the spec.
This also means we can get rid of the anonymous named getter in our
IDL.
2. The named getter should be enumerable as per Web IDL, meaning that
elements id / names should be enumerated. The supported property names
are spec'd at:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection-0
This change is also consistent with IE11. Mozilla does not seem to
support enumerating document.all?
3. The named property getter returns more types of elements by name (a, area,
frame, frameset, iframe). Its still returns select and input elements as
well, even though this is against spec, for backward compatibility.
This behavior is consistent with IE11 and Firefox 27.
This CL also gets rid of the custom bindings for namedItem() now that the
bindings generator has better support for returning union types.
R=haraken, arv, tkent
BUG=341269
TEST=fast/dom/htmlallcollection-enumerated-properties.html
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167126
Patch Set 1 #Patch Set 2 : Add layout test #Patch Set 3 : Add FIXME comment #Patch Set 4 : Fix clang build #
Total comments: 1
Patch Set 5 : Fix linking error #
Total comments: 8
Patch Set 6 : Rebase and get rid of code duplication #
Messages
Total messages: 21 (0 generated)
|