Changeset 94777 in webkit
- Timestamp:
- Sep 8, 2011 11:54:33 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r94776 r94777 1 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> 2 3 Remove LayoutStateDisabler instances from RenderLayer 4 https://bugs.webkit.org/show_bug.cgi?id=66896 5 6 Reviewed by Simon Fraser. 7 8 As part of r93614, scrollTo does not call updateLayerPositions anymore. 9 This means that we don't need to disable LayoutState from the scrolling code 10 in RenderLayer. 11 12 This change is covered by the existing tests. 13 14 * rendering/RenderLayer.cpp: 15 (WebCore::RenderLayer::updateLayerPositions): Updated the comment 16 that was not accurate anymore. Also explained what is wrong with 17 LayoutState vs RenderLayer now. Note that the ASSERT is still 18 valid and will not trigger as the remaining calls to updateLayerPositions 19 are done *outside* layout() where LayoutState is not set (thus disabled). 20 21 (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed 22 2 LayoutStateDisabler surrounding scrollToOffset. 23 1 24 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> 2 25 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r94741 r94777 335 335 RenderView* view = renderer()->view(); 336 336 ASSERT(view); 337 // FIXME: Optimize using LayoutState and remove LayoutStateDisabler instantiation 338 // from updateScrollInfoAfterLayout(). 337 // FIXME: LayoutState does not work with RenderLayers as there is not a 1-to-1 338 // mapping between them and the RenderObjects. It would be neat to enable 339 // LayoutState outside the layout() phase and use it here. 339 340 ASSERT(!view->layoutStateEnabled()); 340 341 … … 2248 2249 LayoutUnit newX = max<LayoutUnit>(0, min(scrollXOffset(), scrollWidth() - box->clientWidth())); 2249 2250 LayoutUnit newY = max<LayoutUnit>(0, min(scrollYOffset(), scrollHeight() - box->clientHeight())); 2250 if (newX != scrollXOffset() || newY != scrollYOffset()) { 2251 RenderView* view = renderer()->view(); 2252 ASSERT(view); 2253 // scrollToOffset() may call updateLayerPositions(), which doesn't work 2254 // with LayoutState. 2255 // FIXME: Remove the LayoutStateDisabler instantiation if the above changes. 2256 LayoutStateDisabler layoutStateDisabler(view); 2251 if (newX != scrollXOffset() || newY != scrollYOffset()) 2257 2252 scrollToOffset(newX, newY); 2258 }2259 2253 } 2260 2254 … … 2329 2323 } 2330 2324 2331 RenderView* view = renderer()->view(); 2332 { 2333 LayoutStateDisabler layoutStateDisabler(view); 2334 scrollToOffset(scrollXOffset(), scrollYOffset()); 2335 } 2325 scrollToOffset(scrollXOffset(), scrollYOffset()); 2336 2326 2337 2327 if (renderer()->node() && renderer()->document()->hasListenerType(Document::OVERFLOWCHANGED_LISTENER))
Note: See TracChangeset
for help on using the changeset viewer.