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 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 } | 1360 } |
1361 | 1361 |
1362 void FrameView::scrollContentsIfNeeded() | 1362 void FrameView::scrollContentsIfNeeded() |
1363 { | 1363 { |
1364 bool didScroll = !pendingScrollDelta().isZero(); | 1364 bool didScroll = !pendingScrollDelta().isZero(); |
1365 ScrollView::scrollContentsIfNeeded(); | 1365 ScrollView::scrollContentsIfNeeded(); |
1366 if (didScroll) | 1366 if (didScroll) |
1367 updateFixedElementPaintInvalidationRectsAfterScroll(); | 1367 updateFixedElementPaintInvalidationRectsAfterScroll(); |
1368 } | 1368 } |
1369 | 1369 |
1370 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
& rectToScroll, const IntRect& clipRect) | 1370 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect
& rectToScroll, const IntRect& unusedClipRect) |
1371 { | 1371 { |
| 1372 // FIXME: once we can switch plugins to a unified scrolling scheme, then |
| 1373 // we can do away with this parameter. Leaving as an empty rect for now to |
| 1374 // document the uselessness of the parameter to hostWindow. |
| 1375 static const IntRect dummyScrollRect; |
| 1376 |
1372 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { | 1377 if (!m_viewportConstrainedObjects || m_viewportConstrainedObjects->isEmpty()
) { |
1373 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); | 1378 hostWindow()->scroll(dummyScrollRect); |
1374 return true; | 1379 return true; |
1375 } | 1380 } |
1376 | 1381 |
1377 const bool isCompositedContentLayer = contentsInCompositedLayer(); | 1382 const bool isCompositedContentLayer = contentsInCompositedLayer(); |
1378 | 1383 |
1379 // Get the rects of the fixed objects visible in the rectToScroll | 1384 // Get the rects of the fixed objects visible in the rectToScroll |
1380 Region regionToUpdate; | 1385 Region regionToUpdate; |
1381 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje
cts->end(); | 1386 ViewportConstrainedObjectSet::const_iterator end = m_viewportConstrainedObje
cts->end(); |
1382 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained
Objects->begin(); it != end; ++it) { | 1387 for (ViewportConstrainedObjectSet::const_iterator it = m_viewportConstrained
Objects->begin(); it != end; ++it) { |
1383 RenderObject* renderer = *it; | 1388 RenderObject* renderer = *it; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 // Coalesce the paint invalidations that will be issued to the rende
rView. | 1428 // Coalesce the paint invalidations that will be issued to the rende
rView. |
1424 updateRect = contentsToRootView(updateRect); | 1429 updateRect = contentsToRootView(updateRect); |
1425 if (!isCompositedContentLayer && clipsPaintInvalidations()) | 1430 if (!isCompositedContentLayer && clipsPaintInvalidations()) |
1426 updateRect.intersect(rectToScroll); | 1431 updateRect.intersect(rectToScroll); |
1427 if (!updateRect.isEmpty()) | 1432 if (!updateRect.isEmpty()) |
1428 regionToUpdate.unite(updateRect); | 1433 regionToUpdate.unite(updateRect); |
1429 } | 1434 } |
1430 } | 1435 } |
1431 | 1436 |
1432 // 1) scroll | 1437 // 1) scroll |
1433 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); | 1438 hostWindow()->scroll(dummyScrollRect); |
1434 | 1439 |
1435 // 2) update the area of fixed objects that has been invalidated | 1440 // 2) update the area of fixed objects that has been invalidated |
1436 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); | 1441 Vector<IntRect> subRectsToUpdate = regionToUpdate.rects(); |
1437 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); | 1442 size_t viewportConstrainedObjectsCount = subRectsToUpdate.size(); |
1438 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { | 1443 for (size_t i = 0; i < viewportConstrainedObjectsCount; ++i) { |
1439 IntRect updateRect = subRectsToUpdate[i]; | 1444 IntRect updateRect = subRectsToUpdate[i]; |
1440 IntRect scrolledRect = updateRect; | 1445 IntRect scrolledRect = updateRect; |
1441 scrolledRect.move(-scrollDelta); | 1446 scrolledRect.move(-scrollDelta); |
1442 updateRect.unite(scrolledRect); | 1447 updateRect.unite(scrolledRect); |
1443 if (isCompositedContentLayer) { | 1448 if (isCompositedContentLayer) { |
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3270 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) | 3275 void FrameView::willRemoveScrollbar(Scrollbar* scrollbar, ScrollbarOrientation o
rientation) |
3271 { | 3276 { |
3272 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); | 3277 ScrollableArea::willRemoveScrollbar(scrollbar, orientation); |
3273 if (AXObjectCache* cache = axObjectCache()) { | 3278 if (AXObjectCache* cache = axObjectCache()) { |
3274 cache->remove(scrollbar); | 3279 cache->remove(scrollbar); |
3275 cache->handleScrollbarUpdate(this); | 3280 cache->handleScrollbarUpdate(this); |
3276 } | 3281 } |
3277 } | 3282 } |
3278 | 3283 |
3279 } // namespace WebCore | 3284 } // namespace WebCore |
OLD | NEW |