Chromium Code Reviews| 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, 2010 Apple Inc. All r ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 722 if (!paintInfo.shouldPaintWithinRoot(this)) | 722 if (!paintInfo.shouldPaintWithinRoot(this)) |
| 723 return; | 723 return; |
| 724 | 724 |
| 725 LayoutRect rect(paintOffset, size()); | 725 LayoutRect rect(paintOffset, size()); |
| 726 subtractCaptionRect(rect); | 726 subtractCaptionRect(rect); |
| 727 paintBoxDecorationsWithRect(paintInfo, paintOffset, rect); | 727 paintBoxDecorationsWithRect(paintInfo, paintOffset, rect); |
| 728 } | 728 } |
| 729 | 729 |
| 730 void RenderTable::paintBackgroundWithBorderAndBoxShadow(PaintInfo& paintInfo, co nst LayoutRect& rect, BackgroundBleedAvoidance bleedAvoidance) | 730 void RenderTable::paintBackgroundWithBorderAndBoxShadow(PaintInfo& paintInfo, co nst LayoutRect& rect, BackgroundBleedAvoidance bleedAvoidance) |
| 731 { | 731 { |
| 732 bool needToPaintBorder = !style()->hasAppearance() && style()->hasBorder() & & !collapseBorders(); | |
| 733 // If bleedAvoidance is BackgroundOverBorder, we need to paint borders befor e painting background. | |
| 734 if (bleedAvoidance == BackgroundBleedBackgroundOverBorder && needToPaintBord er) | |
| 735 paintBorder(paintInfo, rect, style()); | |
|
Julien - ping for review
2013/10/25 00:29:16
Other callers pass bleedAvoidance, shouldn't be co
tasak
2013/11/27 08:20:44
Sorry.
The "BackgroundOverBorder" should be "Backg
| |
| 736 | |
| 732 paintBackground(paintInfo, rect, bleedAvoidance); | 737 paintBackground(paintInfo, rect, bleedAvoidance); |
| 733 paintBoxShadow(paintInfo, rect, style(), Inset); | 738 paintBoxShadow(paintInfo, rect, style(), Inset); |
| 734 | 739 |
| 735 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && !style()->hasAp pearance() && style()->hasBorder() && !collapseBorders()) | 740 // If bleedAvoidance is not BackgroundOverBorder, we need to paint borders a fter painting background. |
| 741 if (bleedAvoidance != BackgroundBleedBackgroundOverBorder && needToPaintBord er) | |
| 736 paintBorder(paintInfo, rect, style()); | 742 paintBorder(paintInfo, rect, style()); |
| 737 } | 743 } |
|
Julien - ping for review
2013/10/25 00:29:16
This function is now very similar to the one in Re
tasak
2013/11/27 08:20:44
I see. I added collapsedBorder() to RenderBox and
| |
| 738 | 744 |
| 739 void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset ) | 745 void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset ) |
| 740 { | 746 { |
| 741 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) | 747 if (style()->visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) |
| 742 return; | 748 return; |
| 743 | 749 |
| 744 LayoutRect rect(paintOffset, size()); | 750 LayoutRect rect(paintOffset, size()); |
| 745 subtractCaptionRect(rect); | 751 subtractCaptionRect(rect); |
| 746 | 752 |
| 747 paintMaskImages(paintInfo, rect); | 753 paintMaskImages(paintInfo, rect); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1442 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const | 1448 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel l* cell) const |
| 1443 { | 1449 { |
| 1444 ASSERT(cell->isFirstOrLastCellInRow()); | 1450 ASSERT(cell->isFirstOrLastCellInRow()); |
| 1445 if (hasSameDirectionAs(cell->row())) | 1451 if (hasSameDirectionAs(cell->row())) |
| 1446 return style()->borderEnd(); | 1452 return style()->borderEnd(); |
| 1447 | 1453 |
| 1448 return style()->borderStart(); | 1454 return style()->borderStart(); |
| 1449 } | 1455 } |
| 1450 | 1456 |
| 1451 } | 1457 } |
| OLD | NEW |