| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && box().frameView()
->isInPerformLayout()) { | 209 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && box().frameView()
->isInPerformLayout()) { |
| 210 if (scrollbar == m_vBar.get()) { | 210 if (scrollbar == m_vBar.get()) { |
| 211 m_verticalBarDamage = intRect; | 211 m_verticalBarDamage = intRect; |
| 212 m_hasVerticalBarDamage = true; | 212 m_hasVerticalBarDamage = true; |
| 213 } else { | 213 } else { |
| 214 m_horizontalBarDamage = intRect; | 214 m_horizontalBarDamage = intRect; |
| 215 m_hasHorizontalBarDamage = true; | 215 m_hasHorizontalBarDamage = true; |
| 216 } | 216 } |
| 217 | 217 |
| 218 } else { | 218 } else { |
| 219 box().repaintRectangle(intRect); | 219 box().invalidatePaintRectangle(intRect); |
| 220 } | 220 } |
| 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); |
| 227 return; | 227 return; |
| 228 } | 228 } |
| 229 | 229 |
| 230 if (m_scrollCorner) | 230 if (m_scrollCorner) |
| 231 m_scrollCorner->repaintRectangle(rect); | 231 m_scrollCorner->invalidatePaintRectangle(rect); |
| 232 if (m_resizer) | 232 if (m_resizer) |
| 233 m_resizer->repaintRectangle(rect); | 233 m_resizer->invalidatePaintRectangle(rect); |
| 234 } | 234 } |
| 235 | 235 |
| 236 bool RenderLayerScrollableArea::isActive() const | 236 bool RenderLayerScrollableArea::isActive() const |
| 237 { | 237 { |
| 238 Page* page = box().frame()->page(); | 238 Page* page = box().frame()->page(); |
| 239 return page && page->focusController().isActive(); | 239 return page && page->focusController().isActive(); |
| 240 } | 240 } |
| 241 | 241 |
| 242 bool RenderLayerScrollableArea::isScrollCornerVisible() const | 242 bool RenderLayerScrollableArea::isScrollCornerVisible() const |
| 243 { | 243 { |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 if (usesCompositedScrolling() || onlyScrolledCompositedLayers) | 405 if (usesCompositedScrolling() || onlyScrolledCompositedLayers) |
| 406 requiresRepaint = false; | 406 requiresRepaint = false; |
| 407 } | 407 } |
| 408 | 408 |
| 409 // Just schedule a full repaint of our object. | 409 // Just schedule a full repaint of our object. |
| 410 if (requiresRepaint) { | 410 if (requiresRepaint) { |
| 411 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | 411 if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
| 412 if (box().frameView()->isInPerformLayout()) | 412 if (box().frameView()->isInPerformLayout()) |
| 413 box().setShouldDoFullPaintInvalidationAfterLayout(true); | 413 box().setShouldDoFullPaintInvalidationAfterLayout(true); |
| 414 else | 414 else |
| 415 box().repaintUsingContainer(repaintContainer, pixelSnappedIntRec
t(layer()->renderer()->previousPaintInvalidationRect()), InvalidationScroll); | 415 box().invalidatePaintUsingContainer(repaintContainer, pixelSnapp
edIntRect(layer()->renderer()->previousPaintInvalidationRect()), InvalidationScr
oll); |
| 416 } else { | 416 } else { |
| 417 box().repaintUsingContainer(repaintContainer, pixelSnappedIntRect(la
yer()->repainter().repaintRect()), InvalidationScroll); | 417 box().invalidatePaintUsingContainer(repaintContainer, pixelSnappedIn
tRect(layer()->repainter().repaintRect()), InvalidationScroll); |
| 418 } | 418 } |
| 419 } | 419 } |
| 420 | 420 |
| 421 // Schedule the scroll DOM event. | 421 // Schedule the scroll DOM event. |
| 422 if (box().node()) | 422 if (box().node()) |
| 423 box().node()->document().enqueueScrollEventForNode(box().node()); | 423 box().node()->document().enqueueScrollEventForNode(box().node()); |
| 424 | 424 |
| 425 if (AXObjectCache* cache = box().document().existingAXObjectCache()) | 425 if (AXObjectCache* cache = box().document().existingAXObjectCache()) |
| 426 cache->handleScrollPositionChanged(&box()); | 426 cache->handleScrollPositionChanged(&box()); |
| 427 | 427 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 if (hasVerticalOverflow || hasHorizontalOverflow) | 636 if (hasVerticalOverflow || hasHorizontalOverflow) |
| 637 updateScrollCornerStyle(); | 637 updateScrollCornerStyle(); |
| 638 | 638 |
| 639 layer()->updateSelfPaintingLayer(); | 639 layer()->updateSelfPaintingLayer(); |
| 640 | 640 |
| 641 // Force an update since we know the scrollbars have changed things. | 641 // Force an update since we know the scrollbars have changed things. |
| 642 if (box().document().hasAnnotatedRegions()) | 642 if (box().document().hasAnnotatedRegions()) |
| 643 box().document().setAnnotatedRegionsDirty(true); | 643 box().document().setAnnotatedRegionsDirty(true); |
| 644 | 644 |
| 645 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 645 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 646 box().repaint(); | 646 box().paintInvalidationForWholeRenderer(); |
| 647 | 647 |
| 648 if (box().style()->overflowX() == OAUTO || box().style()->overflowY() ==
OAUTO) { | 648 if (box().style()->overflowX() == OAUTO || box().style()->overflowY() ==
OAUTO) { |
| 649 if (!m_inOverflowRelayout) { | 649 if (!m_inOverflowRelayout) { |
| 650 // Our proprietary overflow: overlay value doesn't trigger a lay
out. | 650 // Our proprietary overflow: overlay value doesn't trigger a lay
out. |
| 651 m_inOverflowRelayout = true; | 651 m_inOverflowRelayout = true; |
| 652 SubtreeLayoutScope layoutScope(box()); | 652 SubtreeLayoutScope layoutScope(box()); |
| 653 layoutScope.setNeedsLayout(&box()); | 653 layoutScope.setNeedsLayout(&box()); |
| 654 if (box().isRenderBlock()) { | 654 if (box().isRenderBlock()) { |
| 655 RenderBlock& block = toRenderBlock(box()); | 655 RenderBlock& block = toRenderBlock(box()); |
| 656 block.scrollbarsChanged(autoHorizontalScrollBarChanged, auto
VerticalScrollBarChanged); | 656 block.scrollbarsChanged(autoHorizontalScrollBarChanged, auto
VerticalScrollBarChanged); |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 DisableCompositingQueryAsserts disabler; | 1490 DisableCompositingQueryAsserts disabler; |
| 1491 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); | 1491 return box().hasCompositedLayerMapping() && box().compositedLayerMapping()->
scrollingLayer(); |
| 1492 } | 1492 } |
| 1493 | 1493 |
| 1494 bool RenderLayerScrollableArea::needsCompositedScrolling() const | 1494 bool RenderLayerScrollableArea::needsCompositedScrolling() const |
| 1495 { | 1495 { |
| 1496 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); | 1496 return scrollsOverflow() && box().view()->compositor()->acceleratedCompositi
ngForOverflowScrollEnabled(); |
| 1497 } | 1497 } |
| 1498 | 1498 |
| 1499 } // Namespace WebCore | 1499 } // Namespace WebCore |
| OLD | NEW |