Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Issue 158563004: Make HTMLAllCollection named property getter behave more according to spec (Closed)

Created:
6 years, 10 months ago by Inactive
Modified:
6 years, 10 months ago
CC:
blink-reviews, apavlov+blink_chromium.org, adamk+blink_chromium.org, aandrey+blink_chromium.org, Nils Barth (inactive), caseq+blink_chromium.org, kojih, arv+blink, yurys+blink_chromium.org, abarth-chromium, marja+watch_chromium.org, dglazkov+blink, devtools-reviews_chromium.org, loislo+blink_chromium.org, sof, lushnikov+blink_chromium.org, eustas+blink_chromium.org, paulirish+reviews_chromium.org, Nate Chapin, jsbell+bindings_chromium.org, alph+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, watchdog-blink-watchlist_google.com
Visibility:
Public.

Description

Make 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -22 lines) Patch
A LayoutTests/fast/dom/htmlallcollection-enumerated-properties.html View 1 1 chunk +47 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt View 1 1 chunk +15 lines, -0 lines 0 comments Download
M LayoutTests/inspector/console/console-format-collections-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/v8/custom/V8HTMLAllCollectionCustom.cpp View 1 chunk +0 lines, -15 lines 0 comments Download
M Source/core/html/HTMLAllCollection.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLAllCollection.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLAllCollection.idl View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 2 3 4 5 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Inactive
https://codereview.chromium.org/158563004/diff/130001/LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt File LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt (right): https://codereview.chromium.org/158563004/diff/130001/LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt#newcode7 LayoutTests/fast/dom/htmlallcollection-enumerated-properties-expected.txt:7: FAIL htmlAllCollection.__proto__.__proto__ should be [object Object]. Was [object Object]. ...
6 years, 10 months ago (2014-02-11 20:36:00 UTC) #1
arv (Not doing code reviews)
FYI: Mozilla does support document.all On Tue, Feb 11, 2014 at 3:36 PM, <ch.dumez@samsung.com> wrote: ...
6 years, 10 months ago (2014-02-11 20:43:35 UTC) #2
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode65 Source/core/html/HTMLAllCollection.cpp:65: || element.hasLocalName(inputTag) // FIXME: Not according to spec. ...
6 years, 10 months ago (2014-02-11 20:48:41 UTC) #3
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode65 Source/core/html/HTMLAllCollection.cpp:65: || element.hasLocalName(inputTag) // FIXME: Not according to spec. On ...
6 years, 10 months ago (2014-02-11 20:50:36 UTC) #4
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode65 Source/core/html/HTMLAllCollection.cpp:65: || element.hasLocalName(inputTag) // FIXME: Not according to spec. On ...
6 years, 10 months ago (2014-02-11 20:55:09 UTC) #5
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode65 Source/core/html/HTMLAllCollection.cpp:65: || element.hasLocalName(inputTag) // FIXME: Not according to spec. On ...
6 years, 10 months ago (2014-02-11 21:02:38 UTC) #6
Inactive
I don't quite understand Firefox 27's behavior: http://jsfiddle.net/jAx2t/5/ When I load this is Firefox 27, ...
6 years, 10 months ago (2014-02-11 21:08:31 UTC) #7
arv (Not doing code reviews)
On 2014/02/11 21:08:31, Chris Dumez wrote: > I don't quite understand Firefox 27's behavior: > ...
6 years, 10 months ago (2014-02-11 21:28:43 UTC) #8
haraken
LGTM except for arv's concern about the spec. Probably we can exclude the controversial part ...
6 years, 10 months ago (2014-02-12 01:23:00 UTC) #9
Inactive
On 2014/02/12 01:23:00, haraken wrote: > LGTM except for arv's concern about the spec. Probably ...
6 years, 10 months ago (2014-02-12 01:26:19 UTC) #10
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode79 Source/core/html/HTMLAllCollection.cpp:79: for (Element* element = traverseToFirstElement(root); element; element = traverseNextElement(*element, ...
6 years, 10 months ago (2014-02-12 01:31:05 UTC) #11
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode65 Source/core/html/HTMLAllCollection.cpp:65: || element.hasLocalName(inputTag) // FIXME: Not according to spec. On ...
6 years, 10 months ago (2014-02-12 01:32:36 UTC) #12
haraken
On 2014/02/12 01:31:05, Chris Dumez wrote: > https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp > File Source/core/html/HTMLAllCollection.cpp (right): > > https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode79 ...
6 years, 10 months ago (2014-02-12 01:34:32 UTC) #13
Inactive
https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp File Source/core/html/HTMLAllCollection.cpp (right): https://codereview.chromium.org/158563004/diff/170001/Source/core/html/HTMLAllCollection.cpp#newcode79 Source/core/html/HTMLAllCollection.cpp:79: for (Element* element = traverseToFirstElement(root); element; element = traverseNextElement(*element, ...
6 years, 10 months ago (2014-02-12 16:28:41 UTC) #14
Inactive
Now that I landed my patch to fix the properties order on HTMLCollection, I have ...
6 years, 10 months ago (2014-02-13 18:50:44 UTC) #15
arv (Not doing code reviews)
LGTM
6 years, 10 months ago (2014-02-13 18:57:01 UTC) #16
Inactive
On 2014/02/13 18:57:01, arv wrote: > LGTM Thanks arv. tkent or jochen, could I please ...
6 years, 10 months ago (2014-02-13 19:01:46 UTC) #17
tkent
public API change lgtm
6 years, 10 months ago (2014-02-13 23:02:51 UTC) #18
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 10 months ago (2014-02-13 23:02:57 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/158563004/330001
6 years, 10 months ago (2014-02-13 23:03:06 UTC) #20
commit-bot: I haz the power
6 years, 10 months ago (2014-02-14 00:09:01 UTC) #21
Message was sent while issue was closed.
Change committed as 167126

Powered by Google App Engine
This is Rietveld 408576698