node.contains(node) returns false per spec and in Gecko, true in other browsers

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
8 years ago
a month ago

People

(Reporter: bugzilla33, Assigned: smaug)

Tracking

({dev-doc-complete})

Trunk
Points:
---

Firefox Tracking Flags

(firefox9-)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
Posted file contains.html
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0a1) Gecko/20110907 Firefox/9.0a1
Build ID: 20110907030853

Steps to reproduce:

1. open testcase
2. click TEST button


Actual results:

theSameElem.contains(theSameElem) returns FALSE


Expected results:

theSameElem.contains(theSameElem) should returns TRUE

like: IE9, Chrome 13, Safari 5.1, Opera 11.5, Konqueror 4.5
(Reporter)

Updated

8 years ago
Attachment #558787 - Attachment mime type: text/plain → text/html
OS: Windows 7 → All
Hardware: x86 → All
Version: 9 Branch → Trunk
This is not what the specs require but maybe they should change if all other browsers does it this way?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: broken Node.contains → node.contains(node) returns false per spec and in Gecko, true in other browsers
Requesting tracking to make sure we don't ship something incompatible here if the spec changes in the next few weeks...
Blocks: 685086
(Assignee)

Comment 3

8 years ago
Posted patch patch + testsSplinter Review
Attachment #558794 - Flags: review?(bzbarsky)
Comment on attachment 558794 [details] [diff] [review]
patch + tests

r=me
Attachment #558794 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 5

8 years ago
http://hg.mozilla.org/mozilla-central/rev/2cbb9f7ffe32
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
This is documented as implemented, but I've added a note that this is contrary to the specification.
Spec was changed to match implementations a while back.  I've removed the note from the devmo docs.
Thanks bz. :)
This made 9, not tracking at this point.
Assignee: nobody → bugs
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.