Bug 160084 - Parameter to Node.contains() should be mandatory
Summary: Parameter to Node.contains() should be mandatory
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: WebExposed
Depends on:
Blocks:
 
Reported: 2016-07-22 09:19 PDT by Chris Dumez
Modified: 2016-07-22 12:36 PDT (History)
10 users (show)

See Also:


Attachments
Patch (17.85 KB, patch)
2016-07-22 09:47 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (17.91 KB, patch)
2016-07-22 12:06 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-07-22 09:19:35 PDT
Parameter to Node.contains() should be mandatory as the per specification:
- https://dom.spec.whatwg.org/#node

The compatibility risk should be low because both Firefox and Chrome both agree with the specification. Also, it does not make much sense to call this API without parameter.
Comment 1 Chris Dumez 2016-07-22 09:47:29 PDT
Created attachment 284340 [details]
Patch
Comment 2 Darin Adler 2016-07-22 11:29:36 PDT
Comment on attachment 284340 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=284340&action=review

> Source/WebCore/ChangeLog:14
> +        The compatibility risk should be low because both Firefox and Chrome
> +        both agree with the specification. Also, it does not make much sense
> +        to call this API without parameter.

I’m concerned about this repeated statement.

These changes possibly pose real risk for content that has only ever been used with WebKit, such as content within certain iOS or Mac applications. Even though there is no useful way to use such functions, there’s a real possibility someone is accidentally invoking one of these, and a new exception might indeed cause an app to fail. The mitigation is presumably testing.

The risk for any one of these changes is small. The risk of all combined is harder to assess.
Comment 3 WebKit Commit Bot 2016-07-22 11:51:33 PDT
Comment on attachment 284340 [details]
Patch

Rejecting attachment 284340 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 284340, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
fs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 203603 = d70441ca2fc544197394c8b3230707e6d97575a6
r203604 = b90b7081874c904a2e7625bc2d1a77df391583ee
r203605 = 03d045ec9b87f56150f5e128b074f6abb5f1c749
r203606 = 38dbbf9488478144af3f4ed42c15d906e1c53938
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.webkit.org/results/1735151
Comment 4 Chris Dumez 2016-07-22 12:06:13 PDT
Created attachment 284356 [details]
Patch
Comment 5 WebKit Commit Bot 2016-07-22 12:35:59 PDT
Comment on attachment 284356 [details]
Patch

Clearing flags on attachment: 284356

Committed r203609: <http://trac.webkit.org/changeset/203609>
Comment 6 WebKit Commit Bot 2016-07-22 12:36:05 PDT
All reviewed patches have been landed.  Closing bug.