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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.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) 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "platform/FrameViewBase.h" 43 #include "platform/FrameViewBase.h"
44 #include "platform/RuntimeEnabledFeatures.h" 44 #include "platform/RuntimeEnabledFeatures.h"
45 #include "platform/animation/CompositorAnimationHost.h" 45 #include "platform/animation/CompositorAnimationHost.h"
46 #include "platform/animation/CompositorAnimationTimeline.h" 46 #include "platform/animation/CompositorAnimationTimeline.h"
47 #include "platform/geometry/IntRect.h" 47 #include "platform/geometry/IntRect.h"
48 #include "platform/geometry/LayoutRect.h" 48 #include "platform/geometry/LayoutRect.h"
49 #include "platform/graphics/Color.h" 49 #include "platform/graphics/Color.h"
50 #include "platform/graphics/GraphicsLayerClient.h" 50 #include "platform/graphics/GraphicsLayerClient.h"
51 #include "platform/scroll/ScrollTypes.h" 51 #include "platform/scroll/ScrollTypes.h"
52 #include "platform/scroll/Scrollbar.h" 52 #include "platform/scroll/Scrollbar.h"
53 #include "platform/scroll/SmoothScrollSequencer.h"
53 #include "public/platform/ShapeProperties.h" 54 #include "public/platform/ShapeProperties.h"
54 #include "public/platform/WebDisplayMode.h" 55 #include "public/platform/WebDisplayMode.h"
55 #include "public/platform/WebRect.h" 56 #include "public/platform/WebRect.h"
56 #include "wtf/Allocator.h" 57 #include "wtf/Allocator.h"
57 #include "wtf/AutoReset.h" 58 #include "wtf/AutoReset.h"
58 #include "wtf/Forward.h" 59 #include "wtf/Forward.h"
59 #include "wtf/HashSet.h" 60 #include "wtf/HashSet.h"
60 #include "wtf/ListHashSet.h" 61 #include "wtf/ListHashSet.h"
61 #include "wtf/text/WTFString.h" 62 #include "wtf/text/WTFString.h"
62 63
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 CompositorAnimationTimeline* compositorAnimationTimeline() const override; 442 CompositorAnimationTimeline* compositorAnimationTimeline() const override;
442 LayoutBox* layoutBox() const override; 443 LayoutBox* layoutBox() const override;
443 FloatQuad localToVisibleContentQuad(const FloatQuad&, 444 FloatQuad localToVisibleContentQuad(const FloatQuad&,
444 const LayoutObject*, 445 const LayoutObject*,
445 unsigned = 0) const final; 446 unsigned = 0) const final;
446 RefPtr<WebTaskRunner> getTimerTaskRunner() const final; 447 RefPtr<WebTaskRunner> getTimerTaskRunner() const final;
447 448
448 LayoutRect scrollIntoView(const LayoutRect& rectInContent, 449 LayoutRect scrollIntoView(const LayoutRect& rectInContent,
449 const ScrollAlignment& alignX, 450 const ScrollAlignment& alignX,
450 const ScrollAlignment& alignY, 451 const ScrollAlignment& alignY,
451 ScrollType = ProgrammaticScroll) override; 452 ScrollType = ProgrammaticScroll,
453 bool isSmooth = false) override;
452 454
453 // The window that hosts the FrameView. The FrameView will communicate scrolls 455 // The window that hosts the FrameView. The FrameView will communicate scrolls
454 // and repaints to the host window in the window's coordinate space. 456 // and repaints to the host window in the window's coordinate space.
455 HostWindow* getHostWindow() const; 457 HostWindow* getHostWindow() const;
456 458
459 SmoothScrollSequencer* getSmoothScrollSequencer() const override;
460
457 typedef HeapHashSet<Member<FrameViewBase>> ChildrenSet; 461 typedef HeapHashSet<Member<FrameViewBase>> ChildrenSet;
458 typedef HeapHashSet<Member<PluginView>> PluginsSet; 462 typedef HeapHashSet<Member<PluginView>> PluginsSet;
459 463
460 // Functions for child manipulation and inspection. 464 // Functions for child manipulation and inspection.
461 void setParent(FrameViewBase*) override; 465 void setParent(FrameViewBase*) override;
462 void removeChild(FrameViewBase*); 466 void removeChild(FrameViewBase*);
463 void addChild(FrameViewBase*); 467 void addChild(FrameViewBase*);
464 const ChildrenSet* children() const { return &m_children; } 468 const ChildrenSet* children() const { return &m_children; }
465 void removePlugin(PluginView*); 469 void removePlugin(PluginView*);
466 void addPlugin(PluginView*); 470 void addPlugin(PluginView*);
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 frameViewBase.isFrameView()); 1265 frameViewBase.isFrameView());
1262 DEFINE_TYPE_CASTS(FrameView, 1266 DEFINE_TYPE_CASTS(FrameView,
1263 ScrollableArea, 1267 ScrollableArea,
1264 scrollableArea, 1268 scrollableArea,
1265 scrollableArea->isFrameView(), 1269 scrollableArea->isFrameView(),
1266 scrollableArea.isFrameView()); 1270 scrollableArea.isFrameView());
1267 1271
1268 } // namespace blink 1272 } // namespace blink
1269 1273
1270 #endif // FrameView_h 1274 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698