WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160071
Parameter to Node.compareDocumentPosition() should be mandatory and non-nullable
https://bugs.webkit.org/show_bug.cgi?id=160071
Summary
Parameter to Node.compareDocumentPosition() should be mandatory and non-nullable
Chris Dumez
Reported
2016-07-21 20:41:49 PDT
Parameter to Node.compareDocumentPosition() should be mandatory and non-nullable: -
https://dom.spec.whatwg.org/#interface-node
Firefox and Chrome agree with the specification.
Attachments
Patch
(31.03 KB, patch)
2016-07-21 21:55 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-07-21 21:55:02 PDT
Created
attachment 284306
[details]
Patch
Ryosuke Niwa
Comment 2
2016-07-21 22:36:34 PDT
Comment on
attachment 284306
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=284306&action=review
> Source/WebCore/ChangeLog:8 > + > +
What's up with the second blank line (with leading whitespace)?
Chris Dumez
Comment 3
2016-07-22 09:02:49 PDT
Comment on
attachment 284306
[details]
Patch Clearing flags on attachment: 284306 Committed
r203601
: <
http://trac.webkit.org/changeset/203601
>
Chris Dumez
Comment 4
2016-07-22 09:02:54 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5
2016-07-22 11:21:25 PDT
Comment on
attachment 284306
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=284306&action=review
> Source/WebCore/accessibility/AccessibilityObject.cpp:649 > - if (afterRange && ((afterRange->startPosition().anchorNode()->compareDocumentPosition(referenceRange->endPosition().anchorNode()) & Node::DOCUMENT_POSITION_DISCONNECTED) == Node::DOCUMENT_POSITION_DISCONNECTED)) > + if (afterRange && (referenceRange->endPosition().isNull() || ((afterRange->startPosition().anchorNode()->compareDocumentPosition(*referenceRange->endPosition().anchorNode()) & Node::DOCUMENT_POSITION_DISCONNECTED) == Node::DOCUMENT_POSITION_DISCONNECTED)))
Sure seems like a wordy way to write this. If "b" is a single bit, then in a boolean context: (x & b) == b Is just a wordy way to write: (x & b)
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