Changeset 160717 in webkit
- Timestamp:
- Dec 17, 2013 10:46:04 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r160715 r160717 1 2013-12-17 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 Darin Adler. 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.txt: Added. 15 * fast/regions/repaint/fixed-in-named-flow-cb-changed.html: Added. 16 * fast/regions/repaint/fixed-in-named-flow-cb-changed2-expected.txt: Added. 17 * fast/regions/repaint/fixed-in-named-flow-cb-changed2.html: Added. 18 1 19 2013-12-17 Bem Jones-Bey <bjonesbe@adobe.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r160715 r160717 1 2013-12-17 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 Darin Adler. 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 Modified also FlowThreadController::collectFixedPositionedLayers function 13 to always return the layers sorted by z-index, as this operation was always 14 done at the call sites. 15 16 Tests: fast/regions/repaint/fixed-in-named-flow-cb-changed.html 17 fast/regions/repaint/fixed-in-named-flow-cb-changed2.html 18 19 * rendering/FlowThreadController.cpp: 20 (WebCore::compareZIndex): 21 (WebCore::FlowThreadController::collectFixedPositionedLayers): 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::paintFixedLayersInNamedFlows): 24 (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows): 25 1 26 2013-12-17 Bem Jones-Bey <bjonesbe@adobe.com> 2 27 -
trunk/Source/WebCore/rendering/FlowThreadController.cpp
r158559 r160717 29 29 30 30 #include "config.h" 31 32 31 #include "FlowThreadController.h" 33 32 … … 281 280 } 282 281 283 // Collect the fixed positioned layers that have the named flows as containing block 282 // Helper for the sorting of layers by z-index. 283 static inline bool compareZIndex(RenderLayer* first, RenderLayer* second) 284 { 285 return first->zIndex() < second->zIndex(); 286 } 287 288 // Collect the fixed positioned layers that have the named flows as containing block. 284 289 // These layers are painted and hit-tested starting from RenderView not from regions. 290 // The list of layers is returned sorted by z-index. 285 291 void FlowThreadController::collectFixedPositionedLayers(Vector<RenderLayer*>& fixedPosLayers) const 286 292 { … … 293 299 continue; 294 300 295 // Iterate over the fixed positioned elements in the flow thread 296 TrackedRendererListHashSet* positionedDescendants = flowRenderer->positionedObjects(); 297 if (positionedDescendants) { 298 for (auto it = positionedDescendants->begin(), end = positionedDescendants->end(); it != end; ++it) { 299 RenderBox* box = *it; 300 if (!box->fixedPositionedWithNamedFlowContainingBlock()) 301 RenderLayer* flowThreadLayer = flowRenderer->layer(); 302 if (Vector<RenderLayer*>* negZOrderList = flowThreadLayer->negZOrderList()) { 303 for (size_t i = 0, size = negZOrderList->size(); i < size; ++i) { 304 RenderLayer* currLayer = negZOrderList->at(i); 305 if (currLayer->renderer().style().position() != FixedPosition) 301 306 continue; 302 fixedPosLayers.append( box->layer());307 fixedPosLayers.append(currLayer); 303 308 } 304 309 } 305 } 310 311 if (Vector<RenderLayer*>* posZOrderList = flowThreadLayer->posZOrderList()) { 312 for (size_t i = 0, size = posZOrderList->size(); i < size; ++i) { 313 RenderLayer* currLayer = posZOrderList->at(i); 314 if (currLayer->renderer().style().position() != FixedPosition) 315 continue; 316 fixedPosLayers.append(currLayer); 317 } 318 } 319 } 320 321 std::stable_sort(fixedPosLayers.begin(), fixedPosLayers.end(), compareZIndex); 306 322 } 307 323 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r160699 r160717 4045 4045 renderer().view().flowThreadController().collectFixedPositionedLayers(fixedLayers); 4046 4046 4047 // Sort the fixed layers list4048 std::stable_sort(fixedLayers.begin(), fixedLayers.end(), compareZIndex);4049 4050 4047 // Paint the layers 4051 4048 for (size_t i = 0; i < fixedLayers.size(); ++i) { … … 4794 4791 Vector<RenderLayer*> fixedLayers; 4795 4792 renderer().view().flowThreadController().collectFixedPositionedLayers(fixedLayers); 4796 4797 // Sort the fixed layers list4798 std::stable_sort(fixedLayers.begin(), fixedLayers.end(), compareZIndex);4799 4793 4800 4794 // Hit test the layers
Note: See TracChangeset
for help on using the changeset viewer.