Index: third_party/WebKit/Source/core/layout/LayoutView.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
index f7e4dbfcb46e5e025a097139331250fe6cbfb470..dbb290f0a21e6d8f559126895a7c5bcd7dfd1115 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
@@ -400,10 +400,7 @@ const LayoutObject* LayoutView::pushMappingToContainer( |
void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
TransformState& transformState, |
MapCoordinatesFlags mode) const { |
- if (this == ancestor) |
- return; |
- |
- if (mode & TraverseDocumentBoundaries) { |
+ if (this != ancestor && (mode & TraverseDocumentBoundaries)) { |
if (LayoutPart* parentDocLayoutObject = toLayoutPart( |
LayoutAPIShim::layoutObjectFrom(frame()->ownerLayoutItem()))) { |
// A LayoutView is a containing block for fixed-position elements, so |
@@ -415,7 +412,7 @@ void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
transformState.move(LayoutSize(-frame()->view()->scrollOffset())); |
} |
} else { |
- ASSERT(!ancestor); |
+ DCHECK(this == ancestor || !ancestor); |
} |
if (mode & IsFixed) |