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

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

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderTableRow.cpp ('k') | Source/core/rendering/RenderText.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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, 2013 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2013 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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } 995 }
996 996
997 LayoutSize childOffset(cell->location() - oldCellRect.location()); 997 LayoutSize childOffset(cell->location() - oldCellRect.location());
998 if (childOffset.width() || childOffset.height()) { 998 if (childOffset.width() || childOffset.height()) {
999 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 999 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1000 view()->addLayoutDelta(childOffset); 1000 view()->addLayoutDelta(childOffset);
1001 1001
1002 // If the child moved, we have to repaint it as well as any floa ting/positioned 1002 // If the child moved, we have to repaint it as well as any floa ting/positioned
1003 // descendants. An exception is if we need a layout. In this cas e, we know we're going to 1003 // descendants. An exception is if we need a layout. In this cas e, we know we're going to
1004 // repaint ourselves (and the child) anyway. 1004 // repaint ourselves (and the child) anyway.
1005 if (!table()->selfNeedsLayout() && cell->checkForRepaint()) { 1005 if (!table()->selfNeedsLayout() && cell->checkForPaintInvalidati on()) {
1006 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 1006 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1007 cell->setMayNeedPaintInvalidation(true); 1007 cell->setMayNeedPaintInvalidation(true);
1008 else 1008 else
1009 cell->repaintDuringLayoutIfMoved(oldCellRect); 1009 cell->repaintDuringLayoutIfMoved(oldCellRect);
1010 } 1010 }
1011 } 1011 }
1012 } 1012 }
1013 if (rowHeightIncreaseForPagination) { 1013 if (rowHeightIncreaseForPagination) {
1014 for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++) 1014 for (unsigned rowIndex = r + 1; rowIndex <= totalRows; rowIndex++)
1015 m_rowPos[rowIndex] += rowHeightIncreaseForPagination; 1015 m_rowPos[rowIndex] += rowHeightIncreaseForPagination;
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 1509
1510 m_grid[insertionRow].rowRenderer = row; 1510 m_grid[insertionRow].rowRenderer = row;
1511 row->setRowIndex(insertionRow); 1511 row->setRowIndex(insertionRow);
1512 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[insertionRow]); 1512 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[insertionRow]);
1513 1513
1514 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->nextCe ll()) 1514 for (RenderTableCell* cell = row->firstCell(); cell; cell = cell->nextCe ll())
1515 addCell(cell, row); 1515 addCell(cell, row);
1516 } 1516 }
1517 1517
1518 m_grid.shrinkToFit(); 1518 m_grid.shrinkToFit();
1519 setNeedsLayoutAndFullRepaint(); 1519 setNeedsLayoutAndFullPaintInvalidation();
1520 } 1520 }
1521 1521
1522 // FIXME: This function could be made O(1) in certain cases (like for the non-mo st-constrainive cells' case). 1522 // FIXME: This function could be made O(1) in certain cases (like for the non-mo st-constrainive cells' case).
1523 void RenderTableSection::rowLogicalHeightChanged(unsigned rowIndex) 1523 void RenderTableSection::rowLogicalHeightChanged(unsigned rowIndex)
1524 { 1524 {
1525 if (needsCellRecalc()) 1525 if (needsCellRecalc())
1526 return; 1526 return;
1527 1527
1528 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[rowIndex]); 1528 setRowLogicalHeightToRowStyleLogicalHeight(m_grid[rowIndex]);
1529 1529
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 else 1723 else
1724 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1724 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1725 1725
1726 cell->setLogicalLocation(cellLocation); 1726 cell->setLogicalLocation(cellLocation);
1727 1727
1728 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) 1728 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
1729 view()->addLayoutDelta(oldCellLocation - cell->location()); 1729 view()->addLayoutDelta(oldCellLocation - cell->location());
1730 } 1730 }
1731 1731
1732 } // namespace WebCore 1732 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderTableRow.cpp ('k') | Source/core/rendering/RenderText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698