Changeset 140554 in webkit
- Timestamp:
- Jan 23, 2013, 10:54:56 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r140547 r140554 1 2013-01-23 Ojan Vafai <ojan@chromium.org> 2 3 Assert that computePreferredLogicalWidths never calls setNeedsLayout 4 https://bugs.webkit.org/show_bug.cgi?id=107613 5 6 Reviewed by Eric Seidel. 7 8 computePreferredLogicalWidths should only set m_minPreferredLogicalWidth 9 and m_maxPreferredLogicalWidth. It shouldn't have other side-effects. 10 The mathml bits can be removed once https://bugs.webkit.org/show_bug.cgi?id=107353 11 is resolved. 12 13 * rendering/RenderBox.cpp: 14 (WebCore::RenderBox::minPreferredLogicalWidth): 15 * rendering/mathml/RenderMathMLOperator.cpp: 16 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): 17 * rendering/mathml/RenderMathMLRoot.cpp: 18 (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): 19 * rendering/mathml/RenderMathMLRow.cpp: 20 (WebCore::RenderMathMLRow::computePreferredLogicalWidths): 21 1 22 2013-01-23 Noam Rosenthal <noam@webkit.org> 2 23 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r140439 r140554 850 850 LayoutUnit RenderBox::minPreferredLogicalWidth() const 851 851 { 852 if (preferredLogicalWidthsDirty()) 852 if (preferredLogicalWidthsDirty()) { 853 #ifndef NDEBUG 854 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox*>(this)); 855 #endif 853 856 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); 857 } 854 858 855 859 return m_minPreferredLogicalWidth; … … 858 862 LayoutUnit RenderBox::maxPreferredLogicalWidth() const 859 863 { 860 if (preferredLogicalWidthsDirty()) 864 if (preferredLogicalWidthsDirty()) { 865 #ifndef NDEBUG 866 SetLayoutNeededForbiddenScope layoutForbiddenScope(const_cast<RenderBox*>(this)); 867 #endif 861 868 const_cast<RenderBox*>(this)->computePreferredLogicalWidths(); 869 } 862 870 863 871 return m_maxPreferredLogicalWidth; -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r140244 r140554 84 84 { 85 85 ASSERT(preferredLogicalWidthsDirty()); 86 87 #ifndef NDEBUG 88 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 89 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 90 setNeedsLayoutIsForbidden(false); 91 #endif 86 92 87 93 // Check for an uninitialized operator. 88 94 if (!firstChild()) 89 95 updateFromElement(); 90 96 97 #ifndef NDEBUG 98 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden); 99 #endif 100 91 101 RenderMathMLBlock::computePreferredLogicalWidths(); 92 102 } -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
r140032 r140554 188 188 ASSERT(preferredLogicalWidthsDirty() && needsLayout()); 189 189 190 #ifndef NDEBUG 191 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 192 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 193 setNeedsLayoutIsForbidden(false); 194 #endif 195 190 196 computeChildrenPreferredLogicalHeights(); 191 197 … … 220 226 } else 221 227 m_intrinsicPaddingStart = frontWidth; 222 228 229 #ifndef NDEBUG 230 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden); 231 #endif 232 223 233 RenderMathMLBlock::computePreferredLogicalWidths(); 224 234 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r140244 r140554 55 55 { 56 56 ASSERT(preferredLogicalWidthsDirty() && needsLayout()); 57 57 58 #ifndef NDEBUG 59 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 60 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 61 setNeedsLayoutIsForbidden(false); 62 #endif 63 58 64 computeChildrenPreferredLogicalHeights(); 59 65 int stretchLogicalHeight = 0; … … 78 84 } 79 85 } 80 86 87 #ifndef NDEBUG 88 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden); 89 #endif 90 81 91 RenderMathMLBlock::computePreferredLogicalWidths(); 82 92
Note:
See TracChangeset
for help on using the changeset viewer.