Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index c48220c9b982670f937e3d025d61a06373815254..6aabf0e865c2358a2804e8e3321c29c741392b87 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -1901,6 +1901,12 @@ void LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance |
| // included into the visual overflow for repaint, we wouldn't have this issue. |
| inflatePaintInvalidationRectForReflectionAndFilter(rect); |
| + if (ancestor == this) { |
|
chrishtr
2016/03/11 21:17:16
This seems fragile. Can it just be moved down into
Xianzhu
2016/03/11 21:39:56
This code is also needed when there is no paintInv
chrishtr
2016/03/11 21:43:06
Ok. Please add a comment explaining then.
Xianzhu
2016/03/11 22:08:25
Done.
chrishtr
2016/03/11 22:11:44
Actually, hold on a minute. would it be cleaner an
Xianzhu
2016/03/11 22:23:43
I don't quite understand your suggestion. Do you m
|
| + if (ancestor->style()->isFlippedBlocksWritingMode()) |
| + flipForWritingMode(rect); |
| + return; |
| + } |
| + |
| if (paintInvalidationState && paintInvalidationState->canMapToContainer(ancestor) && position != FixedPosition) { |
| if (layer() && layer()->transform()) |
| rect = LayoutRect(layer()->transform()->mapRect(pixelSnappedIntRect(rect))); |
| @@ -1916,12 +1922,6 @@ void LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance |
| return; |
| } |
| - if (ancestor == this) { |
| - if (ancestor->style()->isFlippedBlocksWritingMode()) |
| - flipForWritingMode(rect); |
| - return; |
| - } |
| - |
| bool containerSkipped; |
| LayoutObject* container = this->container(ancestor, &containerSkipped); |
| if (!container) |