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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 1511003003: Use refs for non-null GraphicsContext, Scrollbar, etc. in scrollbar related code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ScrollbarRemove
Patch Set: yet another mac fix Created 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index b13c3b0c43bfa85d046121437ee380efda5b999e..80b1d29542cdcb6f3679388a2940f8af350da087 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -210,7 +210,7 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
if (clampedOffset != m_offset) {
m_offset = clampedOffset;
- scrollAnimator()->setCurrentPosition(m_offset);
+ scrollAnimator().setCurrentPosition(m_offset);
// SVG runs with accelerated compositing disabled so no ScrollingCoordinator.
if (ScrollingCoordinator* coordinator = frameHost().page().scrollingCoordinator())
@@ -364,10 +364,10 @@ void VisualViewport::setupScrollbar(WebScrollbar::Orientation orientation)
OwnPtr<WebScrollbarLayer>& webScrollbarLayer = isHorizontal ?
m_webOverlayScrollbarHorizontal : m_webOverlayScrollbarVertical;
- ScrollbarTheme* theme = ScrollbarThemeOverlay::mobileTheme();
- int thumbThickness = theme->thumbThickness(0);
- int scrollbarThickness = theme->scrollbarThickness(RegularScrollbar);
- int scrollbarMargin = theme->scrollbarMargin();
+ ScrollbarThemeOverlay& theme = ScrollbarThemeOverlay::mobileTheme();
+ int thumbThickness = theme.thumbThickness();
+ int scrollbarThickness = theme.scrollbarThickness(RegularScrollbar);
+ int scrollbarMargin = theme.scrollbarMargin();
if (!webScrollbarLayer) {
ScrollingCoordinator* coordinator = frameHost().page().scrollingCoordinator();

Powered by Google App Engine
This is Rietveld 408576698