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

Side by Side Diff: Source/WebCore/page/FrameView.cpp

Issue 6686050: Merge 76437 - 2011-01-22 Adrienne Walker <enne@google.com>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 9 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
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 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 // Get the rects of the fixed objects visible in the rectToScroll 1090 // Get the rects of the fixed objects visible in the rectToScroll
1091 Vector<IntRect, fixedObjectThreshold> subRectToUpdate; 1091 Vector<IntRect, fixedObjectThreshold> subRectToUpdate;
1092 bool updateInvalidatedSubRect = true; 1092 bool updateInvalidatedSubRect = true;
1093 RenderBlock::PositionedObjectsListHashSet::const_iterator end = positionedOb jects->end(); 1093 RenderBlock::PositionedObjectsListHashSet::const_iterator end = positionedOb jects->end();
1094 for (RenderBlock::PositionedObjectsListHashSet::const_iterator it = position edObjects->begin(); it != end; ++it) { 1094 for (RenderBlock::PositionedObjectsListHashSet::const_iterator it = position edObjects->begin(); it != end; ++it) {
1095 RenderBox* renderBox = *it; 1095 RenderBox* renderBox = *it;
1096 if (renderBox->style()->position() != FixedPosition) 1096 if (renderBox->style()->position() != FixedPosition)
1097 continue; 1097 continue;
1098 IntRect updateRect = renderBox->layer()->repaintRectIncludingDescendants (); 1098 IntRect updateRect = renderBox->layer()->repaintRectIncludingDescendants ();
1099 updateRect = contentsToWindow(updateRect); 1099 updateRect = contentsToWindow(updateRect);
1100 1100 if (clipsRepaints())
1101 updateRect.intersect(rectToScroll); 1101 updateRect.intersect(rectToScroll);
1102 if (!updateRect.isEmpty()) { 1102 if (!updateRect.isEmpty()) {
1103 if (subRectToUpdate.size() >= fixedObjectThreshold) { 1103 if (subRectToUpdate.size() >= fixedObjectThreshold) {
1104 updateInvalidatedSubRect = false; 1104 updateInvalidatedSubRect = false;
1105 break; 1105 break;
1106 } 1106 }
1107 subRectToUpdate.append(updateRect); 1107 subRectToUpdate.append(updateRect);
1108 } 1108 }
1109 } 1109 }
1110 1110
1111 // Scroll the view 1111 // Scroll the view
1112 if (updateInvalidatedSubRect) { 1112 if (updateInvalidatedSubRect) {
1113 // 1) scroll 1113 // 1) scroll
1114 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); 1114 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect);
1115 1115
1116 // 2) update the area of fixed objects that has been invalidated 1116 // 2) update the area of fixed objects that has been invalidated
1117 size_t fixObjectsCount = subRectToUpdate.size(); 1117 size_t fixObjectsCount = subRectToUpdate.size();
1118 for (size_t i = 0; i < fixObjectsCount; ++i) { 1118 for (size_t i = 0; i < fixObjectsCount; ++i) {
1119 IntRect updateRect = subRectToUpdate[i]; 1119 IntRect updateRect = subRectToUpdate[i];
1120 IntRect scrolledRect = updateRect; 1120 IntRect scrolledRect = updateRect;
1121 scrolledRect.move(scrollDelta); 1121 scrolledRect.move(scrollDelta);
1122 updateRect.unite(scrolledRect); 1122 updateRect.unite(scrolledRect);
1123 updateRect.intersect(rectToScroll); 1123 if (clipsRepaints())
1124 updateRect.intersect(rectToScroll);
1124 hostWindow()->invalidateContentsAndWindow(updateRect, false); 1125 hostWindow()->invalidateContentsAndWindow(updateRect, false);
1125 } 1126 }
1126 return true; 1127 return true;
1127 } 1128 }
1128 1129
1129 // the number of fixed objects exceed the threshold, we cannot use the fast path 1130 // the number of fixed objects exceed the threshold, we cannot use the fast path
1130 return false; 1131 return false;
1131 } 1132 }
1132 1133
1133 void FrameView::scrollContentsSlowPath(const IntRect& updateRect) 1134 void FrameView::scrollContentsSlowPath(const IntRect& updateRect)
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2528 } 2529 }
2529 2530
2530 AXObjectCache* FrameView::axObjectCache() const 2531 AXObjectCache* FrameView::axObjectCache() const
2531 { 2532 {
2532 if (frame() && frame()->document() && frame()->document()->axObjectCacheExis ts()) 2533 if (frame() && frame()->document() && frame()->document()->axObjectCacheExis ts())
2533 return frame()->document()->axObjectCache(); 2534 return frame()->document()->axObjectCache();
2534 return 0; 2535 return 0;
2535 } 2536 }
2536 2537
2537 } // namespace WebCore 2538 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698