Bug 126978 - [CSSRegions] The list of fixed positioned layers in named flows should be sorted by z-index
Summary: [CSSRegions] The list of fixed positioned layers in named flows should be sor...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 57312
  Show dependency treegraph
 
Reported: 2014-01-14 05:12 PST by Mihnea Ovidenie
Modified: 2014-01-14 06:46 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.46 KB, patch)
2014-01-14 05:16 PST, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.