OLD | NEW |
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 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
8 * All rights reserved. | 8 * All rights reserved. |
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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 if (firstLineBaseline != -1) | 462 if (firstLineBaseline != -1) |
463 return firstLineBaseline; | 463 return firstLineBaseline; |
464 return (borderBefore() + paddingBefore() + contentLogicalHeight()).toInt(); | 464 return (borderBefore() + paddingBefore() + contentLogicalHeight()).toInt(); |
465 } | 465 } |
466 | 466 |
467 void LayoutTableCell::ensureIsReadyForPaintInvalidation() { | 467 void LayoutTableCell::ensureIsReadyForPaintInvalidation() { |
468 LayoutBlockFlow::ensureIsReadyForPaintInvalidation(); | 468 LayoutBlockFlow::ensureIsReadyForPaintInvalidation(); |
469 if (!usesCompositedCellDisplayItemClients()) | 469 if (!usesCompositedCellDisplayItemClients()) |
470 return; | 470 return; |
471 if (!m_rowBackgroundDisplayItemClient) { | 471 if (!m_rowBackgroundDisplayItemClient) { |
472 m_rowBackgroundDisplayItemClient = | 472 m_rowBackgroundDisplayItemClient = WTF::wrapUnique( |
473 wrapUnique(new LayoutTableCell::RowBackgroundDisplayItemClient(*this)); | 473 new LayoutTableCell::RowBackgroundDisplayItemClient(*this)); |
474 } | 474 } |
475 } | 475 } |
476 | 476 |
477 void LayoutTableCell::styleDidChange(StyleDifference diff, | 477 void LayoutTableCell::styleDidChange(StyleDifference diff, |
478 const ComputedStyle* oldStyle) { | 478 const ComputedStyle* oldStyle) { |
479 DCHECK_EQ(style()->display(), EDisplay::TableCell); | 479 DCHECK_EQ(style()->display(), EDisplay::TableCell); |
480 | 480 |
481 LayoutBlockFlow::styleDidChange(diff, oldStyle); | 481 LayoutBlockFlow::styleDidChange(diff, oldStyle); |
482 setHasBoxDecorationBackground(true); | 482 setHasBoxDecorationBackground(true); |
483 | 483 |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 | 1323 |
1324 bool changed = false; | 1324 bool changed = false; |
1325 if (!newValues.startBorder().isVisible() && | 1325 if (!newValues.startBorder().isVisible() && |
1326 !newValues.endBorder().isVisible() && | 1326 !newValues.endBorder().isVisible() && |
1327 !newValues.beforeBorder().isVisible() && | 1327 !newValues.beforeBorder().isVisible() && |
1328 !newValues.afterBorder().isVisible()) { | 1328 !newValues.afterBorder().isVisible()) { |
1329 changed = !!m_collapsedBorderValues; | 1329 changed = !!m_collapsedBorderValues; |
1330 m_collapsedBorderValues = nullptr; | 1330 m_collapsedBorderValues = nullptr; |
1331 } else if (!m_collapsedBorderValues) { | 1331 } else if (!m_collapsedBorderValues) { |
1332 changed = true; | 1332 changed = true; |
1333 m_collapsedBorderValues = wrapUnique(new CollapsedBorderValues( | 1333 m_collapsedBorderValues = WTF::wrapUnique(new CollapsedBorderValues( |
1334 *table(), newValues.startBorder(), newValues.endBorder(), | 1334 *table(), newValues.startBorder(), newValues.endBorder(), |
1335 newValues.beforeBorder(), newValues.afterBorder())); | 1335 newValues.beforeBorder(), newValues.afterBorder())); |
1336 } else { | 1336 } else { |
1337 // We check visuallyEquals so that the table cell is invalidated only if a | 1337 // We check visuallyEquals so that the table cell is invalidated only if a |
1338 // changed collapsed border is visible in the first place. | 1338 // changed collapsed border is visible in the first place. |
1339 changed = !m_collapsedBorderValues->startBorder().visuallyEquals( | 1339 changed = !m_collapsedBorderValues->startBorder().visuallyEquals( |
1340 newValues.startBorder()) || | 1340 newValues.startBorder()) || |
1341 !m_collapsedBorderValues->endBorder().visuallyEquals( | 1341 !m_collapsedBorderValues->endBorder().visuallyEquals( |
1342 newValues.endBorder()) || | 1342 newValues.endBorder()) || |
1343 !m_collapsedBorderValues->beforeBorder().visuallyEquals( | 1343 !m_collapsedBorderValues->beforeBorder().visuallyEquals( |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 cb->adjustChildDebugRect(rect); | 1481 cb->adjustChildDebugRect(rect); |
1482 | 1482 |
1483 return rect; | 1483 return rect; |
1484 } | 1484 } |
1485 | 1485 |
1486 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { | 1486 void LayoutTableCell::adjustChildDebugRect(LayoutRect& r) const { |
1487 r.move(0, -intrinsicPaddingBefore()); | 1487 r.move(0, -intrinsicPaddingBefore()); |
1488 } | 1488 } |
1489 | 1489 |
1490 } // namespace blink | 1490 } // namespace blink |
OLD | NEW |