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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2832883003: Remove unneeded Convert* methods and move many from FrameViewBase to FrameView (Closed)
Patch Set: fix ScrollableArea::ConvertFromScrollbarToContainingFrameViewBase and remove dchecks Created 3 years, 8 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 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
6 * 6 *
7 * Other contributors: 7 * Other contributors:
8 * Robert O'Callahan <roc+@cs.cmu.edu> 8 * Robert O'Callahan <roc+@cs.cmu.edu>
9 * David Baron <dbaron@fas.harvard.edu> 9 * David Baron <dbaron@fas.harvard.edu>
10 * Christian Biesinger <cbiesinger@gmail.com> 10 * Christian Biesinger <cbiesinger@gmail.com>
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (!view) 322 if (!view)
323 return scrollbar_rect; 323 return scrollbar_rect;
324 324
325 IntRect rect = scrollbar_rect; 325 IntRect rect = scrollbar_rect;
326 rect.Move(ScrollbarOffset(scrollbar)); 326 rect.Move(ScrollbarOffset(scrollbar));
327 327
328 return view->GetFrameView()->ConvertFromLayoutItem(LayoutBoxItem(&Box()), 328 return view->GetFrameView()->ConvertFromLayoutItem(LayoutBoxItem(&Box()),
329 rect); 329 rect);
330 } 330 }
331 331
332 IntRect PaintLayerScrollableArea::ConvertFromContainingFrameViewBaseToScrollbar(
333 const Scrollbar& scrollbar,
334 const IntRect& parent_rect) const {
335 LayoutView* view = Box().View();
336 if (!view)
337 return parent_rect;
338
339 IntRect rect = view->GetFrameView()->ConvertToLayoutItem(
340 LayoutBoxItem(&Box()), parent_rect);
341 rect.Move(-ScrollbarOffset(scrollbar));
342 return rect;
343 }
344
345 IntPoint 332 IntPoint
346 PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameViewBase( 333 PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameViewBase(
347 const Scrollbar& scrollbar, 334 const Scrollbar& scrollbar,
348 const IntPoint& scrollbar_point) const { 335 const IntPoint& scrollbar_point) const {
349 LayoutView* view = Box().View(); 336 LayoutView* view = Box().View();
350 if (!view) 337 if (!view)
351 return scrollbar_point; 338 return scrollbar_point;
352 339
353 IntPoint point = scrollbar_point; 340 IntPoint point = scrollbar_point;
354 point.Move(ScrollbarOffset(scrollbar)); 341 point.Move(ScrollbarOffset(scrollbar));
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2137 2124
2138 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2125 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2139 ClampScrollableAreas() { 2126 ClampScrollableAreas() {
2140 for (auto& scrollable_area : *needs_clamp_) 2127 for (auto& scrollable_area : *needs_clamp_)
2141 scrollable_area->ClampScrollOffsetAfterOverflowChange(); 2128 scrollable_area->ClampScrollOffsetAfterOverflowChange();
2142 delete needs_clamp_; 2129 delete needs_clamp_;
2143 needs_clamp_ = nullptr; 2130 needs_clamp_ = nullptr;
2144 } 2131 }
2145 2132
2146 } // namespace blink 2133 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.h ('k') | third_party/WebKit/Source/platform/FrameViewBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698