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

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

Issue 819953002: Mac: Update scrollbar size and input position during impl-overscroll (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clean up Created 6 years 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, 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 , m_pressedPart(NoPart) 59 , m_pressedPart(NoPart)
60 , m_pressedPos(0) 60 , m_pressedPos(0)
61 , m_scrollPos(0) 61 , m_scrollPos(0)
62 , m_draggingDocument(false) 62 , m_draggingDocument(false)
63 , m_documentDragPos(0) 63 , m_documentDragPos(0)
64 , m_enabled(true) 64 , m_enabled(true)
65 , m_scrollTimer(this, &Scrollbar::autoscrollTimerFired) 65 , m_scrollTimer(this, &Scrollbar::autoscrollTimerFired)
66 , m_overlapsResizer(false) 66 , m_overlapsResizer(false)
67 , m_suppressInvalidation(false) 67 , m_suppressInvalidation(false)
68 , m_isAlphaLocked(false) 68 , m_isAlphaLocked(false)
69 , m_elasticOverscroll(0)
69 { 70 {
70 if (!m_theme) 71 if (!m_theme)
71 m_theme = ScrollbarTheme::theme(); 72 m_theme = ScrollbarTheme::theme();
72 73
73 m_theme->registerScrollbar(this); 74 m_theme->registerScrollbar(this);
74 75
75 // FIXME: This is ugly and would not be necessary if we fix cross-platform c ode to actually query for 76 // FIXME: This is ugly and would not be necessary if we fix cross-platform c ode to actually query for
76 // scrollbar thickness and use it when sizing scrollbars (rather than leavin g one dimension of the scrollbar 77 // scrollbar thickness and use it when sizing scrollbars (rather than leavin g one dimension of the scrollbar
77 // alone when sizing). 78 // alone when sizing).
78 int thickness = m_theme->scrollbarThickness(controlSize); 79 int thickness = m_theme->scrollbarThickness(controlSize);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 if (!m_scrollableArea) 550 if (!m_scrollableArea)
550 return 0; 551 return 0;
551 552
552 if (m_orientation == HorizontalScrollbar) 553 if (m_orientation == HorizontalScrollbar)
553 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x(); 554 return m_scrollableArea->scrollPosition().x() - m_scrollableArea->minimu mScrollPosition().x();
554 555
555 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y(); 556 return m_scrollableArea->scrollPosition().y() - m_scrollableArea->minimumScr ollPosition().y();
556 } 557 }
557 558
558 } // namespace blink 559 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698