Changeset 174677 in webkit
- Timestamp:
- Oct 14, 2014, 2:53:59 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/mathml/MathMLTextElement.cpp (modified) (1 diff)
-
Source/WebCore/mathml/MathMLTextElement.h (modified) (2 diffs)
-
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp (modified) (1 diff)
-
Source/WebCore/rendering/mathml/RenderMathMLOperator.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r174675 r174677 1 2014-10-14 Alejandro G. Castro <alex@igalia.com> 2 3 Changes in the stretchy attribute do not update rendering 4 https://bugs.webkit.org/show_bug.cgi?id=136883 5 6 Reviewed by Darin Adler. 7 8 The test updates the stretchy value in a timeout. 9 10 * mathml/presentation/mo-stretch-update-expected.html: Added. 11 * mathml/presentation/mo-stretch-update.html: Added. 12 1 13 2014-10-14 Andrzej Badowski <a.badowski@samsung.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r174676 r174677 1 2014-10-14 Alejandro G. Castro <alex@igalia.com> 2 3 Changes in the stretchy attribute do not update rendering 4 https://bugs.webkit.org/show_bug.cgi?id=136883 5 6 Reviewed by Darin Adler. 7 8 Test: mathml/presentation/mo-stretch-update.html 9 10 We need to relayout when a change in the stretchy attribute 11 happens. 12 13 * mathml/MathMLTextElement.cpp: 14 (WebCore::MathMLTextElement::parseAttribute): Parse the 15 modifications of the stretchy attribute. 16 * mathml/MathMLTextElement.h: 17 * rendering/mathml/RenderMathMLOperator.cpp: 18 (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded): 19 Add function that receives the value instead of looking for it and 20 checks if the change should schedule a layout. 21 (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute): 22 (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue): 23 Add function that receives the value instead of looking for it. 24 * rendering/mathml/RenderMathMLOperator.h: 25 1 26 2014-10-14 Chris Dumez <cdumez@apple.com> 2 27 -
trunk/Source/WebCore/mathml/MathMLTextElement.cpp
r174375 r174677 65 65 } 66 66 67 void MathMLTextElement::parseAttribute(const QualifiedName& name, const AtomicString& value) 68 { 69 if (name == stretchyAttr) { 70 if (is<RenderMathMLOperator>(renderer())) 71 downcast<RenderMathMLOperator>(*renderer()).setOperatorFlagAndScheduleLayoutIfNeeded(MathMLOperatorDictionary::Stretchy, value); 72 return; 73 } 74 75 MathMLElement::parseAttribute(name, value); 76 } 77 67 78 RenderPtr<RenderElement> MathMLTextElement::createElementRenderer(PassRef<RenderStyle> style) 68 79 { -
trunk/Source/WebCore/mathml/MathMLTextElement.h
r162139 r174677 33 33 namespace WebCore { 34 34 35 class MathMLTextElement : public MathMLElement {35 class MathMLTextElement final : public MathMLElement { 36 36 public: 37 37 static PassRefPtr<MathMLTextElement> create(const QualifiedName& tagName, Document&); … … 47 47 48 48 virtual void childrenChanged(const ChildChange&) override; 49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; 49 50 }; 50 51 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r174619 r174677 1158 1158 } 1159 1159 1160 void RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded(MathMLOperatorDictionary::Flag flag, const AtomicString& attributeValue) 1161 { 1162 unsigned short oldOperatorFlags = m_operatorFlags; 1163 1164 setOperatorFlagFromAttributeValue(flag, attributeValue); 1165 1166 if (oldOperatorFlags != m_operatorFlags) 1167 setNeedsLayoutAndPrefWidthsRecalc(); 1168 } 1169 1160 1170 void RenderMathMLOperator::setOperatorFlagFromAttribute(MathMLOperatorDictionary::Flag flag, const QualifiedName& name) 1161 1171 { 1172 setOperatorFlagFromAttributeValue(flag, element().fastGetAttribute(name)); 1173 } 1174 1175 void RenderMathMLOperator::setOperatorFlagFromAttributeValue(MathMLOperatorDictionary::Flag flag, const AtomicString& attributeValue) 1176 { 1162 1177 ASSERT(!isAnonymous()); 1163 const AtomicString& attributeValue = element().fastGetAttribute(name); 1178 1164 1179 if (attributeValue == "true") 1165 1180 m_operatorFlags |= flag; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h
r174540 r174677 80 80 void updateTokenContent() override final; 81 81 void updateOperatorProperties(); 82 void setOperatorFlagAndScheduleLayoutIfNeeded(MathMLOperatorDictionary::Flag, const AtomicString& attributeValue); 82 83 83 84 protected: … … 187 188 188 189 void setOperatorFlagFromAttribute(MathMLOperatorDictionary::Flag, const QualifiedName&); 190 void setOperatorFlagFromAttributeValue(MathMLOperatorDictionary::Flag, const AtomicString& attributeValue); 189 191 void setOperatorPropertiesFromOpDictEntry(const MathMLOperatorDictionary::Entry*); 190 192 virtual void SetOperatorProperties();
Note:
See TracChangeset
for help on using the changeset viewer.