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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1516893002: Second reland: Fix incorrect sign in scroll and content box offset in absoluteToLocalPoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 if (mode & UseTransforms && shouldUseTransformFromContainer(0)) { 389 if (mode & UseTransforms && shouldUseTransformFromContainer(0)) {
390 TransformationMatrix t; 390 TransformationMatrix t;
391 getTransformFromContainer(0, LayoutSize(), t); 391 getTransformFromContainer(0, LayoutSize(), t);
392 transformState.applyTransform(t); 392 transformState.applyTransform(t);
393 } 393 }
394 394
395 if (mode & TraverseDocumentBoundaries) { 395 if (mode & TraverseDocumentBoundaries) {
396 if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) { 396 if (LayoutPart* parentDocLayoutObject = frame()->ownerLayoutObject()) {
397 parentDocLayoutObject->mapAbsoluteToLocalPoint(mode, transformState) ; 397 parentDocLayoutObject->mapAbsoluteToLocalPoint(mode, transformState) ;
398 398 transformState.move(parentDocLayoutObject->contentBoxOffset());
399 transformState.move(-parentDocLayoutObject->contentBoxOffset()); 399 transformState.move(-frame()->view()->scrollOffset());
400 transformState.move(frame()->view()->scrollOffset());
401 } 400 }
402 } 401 }
403 } 402 }
404 403
405 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout Point&) const 404 void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layout Point&) const
406 { 405 {
407 // Record the entire size of the contents of the frame. Note that we don't j ust 406 // Record the entire size of the contents of the frame. Note that we don't j ust
408 // use the viewport size (containing block) here because we want to ensure t his includes 407 // use the viewport size (containing block) here because we want to ensure t his includes
409 // all children (so we can avoid walking them explicitly). 408 // all children (so we can avoid walking them explicitly).
410 rects.append(LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->content sSize()))); 409 rects.append(LayoutRect(LayoutPoint::zero(), LayoutSize(frameView()->content sSize())));
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 } 995 }
997 996
998 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect ) 997 void LayoutView::sendMediaPositionChangeNotifications(const IntRect& visibleRect )
999 { 998 {
1000 for (auto& media : m_mediaForPositionNotification) { 999 for (auto& media : m_mediaForPositionNotification) {
1001 media->notifyPositionMayHaveChanged(visibleRect); 1000 media->notifyPositionMayHaveChanged(visibleRect);
1002 } 1001 }
1003 } 1002 }
1004 1003
1005 } // namespace blink 1004 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698