[Bug 16635] Setting innerHTML on an SVG element will parse into HTML elements. Since innerHTML is available on Element now, we should check if the context element is an SVG element (or MathML element) other than foreignObject (etc) and use the foreign lands insertion

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16635

--- Comment #4 from Simon Pieters <simonp@opera.com> 2012-04-05 12:53:12 UTC ---
Desired outcome, I think (using html5lib test syntax to indicate namespace):

<math math>.innerHTML = '<b>x';
| <math math>
|   <b>
|     "x"

<math math>.innerHTML = '<foo><b>x';
| <math math>
|   <math foo>
| <b>
|   "x"

i.e. the "break out" step needs to be changed to not pop the current element if
that's an html element (fragment case), but should otherwise work like normal.

<math mi>.innerHTML = '<b>x';
| <math mi>
|   <b>
|     "x"

<math mi>.innerHTML = '<foo><b>x';
| <math mi>
|   <foo>
|     <b>
|       "x"

<math mi>.innerHTML = '<mglyph>';
| <math mi>
|   <math mglyph>

<math mi>.innerHTML = '<malignmark>';
| <math mi>
|   <math malignmark>

<math mi>.innerHTML = '<svg>';
| <math mi>
|   <svg svg>

<math annotation-xml>.innerHTML = '<svg>';
| <math annotation-xml>
|   <svg svg>

<math annotation-xml>.innerHTML = '<foo>';
| <math annotation-xml>
|   <math foo>

<math annotation-xml encoding="text/html">.innerHTML = '<foo>';
| <math annotation-xml>
|   encoding="text/html"
|   <foo>

--- Comment #5 from Simon Pieters <simonp@opera.com> 2012-04-05 12:53:13 UTC ---
Desired outcome, I think (using html5lib test syntax to indicate namespace):

<math math>.innerHTML = '<b>x';
| <math math>
|   <b>
|     "x"

<math math>.innerHTML = '<foo><b>x';
| <math math>
|   <math foo>
| <b>
|   "x"

i.e. the "break out" step needs to be changed to not pop the current element if
that's an html element (fragment case), but should otherwise work like normal.

<math mi>.innerHTML = '<b>x';
| <math mi>
|   <b>
|     "x"

<math mi>.innerHTML = '<foo><b>x';
| <math mi>
|   <foo>
|     <b>
|       "x"

<math mi>.innerHTML = '<mglyph>';
| <math mi>
|   <math mglyph>

<math mi>.innerHTML = '<malignmark>';
| <math mi>
|   <math malignmark>

<math mi>.innerHTML = '<svg>';
| <math mi>
|   <svg svg>

<math annotation-xml>.innerHTML = '<svg>';
| <math annotation-xml>
|   <svg svg>

<math annotation-xml>.innerHTML = '<foo>';
| <math annotation-xml>
|   <math foo>

<math annotation-xml encoding="text/html">.innerHTML = '<foo>';
| <math annotation-xml>
|   encoding="text/html"
|   <foo>

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 5 April 2012 12:53:20 UTC