WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160906
querySelector() / querySelectorAll() should always throw a SyntaxError when failing to parse selector string
https://bugs.webkit.org/show_bug.cgi?id=160906
Summary
querySelector() / querySelectorAll() should always throw a SyntaxError when f...
Chris Dumez
Reported
2016-08-16 12:41:36 PDT
querySelector() / querySelectorAll() should always throw a SyntaxError when failing to parse selector string: -
https://dom.spec.whatwg.org/#dom-parentnode-queryselector
-
https://dom.spec.whatwg.org/#scope-match-a-selectors-string
In some cases, WebKit was throwing a NamespaceError instead.
Attachments
Patch
(160.74 KB, patch)
2016-08-16 12:43 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-08-16 12:43:27 PDT
Created
attachment 286194
[details]
Patch
Ryosuke Niwa
Comment 2
2016-08-16 13:35:49 PDT
This seems like a risky change.
Chris Dumez
Comment 3
2016-08-16 13:36:26 PDT
(In reply to
comment #2
)
> This seems like a risky change.
? Throwing a different exception type ?
Ryosuke Niwa
Comment 4
2016-08-16 13:37:35 PDT
Comment on
attachment 286194
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=286194&action=review
> Source/WebCore/dom/SelectorQuery.cpp:634 > - ec = NAMESPACE_ERR; > + ec = SYNTAX_ERR;
Oh, you're just changing the exception type.
WebKit Commit Bot
Comment 5
2016-08-16 13:59:36 PDT
Comment on
attachment 286194
[details]
Patch Clearing flags on attachment: 286194 Committed
r204522
: <
http://trac.webkit.org/changeset/204522
>
WebKit Commit Bot
Comment 6
2016-08-16 13:59:41 PDT
All reviewed patches have been landed. Closing bug.
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