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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Fixed nits. Created 3 years, 6 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) 2003, 2009, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2009, 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 Scrollbar* HorizontalScrollbar() const override { 234 Scrollbar* HorizontalScrollbar() const override {
235 return scrollbar_manager_.HorizontalScrollbar(); 235 return scrollbar_manager_.HorizontalScrollbar();
236 } 236 }
237 Scrollbar* VerticalScrollbar() const override { 237 Scrollbar* VerticalScrollbar() const override {
238 return scrollbar_manager_.VerticalScrollbar(); 238 return scrollbar_manager_.VerticalScrollbar();
239 } 239 }
240 240
241 PlatformChromeClient* GetChromeClient() const override; 241 PlatformChromeClient* GetChromeClient() const override;
242 242
243 SmoothScrollSequencer* GetSmoothScrollSequencer() const override;
244
243 // For composited scrolling, we allocate an extra GraphicsLayer to hold 245 // For composited scrolling, we allocate an extra GraphicsLayer to hold
244 // onto the scrolling content. The layer can be shifted on the GPU and 246 // onto the scrolling content. The layer can be shifted on the GPU and
245 // composited at little cost. 247 // composited at little cost.
246 // Note that this is done in CompositedLayerMapping, this function being 248 // Note that this is done in CompositedLayerMapping, this function being
247 // only a helper. 249 // only a helper.
248 GraphicsLayer* LayerForScrolling() const override; 250 GraphicsLayer* LayerForScrolling() const override;
249 251
250 // GraphicsLayers for the scrolling components. 252 // GraphicsLayers for the scrolling components.
251 // 253 //
252 // Any function can return nullptr if they are not accelerated. 254 // Any function can return nullptr if they are not accelerated.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 bool HitTestOverflowControls(HitTestResult&, const IntPoint& local_point); 387 bool HitTestOverflowControls(HitTestResult&, const IntPoint& local_point);
386 388
387 bool HitTestResizerInFragments(const PaintLayerFragments&, 389 bool HitTestResizerInFragments(const PaintLayerFragments&,
388 const HitTestLocation&) const; 390 const HitTestLocation&) const;
389 391
390 // Returns the new offset, after scrolling, of the given rect in absolute 392 // Returns the new offset, after scrolling, of the given rect in absolute
391 // coordinates, clipped by the parent's client rect. 393 // coordinates, clipped by the parent's client rect.
392 LayoutRect ScrollIntoView(const LayoutRect&, 394 LayoutRect ScrollIntoView(const LayoutRect&,
393 const ScrollAlignment& align_x, 395 const ScrollAlignment& align_x,
394 const ScrollAlignment& align_y, 396 const ScrollAlignment& align_y,
397 bool is_smooth,
395 ScrollType = kProgrammaticScroll) override; 398 ScrollType = kProgrammaticScroll) override;
396 399
397 // Returns true if scrollable area is in the FrameView's collection of 400 // Returns true if scrollable area is in the FrameView's collection of
398 // scrollable areas. This can only happen if we're scrollable, visible to hit 401 // scrollable areas. This can only happen if we're scrollable, visible to hit
399 // test, and do in fact overflow. This means that 'overflow: hidden' or 402 // test, and do in fact overflow. This means that 'overflow: hidden' or
400 // 'pointer-events: none' layers never get added to the FrameView's 403 // 'pointer-events: none' layers never get added to the FrameView's
401 // collection. 404 // collection.
402 bool ScrollsOverflow() const { return scrolls_overflow_; } 405 bool ScrollsOverflow() const { return scrolls_overflow_; }
403 406
404 // Rectangle encompassing the scroll corner and resizer rect. 407 // Rectangle encompassing the scroll corner and resizer rect.
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 615
613 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 616 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
614 ScrollableArea, 617 ScrollableArea,
615 scrollableArea, 618 scrollableArea,
616 scrollableArea->IsPaintLayerScrollableArea(), 619 scrollableArea->IsPaintLayerScrollableArea(),
617 scrollableArea.IsPaintLayerScrollableArea()); 620 scrollableArea.IsPaintLayerScrollableArea());
618 621
619 } // namespace blink 622 } // namespace blink
620 623
621 #endif // LayerScrollableArea_h 624 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698