Bug 126978

Summary: [CSSRegions] The list of fixed positioned layers in named flows should be sorted by z-index
Product: WebKit Reporter: Mihnea Ovidenie <mihnea>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, simon.fraser, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Patch none

Description Mihnea Ovidenie 2014-01-14 05:12:42 PST
Return the list of fixed positioned layers sorted by z-index from FlowThreadController::collectFixedPositionedLayers instead of manually sort it every time we need it (RenderLayer::paintFixedLayersInNamedFlows, RenderLayer::hitTestFixedLayersInNamedFlows).
Comment 1 Mihnea Ovidenie 2014-01-14 05:16:52 PST
Created attachment 221146 [details]
Patch
Comment 2 Mihai Maerean 2014-01-14 05:24:06 PST
Comment on attachment 221146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221146&action=review

> Source/WebCore/rendering/FlowThreadController.cpp:282
> +static inline bool compareZIndex(RenderLayer* first, RenderLayer* second)

Rather than having this method in both FlowThreadController and RenderLayer object files, maybe it should be a public static method of the RenderLayer class.
Comment 3 Mihnea Ovidenie 2014-01-14 06:04:34 PST
(In reply to comment #2)
> (From update of attachment 221146 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221146&action=review
> 
> > Source/WebCore/rendering/FlowThreadController.cpp:282
> > +static inline bool compareZIndex(RenderLayer* first, RenderLayer* second)
> 
> Rather than having this method in both FlowThreadController and RenderLayer object files, maybe it should be a public static method of the RenderLayer class.

I thought about that but i decided not to add another method to the public interface of RenderLayer since it is just a very simple comparison function.
Comment 4 Antti Koivisto 2014-01-14 06:12:23 PST
Comment on attachment 221146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=221146&action=review

> Source/WebCore/rendering/RenderLayer.cpp:4062
>      renderer().view().flowThreadController().collectFixedPositionedLayers(fixedLayers);

Maybe call it collectSortedFixedPositionedLayers or similar?

We nowadays prefer collection functions to return the vector normally instead of passing an argument since rvalue references make it copy-free.
Comment 5 WebKit Commit Bot 2014-01-14 06:46:55 PST
Comment on attachment 221146 [details]
Patch

Clearing flags on attachment: 221146

Committed r161960: <http://trac.webkit.org/changeset/161960>
Comment 6 WebKit Commit Bot 2014-01-14 06:46:57 PST
All reviewed patches have been landed.  Closing bug.