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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Rebase 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) 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 m_scrollbarManager.horizontalScrollbar(); 235 return m_scrollbarManager.horizontalScrollbar();
236 } 236 }
237 Scrollbar* verticalScrollbar() const override { 237 Scrollbar* verticalScrollbar() const override {
238 return m_scrollbarManager.verticalScrollbar(); 238 return m_scrollbarManager.verticalScrollbar();
239 } 239 }
240 240
241 HostWindow* getHostWindow() const override; 241 HostWindow* getHostWindow() 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); 377 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint);
376 378
377 bool hitTestResizerInFragments(const PaintLayerFragments&, 379 bool hitTestResizerInFragments(const PaintLayerFragments&,
378 const HitTestLocation&) const; 380 const HitTestLocation&) const;
379 381
380 // Returns the new offset, after scrolling, of the given rect in absolute 382 // Returns the new offset, after scrolling, of the given rect in absolute
381 // coordinates, clipped by the parent's client rect. 383 // coordinates, clipped by the parent's client rect.
382 LayoutRect scrollIntoView(const LayoutRect&, 384 LayoutRect scrollIntoView(const LayoutRect&,
383 const ScrollAlignment& alignX, 385 const ScrollAlignment& alignX,
384 const ScrollAlignment& alignY, 386 const ScrollAlignment& alignY,
385 ScrollType = ProgrammaticScroll) override; 387 ScrollType = ProgrammaticScroll,
388 bool isSmooth = false) override;
386 389
387 // Returns true if scrollable area is in the FrameView's collection of 390 // Returns true if scrollable area is in the FrameView's collection of
388 // scrollable areas. This can only happen if we're scrollable, visible to hit 391 // scrollable areas. This can only happen if we're scrollable, visible to hit
389 // test, and do in fact overflow. This means that 'overflow: hidden' or 392 // test, and do in fact overflow. This means that 'overflow: hidden' or
390 // 'pointer-events: none' layers never get added to the FrameView's 393 // 'pointer-events: none' layers never get added to the FrameView's
391 // collection. 394 // collection.
392 bool scrollsOverflow() const { return m_scrollsOverflow; } 395 bool scrollsOverflow() const { return m_scrollsOverflow; }
393 396
394 // Rectangle encompassing the scroll corner and resizer rect. 397 // Rectangle encompassing the scroll corner and resizer rect.
395 IntRect scrollCornerAndResizerRect() const final; 398 IntRect scrollCornerAndResizerRect() const final;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 607
605 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 608 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
606 ScrollableArea, 609 ScrollableArea,
607 scrollableArea, 610 scrollableArea,
608 scrollableArea->isPaintLayerScrollableArea(), 611 scrollableArea->isPaintLayerScrollableArea(),
609 scrollableArea.isPaintLayerScrollableArea()); 612 scrollableArea.isPaintLayerScrollableArea());
610 613
611 } // namespace blink 614 } // namespace blink
612 615
613 #endif // LayerScrollableArea_h 616 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698