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

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

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 | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | no next file » | 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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 m_totalSize(0), 51 m_totalSize(0),
52 m_currentPos(0), 52 m_currentPos(0),
53 m_dragOrigin(0), 53 m_dragOrigin(0),
54 m_hoveredPart(NoPart), 54 m_hoveredPart(NoPart),
55 m_pressedPart(NoPart), 55 m_pressedPart(NoPart),
56 m_pressedPos(0), 56 m_pressedPos(0),
57 m_scrollPos(0), 57 m_scrollPos(0),
58 m_draggingDocument(false), 58 m_draggingDocument(false),
59 m_documentDragPos(0), 59 m_documentDragPos(0),
60 m_enabled(true), 60 m_enabled(true),
61 m_scrollTimer(this, &Scrollbar::autoscrollTimerFired), 61 m_scrollTimer(scrollableArea->getTimerTaskRunner(),
62 this,
63 &Scrollbar::autoscrollTimerFired),
62 m_elasticOverscroll(0), 64 m_elasticOverscroll(0),
63 m_trackNeedsRepaint(true), 65 m_trackNeedsRepaint(true),
64 m_thumbNeedsRepaint(true) { 66 m_thumbNeedsRepaint(true) {
65 m_theme.registerScrollbar(*this); 67 m_theme.registerScrollbar(*this);
66 68
67 // FIXME: This is ugly and would not be necessary if we fix cross-platform 69 // FIXME: This is ugly and would not be necessary if we fix cross-platform
68 // code to actually query for scrollbar thickness and use it when sizing 70 // code to actually query for scrollbar thickness and use it when sizing
69 // scrollbars (rather than leaving one dimension of the scrollbar alone when 71 // scrollbars (rather than leaving one dimension of the scrollbar alone when
70 // sizing). 72 // sizing).
71 int thickness = m_theme.scrollbarThickness(controlSize); 73 int thickness = m_theme.scrollbarThickness(controlSize);
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 invalidParts = AllParts; 635 invalidParts = AllParts;
634 if (invalidParts & ~ThumbPart) 636 if (invalidParts & ~ThumbPart)
635 m_trackNeedsRepaint = true; 637 m_trackNeedsRepaint = true;
636 if (invalidParts & ThumbPart) 638 if (invalidParts & ThumbPart)
637 m_thumbNeedsRepaint = true; 639 m_thumbNeedsRepaint = true;
638 if (m_scrollableArea) 640 if (m_scrollableArea)
639 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation()); 641 m_scrollableArea->setScrollbarNeedsPaintInvalidation(orientation());
640 } 642 }
641 643
642 } // namespace blink 644 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698