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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrameView.h

Issue 2650343008: Implement Element.scrollIntoView for scroll-behavior: smooth. (Closed)
Patch Set: Fixed nits. Created 3 years, 6 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override; 463 CompositorAnimationTimeline* GetCompositorAnimationTimeline() const override;
463 LayoutBox* GetLayoutBox() const override; 464 LayoutBox* GetLayoutBox() const override;
464 FloatQuad LocalToVisibleContentQuad(const FloatQuad&, 465 FloatQuad LocalToVisibleContentQuad(const FloatQuad&,
465 const LayoutObject*, 466 const LayoutObject*,
466 unsigned = 0) const final; 467 unsigned = 0) const final;
467 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final; 468 RefPtr<WebTaskRunner> GetTimerTaskRunner() const final;
468 469
469 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content, 470 LayoutRect ScrollIntoView(const LayoutRect& rect_in_content,
470 const ScrollAlignment& align_x, 471 const ScrollAlignment& align_x,
471 const ScrollAlignment& align_y, 472 const ScrollAlignment& align_y,
473 bool is_smooth,
472 ScrollType = kProgrammaticScroll) override; 474 ScrollType = kProgrammaticScroll) override;
473 475
474 // The window that hosts the LocalFrameView. The LocalFrameView will 476 // The window that hosts the LocalFrameView. The LocalFrameView will
475 // communicate scrolls and repaints to the host window in the window's 477 // communicate scrolls and repaints to the host window in the window's
476 // coordinate space. 478 // coordinate space.
477 PlatformChromeClient* GetChromeClient() const; 479 PlatformChromeClient* GetChromeClient() const;
478 480
481 SmoothScrollSequencer* GetSmoothScrollSequencer() const override;
482
479 // Functions for child manipulation and inspection. 483 // Functions for child manipulation and inspection.
480 bool IsSelfVisible() const { 484 bool IsSelfVisible() const {
481 return self_visible_; 485 return self_visible_;
482 } // Whether or not we have been explicitly marked as visible or not. 486 } // Whether or not we have been explicitly marked as visible or not.
483 bool IsParentVisible() const { 487 bool IsParentVisible() const {
484 return parent_visible_; 488 return parent_visible_;
485 } // Whether or not our parent is visible. 489 } // Whether or not our parent is visible.
486 bool IsVisible() const { 490 bool IsVisible() const {
487 return self_visible_ && parent_visible_; 491 return self_visible_ && parent_visible_;
488 } // Whether or not we are actually visible. 492 } // Whether or not we are actually visible.
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 embedded_content_view.IsLocalFrameView()); 1276 embedded_content_view.IsLocalFrameView());
1273 DEFINE_TYPE_CASTS(LocalFrameView, 1277 DEFINE_TYPE_CASTS(LocalFrameView,
1274 ScrollableArea, 1278 ScrollableArea,
1275 scrollableArea, 1279 scrollableArea,
1276 scrollableArea->IsLocalFrameView(), 1280 scrollableArea->IsLocalFrameView(),
1277 scrollableArea.IsLocalFrameView()); 1281 scrollableArea.IsLocalFrameView());
1278 1282
1279 } // namespace blink 1283 } // namespace blink
1280 1284
1281 #endif // LocalFrameView_h 1285 #endif // LocalFrameView_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698