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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 1933063002: Set needsPaintPhaseDescendantBlockBackgrounds if a table has collapsed borders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInfo.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, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 return style()->borderEnd(); 1394 return style()->borderEnd();
1395 1395
1396 return style()->borderStart(); 1396 return style()->borderStart();
1397 } 1397 }
1398 1398
1399 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(const PaintInvalida tionState& paintInvalidationState) 1399 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(const PaintInvalida tionState& paintInvalidationState)
1400 { 1400 {
1401 // Information of collapsed borders doesn't affect layout and are for painti ng only. 1401 // Information of collapsed borders doesn't affect layout and are for painti ng only.
1402 // Do it now instead of during painting to invalidate table cells if needed. 1402 // Do it now instead of during painting to invalidate table cells if needed.
1403 recalcCollapsedBordersIfNeeded(); 1403 recalcCollapsedBordersIfNeeded();
1404 if (collapseBorders() && !m_collapsedBorders.isEmpty())
1405 paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPh aseDescendantBlockBackgrounds();
1406
1404 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 1407 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
1405 } 1408 }
1406 1409
1407 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState & childPaintInvalidationState) 1410 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState & childPaintInvalidationState)
1408 { 1411 {
1409 // Table cells paint background from the containing column group, column, se ction and row. 1412 // Table cells paint background from the containing column group, column, se ction and row.
1410 // If background of any of them changed, we need to invalidate all affected cells. 1413 // If background of any of them changed, we need to invalidate all affected cells.
1411 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr ound change. 1414 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr ound change.
1412 for (LayoutObject* section = firstChild(); section; section = section->nextS ibling()) { 1415 for (LayoutObject* section = firstChild(); section; section = section->nextS ibling()) {
1413 if (!section->isTableSection()) 1416 if (!section->isTableSection())
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1461 1464
1462 LayoutUnit LayoutTable::paddingRight() const 1465 LayoutUnit LayoutTable::paddingRight() const
1463 { 1466 {
1464 if (collapseBorders()) 1467 if (collapseBorders())
1465 return LayoutUnit(); 1468 return LayoutUnit();
1466 1469
1467 return LayoutBlock::paddingRight(); 1470 return LayoutBlock::paddingRight();
1468 } 1471 }
1469 1472
1470 } // namespace blink 1473 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698