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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LayoutBoxItem.h

Issue 1738243002: Removed main-thread one dimensional scrolling paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@removeStepFromUserScroll
Patch Set: Rebase Created 4 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LayoutBoxItem_h 5 #ifndef LayoutBoxItem_h
6 #define LayoutBoxItem_h 6 #define LayoutBoxItem_h
7 7
8 #include "core/layout/LayoutBox.h" 8 #include "core/layout/LayoutBox.h"
9 #include "core/layout/api/LayoutBoxModel.h" 9 #include "core/layout/api/LayoutBoxModel.h"
10 #include "platform/scroll/ScrollTypes.h" 10 #include "platform/scroll/ScrollTypes.h"
(...skipping 15 matching lines...) Expand all
26 26
27 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) { } 27 explicit LayoutBoxItem(std::nullptr_t) : LayoutBoxModel(nullptr) { }
28 28
29 LayoutBoxItem() { } 29 LayoutBoxItem() { }
30 30
31 LayoutBoxItem enclosingBox() const 31 LayoutBoxItem enclosingBox() const
32 { 32 {
33 return LayoutBoxItem(toBox()->enclosingBox()); 33 return LayoutBoxItem(toBox()->enclosingBox());
34 } 34 }
35 35
36 ScrollResultOneDimensional scroll(ScrollDirectionPhysical direction, ScrollG ranularity granularity, float delta = 1) 36 ScrollResult scroll(ScrollGranularity granularity, const FloatSize& delta)
37 { 37 {
38 return toBox()->scroll(direction, granularity, delta); 38 return toBox()->scroll(granularity, delta);
39 } 39 }
40 40
41 private: 41 private:
42 LayoutBox* toBox() 42 LayoutBox* toBox()
43 { 43 {
44 return toLayoutBox(layoutObject()); 44 return toLayoutBox(layoutObject());
45 } 45 }
46 46
47 const LayoutBox* toBox() const 47 const LayoutBox* toBox() const
48 { 48 {
49 return toLayoutBox(layoutObject()); 49 return toLayoutBox(layoutObject());
50 } 50 }
51 }; 51 };
52 52
53 } // namespace blink 53 } // namespace blink
54 54
55 #endif // LayoutBoxItem_h 55 #endif // LayoutBoxItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698