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

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

Issue 2286843002: Rename DisplayItem::Type enum constants to Chromium style. (Closed)
Patch Set: Rebasing... Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 return rect; 122 return rect;
123 } 123 }
124 124
125 int ScrollbarThemeOverlay::thumbThickness(const ScrollbarThemeClient&) 125 int ScrollbarThemeOverlay::thumbThickness(const ScrollbarThemeClient&)
126 { 126 {
127 return m_thumbThickness; 127 return m_thumbThickness;
128 } 128 }
129 129
130 void ScrollbarThemeOverlay::paintThumb(GraphicsContext& context, const Scrollbar & scrollbar, const IntRect& rect) 130 void ScrollbarThemeOverlay::paintThumb(GraphicsContext& context, const Scrollbar & scrollbar, const IntRect& rect)
131 { 131 {
132 if (DrawingRecorder::useCachedDrawingIfPossible(context, scrollbar, DisplayI tem::ScrollbarThumb)) 132 if (DrawingRecorder::useCachedDrawingIfPossible(context, scrollbar, DisplayI tem::kScrollbarThumb))
133 return; 133 return;
134 134
135 DrawingRecorder recorder(context, scrollbar, DisplayItem::ScrollbarThumb, re ct); 135 DrawingRecorder recorder(context, scrollbar, DisplayItem::kScrollbarThumb, r ect);
136 136
137 IntRect thumbRect = rect; 137 IntRect thumbRect = rect;
138 if (scrollbar.orientation() == HorizontalScrollbar) { 138 if (scrollbar.orientation() == HorizontalScrollbar) {
139 thumbRect.setHeight(thumbRect.height() - m_scrollbarMargin); 139 thumbRect.setHeight(thumbRect.height() - m_scrollbarMargin);
140 } else { 140 } else {
141 thumbRect.setWidth(thumbRect.width() - m_scrollbarMargin); 141 thumbRect.setWidth(thumbRect.width() - m_scrollbarMargin);
142 if (scrollbar.isLeftSideVerticalScrollbar()) 142 if (scrollbar.isLeftSideVerticalScrollbar())
143 thumbRect.setX(thumbRect.x() + m_scrollbarMargin); 143 thumbRect.setX(thumbRect.x() + m_scrollbarMargin);
144 } 144 }
145 145
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 WebThemeEngine::ScrollbarStyle style = { 3, 3, 0x80808080 }; // default style 178 WebThemeEngine::ScrollbarStyle style = { 3, 3, 0x80808080 }; // default style
179 if (Platform::current()->themeEngine()) { 179 if (Platform::current()->themeEngine()) {
180 Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style) ; 180 Platform::current()->themeEngine()->getOverlayScrollbarStyle(&style) ;
181 } 181 }
182 theme = new ScrollbarThemeOverlay(style.thumbThickness, style.scrollbarM argin, ScrollbarThemeOverlay::DisallowHitTest, Color(style.color)); 182 theme = new ScrollbarThemeOverlay(style.thumbThickness, style.scrollbarM argin, ScrollbarThemeOverlay::DisallowHitTest, Color(style.color));
183 } 183 }
184 return *theme; 184 return *theme;
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698