| OLD | NEW |
| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 if (!view) | 351 if (!view) |
| 352 return parent_point; | 352 return parent_point; |
| 353 | 353 |
| 354 IntPoint point = view->GetFrameView()->ConvertToLayoutItem( | 354 IntPoint point = view->GetFrameView()->ConvertToLayoutItem( |
| 355 LayoutBoxItem(&Box()), parent_point); | 355 LayoutBoxItem(&Box()), parent_point); |
| 356 | 356 |
| 357 point.Move(-ScrollbarOffset(scrollbar)); | 357 point.Move(-ScrollbarOffset(scrollbar)); |
| 358 return point; | 358 return point; |
| 359 } | 359 } |
| 360 | 360 |
| 361 IntPoint PaintLayerScrollableArea::ConvertFromRootFrame( |
| 362 const IntPoint& point_in_root_frame) const { |
| 363 LayoutView* view = Box().View(); |
| 364 if (!view) |
| 365 return point_in_root_frame; |
| 366 |
| 367 return view->GetFrameView()->ConvertFromRootFrame(point_in_root_frame); |
| 368 } |
| 369 |
| 361 int PaintLayerScrollableArea::ScrollSize( | 370 int PaintLayerScrollableArea::ScrollSize( |
| 362 ScrollbarOrientation orientation) const { | 371 ScrollbarOrientation orientation) const { |
| 363 IntSize scroll_dimensions = | 372 IntSize scroll_dimensions = |
| 364 MaximumScrollOffsetInt() - MinimumScrollOffsetInt(); | 373 MaximumScrollOffsetInt() - MinimumScrollOffsetInt(); |
| 365 return (orientation == kHorizontalScrollbar) ? scroll_dimensions.Width() | 374 return (orientation == kHorizontalScrollbar) ? scroll_dimensions.Width() |
| 366 : scroll_dimensions.Height(); | 375 : scroll_dimensions.Height(); |
| 367 } | 376 } |
| 368 | 377 |
| 369 void PaintLayerScrollableArea::UpdateScrollOffset( | 378 void PaintLayerScrollableArea::UpdateScrollOffset( |
| 370 const ScrollOffset& new_offset, | 379 const ScrollOffset& new_offset, |
| (...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2177 | 2186 |
| 2178 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2187 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 2179 ClampScrollableAreas() { | 2188 ClampScrollableAreas() { |
| 2180 for (auto& scrollable_area : *needs_clamp_) | 2189 for (auto& scrollable_area : *needs_clamp_) |
| 2181 scrollable_area->ClampScrollOffsetAfterOverflowChange(); | 2190 scrollable_area->ClampScrollOffsetAfterOverflowChange(); |
| 2182 delete needs_clamp_; | 2191 delete needs_clamp_; |
| 2183 needs_clamp_ = nullptr; | 2192 needs_clamp_ = nullptr; |
| 2184 } | 2193 } |
| 2185 | 2194 |
| 2186 } // namespace blink | 2195 } // namespace blink |
| OLD | NEW |