Commit abf850e
authored
Reconstruct active formatting elements when <math> or <svg> start (#724)
As per 13.2.6.4.7 The "in body" insertion mode:
A start tag whose tag name is "math"
[Reconstruct the active formatting
elements](https://html.spec.whatwg.org/multipage/parsing.html#reconstruct-the-active-formatting-elements),
if any.
[Adjust MathML
attributes](https://html.spec.whatwg.org/multipage/parsing.html#adjust-mathml-attributes) for
the token. (This fixes the case of MathML attributes that are not all
lowercase.)
[Adjust foreign
attributes](https://html.spec.whatwg.org/multipage/parsing.html#adjust-foreign-attributes) for
the token. (This fixes the use of namespaced attributes, in particular
XLink.)
[Insert a foreign
element](https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element) for
the token, with [MathML
namespace](https://infra.spec.whatwg.org/#mathml-namespace) and false.
If the token has its *[self-closing
flag](https://html.spec.whatwg.org/multipage/parsing.html#self-closing-flag)* set,
pop the [current
node](https://html.spec.whatwg.org/multipage/parsing.html#current-node) off
the [stack of open
elements](https://html.spec.whatwg.org/multipage/parsing.html#stack-of-open-elements) and [acknowledge
the token's *self-closing
flag*](https://html.spec.whatwg.org/multipage/parsing.html#acknowledge-self-closing-flag).
A start tag whose tag name is "svg"
[Reconstruct the active formatting
elements](https://html.spec.whatwg.org/multipage/parsing.html#reconstruct-the-active-formatting-elements),
if any.
[Adjust SVG
attributes](https://html.spec.whatwg.org/multipage/parsing.html#adjust-svg-attributes) for
the token. (This fixes the case of SVG attributes that are not all
lowercase.)
[Adjust foreign
attributes](https://html.spec.whatwg.org/multipage/parsing.html#adjust-foreign-attributes) for
the token. (This fixes the use of namespaced attributes, in particular
XLink in SVG.)
[Insert a foreign
element](https://html.spec.whatwg.org/multipage/parsing.html#insert-a-foreign-element) for
the token, with [SVG
namespace](https://infra.spec.whatwg.org/#svg-namespace) and false.
If the token has its *[self-closing
flag](https://html.spec.whatwg.org/multipage/parsing.html#self-closing-flag)* set,
pop the [current
node](https://html.spec.whatwg.org/multipage/parsing.html#current-node) off
the [stack of open
elements](https://html.spec.whatwg.org/multipage/parsing.html#stack-of-open-elements) and [acknowledge
the token's *self-closing
flag*](https://html.spec.whatwg.org/multipage/parsing.html#acknowledge-self-closing-flag).1 parent 9279dd2 commit abf850e
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
971 | 974 | | |
972 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
973 | 979 | | |
974 | 980 | | |
975 | 981 | | |
| |||
0 commit comments