Closed
Bug 166419
Opened 22 years ago
Closed 17 years ago
Mozilla's DOM Ranges don't support comment nodes
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: aaronlev, Assigned: mozeditor)
References
Details
(Keywords: qawanted)
Attachments
(1 file)
If one tries to use nsIDOMRange::SetStart() or SetEnd() with a comment node, it
returns an error.
This is because nsRange::GetNodeLength() does not handle comment nodes.
It only supports node length for text nodes and cdata section nodes.
However, I noticed there are other places in dom ranges where comment nodes are
not supported. Is this by design or was it just never completed?
Reporter | ||
Comment 1•22 years ago
|
||
Is this the right thing to do? Seeking r=/sr=
Reporter | ||
Comment 2•22 years ago
|
||
I already have a work around for my particular bug, so I'm going to pass this to
jrfrancis, so he can get all the places that should support comment nodes right.
On the other hand, if this doesn't seem to affect anyone it doesn't bother me if
it's futured.
Assignee: aaronl → jfrancis
Summary: nsIDOMRange::GetNodeLength() returning incorrect value for comment nodes → Mozilla's DOM Ranges don't support comment nodes
![]() |
||
Comment 3•22 years ago
|
||
What does the DOM Range spec say on this? This sounds to me like something we
should really fix....
Assignee | ||
Comment 4•22 years ago
|
||
futuring for now. if someone is affected by this please comment.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 5•17 years ago
|
||
I think my fix for bug 332148 handles this, if it's not fixed already.
Depends on: 332148
Comment 6•17 years ago
|
||
Someone want to submit a testcase beyond the one provided in bug 332148?
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
![]() |
||
Comment 7•17 years ago
|
||
Alex, does that testcase test comment nodes? If not, care to just write a test for this bug?
Comment 8•17 years ago
|
||
bz: it does, but only for the extractContents and cloneContents cases. IMHO, that's not enough. :)
I'd really rather not write the tests myself (nor would I want to burden you, bz).
![]() |
||
Comment 9•17 years ago
|
||
So setStart/setEnd per comment 0 work? That's what needs to be tested.
For what it's worth, this is now in my to-do list, since _someone_ has to do it. I'd be quite happy if someone else gets to it, of course.
Keywords: qawanted
Comment 10•17 years ago
|
||
(In reply to comment #9)
> So setStart/setEnd per comment 0 work? That's what needs to be tested.
Yes, that's one thing the tests for extractContents covers.
![]() |
||
Comment 11•17 years ago
|
||
Sounds like this bug is covered then... what else needs testing?
Updated•12 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
Updated•7 years ago
|
Flags: in-testsuite?
You need to log in
before you can comment on or make changes to this bug.
Description
•