Closed
Bug 414637
Opened 17 years ago
Closed 16 years ago
createContextualFragment() throws NS_ERROR_NOT_AVAILABLE
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: nassar, Assigned: smaug)
References
()
Details
(Keywords: regression, testcase)
Attachments
(3 files)
455 bytes,
text/html
|
Details | |
657 bytes,
text/html
|
Details | |
1.74 KB,
patch
|
sicking
:
review+
sicking
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: XULRunner CVS trunk 01/29/2008 Calls to nsIDOMRange::createContextualFragment() on a HTML document throw the following exception. [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSRange.createContextualFragment]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///e:/miro/tv/platform/windows-xul/dist/components/jsbridge.js :: anonymous :: line 519" data: no] Reproducible: Always Steps to Reproduce: var elt = document.getElementById(id); //id is a string defined earlier var r = document.createRange(); r.selectNode(document.documentElement); var frag = r.createContextualFragment(xml); //xml is a string defined earlier Actual Results: throws NS_ERROR_NOT_AVAILABLE Expected Results: Return the fragment This is happening for me when I upgrade Miro to XULRunner 1.9 from CVS trunk. The above link is from someone else experiencing the same problem.
Reporter | ||
Updated•17 years ago
|
Version: unspecified → Trunk
Assignee | ||
Comment 1•17 years ago
|
||
A testcase uploaded using "Add an attachment" would be great.
Assignee | ||
Updated•17 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•17 years ago
|
||
Something to do with .documentElement
Assignee | ||
Comment 3•17 years ago
|
||
mStartParent is null when selecting .documentElement. Jonas, can you remember something related to this immediately?
Assignee | ||
Comment 4•17 years ago
|
||
Er, no, sorry. It is doc which I QI'd to nsIContent in nsContentUtils::CreateContextualFragment. That of doesn't work.
Assignee | ||
Comment 5•17 years ago
|
||
s/which I/which is/
Assignee | ||
Comment 6•17 years ago
|
||
regression range 2006-10-19 - 2006-10-21. -> Bug 357445
Blocks: 357445
Updated•17 years ago
|
Keywords: regression,
testcase
Flags: blocking1.9?
Assignee | ||
Comment 7•17 years ago
|
||
So on 1.8 .startContainer is htmlelement, on 1.9 it is htmldocument. What 1.9 does is afaik right. That is what Opera and Safari returns. (Safari crashes with this testcase.)
Assignee | ||
Comment 8•17 years ago
|
||
I think we should do something like this.
Comment on attachment 300380 [details] [diff] [review] allow contextfragments when container is document Looks good
Attachment #300380 -
Flags: superreview+
Attachment #300380 -
Flags: review?(jonas)
Attachment #300380 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Attachment #300380 -
Flags: approval1.9?
Reporter | ||
Comment 10•17 years ago
|
||
The patch works for me
Comment 11•17 years ago
|
||
Did you want this for b3?
Assignee | ||
Comment 12•17 years ago
|
||
I was thinking after b3. Not so serious, or at least this feature isn't apparently used very often. So just to get this fixed in FF3.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Updated•16 years ago
|
Attachment #300380 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Comment 13•16 years ago
|
||
Checking in content/base/src/nsContentUtils.cpp; /cvsroot/mozilla/content/base/src/nsContentUtils.cpp,v <-- nsContentUtils.cpp new revision: 1.272; previous revision: 1.271 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Comment 14•16 years ago
|
||
*** 42217 ERROR FAIL | range.createContextualFragment() should throw when range node is DocType | | /tests/parser/htmlparser/tests/mochitest/test_bug358797.html Backed out.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: --- → mozilla1.9beta4
Assignee | ||
Comment 15•16 years ago
|
||
Bah, sorry. I'll update either the testcase or patch when back on my dev.machine.
Assignee | ||
Comment 16•16 years ago
|
||
I think changing the testcase is ok, it should just check that browser doesn't crash when creating contextual fragment using doctype.
Assignee | ||
Comment 17•16 years ago
|
||
I changed the testcase.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•