Closed
Bug 30838
Opened 25 years ago
Closed 12 years ago
complete implementation of nsRange interface
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: Brade, Assigned: kinmoz)
References
Details
(Keywords: dom2, helpwanted, testcase)
Attachments
(8 files)
Here is a snippet from an e-mail by Vidur:
Well...there are a few NS_ERROR_NOT_IMPLEMENTEDs in nsRange.cpp and the current
version of the spec (http://www.w3.org/TR/DOM-Level-2/range.html) includes some
new errors and exceptions. Last I heard from Joe, completing the implementation
was not on his list.
I am creating this bug for tracking purposes but I don't expect Joe to get to it
soon. Maybe someone else can pick this up? If not, hopefully it can wait until
later in the development cycle.
Reporter | ||
Updated•25 years ago
|
Target Milestone: M19
Reporter | ||
Comment 1•25 years ago
|
||
M19 for now
Reporter | ||
Updated•25 years ago
|
Keywords: helpwanted
Comment 3•25 years ago
|
||
Marking FUTURE. Netscape can survive without complete nsRange for FCS.
Target Milestone: M19 → Future
I'd like to suggest that at least nsRange::CloneContents/ExtractContents be
implemented soon. It appears to be mostly complete already.
Since the contents of a range cannot be extracted, currently the only usefulness
of creating a range is the ability to delete it.
The only way I can manipulate a range of the DOM right now is to use .innerHTML
instead of ranges and then dump the content back into
createContextualFragment().
Comment 5•24 years ago
|
||
This has been split into four bugs, one for each unimplemented method:
extractContents: http://bugzilla.mozilla.org/show_bug.cgi?id=58969
cloneContents: http://bugzilla.mozilla.org/show_bug.cgi?id=58970
insertNode: http://bugzilla.mozilla.org/show_bug.cgi?id=58972
surroundContents: http://bugzilla.mozilla.org/show_bug.cgi?id=58974
A limited testcase is posted for each.
All are assigned to anothonyd@netscape.com
Updated•24 years ago
|
Component: DOM Level 2 → DOM Traversal-Range
Comment 6•24 years ago
|
||
I am attaching a JavaScript "Patch" that can be used as a work around for the
range object. This patch adds support for the following:
Range.innerHTML - read only
Range.extractContents - as per W3C specs
Range.cloneContents - as per W3C specs
Range.insertNode - as per W3C specs
Range.surroundContents - as per W3C specs
Range.deleteContents - as per W3C specs - fixes buggy support from Mozilla
Range.jmyCompareNode - extends Mozilla's compareNode to include
the following 2 constants
Range.NODE_BEFORE_AND_INSIDE = -1;
Range.NODE_INSIDE_AND_AFTER = -2;
I would like a C++ programmer to implement these in C if possible.
Jeff Yates
Comment 7•24 years ago
|
||
Comment 8•24 years ago
|
||
Comment 9•24 years ago
|
||
Adding patch and test cases as text files since zip is not attaching properly.
Jeff
Comment 10•24 years ago
|
||
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
Comment 15•24 years ago
|
||
Comment 16•24 years ago
|
||
The complete functionality of the Range object cannot be accomplished until
ownerDocument bug (bug #27382) is fixed.
As stated in bug 27382, the ownerDocument property of all orphaned nodes is
null, thus the Range object cannot set container points within orphaned nodes
(it generates a NS_ERROR_INVALID_POINTER). This is against the purpose of the
range object. It is supposed to be able to navigate a DocumentFragment, which
by definition is not attached to a document.
Jeff.
Depends on: 27382
Comment 17•24 years ago
|
||
My final version of the Range Object Patch via JavaScript is now available.
The first versions were concentrating upon HTML applications. I have now
corrected this oversite. Since people have been having a problem with my
attachments you can download the patch from http://pbwizard.com/Moz%
20Patches/RangePatch.zip. Included in the zip file are the test cases that I
used to test my script.
Jeff Yates.
Comment 18•24 years ago
|
||
Bad news. I have just put in a bug (Bug #73552) that ALL of the comparison
methods of the Range object fail if the range is the contents of an Attr
object. This is a major step back and my "Patch" does not fix this ... yet.
Jeff.
Comment 19•23 years ago
|
||
sicking: are you interested in converting this JS to C++? I know you've been
doing this sort of thing recently.
Gerv
I'll look into it after I'm done with the treeWalker (bug 82625). But wasn't
most of nsRange fixed recently?
Comment 21•23 years ago
|
||
Yes, most of this was fixed. This and 58969 seem to be duplicates now.
Attachment #27659 -
Attachment mime type: text/plain → text/html
Updated•15 years ago
|
QA Contact: vidur → traversal-range
Comment 23•12 years ago
|
||
Any remaining issues can be filed as separate bugs.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•12 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•