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

Side by Side Diff: Source/core/layout/LayerScrollableArea.cpp

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed rbyers@ feedback (minus tests) Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 gevt = static_cast<const PlatformGestureEvent*>(&evt); 1228 gevt = static_cast<const PlatformGestureEvent*>(&evt);
1229 pos = gevt->position(); 1229 pos = gevt->position();
1230 pos.move(gevt->deltaX(), gevt->deltaY()); 1230 pos.move(gevt->deltaX(), gevt->deltaY());
1231 break; 1231 break;
1232 default: 1232 default:
1233 ASSERT_NOT_REACHED(); 1233 ASSERT_NOT_REACHED();
1234 } 1234 }
1235 1235
1236 float zoomFactor = box().style()->effectiveZoom(); 1236 float zoomFactor = box().style()->effectiveZoom();
1237 1237
1238 IntSize newOffset = offsetFromResizeCorner(document.view()->windowToContents (pos)); 1238 IntSize newOffset = offsetFromResizeCorner(document.view()->rootFrameToConte nts(pos));
1239 newOffset.setWidth(newOffset.width() / zoomFactor); 1239 newOffset.setWidth(newOffset.width() / zoomFactor);
1240 newOffset.setHeight(newOffset.height() / zoomFactor); 1240 newOffset.setHeight(newOffset.height() / zoomFactor);
1241 1241
1242 LayoutSize currentSize = box().size(); 1242 LayoutSize currentSize = box().size();
1243 currentSize.scale(1 / zoomFactor); 1243 currentSize.scale(1 / zoomFactor);
1244 LayoutSize minimumSize = element->minimumSizeForResizing().shrunkTo(currentS ize); 1244 LayoutSize minimumSize = element->minimumSizeForResizing().shrunkTo(currentS ize);
1245 element->setMinimumSizeForResizing(minimumSize); 1245 element->setMinimumSizeForResizing(minimumSize);
1246 1246
1247 LayoutSize adjustedOldOffset = LayoutSize(oldOffset.width() / zoomFactor, ol dOffset.height() / zoomFactor); 1247 LayoutSize adjustedOldOffset = LayoutSize(oldOffset.width() / zoomFactor, ol dOffset.height() / zoomFactor);
1248 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) { 1248 if (box().style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft()) {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 void LayerScrollableArea::setTopmostScrollChild(Layer* scrollChild) 1378 void LayerScrollableArea::setTopmostScrollChild(Layer* scrollChild)
1379 { 1379 {
1380 // We only want to track the topmost scroll child for scrollable areas with 1380 // We only want to track the topmost scroll child for scrollable areas with
1381 // overlay scrollbars. 1381 // overlay scrollbars.
1382 if (!hasOverlayScrollbars()) 1382 if (!hasOverlayScrollbars())
1383 return; 1383 return;
1384 m_nextTopmostScrollChild = scrollChild; 1384 m_nextTopmostScrollChild = scrollChild;
1385 } 1385 }
1386 1386
1387 } // namespace blink 1387 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698