Changeset 142056 in webkit
- Timestamp:
- Feb 6, 2013 4:55:10 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142054 r142056 1 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 3 [Chromium] table-section-overflow-clip-crash.html hits an assert 4 https://bugs.webkit.org/show_bug.cgi?id=108594 5 6 Reviewed by Levi Weintraub. 7 8 * platform/chromium/TestExpectations: 9 1 10 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 11 -
trunk/LayoutTests/platform/chromium/TestExpectations
r142051 r142056 4345 4345 4346 4346 webkit.org/b/108424 media/video-error-does-not-exist.html [ Failure Crash ] 4347 webkit.org/b/108594 [ Debug ] tables/table-section-overflow-clip-crash.html [ Crash ]4348 4347 4349 4348 webkit.org/b/108781 [ Win ] fast/css-grid-layout/grid-preferred-logical-widths.html [ Timeout ] -
trunk/Source/WebCore/ChangeLog
r142054 r142056 1 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 3 [Chromium] table-section-overflow-clip-crash.html hits an assert 4 https://bugs.webkit.org/show_bug.cgi?id=108594 5 6 Reviewed by Levi Weintraub. 7 8 When a counter calls setNeedsLayout, it also marks it's containing blocks 9 as needing layout, so we need to clear the setNeedsLayoutIsForbidden bit on the 10 containing blocks as well as the counter itself. 11 12 Also, use RAII objects for all the places where we clear this bit and make 13 the setter/getter for it private to RenderObject. 14 15 * rendering/RenderCounter.cpp: 16 (WebCore::RenderCounter::computePreferredLogicalWidths): 17 * rendering/RenderObject.cpp: 18 (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope): 19 (WebCore::RenderObject::markContainingBlocksForLayout): 20 * rendering/RenderObject.h: 21 (SetLayoutNeededForbiddenScope): 22 (RenderObject): 23 (WebCore::RenderObject::isSetNeedsLayoutForbidden): 24 (WebCore::RenderObject::setNeedsLayoutIsForbidden): 25 * rendering/RenderQuote.cpp: 26 (WebCore::RenderQuote::computePreferredLogicalWidths): 27 * rendering/RenderTableSection.cpp: 28 (WebCore::RenderTableSection::calcRowLogicalHeight): 29 (WebCore::RenderTableSection::layoutRows): 30 * rendering/mathml/RenderMathMLOperator.cpp: 31 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): 32 * rendering/mathml/RenderMathMLRoot.cpp: 33 (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): 34 * rendering/mathml/RenderMathMLRow.cpp: 35 (WebCore::RenderMathMLRow::computePreferredLogicalWidths): 36 1 37 2013-02-06 Ojan Vafai <ojan@chromium.org> 2 38 -
trunk/Source/WebCore/rendering/RenderCounter.cpp
r141517 r142056 526 526 // computePreferredLogicalWidths at all. 527 527 // https://bugs.webkit.org/show_bug.cgi?id=104829 528 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 529 setNeedsLayoutIsForbidden(false); 528 SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false); 530 529 #endif 531 530 532 531 setTextInternal(originalText()); 533 534 #ifndef NDEBUG535 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden);536 #endif537 532 538 533 RenderText::computePreferredLogicalWidths(lead); -
trunk/Source/WebCore/rendering/RenderObject.cpp
r142015 r142056 95 95 static void* baseOfRenderObjectBeingDeleted; 96 96 97 RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(RenderObject* renderObject )97 RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope(RenderObject* renderObject, bool isForbidden) 98 98 : m_renderObject(renderObject) 99 99 , m_preexistingForbidden(m_renderObject->isSetNeedsLayoutForbidden()) 100 100 { 101 m_renderObject->setNeedsLayoutIsForbidden( true);101 m_renderObject->setNeedsLayoutIsForbidden(isForbidden); 102 102 } 103 103 … … 655 655 { 656 656 ASSERT(!scheduleRelayout || !newRoot); 657 ASSERT(!isSetNeedsLayoutForbidden()); 657 658 658 659 RenderObject* object = container(); … … 662 663 663 664 while (object) { 665 #ifndef NDEBUG 666 // FIXME: Remove this once we remove the special cases for counters, quotes and mathml 667 // calling setNeedsLayout during preferred width computation. 668 SetLayoutNeededForbiddenScope layoutForbiddenScope(object, isSetNeedsLayoutForbidden()); 669 #endif 664 670 // Don't mark the outermost object of an unrooted subtree. That object will be 665 671 // marked when the subtree is added to the document. -
trunk/Source/WebCore/rendering/RenderObject.h
r142015 r142056 227 227 void setHasAXObject(bool flag) { m_hasAXObject = flag; } 228 228 bool hasAXObject() const { return m_hasAXObject; } 229 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; }230 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag; }231 229 232 230 // Helper class forbidding calls to setNeedsLayout() during its lifetime. 233 231 class SetLayoutNeededForbiddenScope { 234 232 public: 235 explicit SetLayoutNeededForbiddenScope(RenderObject* );233 explicit SetLayoutNeededForbiddenScope(RenderObject*, bool isForbidden = true); 236 234 ~SetLayoutNeededForbiddenScope(); 237 235 private: … … 273 271 ////////////////////////////////////////// 274 272 private: 273 #ifndef NDEBUG 274 bool isSetNeedsLayoutForbidden() const { return m_setNeedsLayoutForbidden; } 275 void setNeedsLayoutIsForbidden(bool flag) { m_setNeedsLayoutForbidden = flag; } 276 #endif 277 275 278 void addAbsoluteRectForLayer(LayoutRect& result); 276 279 void setLayerNeedsFullRepaint(); -
trunk/Source/WebCore/rendering/RenderQuote.cpp
r141517 r142056 257 257 // computePreferredLogicalWidths at all. 258 258 // https://bugs.webkit.org/show_bug.cgi?id=104829 259 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 260 setNeedsLayoutIsForbidden(false); 259 SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false); 261 260 #endif 262 261 … … 264 263 attachQuote(); 265 264 setTextInternal(originalText()); 266 267 #ifndef NDEBUG268 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden);269 #endif270 265 271 266 RenderText::computePreferredLogicalWidths(lead); -
trunk/Source/WebCore/rendering/RenderTableSection.cpp
r141570 r142056 264 264 { 265 265 #ifndef NDEBUG 266 setNeedsLayoutIsForbidden(true);266 SetLayoutNeededForbiddenScope layoutForbiddenScope(this); 267 267 #endif 268 268 … … 339 339 m_rowPos[r + 1] = max(m_rowPos[r + 1], m_rowPos[r]); 340 340 } 341 342 #ifndef NDEBUG343 setNeedsLayoutIsForbidden(false);344 #endif345 341 346 342 ASSERT(!needsLayout()); … … 493 489 { 494 490 #ifndef NDEBUG 495 setNeedsLayoutIsForbidden(true);491 SetLayoutNeededForbiddenScope layoutForbiddenScope(this); 496 492 #endif 497 493 … … 638 634 } 639 635 } 640 641 #ifndef NDEBUG642 setNeedsLayoutIsForbidden(false);643 #endif644 636 645 637 ASSERT(!needsLayout()); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
r141517 r142056 86 86 87 87 #ifndef NDEBUG 88 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 89 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 90 setNeedsLayoutIsForbidden(false); 88 // FIXME: Remove this once mathml stops modifying the render tree here. 89 SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false); 91 90 #endif 92 91 … … 94 93 if (!firstChild()) 95 94 updateFromElement(); 96 97 #ifndef NDEBUG98 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden);99 #endif100 95 101 96 RenderMathMLBlock::computePreferredLogicalWidths(); -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
r141517 r142056 189 189 190 190 #ifndef NDEBUG 191 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 192 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 193 setNeedsLayoutIsForbidden(false); 191 // FIXME: Remove this once mathml stops modifying the render tree here. 192 SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false); 194 193 #endif 195 194 … … 227 226 m_intrinsicPaddingStart = frontWidth; 228 227 229 #ifndef NDEBUG230 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden);231 #endif232 233 228 RenderMathMLBlock::computePreferredLogicalWidths(); 234 229 -
trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
r141517 r142056 57 57 58 58 #ifndef NDEBUG 59 // FIXME: Remove the setNeedsLayoutIsForbidden calls once mathml stops modifying the render tree here. 60 bool oldSetNeedsLayoutIsForbidden = isSetNeedsLayoutForbidden(); 61 setNeedsLayoutIsForbidden(false); 59 // FIXME: Remove this once mathml stops modifying the render tree here. 60 SetLayoutNeededForbiddenScope layoutForbiddenScope(this, false); 62 61 #endif 63 62 … … 85 84 } 86 85 87 #ifndef NDEBUG88 setNeedsLayoutIsForbidden(oldSetNeedsLayoutIsForbidden);89 #endif90 91 86 RenderMathMLBlock::computePreferredLogicalWidths(); 92 87
Note: See TracChangeset
for help on using the changeset viewer.