Changeset 121443 in webkit
- Timestamp:
- Jun 28, 2012 11:08:46 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r121442 r121443 1 2012-06-28 Simon Fraser <simon.fraser@apple.com> 2 3 Change FrameView::scrollContentsFastPath to use m_fixedObjects 4 https://bugs.webkit.org/show_bug.cgi?id=90045 5 6 Reviewed by James Robinson. 7 8 FrameView now has a hash set of fixed-position objects, so use 9 that instead of RenderBlock::positionedObjects(); we'll avoid traversing 10 through absolutely positioned objects, and this will work better for sticky 11 positioning in future. 12 13 No behavior change, so no new tests. 14 15 * page/FrameView.cpp: 16 (WebCore::FrameView::scrollContentsFastPath): 17 1 18 2012-06-28 Tony Chang <tony@chromium.org> 2 19 -
trunk/Source/WebCore/page/FrameView.cpp
r121348 r121443 1441 1441 bool FrameView::scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) 1442 1442 { 1443 RenderBlock::PositionedObjectsListHashSet* positionedObjects = 0; 1444 if (RenderView* root = rootRenderer(this)) 1445 positionedObjects = root->positionedObjects(); 1446 1447 if (!positionedObjects || positionedObjects->isEmpty()) { 1443 if (!m_fixedObjects || m_fixedObjects->isEmpty()) { 1448 1444 hostWindow()->scroll(scrollDelta, rectToScroll, clipRect); 1449 1445 return true; … … 1454 1450 // Get the rects of the fixed objects visible in the rectToScroll 1455 1451 Region regionToUpdate; 1456 RenderBlock::PositionedObjectsListHashSet::const_iterator end = positionedObjects->end();1457 for ( RenderBlock::PositionedObjectsListHashSet::const_iterator it = positionedObjects->begin(); it != end; ++it) {1458 Render Box* renderBox= *it;1459 if (render Box->style()->position() != FixedPosition)1452 FixedObjectSet::const_iterator end = m_fixedObjects->end(); 1453 for (FixedObjectSet::const_iterator it = m_fixedObjects->begin(); it != end; ++it) { 1454 RenderObject* renderer = *it; 1455 if (renderer->style()->position() != FixedPosition) 1460 1456 continue; 1461 1457 #if USE(ACCELERATED_COMPOSITING) 1462 if (render Box->isComposited())1458 if (renderer->isComposited()) 1463 1459 continue; 1464 1460 #endif 1461 1462 // Fixed items should always have layers. 1463 ASSERT(renderer->hasLayer()); 1464 RenderLayer* layer = toRenderBoxModelObject(renderer)->layer(); 1465 1465 1466 #if ENABLE(CSS_FILTERS) 1466 if ( renderBox->layer() && renderBox->layer()->parent()) {1467 RenderBoxModelObject* renderer = renderBox->layer()->parent()->renderer();1467 if (layer->parent()) { 1468 RenderBoxModelObject* renderer = layer->parent()->renderer(); 1468 1469 if (renderer->style()->hasFilterOutsets()) { 1469 1470 // If the fixed layer has a blur/drop-shadow filter applied on its parent, we cannot … … 1473 1474 } 1474 1475 #endif 1475 IntRect updateRect = pixelSnappedIntRect( renderBox->layer()->repaintRectIncludingNonCompositingDescendants());1476 IntRect updateRect = pixelSnappedIntRect(layer->repaintRectIncludingNonCompositingDescendants()); 1476 1477 updateRect = contentsToRootView(updateRect); 1477 1478 if (!isCompositedContentLayer && clipsRepaints())
Note: See TracChangeset
for help on using the changeset viewer.