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