Changeset 141221 in webkit
- Timestamp:
- Jan 29, 2013 9:37:21 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r141219 r141221 1 2013-01-29 Simon Fraser <simon.fraser@apple.com> 2 3 Rubberband scrolling on news.google.com causes text to blink repeatedly 4 https://bugs.webkit.org/show_bug.cgi?id=107326 5 6 Reviewed by Beth Dakin. 7 8 When in the middle of layout, RenderBlock::updateScrollInfoAfterLayout() 9 could cause us to re-evaluate reasons for compositing, via the call 10 to updateLayerCompositingState() in RenderLayer::updateScrollInfoAfterLayout(). 11 12 At this time, when layout is still happening, it's bad to look at render 13 geometry to decide when to do compositing (e.g. for fixed position); we might 14 incorrectly conclude that the layer is outside the viewport. 15 16 Fix by having RenderLayerCompositing store in a member whether it's safe 17 to look at layout information. requiresCompositingForPosition() then consults 18 this bit, and, if it needs to make decisions based on layout but layout is not 19 complete, it doesn't change the compositing state of the layer. 20 21 Not testable, since dumping the layer tree will update layout and mask the bug. 22 23 * rendering/RenderLayerCompositor.cpp: 24 (WebCore::RenderLayerCompositor::RenderLayerCompositor): 25 (WebCore::RenderLayerCompositor::updateCompositingLayers): 26 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 27 * rendering/RenderLayerCompositor.h: 28 (RenderLayerCompositor): 29 1 30 2013-01-29 Mark Lam <mark.lam@apple.com> 2 31 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r141121 r141221 62 62 #include "WebCoreMemoryInstrumentation.h" 63 63 #include <wtf/MemoryInstrumentationHashMap.h> 64 #include <wtf/TemporaryChange.h> 64 65 65 66 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) … … 201 202 , m_shouldFlushOnReattach(false) 202 203 , m_forceCompositingMode(false) 204 , m_inPostLayoutUpdate(false) 203 205 , m_isTrackingRepaints(false) 204 206 , m_rootLayerAttachment(RootLayerUnattached) … … 419 421 AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()->animation()); 420 422 423 TemporaryChange<bool> postLayoutChange(m_inPostLayoutUpdate, true); 424 421 425 bool checkForHierarchyUpdate = m_reevaluateCompositingAfterLayout; 422 426 bool needGeometryUpdate = false; … … 2066 2070 return false; 2067 2071 } 2072 2073 // Subsequent tests depend on layout. If we can't tell now, just keep things the way they are until layout is done. 2074 if (!m_inPostLayoutUpdate) { 2075 m_reevaluateCompositingAfterLayout = true; 2076 return layer->isComposited(); 2077 } 2068 2078 2069 2079 // Fixed position elements that are invisible in the current view don't get their own layer. … … 2076 2086 if (viewportConstrainedNotCompositedReason) 2077 2087 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompositedForBoundsOutOfView; 2078 // Reevaluate compositing after layout because the layer bounds may change and become composited.2079 m_reevaluateCompositingAfterLayout = true;2080 2088 return false; 2081 2089 } … … 2083 2091 2084 2092 bool paintsContent = layer->isVisuallyNonEmpty() || layer->hasVisibleDescendant(); 2085 if (!paintsContent) { 2086 // isVisuallyNonEmpty() depends on layout. 2087 m_reevaluateCompositingAfterLayout = true; 2088 return false; 2089 } 2093 if (!paintsContent) 2094 return false; 2090 2095 2091 2096 return true; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r141121 r141221 367 367 bool m_shouldFlushOnReattach; 368 368 bool m_forceCompositingMode; 369 bool m_inPostLayoutUpdate; // true when it's OK to trust layout information (e.g. layer sizes and positions) 369 370 370 371 bool m_isTrackingRepaints; // Used for testing.
Note: See TracChangeset
for help on using the changeset viewer.