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

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, 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "platform/RuntimeEnabledFeatures.h" 45 #include "platform/RuntimeEnabledFeatures.h"
46 #include "platform/animation/CompositorAnimationHost.h" 46 #include "platform/animation/CompositorAnimationHost.h"
47 #include "platform/animation/CompositorAnimationTimeline.h" 47 #include "platform/animation/CompositorAnimationTimeline.h"
48 #include "platform/geometry/IntRect.h" 48 #include "platform/geometry/IntRect.h"
49 #include "platform/geometry/LayoutRect.h" 49 #include "platform/geometry/LayoutRect.h"
50 #include "platform/graphics/Color.h" 50 #include "platform/graphics/Color.h"
51 #include "platform/graphics/CompositorElementId.h" 51 #include "platform/graphics/CompositorElementId.h"
52 #include "platform/graphics/GraphicsLayerClient.h" 52 #include "platform/graphics/GraphicsLayerClient.h"
53 #include "platform/scroll/ScrollTypes.h" 53 #include "platform/scroll/ScrollTypes.h"
54 #include "platform/scroll/Scrollbar.h" 54 #include "platform/scroll/Scrollbar.h"
55 #include "platform/scroll/SmoothScrollSequencer.h"
55 #include "platform/wtf/Allocator.h" 56 #include "platform/wtf/Allocator.h"
56 #include "platform/wtf/AutoReset.h" 57 #include "platform/wtf/AutoReset.h"
57 #include "platform/wtf/Forward.h" 58 #include "platform/wtf/Forward.h"
58 #include "platform/wtf/HashSet.h" 59 #include "platform/wtf/HashSet.h"
59 #include "platform/wtf/ListHashSet.h" 60 #include "platform/wtf/ListHashSet.h"
60 #include "platform/wtf/text/WTFString.h" 61 #include "platform/wtf/text/WTFString.h"
61 #include "public/platform/ShapeProperties.h" 62 #include "public/platform/ShapeProperties.h"
62 #include "public/platform/WebDisplayMode.h" 63 #include "public/platform/WebDisplayMode.h"
63 #include "public/platform/WebRect.h" 64 #include "public/platform/WebRect.h"
64 65
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override; 469 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override;
469 LayoutBox* GetLayoutBox() const override; 470 LayoutBox* GetLayoutBox() const override;
470 FloatQuad LocalToVisibleContentQuad(const FloatQuad&, 471 FloatQuad LocalToVisibleContentQuad(const FloatQuad&,
471 const LayoutObject*, 472 const LayoutObject*,
472 unsigned = 0) const final; 473 unsigned = 0) const final;
473 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final; 474 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final;
474 475
475 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content, 476 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content,
476 const ScrollAlignment& align_x, 477 const ScrollAlignment& align_x,
477 const ScrollAlignment& align_y, 478 const ScrollAlignment& align_y,
478 ScrollType = kProgrammaticScroll) override; 479 ScrollType = kProgrammaticScroll,
480 bool is_smooth = false) override;
479 481
480 // The window that hosts the FrameView. The FrameView will communicate scrolls 482 // The window that hosts the FrameView. The FrameView will communicate scrolls
481 // and repaints to the host window in the window's coordinate space. 483 // and repaints to the host window in the window's coordinate space.
482 PlatformChromeClient* GetChromeClient() const; 484 PlatformChromeClient* GetChromeClient() const;
483 485
486 SmoothScrollSequencer* GetSmoothScrollSequencer() const override;
487
484 typedef HeapHashSet<Member<FrameOrPlugin>> ChildrenSet; 488 typedef HeapHashSet<Member<FrameOrPlugin>> ChildrenSet;
489
bokan 2017/05/15 17:15:28 Nit: remove newline
sunyunjia 2017/05/19 16:24:29 Done.
485 typedef HeapHashSet<Member<Scrollbar>> ScrollbarsSet; 490 typedef HeapHashSet<Member<Scrollbar>> ScrollbarsSet;
486 491
487 // Functions for child manipulation and inspection. 492 // Functions for child manipulation and inspection.
488 bool IsSelfVisible() const { 493 bool IsSelfVisible() const {
489 return self_visible_; 494 return self_visible_;
490 } // Whether or not we have been explicitly marked as visible or not. 495 } // Whether or not we have been explicitly marked as visible or not.
491 bool IsParentVisible() const { 496 bool IsParentVisible() const {
492 return parent_visible_; 497 return parent_visible_;
493 } // Whether or not our parent is visible. 498 } // Whether or not our parent is visible.
494 bool IsVisible() const { 499 bool IsVisible() const {
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 frame_or_plugin.IsFrameView()); 1284 frame_or_plugin.IsFrameView());
1280 DEFINE_TYPE_CASTS(FrameView, 1285 DEFINE_TYPE_CASTS(FrameView,
1281 ScrollableArea, 1286 ScrollableArea,
1282 scrollableArea, 1287 scrollableArea,
1283 scrollableArea->IsFrameView(), 1288 scrollableArea->IsFrameView(),
1284 scrollableArea.IsFrameView()); 1289 scrollableArea.IsFrameView());
1285 1290
1286 } // namespace blink 1291 } // namespace blink
1287 1292
1288 #endif // FrameView_h 1293 #endif // FrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698