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

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

Issue 2105523002: Don't set shownRatio in main thread top controls on animated state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved test a bit Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/TopControls.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 TopControls_h 5 #ifndef TopControls_h
6 #define TopControls_h 6 #define TopControls_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "public/platform/WebTopControlsState.h" 10 #include "public/platform/WebTopControlsState.h"
(...skipping 21 matching lines...) Expand all
32 // The amount that top controls are currently shown. 32 // The amount that top controls are currently shown.
33 float contentOffset(); 33 float contentOffset();
34 34
35 float height() const { return m_height; } 35 float height() const { return m_height; }
36 bool shrinkViewport() const { return m_shrinkViewport; } 36 bool shrinkViewport() const { return m_shrinkViewport; }
37 void setHeight(float height, bool shrinkViewport); 37 void setHeight(float height, bool shrinkViewport);
38 38
39 float shownRatio() const { return m_shownRatio; } 39 float shownRatio() const { return m_shownRatio; }
40 void setShownRatio(float); 40 void setShownRatio(float);
41 41
42 void updateConstraints(WebTopControlsState constraints); 42 void updateConstraintsAndState(
43 WebTopControlsState constraints,
44 WebTopControlsState current,
45 bool animate);
43 46
44 void scrollBegin(); 47 void scrollBegin();
45 48
46 // Scrolls top controls vertically if possible and returns the remaining scr oll 49 // Scrolls top controls vertically if possible and returns the remaining scr oll
47 // amount. 50 // amount.
48 FloatSize scrollBy(FloatSize scrollDelta); 51 FloatSize scrollBy(FloatSize scrollDelta);
49 52
50 private: 53 private:
51 explicit TopControls(const FrameHost&); 54 explicit TopControls(const FrameHost&);
52 void resetBaseline(); 55 void resetBaseline();
(...skipping 23 matching lines...) Expand all
76 // controls height. 79 // controls height.
77 bool m_shrinkViewport; 80 bool m_shrinkViewport;
78 81
79 // Constraints on the top controls state 82 // Constraints on the top controls state
80 WebTopControlsState m_permittedState; 83 WebTopControlsState m_permittedState;
81 84
82 }; 85 };
83 } // namespace blink 86 } // namespace blink
84 87
85 #endif // TopControls_h 88 #endif // TopControls_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/TopControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698