WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 148117
NodeList should not have a named getter
https://bugs.webkit.org/show_bug.cgi?id=148117
Summary
NodeList should not have a named getter
Chris Dumez
Reported
2015-08-17 20:12:06 PDT
NodeList should not have a named getter. We currently have one because several of our Web APIs (getElementsByTagName / getElementsByClassName) return a NodeList instead of an HTMLCollection. One we fix those APIs, we may be able to drop the named getter on NodeList.
Attachments
Patch
(13.19 KB, patch)
2015-08-21 19:31 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(13.21 KB, patch)
2015-08-21 19:37 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-mavericks
(537.86 KB, application/zip)
2015-08-21 20:11 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-mavericks-wk2
(674.67 KB, application/zip)
2015-08-21 20:15 PDT
,
Build Bot
no flags
Details
Patch
(15.13 KB, patch)
2015-08-21 20:29 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews100 for mac-mavericks
(537.14 KB, application/zip)
2015-08-21 21:04 PDT
,
Build Bot
no flags
Details
Patch
(15.07 KB, patch)
2015-08-21 21:05 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Test
(2.42 KB, patch)
2015-08-24 11:03 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-08-21 19:31:41 PDT
Created
attachment 259699
[details]
Patch
Chris Dumez
Comment 2
2015-08-21 19:37:16 PDT
Created
attachment 259700
[details]
Patch
Build Bot
Comment 3
2015-08-21 20:11:22 PDT
Comment on
attachment 259700
[details]
Patch
Attachment 259700
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/88405
New failing tests: fast/dom/named-items-with-symbol-name.html
Build Bot
Comment 4
2015-08-21 20:11:25 PDT
Created
attachment 259701
[details]
Archive of layout-test-results from ews102 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-mavericks Platform: Mac OS X 10.9.5
Build Bot
Comment 5
2015-08-21 20:15:55 PDT
Comment on
attachment 259700
[details]
Patch
Attachment 259700
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/88409
New failing tests: fast/dom/named-items-with-symbol-name.html
Build Bot
Comment 6
2015-08-21 20:15:58 PDT
Created
attachment 259702
[details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Chris Dumez
Comment 7
2015-08-21 20:29:45 PDT
Created
attachment 259703
[details]
Patch
Build Bot
Comment 8
2015-08-21 21:04:22 PDT
Comment on
attachment 259703
[details]
Patch
Attachment 259703
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/88543
New failing tests: fast/dom/named-items-with-symbol-name.html
Build Bot
Comment 9
2015-08-21 21:04:25 PDT
Created
attachment 259707
[details]
Archive of layout-test-results from ews100 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Chris Dumez
Comment 10
2015-08-21 21:05:59 PDT
Created
attachment 259708
[details]
Patch
Darin Adler
Comment 11
2015-08-22 14:42:55 PDT
Comment on
attachment 259708
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259708&action=review
> LayoutTests/fast/dom/named-items-with-symbol-name.html:19 > debug("\n" + String(getElementsByTagNameList));
Really should remove this unneeded newline.
Darin Adler
Comment 12
2015-08-22 14:45:38 PDT
Comment on
attachment 259708
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=259708&action=review
> Source/WebCore/ChangeLog:21 > + This change could be a bit risky but: > + 1. Firefox and IE never had this named property getter on NodeList. > + 2. Chrome successfuly dropped this named property getter in early 2014: > +
https://src.chromium.org/viewvc/blink?revision=166356&view=revision
> + 3. Our named property getter on NodeList is only partly functional: > + It only matches by 'id' attribute, not by 'name' attribute. > + 4. Our APIs that were wrongly returning a NodeList instead of an > + HTMLCollection (getElementsByTagName() / getElementsByClassName()) > + have been fixed in
r188735
and
r188809
. HTMLCollection does have > + a named property getter. > + 5. This named getter adds code complexity.
A few other thoughts, but I don’t think I should remove the commit queue flag. None of these fully address the issue of non-live-website content relying on this by accident. The change could break, say, iPhone apps that used this. I wonder how we can mitigate that risk? Items 3 and 5 are ways in which this patch improves things, but they are not relevant to risk, so I’m not sure they belong on this list. Spelling error: "successfully" is correct, "successfully" is wrong.
WebKit Commit Bot
Comment 13
2015-08-22 15:29:38 PDT
Comment on
attachment 259708
[details]
Patch Clearing flags on attachment: 259708 Committed
r188829
: <
http://trac.webkit.org/changeset/188829
>
WebKit Commit Bot
Comment 14
2015-08-22 15:29:44 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 15
2015-08-24 10:02:50 PDT
(In reply to
comment #11
)
> Comment on
attachment 259708
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=259708&action=review
> > > LayoutTests/fast/dom/named-items-with-symbol-name.html:19 > > debug("\n" + String(getElementsByTagNameList)); > > Really should remove this unneeded newline.
Done in <
http://trac.webkit.org/changeset/188863
>.
Geoffrey Garen
Comment 16
2015-08-24 10:43:24 PDT
Should we add a test that verifies the absence of the name getter?
Chris Dumez
Comment 17
2015-08-24 10:44:19 PDT
(In reply to
comment #16
)
> Should we add a test that verifies the absence of the name getter?
I wasn't sure it was needed. But since you're suggesting it, I'll add one :)
Chris Dumez
Comment 18
2015-08-24 11:03:06 PDT
Reopening to attach new patch.
Chris Dumez
Comment 19
2015-08-24 11:03:11 PDT
Created
attachment 259758
[details]
Test
Chris Dumez
Comment 20
2015-08-24 11:03:47 PDT
(In reply to
comment #16
)
> Should we add a test that verifies the absence of the name getter?
Just uploaded a patch that adds such test.
Geoffrey Garen
Comment 21
2015-08-24 13:59:52 PDT
Comment on
attachment 259758
[details]
Test r=me It's a bit strange to test for something *not* being there, but I think it's good practice in order to confirm the difference before and after the code change.
WebKit Commit Bot
Comment 22
2015-08-24 14:44:46 PDT
Comment on
attachment 259758
[details]
Test Clearing flags on attachment: 259758 Committed
r188885
: <
http://trac.webkit.org/changeset/188885
>
WebKit Commit Bot
Comment 23
2015-08-24 14:44:53 PDT
All reviewed patches have been landed. Closing bug.
Chris Dumez
Comment 24
2015-09-23 19:20:34 PDT
According to the perf bots, this was a ~9% progression on Dromaeo DOM Query subtest and ~3.8% overall on Dromaeo DOM Core.
Ryosuke Niwa
Comment 25
2015-09-23 19:23:43 PDT
(In reply to
comment #24
)
> According to the perf bots, this was a ~9% progression on Dromaeo DOM Query > subtest and ~3.8% overall on Dromaeo DOM Core.
Nice!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug