Changeset 103245 in webkit
- Timestamp:
- Dec 19, 2011 10:11:20 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r103244 r103245 1 2011-12-19 Andreas Kling <kling@webkit.org> 2 3 Avoid instantiating ScrollAnimators when possible. 4 <http://webkit.org/b/74830> 5 6 Reviewed by Beth Dakin. 7 8 Have RenderLayer::scrollToOffset() check if we're scrolling to the already 9 current offset. In that case, don't call down to scrollToOffsetWithoutAnimation(), 10 avoiding the instantiation of a ScrollAnimator. 11 12 This reduces memory consumption by 400 kB (on 32-bit) when viewing the full HTML5 13 spec on <http://whatwg.org/c>, since we were creating a ScrollAnimator for every 14 single RenderLayer. 15 16 * rendering/RenderLayer.cpp: 17 (WebCore::RenderLayer::scrollToOffset): 18 1 19 2011-12-19 Chris Guan <chris.guan@torchmobile.com.cn> 2 20 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r103243 r103245 1413 1413 y = min(max<LayoutUnit>(y, 0), maxY); 1414 1414 } 1415 1416 ScrollableArea::scrollToOffsetWithoutAnimation(LayoutPoint(x, y)); 1415 1416 LayoutPoint newScrollOffset(x, y); 1417 if (newScrollOffset != LayoutPoint(scrollXOffset(), scrollYOffset())) 1418 scrollToOffsetWithoutAnimation(newScrollOffset); 1417 1419 } 1418 1420
Note: See TracChangeset
for help on using the changeset viewer.