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

Unified Diff: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp

Issue 2387053003: reflow comments in platform/{mediastream,scroll} (Closed)
Patch Set: blah Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
diff --git a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
index b148817a83bf4f84cee057128801400383e3404e..080ab921d441fb0077730e65144390b1759efddf 100644
--- a/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
+++ b/third_party/WebKit/Source/platform/scroll/Scrollbar.cpp
@@ -65,9 +65,10 @@ Scrollbar::Scrollbar(ScrollableArea* scrollableArea,
m_thumbNeedsRepaint(true) {
m_theme.registerScrollbar(*this);
- // FIXME: This is ugly and would not be necessary if we fix cross-platform code to actually query for
- // scrollbar thickness and use it when sizing scrollbars (rather than leaving one dimension of the scrollbar
- // alone when sizing).
+ // FIXME: This is ugly and would not be necessary if we fix cross-platform
+ // code to actually query for scrollbar thickness and use it when sizing
+ // scrollbars (rather than leaving one dimension of the scrollbar alone when
+ // sizing).
int thickness = m_theme.scrollbarThickness(controlSize);
if (m_hostWindow)
thickness = m_hostWindow->windowToViewportScalar(thickness);
@@ -302,7 +303,8 @@ void Scrollbar::setHoveredPart(ScrollbarPart part) {
if (((m_hoveredPart == NoPart || part == NoPart) &&
theme().invalidateOnMouseEnterExit())
- // When there's a pressed part, we don't draw a hovered state, so there's no reason to invalidate.
+ // When there's a pressed part, we don't draw a hovered state, so there's
+ // no reason to invalidate.
|| m_pressedPart == NoPart)
setNeedsPaintInvalidation(static_cast<ScrollbarPart>(m_hoveredPart | part));
@@ -311,7 +313,8 @@ void Scrollbar::setHoveredPart(ScrollbarPart part) {
void Scrollbar::setPressedPart(ScrollbarPart part) {
if (m_pressedPart != NoPart
- // When we no longer have a pressed part, we can start drawing a hovered state on the hovered part.
+ // When we no longer have a pressed part, we can start drawing a hovered
+ // state on the hovered part.
|| m_hoveredPart != NoPart)
setNeedsPaintInvalidation(
static_cast<ScrollbarPart>(m_pressedPart | m_hoveredPart | part));
@@ -467,8 +470,9 @@ void Scrollbar::mouseUp(const PlatformMouseEvent& mouseEvent) {
stopTimerIfNeeded();
if (m_scrollableArea) {
- // m_hoveredPart won't be updated until the next mouseMoved or mouseDown, so we have to hit test
- // to really know if the mouse has exited the scrollbar on a mouseUp.
+ // m_hoveredPart won't be updated until the next mouseMoved or mouseDown, so
+ // we have to hit test to really know if the mouse has exited the scrollbar
+ // on a mouseUp.
ScrollbarPart part = theme().hitTest(*this, mouseEvent.position());
if (part == NoPart)
m_scrollableArea->mouseExitedScrollbar(*this);
@@ -492,8 +496,9 @@ void Scrollbar::mouseDown(const PlatformMouseEvent& evt) {
m_dragOrigin = m_currentPos;
int thumbLen = theme().thumbLength(*this);
int desiredPos = pressedPos;
- // Set the pressed position to the middle of the thumb so that when we do the move, the delta
- // will be from the current pixel position of the thumb to the new desired position for the thumb.
+ // Set the pressed position to the middle of the thumb so that when we do
+ // the move, the delta will be from the current pixel position of the thumb
+ // to the new desired position for the thumb.
m_pressedPos = theme().trackPosition(*this) + theme().thumbPosition(*this) +
thumbLen / 2;
moveThumb(desiredPos);

Powered by Google App Engine
This is Rietveld 408576698