diff options
author | wangxianzhu <wangxianzhu@chromium.org> | 2016-01-06 19:13:42 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-07 03:14:53 +0000 |
commit | bbe3833cab208c47f91dfba5decb356bba8f3dfb (patch) | |
tree | 31d9dc5f769c26cdc30f162e3fea595dc866887e /third_party/WebKit/Source/core/layout/LayoutTableCell.cpp | |
parent | 79d23833195a16ec00949709874bab7b7d0ab1b3 (diff) | |
download | chromium_src-bbe3833cab208c47f91dfba5decb356bba8f3dfb.zip chromium_src-bbe3833cab208c47f91dfba5decb356bba8f3dfb.tar.gz chromium_src-bbe3833cab208c47f91dfba5decb356bba8f3dfb.tar.bz2 |
Layered table row/cell leaves collapsed border area transparent
Collapsed borders are painted on the table's layer. If a row or a cell
has layer and the table collapses borders, the row or cell leaves the
collapsed border area on the layer transparent, letting collapsed borders
painted on the table's layer be seen through. In the case, the layer for
the row/cell should not be treated as opaque layers.
This change affects whether the layers are treated as opaque when the
layers are composited.
BUG=562333
TEST=LayoutTableRowTest.BackgroundIsKnownToBeOpaqueWithLayerAndCollapsedBorder
TEST=LayoutTableCellTest.BackgroundIsKnownToBeOpaqueWithLayerAndCollapsedBorder
Review URL: https://codereview.chromium.org/1547563002
Cr-Commit-Position: refs/heads/master@{#367995}
Diffstat (limited to 'third_party/WebKit/Source/core/layout/LayoutTableCell.cpp')
-rw-r--r-- | third_party/WebKit/Source/core/layout/LayoutTableCell.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp index fe9d7f0..94c76ba 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp @@ -1011,4 +1011,13 @@ LayoutTableCell* LayoutTableCell::createAnonymousWithParent(const LayoutObject* return newCell; } +bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const +{ + // If this object has layer, the area of collapsed borders should be transparent + // to expose the collapsed borders painted on the underlying layer. + if (hasLayer() && table()->collapseBorders()) + return false; + return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); +} + } // namespace blink |