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

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

Issue 2141693002: Fix order of operations in LayoutView::mapAncestorToLocal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: none Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 049640447983c0360c72adfea4309b6aedcde362..ee065145857401b902663ddf47449fee1ec4c1f6 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -375,28 +375,20 @@ void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor, Transf
if (this == ancestor)
return;
- if (mode & IsFixed && m_frameView)
- transformState.move(m_frameView->scrollOffset());
-
- if (mode & UseTransforms && shouldUseTransformFromContainer(0)) {
- TransformationMatrix t;
- getTransformFromContainer(0, LayoutSize(), t);
- transformState.applyTransform(t);
- }
-
if (mode & TraverseDocumentBoundaries) {
if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) {
- // A LayoutView is a containing block for fixed-position elements, so don't carry this state across frames.
- mode &= ~IsFixed;
+ parentDocLayoutObject->mapAncestorToLocal(ancestor, transformState, mode & ~IsFixed);
- transformState.move(-frame()->view()->scrollOffset());
+ // A LayoutView is a containing block for fixed-position elements, so don't carry this state across frames.
Xianzhu 2016/07/14 17:40:11 Move this comment to above line 380.
chrishtr 2016/07/28 16:21:13 Done.
transformState.move(parentDocLayoutObject->contentBoxOffset());
-
- parentDocLayoutObject->mapAncestorToLocal(ancestor, transformState, mode);
+ transformState.move(-frame()->view()->scrollOffset());
Xianzhu 2016/07/14 17:40:11 Can this be: if (!(mode & IsFixed)) trans
chrishtr 2016/07/28 16:21:13 I could, but then I would have to add an else clau
}
} else {
ASSERT(!ancestor);
}
+
+ if (mode & IsFixed)
+ transformState.move(frame()->view()->scrollOffset());
}
void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutPoint&) const
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698