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

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

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Added web platform test. 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) 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 bool HitTestOverflowControls(HitTestResult&, const IntPoint& local_point); 386 bool HitTestOverflowControls(HitTestResult&, const IntPoint& local_point);
385 387
386 bool HitTestResizerInFragments(const PaintLayerFragments&, 388 bool HitTestResizerInFragments(const PaintLayerFragments&,
387 const HitTestLocation&) const; 389 const HitTestLocation&) const;
388 390
389 // Returns the new offset, after scrolling, of the given rect in absolute 391 // Returns the new offset, after scrolling, of the given rect in absolute
390 // coordinates, clipped by the parent's client rect. 392 // coordinates, clipped by the parent's client rect.
391 LayoutRect ScrollIntoView(const LayoutRect&, 393 LayoutRect ScrollIntoView(const LayoutRect&,
392 const ScrollAlignment& align_x, 394 const ScrollAlignment& align_x,
393 const ScrollAlignment& align_y, 395 const ScrollAlignment& align_y,
394 ScrollType = kProgrammaticScroll) override; 396 ScrollType = kProgrammaticScroll,
397 bool is_smooth = false) override;
395 398
396 // Returns true if scrollable area is in the FrameView's collection of 399 // Returns true if scrollable area is in the FrameView's collection of
397 // scrollable areas. This can only happen if we're scrollable, visible to hit 400 // scrollable areas. This can only happen if we're scrollable, visible to hit
398 // test, and do in fact overflow. This means that 'overflow: hidden' or 401 // test, and do in fact overflow. This means that 'overflow: hidden' or
399 // 'pointer-events: none' layers never get added to the FrameView's 402 // 'pointer-events: none' layers never get added to the FrameView's
400 // collection. 403 // collection.
401 bool ScrollsOverflow() const { return scrolls_overflow_; } 404 bool ScrollsOverflow() const { return scrolls_overflow_; }
402 405
403 // Rectangle encompassing the scroll corner and resizer rect. 406 // Rectangle encompassing the scroll corner and resizer rect.
404 IntRect ScrollCornerAndResizerRect() const final; 407 IntRect ScrollCornerAndResizerRect() const final;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 614
612 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, 615 DEFINE_TYPE_CASTS(PaintLayerScrollableArea,
613 ScrollableArea, 616 ScrollableArea,
614 scrollableArea, 617 scrollableArea,
615 scrollableArea->IsPaintLayerScrollableArea(), 618 scrollableArea->IsPaintLayerScrollableArea(),
616 scrollableArea.IsPaintLayerScrollableArea()); 619 scrollableArea.IsPaintLayerScrollableArea());
617 620
618 } // namespace blink 621 } // namespace blink
619 622
620 #endif // LayerScrollableArea_h 623 #endif // LayerScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698