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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.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) 1997 Martin Jones (mjones@kde.org) 2 Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 (C) 1998 Waldo Bastian (bastian@kde.org) 3 (C) 1998 Waldo Bastian (bastian@kde.org)
4 (C) 1998, 1999 Torben Weis (weis@kde.org) 4 (C) 1998, 1999 Torben Weis (weis@kde.org)
5 (C) 1999 Lars Knoll (knoll@kde.org) 5 (C) 1999 Lars Knoll (knoll@kde.org)
6 (C) 1999 Antti Koivisto (koivisto@kde.org) 6 (C) 1999 Antti Koivisto (koivisto@kde.org)
7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 7 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
8 reserved. 8 reserved.
9 9
10 This library is free software; you can redistribute it and/or 10 This library is free software; you can redistribute it and/or
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "platform/RuntimeEnabledFeatures.h" 46 #include "platform/RuntimeEnabledFeatures.h"
47 #include "platform/animation/CompositorAnimationHost.h" 47 #include "platform/animation/CompositorAnimationHost.h"
48 #include "platform/animation/CompositorAnimationTimeline.h" 48 #include "platform/animation/CompositorAnimationTimeline.h"
49 #include "platform/geometry/IntRect.h" 49 #include "platform/geometry/IntRect.h"
50 #include "platform/geometry/LayoutRect.h" 50 #include "platform/geometry/LayoutRect.h"
51 #include "platform/graphics/Color.h" 51 #include "platform/graphics/Color.h"
52 #include "platform/graphics/CompositorElementId.h" 52 #include "platform/graphics/CompositorElementId.h"
53 #include "platform/graphics/GraphicsLayerClient.h" 53 #include "platform/graphics/GraphicsLayerClient.h"
54 #include "platform/scroll/ScrollTypes.h" 54 #include "platform/scroll/ScrollTypes.h"
55 #include "platform/scroll/Scrollbar.h" 55 #include "platform/scroll/Scrollbar.h"
56 #include "platform/scroll/SmoothScrollSequencer.h"
56 #include "platform/wtf/Allocator.h" 57 #include "platform/wtf/Allocator.h"
57 #include "platform/wtf/AutoReset.h" 58 #include "platform/wtf/AutoReset.h"
58 #include "platform/wtf/Forward.h" 59 #include "platform/wtf/Forward.h"
59 #include "platform/wtf/HashSet.h" 60 #include "platform/wtf/HashSet.h"
60 #include "platform/wtf/ListHashSet.h" 61 #include "platform/wtf/ListHashSet.h"
61 #include "platform/wtf/text/WTFString.h" 62 #include "platform/wtf/text/WTFString.h"
62 #include "public/platform/ShapeProperties.h" 63 #include "public/platform/ShapeProperties.h"
63 #include "public/platform/WebDisplayMode.h" 64 #include "public/platform/WebDisplayMode.h"
64 #include "public/platform/WebRect.h" 65 #include "public/platform/WebRect.h"
65 66
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override; 470 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override;
470 LayoutBox* GetLayoutBox() const override; 471 LayoutBox* GetLayoutBox() const override;
471 FloatQuad LocalToVisibleContentQuad(const FloatQuad&, 472 FloatQuad LocalToVisibleContentQuad(const FloatQuad&,
472 const LayoutObject*, 473 const LayoutObject*,
473 unsigned = 0) const final; 474 unsigned = 0) const final;
474 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final; 475 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final;
475 476
476 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content, 477 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content,
477 const ScrollAlignment& align_x, 478 const ScrollAlignment& align_x,
478 const ScrollAlignment& align_y, 479 const ScrollAlignment& align_y,
479 ScrollType = kProgrammaticScroll) override; 480 ScrollType = kProgrammaticScroll,
481 bool is_smooth = false) override;
480 482
481 // The window that hosts the FrameView. The FrameView will communicate scrolls 483 // The window that hosts the FrameView. The FrameView will communicate scrolls
482 // and repaints to the host window in the window's coordinate space. 484 // and repaints to the host window in the window's coordinate space.
483 PlatformChromeClient* GetChromeClient() const; 485 PlatformChromeClient* GetChromeClient() const;
484 486
487 SmoothScrollSequencer* GetSmoothScrollSequencer() const override;
488
485 typedef HeapHashSet<Member<FrameViewBase>> ChildrenSet; 489 typedef HeapHashSet<Member<FrameViewBase>> ChildrenSet;
486 typedef HeapHashSet<Member<PluginView>> PluginsSet; 490 typedef HeapHashSet<Member<PluginView>> PluginsSet;
487 typedef HeapHashSet<Member<Scrollbar>> ScrollbarsSet; 491 typedef HeapHashSet<Member<Scrollbar>> ScrollbarsSet;
488 492
489 // Functions for child manipulation and inspection. 493 // Functions for child manipulation and inspection.
490 bool IsSelfVisible() const { 494 bool IsSelfVisible() const {
491 return self_visible_; 495 return self_visible_;
492 } // Whether or not we have been explicitly marked as visible or not. 496 } // Whether or not we have been explicitly marked as visible or not.
493 bool IsParentVisible() const { 497 bool IsParentVisible() const {
494 return parent_visible_; 498 return parent_visible_;
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 frameViewBase.IsFrameView()); 1285 frameViewBase.IsFrameView());
1282 DEFINE_TYPE_CASTS(FrameView, 1286 DEFINE_TYPE_CASTS(FrameView,
1283 ScrollableArea, 1287 ScrollableArea,
1284 scrollableArea, 1288 scrollableArea,
1285 scrollableArea->IsFrameView(), 1289 scrollableArea->IsFrameView(),
1286 scrollableArea.IsFrameView()); 1290 scrollableArea.IsFrameView());
1287 1291
1288 } // namespace blink 1292 } // namespace blink
1289 1293
1290 #endif // FrameView_h 1294 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698