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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.h

Issue 1601303003: Fix smooth scroll overshooting when mouse held down in scrollbar track. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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) 2004, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 float m_elasticOverscroll; 216 float m_elasticOverscroll;
217 217
218 private: 218 private:
219 bool isScrollbar() const override { return true; } 219 bool isScrollbar() const override { return true; }
220 220
221 void invalidate() override { setNeedsPaintInvalidation(AllParts); } 221 void invalidate() override { setNeedsPaintInvalidation(AllParts); }
222 void invalidateRect(const IntRect&) override { setNeedsPaintInvalidation(All Parts); } 222 void invalidateRect(const IntRect&) override { setNeedsPaintInvalidation(All Parts); }
223 223
224 float scrollableAreaCurrentPos() const; 224 float scrollableAreaCurrentPos() const;
225 float scrollableAreaTargetPos() const;
226 bool thumbWillBeUnderMouse() const;
225 227
226 bool m_trackNeedsRepaint; 228 bool m_trackNeedsRepaint;
227 bool m_thumbNeedsRepaint; 229 bool m_thumbNeedsRepaint;
228 }; 230 };
229 231
230 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr ollbar()); 232 DEFINE_TYPE_CASTS(Scrollbar, Widget, widget, widget->isScrollbar(), widget.isScr ollbar());
231 233
232 } // namespace blink 234 } // namespace blink
233 235
234 #endif // Scrollbar_h 236 #endif // Scrollbar_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698