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

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

Issue 1925703003: Set needsPaintPhaseDescendantBlockBackgrounds if a table has collapsed borders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a dynamic test 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 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 return style()->borderEnd(); 1413 return style()->borderEnd();
1414 1414
1415 return style()->borderStart(); 1415 return style()->borderStart();
1416 } 1416 }
1417 1417
1418 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(const PaintInvalida tionState& paintInvalidationState) 1418 PaintInvalidationReason LayoutTable::invalidatePaintIfNeeded(const PaintInvalida tionState& paintInvalidationState)
1419 { 1419 {
1420 // Information of collapsed borders doesn't affect layout and are for painti ng only. 1420 // Information of collapsed borders doesn't affect layout and are for painti ng only.
1421 // Do it now instead of during painting to invalidate table cells if needed. 1421 // Do it now instead of during painting to invalidate table cells if needed.
1422 recalcCollapsedBordersIfNeeded(); 1422 recalcCollapsedBordersIfNeeded();
1423 if (collapseBorders() && !m_collapsedBorders.isEmpty())
1424 paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPh aseDescendantBlockBackgrounds();
1425
1423 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 1426 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
1424 } 1427 }
1425 1428
1426 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState & childPaintInvalidationState) 1429 void LayoutTable::invalidatePaintOfSubtreesIfNeeded(const PaintInvalidationState & childPaintInvalidationState)
1427 { 1430 {
1428 // Table cells paint background from the containing column group, column, se ction and row. 1431 // Table cells paint background from the containing column group, column, se ction and row.
1429 // If background of any of them changed, we need to invalidate all affected cells. 1432 // If background of any of them changed, we need to invalidate all affected cells.
1430 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr ound change. 1433 // Here use shouldDoFullPaintInvalidation() as a broader condition of backgr ound change.
1431 for (LayoutObject* section = firstChild(); section; section = section->nextS ibling()) { 1434 for (LayoutObject* section = firstChild(); section; section = section->nextS ibling()) {
1432 if (!section->isTableSection()) 1435 if (!section->isTableSection())
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 1483
1481 LayoutUnit LayoutTable::paddingRight() const 1484 LayoutUnit LayoutTable::paddingRight() const
1482 { 1485 {
1483 if (collapseBorders()) 1486 if (collapseBorders())
1484 return LayoutUnit(); 1487 return LayoutUnit();
1485 1488
1486 return LayoutBlock::paddingRight(); 1489 return LayoutBlock::paddingRight();
1487 } 1490 }
1488 1491
1489 } // namespace blink 1492 } // 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