Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 348193002: Remove some dead scrolling paths and unused params (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/loader/EmptyClients.h » ('j') | public/web/WebWidgetClient.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/loader/EmptyClients.h » ('j') | public/web/WebWidgetClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698