Changeset 203553 in webkit
- Timestamp:
- Jul 21, 2016 10:33:01 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 19 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/CMakeLists.txt
r203494 r203553 1996 1996 mathml/MathMLSpaceElement.cpp 1997 1997 mathml/MathMLTextElement.cpp 1998 mathml/MathMLUnderOverElement.cpp 1998 1999 1999 2000 page/AutoscrollController.cpp -
trunk/Source/WebCore/ChangeLog
r203552 r203553 1 2016-07-21 Frederic Wang <fwang@igalia.com> 2 3 Move parsing of accentunder and accent attributes from renderer to element classes 4 https://bugs.webkit.org/show_bug.cgi?id=159625 5 6 Reviewed by Brent Fulgham. 7 8 We introduce a new MathMLUnderOverElement that is used for elements munder, mover and 9 munderover in order to create RenderMathMLUnderOver and parse and expose the values of the 10 accent and accentunder attributes. This is one more step toward moving MathML attribute 11 parsing to the DOM (bug 156536). We also do minor clean-up for this and previous renderer 12 classes that no longer do attribute parsing: the MathMLNames namespace is no longer necessary 13 and constructors can take a more accurate element type. 14 15 No new tests, already covered by existing test. 16 17 * CMakeLists.txt: Add MathMLUnderOverElement files. 18 * WebCore.xcodeproj/project.pbxproj: Ditto. 19 * mathml/MathMLAllInOne.cpp: Ditto. 20 * mathml/MathMLElement.cpp: 21 (WebCore::MathMLElement::cachedBooleanAttribute): Add parsing of boolean attributes. 22 * mathml/MathMLElement.h: New type and helper functions for boolean attributes. 23 * mathml/MathMLInlineContainerElement.cpp: 24 (WebCore::MathMLInlineContainerElement::createElementRenderer): Remove handling of 25 under/over/underover elements. 26 * mathml/MathMLScriptsElement.cpp: 27 (WebCore::MathMLScriptsElement::MathMLScriptsElement): Remove inline keyword to avoid link 28 errors now that MathMLUnderOverElement overrides that class. 29 * mathml/MathMLScriptsElement.h: Allow MathMLUnderOverElement to override this class. 30 * mathml/MathMLUnderOverElement.cpp: 31 (WebCore::MathMLUnderOverElement::MathMLUnderOverElement): 32 (WebCore::MathMLUnderOverElement::create): 33 (WebCore::MathMLUnderOverElement::accent): Helper function to access the accent value. 34 (WebCore::MathMLUnderOverElement::accentUnder): Helper function to access the accentunder value. 35 (WebCore::MathMLUnderOverElement::parseAttribute): Make accent and accentunder dirty. 36 (WebCore::MathMLUnderOverElement::createElementRenderer): Create RenderMathMLUnderOver 37 * mathml/MathMLUnderOverElement.h: 38 * mathml/mathtags.in: Map under/over/underover to MathMLUnderOverElement. 39 * rendering/mathml/RenderMathMLFraction.cpp: Remove MathMLNames and make the constructor 40 take a MathMLFractionElement. 41 (WebCore::RenderMathMLFraction::RenderMathMLFraction): 42 * rendering/mathml/RenderMathMLFraction.h: 43 * rendering/mathml/RenderMathMLPadded.cpp: Remove MathMLNames and make the constructor 44 take a MathMLPaddedElement. 45 (WebCore::RenderMathMLPadded::RenderMathMLPadded): 46 * rendering/mathml/RenderMathMLPadded.h: 47 * rendering/mathml/RenderMathMLScripts.cpp: Remove MathMLNames and make the constructor 48 take a MathMLScriptsElement. Also rename scriptsElement() to element(). 49 (WebCore::RenderMathMLScripts::RenderMathMLScripts): 50 (WebCore::RenderMathMLScripts::element): 51 (WebCore::RenderMathMLScripts::getScriptMetricsAndLayoutIfNeeded): 52 (WebCore::RenderMathMLScripts::scriptsElement): Deleted. 53 * rendering/mathml/RenderMathMLScripts.h: 54 * rendering/mathml/RenderMathMLUnderOver.cpp: Remove MathMLNames and make the constructor 55 take a RenderMathMLUnderOver. 56 (WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): 57 (WebCore::RenderMathMLUnderOver::element): 58 (WebCore::RenderMathMLUnderOver::hasAccent): Use the helper functions for accent and accentunder. 59 * rendering/mathml/RenderMathMLUnderOver.h: 60 1 61 2016-07-21 Chris Dumez <cdumez@apple.com> 2 62 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r203459 r203553 6909 6909 FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002615E0 /* MathMLTextElement.cpp */; }; 6910 6910 FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002615E0 /* MathMLTextElement.h */; }; 6911 FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */; }; 6912 FA654A6C1108ABED002626F1 /* MathMLUnderOverElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FA654A6A1108ABED002626F1 /* MathMLUnderOverElement.h */; }; 6911 6913 FABE72F41059C1EB00D999DD /* MathMLElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */; }; 6912 6914 FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FABE72EE1059C1EB00D999DD /* MathMLElement.h */; }; … … 15088 15090 FA654A691108ABED002615E0 /* MathMLTextElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLTextElement.cpp; sourceTree = "<group>"; }; 15089 15091 FA654A6A1108ABED002615E0 /* MathMLTextElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLTextElement.h; sourceTree = "<group>"; }; 15092 FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLUnderOverElement.cpp; sourceTree = "<group>"; }; 15093 FA654A6A1108ABED002626F1 /* MathMLUnderOverElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLUnderOverElement.h; sourceTree = "<group>"; }; 15090 15094 FA6E466FCD0418A9966A5B60 /* DNSResolveQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSResolveQueue.h; sourceTree = "<group>"; }; 15091 15095 FABE72ED1059C1EB00D999DD /* MathMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLElement.cpp; sourceTree = "<group>"; }; … … 24912 24916 FA654A691108ABED002615E0 /* MathMLTextElement.cpp */, 24913 24917 FA654A6A1108ABED002615E0 /* MathMLTextElement.h */, 24918 FA654A691108ABED002626F1 /* MathMLUnderOverElement.cpp */, 24919 FA654A6A1108ABED002626F1 /* MathMLUnderOverElement.h */, 24914 24920 FABE72F31059C1EB00D999DD /* mathtags.in */, 24915 24921 ); … … 27450 27456 4FA65A6C1108ABED002615E0 /* MathMLSpaceElement.h in Headers */, 27451 27457 FA654A6C1108ABED002615E0 /* MathMLTextElement.h in Headers */, 27458 FA654A6C1108ABED002626F1 /* MathMLUnderOverElement.h in Headers */, 27452 27459 439046EA12DA25E812AF80AC /* MathOperator.h in Headers */, 27453 27460 49D5DC2C0F423A73008F20FD /* Matrix3DTransformOperation.h in Headers */, … … 31283 31290 4FA65A6B1108ABED002615E0 /* MathMLSpaceElement.cpp in Sources */, 31284 31291 FA654A6B1108ABED002615E0 /* MathMLTextElement.cpp in Sources */, 31292 FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */, 31285 31293 439046E912DA25E812AF80AC /* MathOperator.cpp in Sources */, 31286 31294 49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */, -
trunk/Source/WebCore/mathml/MathMLAllInOne.cpp
r203396 r203553 36 36 #include "MathMLSelectElement.cpp" 37 37 #include "MathMLTextElement.cpp" 38 #include "MathMLUnderOverElement.cpp" 38 39 -
trunk/Source/WebCore/mathml/MathMLElement.cpp
r203324 r203553 526 526 } 527 527 528 const MathMLElement::BooleanValue& MathMLElement::cachedBooleanAttribute(const QualifiedName& name, BooleanAttribute& attribute) 529 { 530 if (!attribute.dirty) 531 return attribute.value; 532 533 // In MathML, attribute values are case-sensitive. 534 const AtomicString& value = attributeWithoutSynchronization(name); 535 if (value == "true") 536 attribute.value = BooleanValue::True; 537 else if (value == "false") 538 attribute.value = BooleanValue::False; 539 else 540 attribute.value = BooleanValue::Default; 541 attribute.dirty = false; 542 543 return attribute.value; 544 } 545 528 546 } 529 547 -
trunk/Source/WebCore/mathml/MathMLElement.h
r203228 r203553 67 67 static Length parseMathMLLength(const String&); 68 68 69 enum class BooleanValue { True, False, Default }; 70 struct BooleanAttribute { 71 BooleanValue value { BooleanValue::Default }; 72 bool dirty { true }; 73 }; 74 69 75 protected: 70 76 MathMLElement(const QualifiedName& tagName, Document&); … … 84 90 85 91 const Length& cachedMathMLLength(const QualifiedName&, Length&); 92 const BooleanValue& cachedBooleanAttribute(const QualifiedName&, BooleanAttribute&); 86 93 87 94 private: -
trunk/Source/WebCore/mathml/MathMLInlineContainerElement.cpp
r203396 r203553 37 37 #include "RenderMathMLRoot.h" 38 38 #include "RenderMathMLRow.h" 39 #include "RenderMathMLUnderOver.h"40 39 41 40 namespace WebCore { … … 66 65 if (hasTagName(annotation_xmlTag) || hasTagName(merrorTag) || hasTagName(mphantomTag) || hasTagName(mrowTag) || hasTagName(mstyleTag)) 67 66 return createRenderer<RenderMathMLRow>(*this, WTFMove(style)); 68 if (hasTagName(moverTag) || hasTagName(munderTag) || hasTagName(munderoverTag))69 return createRenderer<RenderMathMLUnderOver>(*this, WTFMove(style));70 67 if (hasTagName(msqrtTag) || hasTagName(mrootTag)) 71 68 return createRenderer<RenderMathMLRoot>(*this, WTFMove(style)); -
trunk/Source/WebCore/mathml/MathMLScriptsElement.cpp
r203396 r203553 36 36 using namespace MathMLNames; 37 37 38 inlineMathMLScriptsElement::MathMLScriptsElement(const QualifiedName& tagName, Document& document)38 MathMLScriptsElement::MathMLScriptsElement(const QualifiedName& tagName, Document& document) 39 39 : MathMLInlineContainerElement(tagName, document) 40 40 { -
trunk/Source/WebCore/mathml/MathMLScriptsElement.h
r203396 r203553 31 31 namespace WebCore { 32 32 33 class MathMLScriptsElement final: public MathMLInlineContainerElement {33 class MathMLScriptsElement : public MathMLInlineContainerElement { 34 34 public: 35 35 static Ref<MathMLScriptsElement> create(const QualifiedName& tagName, Document&); … … 37 37 const Length& superscriptShift(); 38 38 39 protected: 40 MathMLScriptsElement(const QualifiedName& tagName, Document&); 41 39 42 private: 40 MathMLScriptsElement(const QualifiedName& tagName, Document&); 41 RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; 42 void parseAttribute(const QualifiedName&, const AtomicString&) final; 43 RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override; 44 void parseAttribute(const QualifiedName&, const AtomicString&) override; 43 45 44 46 Length m_subscriptShift; -
trunk/Source/WebCore/mathml/MathMLUnderOverElement.cpp
r203552 r203553 28 28 29 29 #if ENABLE(MATHML) 30 #include "MathML ScriptsElement.h"30 #include "MathMLUnderOverElement.h" 31 31 32 #include "RenderMathML Scripts.h"32 #include "RenderMathMLUnderOver.h" 33 33 34 34 namespace WebCore { … … 36 36 using namespace MathMLNames; 37 37 38 inline MathML ScriptsElement::MathMLScriptsElement(const QualifiedName& tagName, Document& document)39 : MathML InlineContainerElement(tagName, document)38 inline MathMLUnderOverElement::MathMLUnderOverElement(const QualifiedName& tagName, Document& document) 39 : MathMLScriptsElement(tagName, document) 40 40 { 41 41 } 42 42 43 Ref<MathML ScriptsElement> MathMLScriptsElement::create(const QualifiedName& tagName, Document& document)43 Ref<MathMLUnderOverElement> MathMLUnderOverElement::create(const QualifiedName& tagName, Document& document) 44 44 { 45 return adoptRef(*new MathML ScriptsElement(tagName, document));45 return adoptRef(*new MathMLUnderOverElement(tagName, document)); 46 46 } 47 47 48 const MathMLElement:: Length& MathMLScriptsElement::subscriptShift()48 const MathMLElement::BooleanValue& MathMLUnderOverElement::accent() 49 49 { 50 return cached MathMLLength(subscriptshiftAttr, m_subscriptShift);50 return cachedBooleanAttribute(accentAttr, m_accent); 51 51 } 52 52 53 const MathMLElement:: Length& MathMLScriptsElement::superscriptShift()53 const MathMLElement::BooleanValue& MathMLUnderOverElement::accentUnder() 54 54 { 55 return cached MathMLLength(superscriptshiftAttr, m_superscriptShift);55 return cachedBooleanAttribute(accentunderAttr, m_accentUnder); 56 56 } 57 57 58 void MathML ScriptsElement::parseAttribute(const QualifiedName& name, const AtomicString& value)58 void MathMLUnderOverElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 59 59 { 60 if (name == subscriptshiftAttr)61 m_ subscriptShift.dirty = true;62 else if (name == superscriptshiftAttr)63 m_ superscriptShift.dirty = true;60 if (name == accentAttr) 61 m_accent.dirty = true; 62 else if (name == accentunderAttr) 63 m_accentUnder.dirty = true; 64 64 65 65 MathMLElement::parseAttribute(name, value); 66 66 } 67 67 68 RenderPtr<RenderElement> MathML ScriptsElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)68 RenderPtr<RenderElement> MathMLUnderOverElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&) 69 69 { 70 ASSERT(hasTagName(m subTag) || hasTagName(msupTag) || hasTagName(msubsupTag) || hasTagName(mmultiscriptsTag));71 return createRenderer<RenderMathML Scripts>(*this, WTFMove(style));70 ASSERT(hasTagName(munderTag) || hasTagName(moverTag) || hasTagName(munderoverTag)); 71 return createRenderer<RenderMathMLUnderOver>(*this, WTFMove(style)); 72 72 } 73 73 -
trunk/Source/WebCore/mathml/MathMLUnderOverElement.h
r203552 r203553 27 27 28 28 #if ENABLE(MATHML) 29 #include "MathML InlineContainerElement.h"29 #include "MathMLScriptsElement.h" 30 30 31 31 namespace WebCore { 32 32 33 class MathML ScriptsElement final : public MathMLInlineContainerElement {33 class MathMLUnderOverElement final : public MathMLScriptsElement { 34 34 public: 35 static Ref<MathML ScriptsElement> create(const QualifiedName& tagName, Document&);36 const Length& subscriptShift();37 const Length& superscriptShift();35 static Ref<MathMLUnderOverElement> create(const QualifiedName& tagName, Document&); 36 const BooleanValue& accent(); 37 const BooleanValue& accentUnder(); 38 38 39 39 private: 40 MathML ScriptsElement(const QualifiedName& tagName, Document&);40 MathMLUnderOverElement(const QualifiedName& tagName, Document&); 41 41 RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final; 42 42 void parseAttribute(const QualifiedName&, const AtomicString&) final; 43 43 44 Length m_subscriptShift;45 Length m_superscriptShift;44 BooleanAttribute m_accent; 45 BooleanAttribute m_accentUnder; 46 46 }; 47 47 -
trunk/Source/WebCore/mathml/mathtags.in
r203396 r203553 16 16 mrow interfaceName=MathMLInlineContainerElement 17 17 mstyle interfaceName=MathMLInlineContainerElement 18 mover interfaceName=MathML InlineContainerElement19 munder interfaceName=MathML InlineContainerElement20 munderover interfaceName=MathML InlineContainerElement18 mover interfaceName=MathMLUnderOverElement 19 munder interfaceName=MathMLUnderOverElement 20 munderover interfaceName=MathMLUnderOverElement 21 21 msqrt interfaceName=MathMLInlineContainerElement 22 22 mroot interfaceName=MathMLInlineContainerElement -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
r203395 r203553 32 32 33 33 #include "GraphicsContext.h" 34 #include "MathML Names.h"34 #include "MathMLFractionElement.h" 35 35 #include "PaintInfo.h" 36 36 #include <cmath> … … 38 38 namespace WebCore { 39 39 40 using namespace MathMLNames; 41 42 RenderMathMLFraction::RenderMathMLFraction(MathMLInlineContainerElement& element, RenderStyle&& style) 40 RenderMathMLFraction::RenderMathMLFraction(MathMLFractionElement& element, RenderStyle&& style) 43 41 : RenderMathMLBlock(element, WTFMove(style)) 44 42 { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h
r203395 r203553 36 36 namespace WebCore { 37 37 38 class MathMLFractionElement; 39 38 40 class RenderMathMLFraction final : public RenderMathMLBlock { 39 41 public: 40 RenderMathMLFraction(MathML InlineContainerElement&, RenderStyle&&);42 RenderMathMLFraction(MathMLFractionElement&, RenderStyle&&); 41 43 42 44 float relativeLineThickness() const { return m_defaultLineThickness ? m_lineThickness / m_defaultLineThickness : LayoutUnit(0); } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp
r203150 r203553 29 29 #if ENABLE(MATHML) 30 30 31 #include "MathMLNames.h"32 31 #include <cmath> 33 32 34 33 namespace WebCore { 35 34 36 using namespace MathMLNames; 37 38 RenderMathMLPadded::RenderMathMLPadded(Element& element, RenderStyle&& style) 35 RenderMathMLPadded::RenderMathMLPadded(MathMLPaddedElement& element, RenderStyle&& style) 39 36 : RenderMathMLRow(element, WTFMove(style)) 40 37 { -
trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.h
r203228 r203553 35 35 class RenderMathMLPadded final : public RenderMathMLRow { 36 36 public: 37 RenderMathMLPadded( Element&, RenderStyle&&);37 RenderMathMLPadded(MathMLPaddedElement&, RenderStyle&&); 38 38 39 39 private: -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp
r203396 r203553 38 38 namespace WebCore { 39 39 40 using namespace MathMLNames;41 42 40 static bool isPrescriptDelimiter(const RenderObject& renderObject) 43 41 { … … 45 43 } 46 44 47 RenderMathMLScripts::RenderMathMLScripts( Element& element, RenderStyle&& style)45 RenderMathMLScripts::RenderMathMLScripts(MathMLScriptsElement& element, RenderStyle&& style) 48 46 : RenderMathMLBlock(element, WTFMove(style)) 49 47 { … … 67 65 } 68 66 69 MathMLScriptsElement& RenderMathMLScripts::scriptsElement() const 70 { 71 ASSERT(!isRenderMathMLUnderOver()); 67 MathMLScriptsElement& RenderMathMLScripts::element() const 68 { 72 69 return static_cast<MathMLScriptsElement&>(nodeForNonAnonymous()); 73 70 } … … 261 258 // It is not clear how to interpret the default shift and it is not available yet anyway. 262 259 // Hence we just pass 0 as the default value used by toUserUnits. 263 LayoutUnit specifiedMinSubShift = toUserUnits( scriptsElement().subscriptShift(), style(), 0);260 LayoutUnit specifiedMinSubShift = toUserUnits(element().subscriptShift(), style(), 0); 264 261 minSubScriptShift = std::max(minSubScriptShift, specifiedMinSubShift); 265 262 } … … 270 267 // It is not clear how to interpret the default shift and it is not available yet anyway. 271 268 // Hence we just pass 0 as the default value used by toUserUnits. 272 LayoutUnit specifiedMinSupShift = toUserUnits( scriptsElement().superscriptShift(), style(), 0);269 LayoutUnit specifiedMinSupShift = toUserUnits(element().superscriptShift(), style(), 0); 273 270 minSupScriptShift = std::max(minSupScriptShift, specifiedMinSupShift); 274 271 } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h
r203396 r203553 39 39 class RenderMathMLScripts : public RenderMathMLBlock { 40 40 public: 41 RenderMathMLScripts( Element&, RenderStyle&&);41 RenderMathMLScripts(MathMLScriptsElement&, RenderStyle&&); 42 42 RenderMathMLOperator* unembellishedOperator() final; 43 43 … … 52 52 53 53 private: 54 MathMLScriptsElement& scriptsElement() const;54 MathMLScriptsElement& element() const; 55 55 Optional<int> firstLineBaseline() const final; 56 56 bool getBaseAndScripts(RenderBox*& base, RenderBox*& firstPostScript, RenderBox*& firstPreScript); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.cpp
r203108 r203553 30 30 31 31 #include "GraphicsContext.h" 32 #include "MathMLNames.h"33 32 #include "PaintInfo.h" 34 33 35 34 namespace WebCore { 36 37 using namespace MathMLNames;38 35 39 36 RenderMathMLSpace::RenderMathMLSpace(MathMLSpaceElement& element, RenderStyle&& style) -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp
r203324 r203553 32 32 33 33 #include "MathMLElement.h" 34 #include "MathMLNames.h"35 34 #include "MathMLOperatorDictionary.h" 35 #include "MathMLUnderOverElement.h" 36 36 #include "RenderIterator.h" 37 37 #include "RenderMathMLOperator.h" … … 39 39 namespace WebCore { 40 40 41 using namespace MathMLNames; 42 43 RenderMathMLUnderOver::RenderMathMLUnderOver(Element& element, RenderStyle&& style) 41 RenderMathMLUnderOver::RenderMathMLUnderOver(MathMLUnderOverElement& element, RenderStyle&& style) 44 42 : RenderMathMLScripts(element, WTFMove(style)) 45 43 { 44 } 45 46 MathMLUnderOverElement& RenderMathMLUnderOver::element() const 47 { 48 return static_cast<MathMLUnderOverElement&>(nodeForNonAnonymous()); 46 49 } 47 50 … … 166 169 ASSERT(m_scriptType == UnderOver || (accentUnder && m_scriptType == Under) || (!accentUnder && m_scriptType == Over)); 167 170 168 const AtomicString& attributeValue = element()->attributeWithoutSynchronization(accentUnder ? accentunderAttr : accentAttr);169 if (attributeValue == "true")171 const MathMLElement::BooleanValue& attributeValue = accentUnder ? element().accentUnder() : element().accent(); 172 if (attributeValue == MathMLElement::BooleanValue::True) 170 173 return true; 171 if (attributeValue == "false")174 if (attributeValue == MathMLElement::BooleanValue::False) 172 175 return false; 173 176 RenderBox& script = accentUnder ? under() : over(); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h
r203228 r203553 33 33 namespace WebCore { 34 34 35 class MathMLUnderOverElement; 36 35 37 class RenderMathMLUnderOver final : public RenderMathMLScripts { 36 38 public: 37 RenderMathMLUnderOver( Element&, RenderStyle&&);39 RenderMathMLUnderOver(MathMLUnderOverElement&, RenderStyle&&); 38 40 39 41 private: … … 41 43 bool isRenderMathMLUnderOver() const final { return true; } 42 44 const char* renderName() const final { return "RenderMathMLUnderOver"; } 45 MathMLUnderOverElement& element() const; 43 46 44 47 void computePreferredLogicalWidths() final;
Note: See TracChangeset
for help on using the changeset viewer.