Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2436283002: Fix LayoutObject::mapLocalToAncestor() for fixed under absolute (Closed)
Patch Set: - Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698