Changeset 198998 in webkit
- Timestamp:
- Apr 4, 2016 1:25:37 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198996 r198998 1 2016-04-04 Frederic Wang <fwang@igalia.com> 2 3 Refactor RenderMathMLRow layout functions to avoid using flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=153208 5 6 Reviewed by Martin Robinson. 7 8 Apply some small adjustments to MathML tests after the refactoring of RenderMathMLRow. 9 10 * TestExpectations: Skip fractions-positions reftest for now. The small difference will be fixed after refactoring completely RenderMathMLFraction. 11 We also ignore a test for margin/padding on MathML renderers. 12 * platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.png: Update reference to take into account small changes in stretch size. 13 The intended test behavior (reading variants and construction from the MATH table) is preserved. 14 * platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt: ditto. 15 * platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.png: ditto. 16 * platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: ditto. 17 1 18 2016-04-04 Hunseop Jeong <hs85.jeong@samsung.com> 2 19 -
trunk/LayoutTests/TestExpectations
r198955 r198998 112 112 # This test verifies dynamic manipulation of the mroot and msqrt elements. 113 113 mathml/roots-removeChild.html [ ImageOnlyFailure ] 114 115 # There is a small 1px size difference but this will be fixed when we refactor completely RenderMathMLFraction. 116 mathml/presentation/fractions-positions.html [ Skip ] 117 118 # For now we ignore margin/padding/border properties of MathML renderers. 119 mathml/presentation/bug97990.html [ Skip ] 114 120 115 121 # This test verifies that a mismatch reftest will fail as intended if both results are same. (introduced in r93187) -
trunk/LayoutTests/platform/gtk/mathml/opentype/opentype-stretchy-horizontal-expected.txt
r174605 r198998 5 5 RenderBody {BODY} at (8,16) size 784x125 6 6 RenderBlock {P} at (0,0) size 784x25 7 RenderMathMLMath {math} at (0,2) size 1 8x23 [padding: 0 1 0 1]8 RenderMathMLRow {mstyle} at (1,0) size 16x239 RenderMathMLUnderOver {mover} at (0,0) size 16x2310 RenderMathMLOperator {mo} at ( 0,1) size 16x227 RenderMathMLMath {math} at (0,2) size 10x23 [padding: 0 1 0 1] 8 RenderMathMLRow {mstyle} at (1,0) size 8x23 9 RenderMathMLUnderOver {mover} at (0,0) size 8x23 10 RenderMathMLOperator {mo} at (-5,1) size 17x22 11 11 RenderMathMLBlock (anonymous, flex) at (2,0) size 11x4 12 12 RenderBlock (anonymous) at (0,0) size 1x4 13 13 RenderText at (0,-3) size 1x0 14 14 text run at (0,-3) width 1: "\x{219C}" 15 RenderMathMLSpace {mspace} at ( 4,0) size 8x115 RenderMathMLSpace {mspace} at (0,0) size 8x1 16 16 RenderText {#text} at (0,0) size 0x0 17 17 RenderBlock {P} at (0,41) size 784x25 18 RenderMathMLMath {math} at (0,2) size 28x23 [padding: 0 1 0 1]19 RenderMathMLRow {mstyle} at (1,0) size 26x2320 RenderMathMLUnderOver {mover} at (0,0) size 26x2321 RenderMathMLOperator {mo} at ( 0,1) size 26x2218 RenderMathMLMath {math} at (0,2) size 17x23 [padding: 0 1 0 1] 19 RenderMathMLRow {mstyle} at (1,0) size 15x23 20 RenderMathMLUnderOver {mover} at (0,0) size 15x23 21 RenderMathMLOperator {mo} at (-6,1) size 27x22 22 22 RenderMathMLBlock (anonymous, flex) at (2,0) size 21x4 23 23 RenderBlock (anonymous) at (0,0) size 1x4 24 24 RenderText at (0,-3) size 1x0 25 25 text run at (0,-3) width 1: "\x{219C}" 26 RenderMathMLSpace {mspace} at ( 5,0) size 16x126 RenderMathMLSpace {mspace} at (0,0) size 15x1 27 27 RenderText {#text} at (0,0) size 0x0 28 28 RenderBlock {P} at (0,82) size 784x43 29 RenderMathMLMath {math} at (0,0) size 15 8x43 [padding: 0 1 0 1]30 RenderMathMLRow {mstyle} at (1,0) size 15 6x4331 RenderMathMLUnderOver {mover} at (0,0) size 15 6x4332 RenderMathMLOperator {mo} at ( 0,1) size 156x4229 RenderMathMLMath {math} at (0,0) size 152x43 [padding: 0 1 0 1] 30 RenderMathMLRow {mstyle} at (1,0) size 150x43 31 RenderMathMLUnderOver {mover} at (0,0) size 150x43 32 RenderMathMLOperator {mo} at (-3,1) size 156x42 33 33 RenderMathMLBlock (anonymous, flex) at (2,0) size 151x4 34 34 RenderBlock (anonymous) at (0,0) size 1x4 35 35 RenderText at (0,-3) size 1x0 36 36 text run at (0,-3) width 1: "\x{219C}" 37 RenderMathMLSpace {mspace} at ( 2,0) size 151x137 RenderMathMLSpace {mspace} at (0,0) size 150x1 38 38 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt
r191456 r198998 5 5 RenderBody {BODY} at (8,16) size 784x121 6 6 RenderBlock {P} at (0,0) size 784x24 7 RenderMathMLMath {math} at (0,3) size 1 8x22 [padding: 0 1 0 1]8 RenderMathMLRow {mstyle} at (1,0) size 16x229 RenderMathMLUnderOver {mover} at (0,0) size 16x2210 RenderMathMLOperator {mo} at ( 0,1) size 16x217 RenderMathMLMath {math} at (0,3) size 10x22 [padding: 0 1 0 1] 8 RenderMathMLRow {mstyle} at (1,0) size 8x22 9 RenderMathMLUnderOver {mover} at (0,0) size 8x22 10 RenderMathMLOperator {mo} at (-5,1) size 17x21 11 11 RenderMathMLBlock (anonymous, flex) at (2,0) size 11x4 12 12 RenderBlock (anonymous) at (0,0) size 2x4 13 13 RenderText at (0,-3) size 2x0 14 14 text run at (0,-3) width 2: "\x{219C}" 15 RenderMathMLSpace {mspace} at ( 4,0) size 8x115 RenderMathMLSpace {mspace} at (0,0) size 8x1 16 16 RenderText {#text} at (0,0) size 0x0 17 17 RenderBlock {P} at (0,40) size 784x24 18 RenderMathMLMath {math} at (0,3) size 28x22 [padding: 0 1 0 1]19 RenderMathMLRow {mstyle} at (1,0) size 26x2220 RenderMathMLUnderOver {mover} at (0,0) size 26x2221 RenderMathMLOperator {mo} at ( 0,1) size 26x2118 RenderMathMLMath {math} at (0,3) size 17x22 [padding: 0 1 0 1] 19 RenderMathMLRow {mstyle} at (1,0) size 15x22 20 RenderMathMLUnderOver {mover} at (0,0) size 15x22 21 RenderMathMLOperator {mo} at (-6,1) size 27x21 22 22 RenderMathMLBlock (anonymous, flex) at (2,0) size 22x4 23 23 RenderBlock (anonymous) at (0,0) size 2x4 24 24 RenderText at (0,-3) size 2x0 25 25 text run at (0,-3) width 2: "\x{219C}" 26 RenderMathMLSpace {mspace} at ( 5,0) size 16x126 RenderMathMLSpace {mspace} at (0,0) size 15x1 27 27 RenderText {#text} at (0,0) size 0x0 28 28 RenderBlock {P} at (0,80) size 784x41 29 RenderMathMLMath {math} at (0,0) size 15 8x42 [padding: 0 1 0 1]30 RenderMathMLRow {mstyle} at (1,0) size 15 6x4231 RenderMathMLUnderOver {mover} at (0,0) size 15 6x4232 RenderMathMLOperator {mo} at ( 0,1) size 156x4129 RenderMathMLMath {math} at (0,0) size 152x42 [padding: 0 1 0 1] 30 RenderMathMLRow {mstyle} at (1,0) size 150x42 31 RenderMathMLUnderOver {mover} at (0,0) size 150x42 32 RenderMathMLOperator {mo} at (-3,1) size 156x41 33 33 RenderMathMLBlock (anonymous, flex) at (2,0) size 151x4 34 34 RenderBlock (anonymous) at (0,0) size 2x4 35 35 RenderText at (0,-3) size 2x0 36 36 text run at (0,-3) width 2: "\x{219C}" 37 RenderMathMLSpace {mspace} at ( 2,0) size 151x137 RenderMathMLSpace {mspace} at (0,0) size 150x1 38 38 RenderText {#text} at (0,0) size 0x0 -
trunk/Source/WebCore/ChangeLog
r198997 r198998 1 2016-04-04 Frederic Wang <fwang@igalia.com> 2 3 Refactor RenderMathMLRow layout functions to avoid using flexbox 4 https://bugs.webkit.org/show_bug.cgi?id=153208 5 6 Reviewed by Martin Robinson. 7 8 This is the first patch to rewrite MathML layout without relying on 9 flexboxes or anonymous renderers. 10 We have done some temporary changes to allow overriding of 11 layoutBlock and to implement paintChildren, but this will be remove in a 12 follow-up patch. We also implement firstLineBaseline, 13 computePreferredLogicalWidths and layoutBlock of RenderMathMLRow without 14 using any flexbox functions. We adjust a bit the MathML CSS to take into 15 account these changes. Finally, we delete the unused helper function to 16 create anonymous RenderMathMLRow. 17 18 * css/mathml.css: 19 (ms, mtext, mi, mn, mo, annotation, mtd): Prevent linebreaking inside token elements and table cells, otherwise this cause test failures with the new implementation of RenderMathMLRow. 20 (math, mrow, mfenced, merror, mphantom, mstyle, menclose): Deleted. We no longer rely on flexbox for baseline alignment of RenderMathMLRow. 21 * rendering/RenderFlexibleBox.h: Allow overrider of the LayoutBlock for the moment. 22 * rendering/RenderObject.h: 23 (WebCore::RenderObject::isRenderMathMLMenclose): Add helper function. 24 * rendering/mathml/RenderMathMLMenclose.h: ditto. 25 * rendering/mathml/RenderMathMLBlock.h: 26 (WebCore::ascentForChild): Add helper function to easily compute the ascent of a child. 27 * rendering/mathml/RenderMathMLRow.cpp: Reimplement the class without using the flexbox layout. 28 (WebCore::RenderMathMLRow::firstLineBaseline): Implement the function to determine the baseline. 29 (WebCore::RenderMathMLRow::computeLineVerticalStretch): Add a function that browses non-stretchy children to determine the desired vertical stretch metrics. 30 (WebCore::RenderMathMLRow::computePreferredLogicalWidths): Implement the function to determine the preferred widths of the RenderMathMLRow. 31 (WebCore::RenderMathMLRow::layoutRowItems): Helper function that layouts children (stretching vertical operators if needed), calculate the exact logical width and position children. 32 (WebCore::RenderMathMLRow::layoutBlock): Implement the function to do the actual layout, which essentially calls layoutRowItems. 33 (WebCore::RenderMathMLRow::paintChildren): Temporarily implement this function, which just calls paintChild on each child. 34 (WebCore::RenderMathMLRow::createAnonymousWithParentRenderer): Deleted. We actually don't create anonymous RenderMathMLRow at the moment. 35 (WebCore::RenderMathMLRow::layout): Deleted. 36 * rendering/mathml/RenderMathMLRow.h: Update declarations of functions. 37 1 38 2016-04-04 Chris Fleizach <cfleizach@apple.com> 2 39 -
trunk/Source/WebCore/css/mathml.css
r198952 r198998 41 41 } 42 42 43 m ath, mrow, mfenced, merror, mphantom, mstyle, menclose{44 align-items: baseline;43 ms, mtext, mi, mn, mo, annotation, mtd { 44 white-space: nowrap !important; 45 45 } 46 46 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r197566 r198998 47 47 bool avoidsFloats() const final { return true; } 48 48 bool canDropAnonymousBlockChild() const final { return false; } 49 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;49 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override; 50 50 51 51 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; -
trunk/Source/WebCore/rendering/RenderObject.h
r197616 r198998 389 389 virtual bool isRenderMathMLRow() const { return false; } 390 390 virtual bool isRenderMathMLMath() const { return false; } 391 virtual bool isRenderMathMLMenclose() const { return false; } 391 392 virtual bool isRenderMathMLFenced() const { return false; } 392 393 virtual bool isRenderMathMLFraction() const { return false; } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h
r197566 r198998 65 65 RenderPtr<RenderMathMLBlock> createAnonymousMathMLBlock(); 66 66 67 protected: 68 static LayoutUnit ascentForChild(const RenderBox& child) 69 { 70 return child.firstLineBaseline().valueOr(child.logicalHeight()); 71 } 72 67 73 private: 68 74 bool isRenderMathMLBlock() const final { return true; } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h
r197563 r198998 37 37 38 38 private: 39 const char* renderName() const override { return "RenderMathMLMenclose"; } 40 void paint(PaintInfo&, const LayoutPoint&) override; 39 bool isRenderMathMLMenclose() const final { return true; } 40 const char* renderName() const final { return "RenderMathMLMenclose"; } 41 void paint(PaintInfo&, const LayoutPoint&) final; 41 42 void updateLogicalHeight() override; 42 43 void addChild(RenderObject* newChild, RenderObject* beforeChild = nullptr) override; 43 void computePreferredLogicalWidths() override;44 void computePreferredLogicalWidths() final; 44 45 bool checkNotationalValuesValidity(const Vector<String>&) const; 45 46 }; … … 47 48 } 48 49 50 SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLMenclose, isRenderMathMLMenclose()) 51 49 52 #endif // ENABLE(MATHML) 50 53 #endif // RenderMathMLMenclose_h -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r194496 r198998 1 1 /* 2 2 * Copyright (C) 2010 Alex Milowski (alex@milowski.com). All rights reserved. 3 * Copyright (C) 2016 Igalia S.L. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 49 50 } 50 51 51 RenderPtr<RenderMathMLRow> RenderMathMLRow::createAnonymousWithParentRenderer(RenderMathMLRoot& parent)52 {53 RenderPtr<RenderMathMLRow> newMRow = createRenderer<RenderMathMLRow>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(&parent.style(), FLEX));54 newMRow->initializeStyle();55 return newMRow;56 }57 58 52 void RenderMathMLRow::updateOperatorProperties() 59 53 { … … 67 61 } 68 62 69 void RenderMathMLRow::layout() 70 { 71 int stretchHeightAboveBaseline = 0, stretchDepthBelowBaseline = 0; 72 for (RenderObject* child = firstChild(); child; child = child->nextSibling()) { 73 if (child->needsLayout()) 74 downcast<RenderElement>(*child).layout(); 75 if (is<RenderMathMLBlock>(*child)) { 76 // We skip the stretchy operators as they must not be included in the computation of the stretch size. 77 auto* renderOperator = downcast<RenderMathMLBlock>(*child).unembellishedOperator(); 63 64 Optional<int> RenderMathMLRow::firstLineBaseline() const 65 { 66 RenderBox* baselineChild = firstChildBox(); 67 if (!baselineChild) 68 return Optional<int>(); 69 70 return Optional<int>(static_cast<int>(lroundf(ascentForChild(*baselineChild) + baselineChild->logicalTop()))); 71 } 72 73 void RenderMathMLRow::computeLineVerticalStretch(int& stretchHeightAboveBaseline, int& stretchDepthBelowBaseline) 74 { 75 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 76 if (is<RenderMathMLBlock>(child)) { 77 auto* renderOperator = downcast<RenderMathMLBlock>(child)->unembellishedOperator(); 78 78 if (renderOperator && renderOperator->hasOperatorFlag(MathMLOperatorDictionary::Stretchy)) 79 79 continue; 80 80 } 81 LayoutUnit childHeightAboveBaseline = 0, childDepthBelowBaseline = 0; 82 if (is<RenderMathMLBlock>(*child)) { 83 RenderMathMLBlock& mathmlChild = downcast<RenderMathMLBlock>(*child); 84 childHeightAboveBaseline = mathmlChild.firstLineBaseline().valueOr(mathmlChild.logicalHeight()); 85 childDepthBelowBaseline = mathmlChild.logicalHeight() - childHeightAboveBaseline; 86 } else if (is<RenderMathMLTable>(*child)) { 87 RenderMathMLTable& tableChild = downcast<RenderMathMLTable>(*child); 88 childHeightAboveBaseline = tableChild.firstLineBaseline().valueOr(-1); 89 childDepthBelowBaseline = tableChild.logicalHeight() - childHeightAboveBaseline; 90 } else if (is<RenderBox>(*child)) { 91 childHeightAboveBaseline = downcast<RenderBox>(*child).logicalHeight(); 92 childDepthBelowBaseline = 0; 93 } 81 82 child->layoutIfNeeded(); 83 84 LayoutUnit childHeightAboveBaseline = ascentForChild(*child); 85 LayoutUnit childDepthBelowBaseline = child->logicalHeight() - childHeightAboveBaseline; 86 94 87 stretchHeightAboveBaseline = std::max<LayoutUnit>(stretchHeightAboveBaseline, childHeightAboveBaseline); 95 88 stretchDepthBelowBaseline = std::max<LayoutUnit>(stretchDepthBelowBaseline, childDepthBelowBaseline); 96 89 } 97 if (stretchHeightAboveBaseline + stretchDepthBelowBaseline <= 0) 90 91 // We ensure a minimal stretch size. 92 if (stretchHeightAboveBaseline + stretchDepthBelowBaseline <= 0) { 98 93 stretchHeightAboveBaseline = style().fontSize(); 99 100 // Set the sizes of (possibly embellished) stretchy operator children. 101 for (auto& child : childrenOfType<RenderMathMLBlock>(*this)) { 102 if (auto renderOperator = child.unembellishedOperator()) 103 renderOperator->stretchTo(stretchHeightAboveBaseline, stretchDepthBelowBaseline); 104 } 105 106 RenderMathMLBlock::layout(); 94 stretchDepthBelowBaseline = 0; 95 } 96 } 97 98 void RenderMathMLRow::computePreferredLogicalWidths() 99 { 100 ASSERT(preferredLogicalWidthsDirty()); 101 102 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = 0; 103 104 LayoutUnit preferredWidth = 0; 105 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) 106 preferredWidth += child->maxPreferredLogicalWidth() + child->marginLogicalWidth(); 107 108 m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = preferredWidth + borderAndPaddingLogicalWidth(); 109 110 setPreferredLogicalWidthsDirty(false); 111 } 112 113 void RenderMathMLRow::layoutRowItems(int stretchHeightAboveBaseline, int stretchDepthBelowBaseline) 114 { 115 // We first stretch the vertical operators. 116 // For inline formulas, we can then calculate the logical width. 117 LayoutUnit width = borderAndPaddingStart(); 118 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 119 if (child->isOutOfFlowPositioned()) 120 continue; 121 122 if (is<RenderMathMLBlock>(child)) { 123 if (auto renderOperator = downcast<RenderMathMLBlock>(child)->unembellishedOperator()) 124 renderOperator->stretchTo(stretchHeightAboveBaseline, stretchDepthBelowBaseline); 125 } 126 127 child->layoutIfNeeded(); 128 129 width += child->marginStart() + child->logicalWidth() + child->marginEnd(); 130 } 131 132 width += borderEnd() + paddingEnd(); 133 // FIXME: RenderMathMLRoot and RenderMathMLEnclose classes should also recalculate the exact logical width instead of using the preferred width. 134 // See https://bugs.webkit.org/show_bug.cgi?id=130326 135 if ((!isRenderMathMLMath() || style().display() == INLINE) && !isRenderMathMLRoot() && !isRenderMathMLMenclose()) 136 setLogicalWidth(width); 137 138 LayoutUnit verticalOffset = borderTop() + paddingTop(); 139 LayoutUnit maxAscent = 0, maxDescent = 0; // Used baseline alignment. 140 LayoutUnit horizontalOffset = borderAndPaddingStart(); 141 bool shouldFlipHorizontal = !style().isLeftToRightDirection(); 142 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 143 if (child->isOutOfFlowPositioned()) { 144 child->containingBlock()->insertPositionedObject(*child); 145 continue; 146 } 147 LayoutUnit childHorizontalExtent = child->logicalWidth(); 148 LayoutUnit ascent = ascentForChild(*child); 149 LayoutUnit descent = child->verticalMarginExtent() + child->logicalHeight() - ascent; 150 maxAscent = std::max(maxAscent, ascent); 151 maxDescent = std::max(maxDescent, descent); 152 LayoutUnit childVerticalMarginBoxExtent = maxAscent + maxDescent; 153 154 horizontalOffset += child->marginStart(); 155 156 setLogicalHeight(std::max(logicalHeight(), verticalOffset + borderBottom() + paddingBottom() + childVerticalMarginBoxExtent + horizontalScrollbarHeight())); 157 158 LayoutPoint childLocation(shouldFlipHorizontal ? logicalWidth() - horizontalOffset - childHorizontalExtent : horizontalOffset, verticalOffset + child->marginTop()); 159 child->setLocation(childLocation); 160 161 horizontalOffset += childHorizontalExtent + child->marginEnd(); 162 } 163 164 LayoutUnit centerBlockOffset = 0; 165 // FIXME: Remove the FLEX when it is not required by the css. 166 if (style().display() == BLOCK || style().display() == FLEX) 167 centerBlockOffset = std::max<LayoutUnit>(0, (logicalWidth() - (horizontalOffset + borderEnd() + paddingEnd())) / 2); 168 169 if (shouldFlipHorizontal && centerBlockOffset > 0) 170 centerBlockOffset = -centerBlockOffset; 171 172 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 173 LayoutUnit ascent = ascentForChild(*child); 174 LayoutUnit startOffset = maxAscent - ascent; 175 child->setLocation(child->location() + LayoutPoint(centerBlockOffset, startOffset)); 176 } 177 } 178 179 void RenderMathMLRow::layoutBlock(bool relayoutChildren, LayoutUnit) 180 { 181 ASSERT(needsLayout()); 182 183 if (!relayoutChildren && simplifiedLayout()) 184 return; 185 186 int stretchHeightAboveBaseline = 0; 187 int stretchDepthBelowBaseline = 0; 188 computeLineVerticalStretch(stretchHeightAboveBaseline, stretchDepthBelowBaseline); 189 190 recomputeLogicalWidth(); 191 192 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()); 193 194 layoutRowItems(stretchHeightAboveBaseline, stretchDepthBelowBaseline); 195 196 updateLogicalHeight(); 197 198 clearNeedsLayout(); 199 } 200 201 void RenderMathMLRow::paintChildren(PaintInfo& paintInfo, const LayoutPoint& paintOffset, PaintInfo& paintInfoForChild, bool usePrintRect) 202 { 203 for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) { 204 if (!paintChild(*child, paintInfo, paintOffset, paintInfoForChild, usePrintRect, PaintAsInlineBlock)) 205 return; 206 } 107 207 } 108 208 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h
r197566 r198998 1 1 /* 2 2 * Copyright (C) 2010 Alex Milowski (alex@milowski.com). All rights reserved. 3 * Copyright (C) 2016 Igalia S.L. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 40 41 RenderMathMLRow(Document&, Ref<RenderStyle>&&); 41 42 42 static RenderPtr<RenderMathMLRow> createAnonymousWithParentRenderer(RenderMathMLRoot&);43 43 void updateOperatorProperties(); 44 44 45 protected: 46 void layout() override; 45 void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; 46 void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final; 47 Optional<int> firstLineBaseline() const final; 47 48 48 49 private: 49 50 bool isRenderMathMLRow() const final { return true; } 50 51 const char* renderName() const override { return isAnonymous() ? "RenderMathMLRow (anonymous)" : "RenderMathMLRow"; } 52 53 void layoutRowItems(int stretchHeightAboveBaseline, int stretchDepthBelowBaseline); 54 void computeLineVerticalStretch(int& stretchHeightAboveBaseline, int& stretchDepthBelowBaseline); 55 void computePreferredLogicalWidths() override; 51 56 }; 52 57
Note: See TracChangeset
for help on using the changeset viewer.