OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 // it does not need paint invalidation just to scroll. | 1282 // it does not need paint invalidation just to scroll. |
1283 if (layer->compositingState() == PaintsIntoOwnBacking) | 1283 if (layer->compositingState() == PaintsIntoOwnBacking) |
1284 continue; | 1284 continue; |
1285 | 1285 |
1286 if (layer->hasAncestorWithFilterOutsets()) { | 1286 if (layer->hasAncestorWithFilterOutsets()) { |
1287 // If the fixed layer has a blur/drop-shadow filter applied on at le
ast one of its parents, we cannot | 1287 // If the fixed layer has a blur/drop-shadow filter applied on at le
ast one of its parents, we cannot |
1288 // scroll using the fast path, otherwise the outsets of the filter w
ill be moved around the page. | 1288 // scroll using the fast path, otherwise the outsets of the filter w
ill be moved around the page. |
1289 return false; | 1289 return false; |
1290 } | 1290 } |
1291 | 1291 |
1292 IntRect updateRect = pixelSnappedIntRect(layer->paintInvalidator().repai
ntRectIncludingNonCompositingDescendants()); | 1292 IntRect updateRect = pixelSnappedIntRect(layer->paintInvalidator().paint
InvalidationRectIncludingNonCompositingDescendants()); |
1293 | 1293 |
1294 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont
ainerForPaintInvalidation(); | 1294 const RenderLayerModelObject* repaintContainer = layer->renderer()->cont
ainerForPaintInvalidation(); |
1295 if (repaintContainer && !repaintContainer->isRenderView()) { | 1295 if (repaintContainer && !repaintContainer->isRenderView()) { |
1296 // Invalidate the old and new locations of fixed position elements t
hat are not drawn into the RenderView. | 1296 // Invalidate the old and new locations of fixed position elements t
hat are not drawn into the RenderView. |
1297 updateRect.moveBy(scrollPosition()); | 1297 updateRect.moveBy(scrollPosition()); |
1298 IntRect previousRect = updateRect; | 1298 IntRect previousRect = updateRect; |
1299 previousRect.move(scrollDelta); | 1299 previousRect.move(scrollDelta); |
1300 // FIXME: Rather than uniting the rects, we should just issue both i
nvalidations. | 1300 // FIXME: Rather than uniting the rects, we should just issue both i
nvalidations. |
1301 updateRect.unite(previousRect); | 1301 updateRect.unite(previousRect); |
1302 layer->renderer()->invalidatePaintUsingContainer(repaintContainer, u
pdateRect, InvalidationScroll); | 1302 layer->renderer()->invalidatePaintUsingContainer(repaintContainer, u
pdateRect, InvalidationScroll); |
1303 } else { | 1303 } else { |
1304 // Coalesce the paint invalidations that will be issued to the rende
rView. | 1304 // Coalesce the paint invalidations that will be issued to the rende
rView. |
1305 updateRect = contentsToRootView(updateRect); | 1305 updateRect = contentsToRootView(updateRect); |
1306 if (!updateRect.isEmpty()) | 1306 if (!updateRect.isEmpty()) |
1307 regionToUpdate.unite(updateRect); | 1307 regionToUpdate.unite(updateRect); |
1308 } | 1308 } |
1309 } | 1309 } |
1310 | 1310 |
1311 hostWindow()->scroll(); | 1311 hostWindow()->scroll(); |
1312 | 1312 |
1313 // Invalidate the old and new locations of fixed position elements that are
drawn into the RenderView. | 1313 // Invalidate the old and new locations of fixed position elements that are
drawn into the RenderView. |
1314 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); | 1314 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); |
1315 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); | 1315 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); |
1316 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { | 1316 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { |
1317 IntRect updateRect = subRectsToUpdate[i]; | 1317 IntRect updateRect = subRectsToUpdate[i]; |
1318 IntRect scrolledRect = updateRect; | 1318 IntRect scrolledRect = updateRect; |
1319 scrolledRect.move(-scrollDelta); | 1319 scrolledRect.move(-scrollDelta); |
1320 updateRect.unite(scrolledRect); | 1320 updateRect.unite(scrolledRect); |
1321 // FIXME: We should be able to issue these invalidations separately and
before we actually scroll. | 1321 // FIXME: We should be able to issue these invalidations separately and
before we actually scroll. |
1322 renderView()->layer()->paintInvalidator().setBackingNeedsRepaintInRect(r
ootViewToContents(updateRect)); | 1322 renderView()->layer()->paintInvalidator().setBackingNeedsPaintInvalidati
onInRect(rootViewToContents(updateRect)); |
1323 } | 1323 } |
1324 | 1324 |
1325 return true; | 1325 return true; |
1326 } | 1326 } |
1327 | 1327 |
1328 void FrameView::scrollContentsSlowPath(const IntRect& updateRect) | 1328 void FrameView::scrollContentsSlowPath(const IntRect& updateRect) |
1329 { | 1329 { |
1330 if (contentsInCompositedLayer()) { | 1330 if (contentsInCompositedLayer()) { |
1331 IntRect updateRect = visibleContentRect(); | 1331 IntRect updateRect = visibleContentRect(); |
1332 ASSERT(renderView()); | 1332 ASSERT(renderView()); |
1333 renderView()->layer()->paintInvalidator().setBackingNeedsRepaintInRect(u
pdateRect); | 1333 renderView()->layer()->paintInvalidator().setBackingNeedsPaintInvalidati
onInRect(updateRect); |
1334 } | 1334 } |
1335 if (RenderPart* frameRenderer = m_frame->ownerRenderer()) { | 1335 if (RenderPart* frameRenderer = m_frame->ownerRenderer()) { |
1336 if (isEnclosedInCompositingLayer()) { | 1336 if (isEnclosedInCompositingLayer()) { |
1337 LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->padding
Left(), | 1337 LayoutRect rect(frameRenderer->borderLeft() + frameRenderer->padding
Left(), |
1338 frameRenderer->borderTop() + frameRenderer->paddingT
op(), | 1338 frameRenderer->borderTop() + frameRenderer->paddingT
op(), |
1339 visibleWidth(), visibleHeight()); | 1339 visibleWidth(), visibleHeight()); |
1340 frameRenderer->invalidatePaintRectangle(rect); | 1340 frameRenderer->invalidatePaintRectangle(rect); |
1341 return; | 1341 return; |
1342 } | 1342 } |
1343 } | 1343 } |
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3135 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3135 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3136 { | 3136 { |
3137 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3137 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3138 if (AXObjectCache* cache = axObjectCache()) { | 3138 if (AXObjectCache* cache = axObjectCache()) { |
3139 cache->remove(scrollbar); | 3139 cache->remove(scrollbar); |
3140 cache->handleScrollbarUpdate(this); | 3140 cache->handleScrollbarUpdate(this); |
3141 } | 3141 } |
3142 } | 3142 } |
3143 | 3143 |
3144 } // namespace blink | 3144 } // namespace blink |
OLD | NEW |