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

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

Issue 2645973004: Have Scrollbar's timer use the same task runner as its scrollable area. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/Scrollbar.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 /* 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 ScrollbarPart m_hoveredPart; 230 ScrollbarPart m_hoveredPart;
231 ScrollbarPart m_pressedPart; 231 ScrollbarPart m_pressedPart;
232 int m_pressedPos; 232 int m_pressedPos;
233 float m_scrollPos; 233 float m_scrollPos;
234 bool m_draggingDocument; 234 bool m_draggingDocument;
235 int m_documentDragPos; 235 int m_documentDragPos;
236 236
237 bool m_enabled; 237 bool m_enabled;
238 238
239 Timer<Scrollbar> m_scrollTimer; 239 TaskRunnerTimer<Scrollbar> m_scrollTimer;
240 240
241 float m_elasticOverscroll; 241 float m_elasticOverscroll;
242 242
243 private: 243 private:
244 bool isScrollbar() const override { return true; } 244 bool isScrollbar() const override { return true; }
245 245
246 void invalidate() override { setNeedsPaintInvalidation(AllParts); } 246 void invalidate() override { setNeedsPaintInvalidation(AllParts); }
247 void invalidateRect(const IntRect&) override { 247 void invalidateRect(const IntRect&) override {
248 setNeedsPaintInvalidation(AllParts); 248 setNeedsPaintInvalidation(AllParts);
249 } 249 }
250 250
251 float scrollableAreaCurrentPos() const; 251 float scrollableAreaCurrentPos() const;
252 float scrollableAreaTargetPos() const; 252 float scrollableAreaTargetPos() const;
253 bool thumbWillBeUnderMouse() const; 253 bool thumbWillBeUnderMouse() const;
254 254
255 int m_themeScrollbarThickness; 255 int m_themeScrollbarThickness;
256 bool m_trackNeedsRepaint; 256 bool m_trackNeedsRepaint;
257 bool m_thumbNeedsRepaint; 257 bool m_thumbNeedsRepaint;
258 }; 258 };
259 259
260 DEFINE_TYPE_CASTS(Scrollbar, 260 DEFINE_TYPE_CASTS(Scrollbar,
261 Widget, 261 Widget,
262 widget, 262 widget,
263 widget->isScrollbar(), 263 widget->isScrollbar(),
264 widget.isScrollbar()); 264 widget.isScrollbar());
265 265
266 } // namespace blink 266 } // namespace blink
267 267
268 #endif // Scrollbar_h 268 #endif // Scrollbar_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698