Closed
Bug 811701
Opened 13 years ago
Closed 13 years ago
Move innerHTML/outerHTML/insertAdjacentHTML from HTMLElement to Element
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file)
72.87 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Comment 3•13 years ago
|
||
Ms2ger has already duped bug 824114, but as an FYI, doing something like according to the domparsing spec:
var gElement = ...;
gElement.innerHTML = "<path d=''/>";
will "just work", in that it looks at the default namespace declaration on the <g> element and will place the <path> element in the SVG namespace.
Assignee | ||
Comment 4•13 years ago
|
||
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Assignee | ||
Updated•13 years ago
|
Attachment #695360 -
Flags: review?(bzbarsky)
![]() |
||
Comment 5•13 years ago
|
||
> will "just work", in that it looks at the default namespace declaration on the <g>
> element
This patch doesn't do that, afaict. We need a followup bug on it or we need to reopen the bugs marked as duplicates of this one.
![]() |
||
Comment 6•13 years ago
|
||
Comment on attachment 695360 [details] [diff] [review]
v1
r=me.
I pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=dcdacd679e49
There will be some known M2 orange from the Document webidl bits, sadly, but apart from that should be useful.
Comment 7•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #5)
> This patch doesn't do that, afaict. We need a followup bug on it or we need
> to reopen the bugs marked as duplicates of this one.
I think I am half mistaken -- innerHTML on an element in an HTML document won't correct parse SVG elements like that, but will on one in an XML document.
![]() |
||
Comment 8•13 years ago
|
||
Cameron, is that per spec or in our impl? In our impl, I'd believe that. I should add an xhtml test...
Comment 9•13 years ago
|
||
That is per spec, looking at http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#html-fragment-parsing-algorithm for HTML documents and http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-fragment-parsing-algorithm for XML documents (which the DOM Parsing spec references).
![]() |
||
Comment 10•13 years ago
|
||
OK. So per spec in the test I pushed the todo_is should be isnot() or should be is() with the namespace as HTML?
![]() |
||
Comment 11•13 years ago
|
||
(Note that a test using XHTML passes with those todo_is converted to is().)
Comment 12•13 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #10)
> OK. So per spec in the test I pushed the todo_is should be isnot() or
> should be is() with the namespace as HTML?
I believe so.
Though I think it would actually be useful to allow innerHTML to start off in foreign content mode when assigning to an SVG- or MathML-namespaced element.
Updated•13 years ago
|
Blocks: domparsing
![]() |
||
Comment 13•13 years ago
|
||
Alright.
There's one orange on the try push: test_bug744830.html. That's happening because that test does:
t.innerHTML = null;
t.appendChild(document.createElement("textarea"));
t.firstChild.appendChild(document.createTextNode("\nhello"));
and this patch lost the [TreatNullAs=EmptyString]. I filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=20499 on adding that to the spec.
No longer blocks: domparsing
![]() |
||
Updated•13 years ago
|
Attachment #695360 -
Flags: review?(bzbarsky) → review+
![]() |
||
Updated•13 years ago
|
Flags: in-testsuite+
![]() |
||
Updated•13 years ago
|
Blocks: domparsing
Comment 14•13 years ago
|
||
Just tested an m-i build with this patch cset:
http://hg.mozilla.org/integration/mozilla-inbound/rev/5d900d13b2cf
CNN will now load, but not fully. I have spinning markers on
Featured TV box on right side
Markets box below that on right side
and Weather information is missing totally.
Several js errors in the Error console:
Error: TypeError: o.style is undefined
Source file: http://cdn.optimizely.com/js/131788053.js
Line: 48
4 of these:
Error: TypeError: document.getElementById(...).style is undefined
Source file: http://z.cdn.turner.com/cnn/tmpl_asset/static/www_homepage/1899/js/hplib-min.js
Line: 23
Error: TypeError: d.style is undefined
Source file: http://z.cdn.turner.com/cnn/.e/js/libs/jquery-1.7.2.min.js
Line: 2
Error: TypeError: $(...).select is not a function
Source file: http://z.cdn.turner.com/cnn/tmpl_asset/static/www_homepage/1899/js/hplib-min.js
Line: 26
Error: TypeError: $(...).update is not a function
Source file: http://z.cdn.turner.com/cnn/tmpl_asset/static/www_global/796/js/globallib-min.js
Line: 2
Sorry I know nothing about webpage layout, js , etc...
Comment 15•13 years ago
|
||
None of the errors I posted above appear in a build prior to the landing of bug 824301
Comment 16•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Comment 17•13 years ago
|
||
I have the same problem as Jim's in comment 14 after installing the latest hourly with this fix.
![]() |
||
Comment 18•13 years ago
|
||
See bug 824301. You're just seeing more of that bug.
Comment 19•12 years ago
|
||
I am unable in 20.0 to render msup properly. I am also unable to do the following:
<p><math>
<mn id="y2">4357</mn>
</math></p>
<script>
var d=new Date();
var y=d.getFullYear();
var yad=y+'AD';
document.getElementById('y2',yad);
</script>
Comment 20•12 years ago
|
||
forgot to give sample page. the first part of the page contains an image which contains the math. the lower duplicate is mathml rendered by whatever browser.
http://Jesusnjim.com/studies/personal/noahs-ark-speciation.html
Comment 21•12 years ago
|
||
> var ycur=d.getFullYear();
> var ycurAD=y+'AD';
Obviously the code is wrong. (y is not defined anywhere.)
And why do you think it is related with this bug?
Comment 22•12 years ago
|
||
var y=d.getFullYear();
Comment 23•12 years ago
|
||
I had my bug daisy-chained to yours because "it's a duplicate". when (?) it's not.
![]() |
||
Comment 24•12 years ago
|
||
> I had my bug daisy-chained to yours because "it's a duplicate".
Your bug being presumably bug 742143?
The testcase in that bug is fixed (by this bug). Comment 19 has nothing to do with that testcase, or with this bug; it's about the fact that the "id" attribute is not special for all elements, which is bug 741295. If you're seeing some other, unrelated, problem with msup, please do file a bug on it with clear steps to reproduce, ok?
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•