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

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

Issue 172753003: Consistently disable the LayoutState for certain layout situations (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, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights 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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 ASSERT(needsLayout()); 709 ASSERT(needsLayout());
710 ASSERT(!needsCellRecalc()); 710 ASSERT(!needsCellRecalc());
711 ASSERT(!table()->needsSectionRecalc()); 711 ASSERT(!table()->needsSectionRecalc());
712 712
713 LayoutRectRecorder recorder(*this); 713 LayoutRectRecorder recorder(*this);
714 714
715 // addChild may over-grow m_grid but we don't want to throw away the memory too early as addChild 715 // addChild may over-grow m_grid but we don't want to throw away the memory too early as addChild
716 // can be called in a loop (e.g during parsing). Doing it now ensures we hav e a stable-enough structure. 716 // can be called in a loop (e.g during parsing). Doing it now ensures we hav e a stable-enough structure.
717 m_grid.shrinkToFit(); 717 m_grid.shrinkToFit();
718 718
719 LayoutStateMaintainer statePusher(this, locationOffset(), style()->isFlipped BlocksWritingMode()); 719 LayoutStateMaintainer statePusher(this, locationOffset());
720 720
721 const Vector<int>& columnPos = table()->columnPositions(); 721 const Vector<int>& columnPos = table()->columnPositions();
722 722
723 SubtreeLayoutScope layouter(this); 723 SubtreeLayoutScope layouter(this);
724 for (unsigned r = 0; r < m_grid.size(); ++r) { 724 for (unsigned r = 0; r < m_grid.size(); ++r) {
725 Row& row = m_grid[r].row; 725 Row& row = m_grid[r].row;
726 unsigned cols = row.size(); 726 unsigned cols = row.size();
727 // First, propagate our table layout's information to the cells. This wi ll mark the row as needing layout 727 // First, propagate our table layout's information to the cells. This wi ll mark the row as needing layout
728 // if there was a column logical width change. 728 // if there was a column logical width change.
729 for (unsigned startColumn = 0; startColumn < cols; ++startColumn) { 729 for (unsigned startColumn = 0; startColumn < cols; ++startColumn) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 864
865 // Set the width of our section now. The rows will also be this width. 865 // Set the width of our section now. The rows will also be this width.
866 setLogicalWidth(table()->contentLogicalWidth()); 866 setLogicalWidth(table()->contentLogicalWidth());
867 m_overflow.clear(); 867 m_overflow.clear();
868 m_overflowingCells.clear(); 868 m_overflowingCells.clear();
869 m_forceSlowPaintPathWithOverflowingCell = false; 869 m_forceSlowPaintPathWithOverflowingCell = false;
870 870
871 int vspacing = table()->vBorderSpacing(); 871 int vspacing = table()->vBorderSpacing();
872 unsigned nEffCols = table()->numEffCols(); 872 unsigned nEffCols = table()->numEffCols();
873 873
874 LayoutStateMaintainer statePusher(this, locationOffset(), style()->isFlipped BlocksWritingMode()); 874 LayoutStateMaintainer statePusher(this, locationOffset());
875 875
876 for (unsigned r = 0; r < totalRows; r++) { 876 for (unsigned r = 0; r < totalRows; r++) {
877 // Set the row's x/y position and width/height. 877 // Set the row's x/y position and width/height.
878 if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) { 878 if (RenderTableRow* rowRenderer = m_grid[r].rowRenderer) {
879 rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r])); 879 rowRenderer->setLocation(LayoutPoint(0, m_rowPos[r]));
880 rowRenderer->setLogicalWidth(logicalWidth()); 880 rowRenderer->setLogicalWidth(logicalWidth());
881 rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspaci ng); 881 rowRenderer->setLogicalHeight(m_rowPos[r + 1] - m_rowPos[r] - vspaci ng);
882 rowRenderer->updateLayerTransform(); 882 rowRenderer->updateLayerTransform();
883 } 883 }
884 884
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 else 1710 else
1711 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1711 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1712 1712
1713 cell->setLogicalLocation(cellLocation); 1713 cell->setLogicalLocation(cellLocation);
1714 1714
1715 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 1715 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1716 view()->addLayoutDelta(oldCellLocation - cell->location()); 1716 view()->addLayoutDelta(oldCellLocation - cell->location());
1717 } 1717 }
1718 1718
1719 } // namespace WebCore 1719 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698