OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMappin
g()->layerForScrollCorner() : 0; | 179 return layer()->hasCompositedLayerMapping() ? layer()->compositedLayerMappin
g()->layerForScrollCorner() : 0; |
180 } | 180 } |
181 | 181 |
182 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co
nst IntRect& rect) | 182 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co
nst IntRect& rect) |
183 { | 183 { |
184 // See crbug.com/343132. | 184 // See crbug.com/343132. |
185 DisableCompositingQueryAsserts disabler; | 185 DisableCompositingQueryAsserts disabler; |
186 | 186 |
187 if (scrollbar == m_vBar.get()) { | 187 if (scrollbar == m_vBar.get()) { |
188 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { | 188 if (GraphicsLayer* layer = layerForVerticalScrollbar()) { |
189 layer->setNeedsDisplayInRect(rect); | 189 layer->setNeedsDisplayInRect(rect, WebInvalidationDebugAnnotationsSc
rollbar); |
190 return; | 190 return; |
191 } | 191 } |
192 } else { | 192 } else { |
193 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { | 193 if (GraphicsLayer* layer = layerForHorizontalScrollbar()) { |
194 layer->setNeedsDisplayInRect(rect); | 194 layer->setNeedsDisplayInRect(rect, WebInvalidationDebugAnnotationsSc
rollbar); |
195 return; | 195 return; |
196 } | 196 } |
197 } | 197 } |
198 | 198 |
199 IntRect scrollRect = rect; | 199 IntRect scrollRect = rect; |
200 // If we are not yet inserted into the tree, there is no need to issue paint
invaldiations. | 200 // If we are not yet inserted into the tree, there is no need to issue paint
invaldiations. |
201 if (!box().parent()) | 201 if (!box().parent()) |
202 return; | 202 return; |
203 | 203 |
204 if (scrollbar == m_vBar.get()) | 204 if (scrollbar == m_vBar.get()) |
(...skipping 11 matching lines...) Expand all Loading... |
216 | 216 |
217 if (box().frameView()->isInPerformLayout()) | 217 if (box().frameView()->isInPerformLayout()) |
218 addScrollbarDamage(scrollbar, intRect); | 218 addScrollbarDamage(scrollbar, intRect); |
219 else | 219 else |
220 box().invalidatePaintRectangle(intRect); | 220 box().invalidatePaintRectangle(intRect); |
221 } | 221 } |
222 | 222 |
223 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) | 223 void RenderLayerScrollableArea::invalidateScrollCornerRect(const IntRect& rect) |
224 { | 224 { |
225 if (GraphicsLayer* layer = layerForScrollCorner()) { | 225 if (GraphicsLayer* layer = layerForScrollCorner()) { |
226 layer->setNeedsDisplayInRect(rect); | 226 layer->setNeedsDisplayInRect(rect, WebInvalidationDebugAnnotationsScroll
bar); |
227 return; | 227 return; |
228 } | 228 } |
229 | 229 |
230 if (m_scrollCorner) | 230 if (m_scrollCorner) |
231 m_scrollCorner->invalidatePaintRectangle(rect); | 231 m_scrollCorner->invalidatePaintRectangle(rect); |
232 if (m_resizer) | 232 if (m_resizer) |
233 m_resizer->invalidatePaintRectangle(rect); | 233 m_resizer->invalidatePaintRectangle(rect); |
234 } | 234 } |
235 | 235 |
236 bool RenderLayerScrollableArea::isActive() const | 236 bool RenderLayerScrollableArea::isActive() const |
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1470 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 1470 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
1471 { | 1471 { |
1472 // We only want to track the topmost scroll child for scrollable areas with | 1472 // We only want to track the topmost scroll child for scrollable areas with |
1473 // overlay scrollbars. | 1473 // overlay scrollbars. |
1474 if (!hasOverlayScrollbars()) | 1474 if (!hasOverlayScrollbars()) |
1475 return; | 1475 return; |
1476 m_nextTopmostScrollChild = scrollChild; | 1476 m_nextTopmostScrollChild = scrollChild; |
1477 } | 1477 } |
1478 | 1478 |
1479 } // namespace blink | 1479 } // namespace blink |
OLD | NEW |