Chromium Code Reviews| 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 |