|
Lines 38-44
namespace WebCore {
a/Source/WebCore/mathml/MathMLTokenElement.cpp_sec1
|
| 38 |
using namespace MathMLNames; |
38 |
using namespace MathMLNames; |
| 39 |
|
39 |
|
| 40 |
MathMLTokenElement::MathMLTokenElement(const QualifiedName& tagName, Document& document) |
40 |
MathMLTokenElement::MathMLTokenElement(const QualifiedName& tagName, Document& document) |
| 41 |
: MathMLElement(tagName, document) |
41 |
: MathMLPresentationElement(tagName, document) |
| 42 |
{ |
42 |
{ |
| 43 |
setHasCustomStyleResolveCallbacks(); |
43 |
setHasCustomStyleResolveCallbacks(); |
| 44 |
} |
44 |
} |
|
Lines 50-56
Ref<MathMLTokenElement> MathMLTokenElement::create(const QualifiedName& tagName,
a/Source/WebCore/mathml/MathMLTokenElement.cpp_sec2
|
| 50 |
|
50 |
|
| 51 |
void MathMLTokenElement::didAttachRenderers() |
51 |
void MathMLTokenElement::didAttachRenderers() |
| 52 |
{ |
52 |
{ |
| 53 |
MathMLElement::didAttachRenderers(); |
53 |
MathMLPresentationElement::didAttachRenderers(); |
| 54 |
auto* mathmlRenderer = renderer(); |
54 |
auto* mathmlRenderer = renderer(); |
| 55 |
if (is<RenderMathMLToken>(mathmlRenderer)) |
55 |
if (is<RenderMathMLToken>(mathmlRenderer)) |
| 56 |
downcast<RenderMathMLToken>(*mathmlRenderer).updateTokenContent(); |
56 |
downcast<RenderMathMLToken>(*mathmlRenderer).updateTokenContent(); |
|
Lines 58-80
void MathMLTokenElement::didAttachRenderers()
a/Source/WebCore/mathml/MathMLTokenElement.cpp_sec3
|
| 58 |
|
58 |
|
| 59 |
void MathMLTokenElement::childrenChanged(const ChildChange& change) |
59 |
void MathMLTokenElement::childrenChanged(const ChildChange& change) |
| 60 |
{ |
60 |
{ |
| 61 |
MathMLElement::childrenChanged(change); |
61 |
MathMLPresentationElement::childrenChanged(change); |
| 62 |
auto* mathmlRenderer = renderer(); |
62 |
auto* mathmlRenderer = renderer(); |
| 63 |
if (is<RenderMathMLToken>(mathmlRenderer)) |
63 |
if (is<RenderMathMLToken>(mathmlRenderer)) |
| 64 |
downcast<RenderMathMLToken>(*mathmlRenderer).updateTokenContent(); |
64 |
downcast<RenderMathMLToken>(*mathmlRenderer).updateTokenContent(); |
| 65 |
} |
65 |
} |
| 66 |
|
66 |
|
| 67 |
void MathMLTokenElement::parseAttribute(const QualifiedName& name, const AtomicString& value) |
|
|
| 68 |
{ |
| 69 |
if (name == mathvariantAttr) { |
| 70 |
m_mathVariant = Nullopt; |
| 71 |
if (renderer()) |
| 72 |
MathMLStyle::resolveMathMLStyleTree(renderer()); |
| 73 |
} |
| 74 |
|
| 75 |
MathMLElement::parseAttribute(name, value); |
| 76 |
} |
| 77 |
|
| 78 |
RenderPtr<RenderElement> MathMLTokenElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) |
67 |
RenderPtr<RenderElement> MathMLTokenElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) |
| 79 |
{ |
68 |
{ |
| 80 |
ASSERT(hasTagName(MathMLNames::miTag) || hasTagName(MathMLNames::mnTag) || hasTagName(MathMLNames::msTag) || hasTagName(MathMLNames::mtextTag)); |
69 |
ASSERT(hasTagName(MathMLNames::miTag) || hasTagName(MathMLNames::mnTag) || hasTagName(MathMLNames::msTag) || hasTagName(MathMLNames::mtextTag)); |