Changeset 199771 in webkit
- Timestamp:
- Apr 20, 2016 6:25:39 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199770 r199771 1 2016-04-20 Frederic Wang <fwang@igalia.com> 2 3 Refactor RenderMathMLSpace to avoid using flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=155168 5 6 Reviewed by Martin Robinson. 7 8 * mathml/presentation/mspace-prefered-width-expected.html: Update the expectation so that the logical width and preferred width are both equal to the one specified by the width attribute. 9 1 10 2016-04-20 Carlos Garcia Campos <cgarcia@igalia.com> 2 11 -
trunk/LayoutTests/mathml/presentation/mspace-prefered-width-expected.html
r152840 r199771 15 15 </td> 16 16 <td> 17 <span style="display: inline-block; width: 50px; height: 10px; background:green; margin-right: 50px;"></span>17 <span style="display: inline-block; width: 50px; height: 10px; background:green;"></span> 18 18 </td> 19 19 <td> 20 <span style="display: inline-block; width: 50px; height: 10px; background:green; margin-right: -40px;"></span>20 <span style="display: inline-block; width: 50px; height: 10px; background:green;"></span> 21 21 </td> 22 22 </tr> -
trunk/Source/WebCore/ChangeLog
r199769 r199771 1 2016-04-20 Frederic Wang <fwang@igalia.com> 2 3 Refactor RenderMathMLSpace to avoid using flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=155168 5 6 Reviewed by Martin Robinson. 7 8 No new tests, already covered by existing tests. The behavior of mspace-prefered-width-expected is not specified by the MathML recommendation, we update that test to match our new behavior. 9 10 * rendering/mathml/RenderMathMLSpace.cpp: Implement layout functions without passing by flebox. 11 (WebCore::RenderMathMLSpace::computePreferredLogicalWidths): Implement this function. 12 (WebCore::RenderMathMLSpace::layoutBlock): Implement this function. 13 (WebCore::RenderMathMLSpace::computeIntrinsicLogicalWidths): Deleted. 14 (WebCore::RenderMathMLSpace::updateLogicalWidth): Deleted. 15 (WebCore::RenderMathMLSpace::updateLogicalHeight): Deleted. 16 * rendering/mathml/RenderMathMLSpace.h: Update function declarations. 17 1 18 2016-04-20 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.cpp
r194496 r199771 45 45 } 46 46 47 void RenderMathMLSpace::compute IntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const47 void RenderMathMLSpace::computePreferredLogicalWidths() 48 48 { 49 minLogicalWidth = m_width; 50 maxLogicalWidth = m_width; 49 ASSERT(preferredLogicalWidthsDirty()); 50 51 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = m_width; 52 53 setPreferredLogicalWidthsDirty(false); 51 54 } 52 55 … … 76 79 } 77 80 78 void RenderMathMLSpace:: updateLogicalWidth()81 void RenderMathMLSpace::layoutBlock(bool relayoutChildren, LayoutUnit) 79 82 { 83 ASSERT(needsLayout()); 84 85 if (!relayoutChildren && simplifiedLayout()) 86 return; 87 80 88 setLogicalWidth(m_width); 81 } 89 setLogicalHeight(m_height + m_depth); 82 90 83 void RenderMathMLSpace::updateLogicalHeight() 84 { 85 setLogicalHeight(m_height + m_depth); 91 clearNeedsLayout(); 86 92 } 87 93 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.h
r197563 r199771 40 40 41 41 private: 42 const char* renderName() const override { return isAnonymous() ? "RenderMathMLSpace (anonymous)" : "RenderMathMLSpace"; } 43 bool isRenderMathMLSpace() const override { return true; } 44 void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override; 45 bool isChildAllowed(const RenderObject&, const RenderStyle&) const override { return false; } 46 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const override; 47 void updateFromElement() override; 48 Optional<int> firstLineBaseline() const override; 49 void updateLogicalWidth() override; 50 void updateLogicalHeight() override; 42 const char* renderName() const final { return isAnonymous() ? "RenderMathMLSpace (anonymous)" : "RenderMathMLSpace"; } 43 bool isRenderMathMLSpace() const final { return true; } 44 void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final; 45 bool isChildAllowed(const RenderObject&, const RenderStyle&) const final { return false; } 46 void updateFromElement() final; 47 void computePreferredLogicalWidths() final; 48 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 49 Optional<int> firstLineBaseline() const final; 51 50 52 51 LayoutUnit m_width;
Note: See TracChangeset
for help on using the changeset viewer.