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

Issue 148323008: Update HTMLCollection's named property getter to behave according to spec (Closed)

Created:
6 years, 10 months ago by Inactive
Modified:
6 years, 10 months ago
CC:
blink-reviews, watchdog-blink-watchlist_google.com, dglazkov+blink, arv+blink, adamk+blink_chromium.org, Inactive
Visibility:
Public.

Description

Update HTMLCollection's named property getter to behave according to spec Update HTMLCollection's named property getter to behave according to spec: http://dom.spec.whatwg.org/#htmlcollection 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://dom.spec.whatwg.org/#htmlcollection Firefox 26 and IE11 both show the names while enumerating. However, IE11 does not show the ids when enumerating, which is incorrect. 3. The argument to namedItem() named getter should be mandatory. This is consistent with the spec, Firefox 26 and IE11. IDL interfaces inheriting HTMLCollection will need similar work (e.g. HTMLFormControlsCollection). This will be taken care of in follow-up patches to limit patch size and facilitate review. R=haraken, arv, tkent BUG=341269 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166623

Patch Set 1 #

Patch Set 2 : Made code more extensible for subclasses #

Patch Set 3 : Rebaseline inpector test #

Total comments: 7

Patch Set 4 : Take feedback into consideation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -3 lines) Patch
A LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg.html View 1 chunk +17 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/html-collections-named-getter-mandatory-arg-expected.txt View 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/htmlcollection-enumerated-properties.html View 1 chunk +40 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/htmlcollection-enumerated-properties-expected.txt View 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/inspector/console/console-format-collections-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLCollection.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCollection.cpp View 1 2 3 3 chunks +42 lines, -0 lines 0 comments Download
M Source/core/html/HTMLCollection.idl View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Inactive
6 years, 10 months ago (2014-02-06 02:24:30 UTC) #1
haraken
LGTM https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp File Source/core/html/HTMLCollection.cpp (right): https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp#newcode499 Source/core/html/HTMLCollection.cpp:499: // The supported property names are the values ...
6 years, 10 months ago (2014-02-06 02:47:41 UTC) #2
Inactive
https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp File Source/core/html/HTMLCollection.cpp (right): https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp#newcode499 Source/core/html/HTMLCollection.cpp:499: // The supported property names are the values from ...
6 years, 10 months ago (2014-02-06 02:55:39 UTC) #3
Inactive
https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp File Source/core/html/HTMLCollection.cpp (right): https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp#newcode511 Source/core/html/HTMLCollection.cpp:511: if (!nameAttribute.isEmpty() && (type() != DocAll || nameShouldBeVisibleInDocumentAll(toHTMLElement(*element)))) { ...
6 years, 10 months ago (2014-02-06 03:01:23 UTC) #4
Inactive
https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp File Source/core/html/HTMLCollection.cpp (right): https://codereview.chromium.org/148323008/diff/50001/Source/core/html/HTMLCollection.cpp#newcode499 Source/core/html/HTMLCollection.cpp:499: // The supported property names are the values from ...
6 years, 10 months ago (2014-02-06 03:03:28 UTC) #5
haraken
LGTM
6 years, 10 months ago (2014-02-06 03:30:29 UTC) #6
tkent
public API change LGTM
6 years, 10 months ago (2014-02-06 03:53:27 UTC) #7
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 10 months ago (2014-02-06 04:36:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/148323008/130001
6 years, 10 months ago (2014-02-06 04:36:37 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-06 06:27:27 UTC) #10
commit-bot: I haz the power
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_rel&number=25990
6 years, 10 months ago (2014-02-06 06:27:28 UTC) #11
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 10 months ago (2014-02-06 13:22:08 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/148323008/130001
6 years, 10 months ago (2014-02-06 13:22:25 UTC) #13
arv (Not doing code reviews)
LGTM
6 years, 10 months ago (2014-02-06 16:53:10 UTC) #14
commit-bot: I haz the power
6 years, 10 months ago (2014-02-06 17:37:08 UTC) #15
Message was sent while issue was closed.
Change committed as 166623

Powered by Google App Engine
This is Rietveld 408576698