Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: Source/core/rendering/RenderTable.cpp

Issue 164553004: Convert LayoutState/LayoutStateMaintainer/LayoutStateDisabler to references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 if (simplifiedLayout()) 422 if (simplifiedLayout())
423 return; 423 return;
424 424
425 recalcSectionsIfNeeded(); 425 recalcSectionsIfNeeded();
426 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w e don't have to make sure 426 // FIXME: We should do this recalc lazily in borderStart/borderEnd so that w e don't have to make sure
427 // to call this before we call borderStart/borderEnd to avoid getting a stal e value. 427 // to call this before we call borderStart/borderEnd to avoid getting a stal e value.
428 recalcBordersInRowDirection(); 428 recalcBordersInRowDirection();
429 429
430 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 430 LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
431 LayoutStateMaintainer statePusher(this, locationOffset()); 431 LayoutStateMaintainer statePusher(*this, locationOffset());
432 432
433 setLogicalHeight(0); 433 setLogicalHeight(0);
434 434
435 LayoutUnit oldLogicalWidth = logicalWidth(); 435 LayoutUnit oldLogicalWidth = logicalWidth();
436 updateLogicalWidth(); 436 updateLogicalWidth();
437 437
438 SubtreeLayoutScope layouter(this); 438 SubtreeLayoutScope layouter(this);
439 439
440 if (logicalWidth() != oldLogicalWidth) { 440 if (logicalWidth() != oldLogicalWidth) {
441 for (unsigned i = 0; i < m_captions.size(); i++) 441 for (unsigned i = 0; i < m_captions.size(); i++)
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 updateLayerTransform(); 567 updateLayerTransform();
568 568
569 // Layout was changed, so probably borders too. 569 // Layout was changed, so probably borders too.
570 invalidateCollapsedBorders(); 570 invalidateCollapsedBorders();
571 571
572 computeOverflow(clientLogicalBottom()); 572 computeOverflow(clientLogicalBottom());
573 573
574 statePusher.pop(); 574 statePusher.pop();
575 575
576 if (view()->layoutState()->pageLogicalHeight()) 576 if (view()->layoutState()->pageLogicalHeight())
577 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(this, logi calTop())); 577 setPageLogicalOffset(view()->layoutState()->pageLogicalOffset(*this, log icalTop()));
578 578
579 bool didFullRepaint = repainter.repaintAfterLayout(); 579 bool didFullRepaint = repainter.repaintAfterLayout();
580 // Repaint with our new bounds if they are different from our old bounds. 580 // Repaint with our new bounds if they are different from our old bounds.
581 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() 581 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()
582 && !didFullRepaint && sectionMoved) { 582 && !didFullRepaint && sectionMoved) {
583 if (style()->isHorizontalWritingMode()) 583 if (style()->isHorizontalWritingMode())
584 repaintRectangle(LayoutRect(visualOverflowRect().x(), movedSectionLo gicalTop, visualOverflowRect().width(), visualOverflowRect().maxY() - movedSecti onLogicalTop)); 584 repaintRectangle(LayoutRect(visualOverflowRect().x(), movedSectionLo gicalTop, visualOverflowRect().width(), visualOverflowRect().maxY() - movedSecti onLogicalTop));
585 else 585 else
586 repaintRectangle(LayoutRect(movedSectionLogicalTop, visualOverflowRe ct().y(), visualOverflowRect().maxX() - movedSectionLogicalTop, visualOverflowRe ct().height())); 586 repaintRectangle(LayoutRect(movedSectionLogicalTop, visualOverflowRe ct().y(), visualOverflowRect().maxX() - movedSectionLogicalTop, visualOverflowRe ct().height()));
587 } 587 }
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1456 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const 1456 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const
1457 { 1457 {
1458 ASSERT(cell->isFirstOrLastCellInRow()); 1458 ASSERT(cell->isFirstOrLastCellInRow());
1459 if (hasSameDirectionAs(cell->row())) 1459 if (hasSameDirectionAs(cell->row()))
1460 return style()->borderEnd(); 1460 return style()->borderEnd();
1461 1461
1462 return style()->borderStart(); 1462 return style()->borderStart();
1463 } 1463 }
1464 1464
1465 } 1465 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMediaControlElements.cpp ('k') | Source/core/rendering/RenderTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698