compare methods not working on Attr nodes

REOPENED
Assigned to

Status

()

Core
DOM: Core & HTML
P5
normal
REOPENED
17 years ago
16 days ago

People

(Reporter: Jeff Yates, Assigned: kinmoz)

Tracking

(Depends on: 1 bug, {dom2})

Trunk
Future
x86
Windows 2000
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [C],[selection][range][embed][correctness])

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
I have found that ALL of the compare methods of the range object fail if the
range commonAncestorContainer is an Attr Node.

The methods effected are:
    compareBoundaryPoints
    intersectsNode
    comparePoint
    isPointInRange
    compareNode  -  This is the only one that throws an exception

I have wrote up a test case and am attaching it.

Jeff Yates
(Reporter)

Comment 1

17 years ago
Created attachment 28883 [details]
Test case - read the source to understand it

Comment 2

17 years ago
thanks for the testcase!
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 3

17 years ago
I believe that I have found the cause of this bug.  All child nodes of an Attr 
node have there parentNode property set to null.  See bug #73681.

If someone could confirm that this is what is causing this problem I will mark 
it as a dependancy/blocker.

Jeff Yates.

Updated

17 years ago
Whiteboard: [select]
Target Milestone: --- → Future

Comment 4

17 years ago
I would suspect that this cannot get resolved at all until 73681 is resolved

Comment 5

17 years ago
setting to 0.9.2
anthonyd
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9.2

Updated

17 years ago
Summary: Range compare methods not working on Attr nodes → RANGE: compare methods not working on Attr nodes

Updated

17 years ago
Keywords: correctness, dom2

Updated

17 years ago
Whiteboard: [select] → [select][range]

Updated

17 years ago
Whiteboard: [select][range] → [select][range][embed]
Target Milestone: mozilla0.9.2 → mozilla1.0

Updated

17 years ago
Summary: RANGE: compare methods not working on Attr nodes → compare methods not working on Attr nodes
Whiteboard: [select][range][embed] → [selection][range][embed][correctness]

Comment 6

17 years ago
getting range spec up to snuff.
setting to 0.9.3

anthonyd
Target Milestone: mozilla1.0 → mozilla0.9.3

Updated

17 years ago
Target Milestone: mozilla0.9.3 → mozilla1.0

Comment 7

17 years ago
range stuff will at somepoint have to be corrected.  i can see how people who 
wish to embed our product will need some of the range functionality to 
manipulate nodes (specifically text nodes).

anthonyd
Whiteboard: [selection][range][embed][correctness] → [C],[selection][range][embed][correctness]

Comment 8

17 years ago
--> kin
Assignee: anthonyd → kin
Status: ASSIGNED → NEW
(Assignee)

Comment 9

17 years ago
Bulk move of mozilla1.0 bugs to mozilla.1.0.1. I will try to pull some of these
back in if I can.
Target Milestone: mozilla1.0 → mozilla1.0.1
(Assignee)

Updated

16 years ago
Priority: -- → P3
Target Milestone: mozilla1.0.1 → Future
QA Contact: lchiang → traversal-range
Testcase as posted fails to execute due to Range.intersectsNode not being implemented - this is bug 579638.

qawanted:  We should convert this into a mochitest.
Keywords: qawanted

Updated

8 years ago
Depends on: 611787
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core

Comment 11

5 years ago
Windows 2000 support has been dropped a while ago. Please only reopen this bug if you can reproduce it on Windows XP or older with current Firefox builds.

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
Ioana, there appears to be nothing win2k-specific about this bug.  Please don't resolve bugs as wontfix based on their (bogus, automatically set by Bugzilla) OS field without actually trying to reproduce them.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---

Comment 13

5 years ago
I tried to reproduce this issue with the attached test case on Mozilla/5.0 (Windows NT 6.1; rv:25.0) Gecko/20100101 Firefox/25.0 and got the following:

* range.compareNote throws an exception (no errors, more details displayed in the Browser console).
* for range.intersectsNode, range.comparePoint, range.isPointInRange and range2.selectNodeContents, I get that "Argument 1 is not an object". The first argument for them is range.startContainer.firstChild.

I don't get any other errors. Any ideas about how I could fix this test case?
Keywords: qawanted
Bulk priority change, per :mdaly
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.