OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | |
6 | |
7 #include "cc/scrollbar_layer.h" | 5 #include "cc/scrollbar_layer.h" |
8 | 6 |
9 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
11 #include "cc/layer_painter.h" | 9 #include "cc/layer_painter.h" |
12 #include "cc/layer_tree_host.h" | 10 #include "cc/layer_tree_host.h" |
13 #include "cc/resource_update_queue.h" | 11 #include "cc/resource_update_queue.h" |
14 #include "cc/scrollbar_layer_impl.h" | 12 #include "cc/scrollbar_layer_impl.h" |
15 #include "ui/gfx/rect_conversions.h" | 13 #include "ui/gfx/rect_conversions.h" |
16 #include <public/WebRect.h> | 14 #include <public/WebRect.h> |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 updatePart(m_foreTrackUpdater.get(), m_foreTrack.get(), contentRect, que
ue, stats); | 267 updatePart(m_foreTrackUpdater.get(), m_foreTrack.get(), contentRect, que
ue, stats); |
270 | 268 |
271 // Consider the thumb to be at the origin when painting. | 269 // Consider the thumb to be at the origin when painting. |
272 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); | 270 WebKit::WebRect thumbRect = m_geometry->thumbRect(m_scrollbar.get()); |
273 gfx::Rect originThumbRect = scrollbarLayerRectToContentRect(gfx::Rect(0, 0,
thumbRect.width, thumbRect.height)); | 271 gfx::Rect originThumbRect = scrollbarLayerRectToContentRect(gfx::Rect(0, 0,
thumbRect.width, thumbRect.height)); |
274 if (!originThumbRect.IsEmpty()) | 272 if (!originThumbRect.IsEmpty()) |
275 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); | 273 updatePart(m_thumbUpdater.get(), m_thumb.get(), originThumbRect, queue,
stats); |
276 } | 274 } |
277 | 275 |
278 } // namespace cc | 276 } // namespace cc |
OLD | NEW |