Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| index ca464ab93c3cb9394109bdd14c06d0e99660266c..ae8cf5965da73cdd1a7d765cab36eb2add22e2a3 100644 |
| --- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| +++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp |
| @@ -156,14 +156,14 @@ void PaintInvalidationState::updatePaintOffsetAndClipForChildren() |
| // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present. |
| } |
| -void PaintInvalidationState::mapObjectRectToAncestor(const LayoutObject& object, const LayoutBoxModelObject* ancestor, LayoutRect& rect) const |
| +bool PaintInvalidationState::mapObjectRectToAncestor(const LayoutObject& object, const LayoutBoxModelObject* ancestor, LayoutRect& rect, int flags) const |
| { |
| ASSERT(canMapToAncestor(ancestor)); |
| if (ancestor == &object) { |
| if (object.isBox() && object.styleRef().isFlippedBlocksWritingMode()) |
| toLayoutBox(object).flipForWritingMode(rect); |
| - return; |
| + return true; |
| } |
| if (object.hasLayer()) { |
| @@ -179,8 +179,13 @@ void PaintInvalidationState::mapObjectRectToAncestor(const LayoutObject& object, |
| rect.move(m_paintOffset); |
| - if (m_clipped) |
| + if (m_clipped) { |
| + if (flags & EdgeInclusive) |
| + return rect.inclusiveIntersect(m_clipRect); |
| rect.intersect(m_clipRect); |
|
chrishtr
2016/03/22 17:25:49
also return false here if it's empty?
szager1
2016/03/22 19:42:24
Done.
|
| + } |
| + |
| + return true; |
| } |
| void PaintInvalidationState::addClipRectRelativeToPaintOffset(const LayoutSize& clipSize) |