Changeset 162050 in webkit
- Timestamp:
- Jan 14, 2014 10:43:39 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r162049 r162050 1 2014-01-14 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions] Incorrect repaint of fixed element with transformed parent 4 https://bugs.webkit.org/show_bug.cgi?id=125756 5 6 Reviewed by Simon Fraser. 7 8 Add tests for a fixed positioned element with a parent that: 9 1. dynamically gets a transform, in which case the fixed positioned element should be positioned 10 relative to its parent 11 2. dynamically loses its transform, in which case the fixed positioned element should be positioned 12 relative to the view. 13 14 * fast/regions/repaint/fixed-in-named-flow-cb-changed-expected.html: Added. 15 * fast/regions/repaint/fixed-in-named-flow-cb-changed.html: Added. 16 * fast/regions/repaint/fixed-in-named-flow-cb-changed2-expected.html: Added. 17 * fast/regions/repaint/fixed-in-named-flow-cb-changed2.html: Added. 18 1 19 2014-01-14 Brent Fulgham <bfulgham@apple.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r162049 r162050 1 2014-01-14 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSSRegions] Incorrect repaint of fixed element with transformed parent 4 https://bugs.webkit.org/show_bug.cgi?id=125756 5 6 Reviewed by Simon Fraser. 7 8 When collecting the layers for fixed positioned elements with named flow 9 as a containing block, use layers collection at named flow layer level 10 instead of relying on the positioned elements collection. 11 12 With this approach, there are situations with nested named flows laid out in 13 auto-height regions and thus assuming 2 step layouts, in which is enough to lay 14 out the inner named flow once instead of twice with a performance gain. 15 In such situations, the layers lists for the inner named flow are not yet updated 16 when collectFixedPositionedLayers is called to paint the fixed positioned layers. 17 Therefore I called updateLayerListsIfNeeded for all named flows layers, via the flow thread controller, before inspecting the named flow layers to avoid hitting the assertions when 18 accessing the named flows layers lists. 19 20 Tests: fast/regions/repaint/fixed-in-named-flow-cb-changed.html 21 fast/regions/repaint/fixed-in-named-flow-cb-changed2.html 22 23 * rendering/FlowThreadController.cpp: 24 (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded): 25 (WebCore::FlowThreadController::collectFixedPositionedLayers): 26 * rendering/FlowThreadController.h: 27 * rendering/RenderLayer.cpp: 28 (WebCore::RenderLayer::paintFixedLayersInNamedFlows): 29 1 30 2014-01-14 Brent Fulgham <bfulgham@apple.com> 2 31 -
trunk/Source/WebCore/rendering/FlowThreadController.cpp
r161960 r162050 280 280 } 281 281 282 void FlowThreadController::updateNamedFlowsLayerListsIfNeeded() 283 { 284 for (auto iter = m_renderNamedFlowThreadList->begin(), end = m_renderNamedFlowThreadList->end(); iter != end; ++iter) { 285 RenderNamedFlowThread* flowRenderer = *iter; 286 flowRenderer->layer()->updateLayerListsIfNeeded(); 287 } 288 } 289 282 290 static inline bool compareZIndex(RenderLayer* first, RenderLayer* second) 283 291 { … … 297 305 continue; 298 306 299 // Iterate over the fixed positioned elements in the flow thread 300 TrackedRendererListHashSet* positionedDescendants = flowRenderer->positionedObjects(); 301 if (positionedDescendants) { 302 for (auto it = positionedDescendants->begin(), end = positionedDescendants->end(); it != end; ++it) { 303 RenderBox* box = *it; 304 if (!box->fixedPositionedWithNamedFlowContainingBlock()) 307 RenderLayer* flowThreadLayer = flowRenderer->layer(); 308 if (Vector<RenderLayer*>* negZOrderList = flowThreadLayer->negZOrderList()) { 309 for (size_t i = 0, size = negZOrderList->size(); i < size; ++i) { 310 RenderLayer* currLayer = negZOrderList->at(i); 311 if (currLayer->renderer().style().position() != FixedPosition) 305 312 continue; 306 fixedPosLayers.append(box->layer()); 313 fixedPosLayers.append(currLayer); 314 } 315 } 316 317 if (Vector<RenderLayer*>* posZOrderList = flowThreadLayer->posZOrderList()) { 318 for (size_t i = 0, size = posZOrderList->size(); i < size; ++i) { 319 RenderLayer* currLayer = posZOrderList->at(i); 320 if (currLayer->renderer().style().position() != FixedPosition) 321 continue; 322 fixedPosLayers.append(currLayer); 307 323 } 308 324 } -
trunk/Source/WebCore/rendering/FlowThreadController.h
r156876 r162050 81 81 void updateFlowThreadsIntoFinalPhase(); 82 82 83 void updateNamedFlowsLayerListsIfNeeded(); 83 84 // Collect the fixed positioned layers that have the named flows as containing block 84 85 // These layers are painted and hit-tested by RenderView -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r161960 r162050 4058 4058 return; 4059 4059 4060 // Ensure the flow threads hierarchy is up-to-date before using it. 4061 renderer().view().flowThreadController().updateNamedFlowsLayerListsIfNeeded(); 4062 4060 4063 // Collect the fixed layers in a list to be painted 4061 4064 Vector<RenderLayer*> fixedLayers;
Note: See TracChangeset
for help on using the changeset viewer.