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

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

Issue 2845583002: Remove FrameViewBase as base class of RemoteFrameView. (Closed)
Patch Set: fix scrollbar inactive Created 3 years, 7 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 bool has_horizontal_bar = HorizontalScrollbar(); 308 bool has_horizontal_bar = HorizontalScrollbar();
309 bool has_vertical_bar = VerticalScrollbar(); 309 bool has_vertical_bar = VerticalScrollbar();
310 bool has_resizer = Box().Style()->Resize() != RESIZE_NONE; 310 bool has_resizer = Box().Style()->Resize() != RESIZE_NONE;
311 if ((has_horizontal_bar && has_vertical_bar) || 311 if ((has_horizontal_bar && has_vertical_bar) ||
312 (has_resizer && (has_horizontal_bar || has_vertical_bar))) 312 (has_resizer && (has_horizontal_bar || has_vertical_bar)))
313 return CornerRect(Box(), HorizontalScrollbar(), VerticalScrollbar(), 313 return CornerRect(Box(), HorizontalScrollbar(), VerticalScrollbar(),
314 Box().PixelSnappedBorderBoxRect()); 314 Box().PixelSnappedBorderBoxRect());
315 return IntRect(); 315 return IntRect();
316 } 316 }
317 317
318 IntRect PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameViewBase( 318 IntRect PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameView(
319 const Scrollbar& scrollbar, 319 const Scrollbar& scrollbar,
320 const IntRect& scrollbar_rect) const { 320 const IntRect& scrollbar_rect) const {
321 LayoutView* view = Box().View(); 321 LayoutView* view = Box().View();
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 IntPoint 332 IntPoint PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameView(
333 PaintLayerScrollableArea::ConvertFromScrollbarToContainingFrameViewBase(
334 const Scrollbar& scrollbar, 333 const Scrollbar& scrollbar,
335 const IntPoint& scrollbar_point) const { 334 const IntPoint& scrollbar_point) const {
336 LayoutView* view = Box().View(); 335 LayoutView* view = Box().View();
337 if (!view) 336 if (!view)
338 return scrollbar_point; 337 return scrollbar_point;
339 338
340 IntPoint point = scrollbar_point; 339 IntPoint point = scrollbar_point;
341 point.Move(ScrollbarOffset(scrollbar)); 340 point.Move(ScrollbarOffset(scrollbar));
342 return view->GetFrameView()->ConvertFromLayoutItem(LayoutBoxItem(&Box()), 341 return view->GetFrameView()->ConvertFromLayoutItem(LayoutBoxItem(&Box()),
343 point); 342 point);
344 } 343 }
345 344
346 IntPoint 345 IntPoint PaintLayerScrollableArea::ConvertFromContainingFrameViewToScrollbar(
347 PaintLayerScrollableArea::ConvertFromContainingFrameViewBaseToScrollbar(
348 const Scrollbar& scrollbar, 346 const Scrollbar& scrollbar,
349 const IntPoint& parent_point) const { 347 const IntPoint& parent_point) const {
350 LayoutView* view = Box().View(); 348 LayoutView* view = Box().View();
351 if (!view) 349 if (!view)
352 return parent_point; 350 return parent_point;
353 351
354 IntPoint point = view->GetFrameView()->ConvertToLayoutItem( 352 IntPoint point = view->GetFrameView()->ConvertToLayoutItem(
355 LayoutBoxItem(&Box()), parent_point); 353 LayoutBoxItem(&Box()), parent_point);
356 354
357 point.Move(-ScrollbarOffset(scrollbar)); 355 point.Move(-ScrollbarOffset(scrollbar));
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 2147
2150 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 2148 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
2151 ClampScrollableAreas() { 2149 ClampScrollableAreas() {
2152 for (auto& scrollable_area : *needs_clamp_) 2150 for (auto& scrollable_area : *needs_clamp_)
2153 scrollable_area->ClampScrollOffsetAfterOverflowChange(); 2151 scrollable_area->ClampScrollOffsetAfterOverflowChange();
2154 delete needs_clamp_; 2152 delete needs_clamp_;
2155 needs_clamp_ = nullptr; 2153 needs_clamp_ = nullptr;
2156 } 2154 }
2157 2155
2158 } // namespace blink 2156 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698