Bug 86416

Summary: Use posZOrderList() / negZOrderList() everywhere to avoid querying dirtied lists
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: enne, eric, jamesr, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed change, fixed 2 places where the ASSERTs where triggering.
none
Proposed change 2: augmented with Simon's suggestions. none

Description Julien Chaffraix 2012-05-14 17:14:23 PDT
There is still a few places where we don't use the getters that properly ASSERTs that we do not get any dirtied lists.

I don't see a use case for getting dirtied values so let's change that!
Comment 1 Julien Chaffraix 2012-05-14 17:23:43 PDT
Created attachment 141823 [details]
Proposed change, fixed 2 places where the ASSERTs where triggering.
Comment 2 Simon Fraser (smfr) 2012-05-15 10:25:59 PDT
Comment on attachment 141823 [details]
Proposed change, fixed 2 places where the ASSERTs where triggering.

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

> Source/WebCore/rendering/RenderLayer.cpp:745
> +        if (posZOrderList()) {
> +            for (unsigned i = 0; i < posZOrderList()->size(); ++i)
> +                m_has3DTransformedDescendant |= posZOrderList()->at(i)->update3DTransformedDescendantStatus();

To avoid 3 calls through posZOrderList() it might be better to do if (Vector<...> list = postZOrderList()) { ... }

> Source/WebCore/rendering/RenderLayer.cpp:751
> +        if (negZOrderList()) {
> +            for (unsigned i = 0; i < negZOrderList()->size(); ++i)
> +                m_has3DTransformedDescendant |= negZOrderList()->at(i)->update3DTransformedDescendantStatus();

Ditto.

> Source/WebCore/rendering/RenderLayerCompositor.cpp:1751
> +    return layer->negZOrderList() && layer->negZOrderList()->size() > 0;

Can we make this an accessor on RenderLayer, like hasNegZOrderChildren() or something?
Comment 3 Julien Chaffraix 2012-05-15 10:57:31 PDT
Created attachment 142005 [details]
Proposed change 2: augmented with Simon's suggestions.
Comment 4 WebKit Review Bot 2012-05-15 14:33:00 PDT
Comment on attachment 142005 [details]
Proposed change 2: augmented with Simon's suggestions.

Clearing flags on attachment: 142005

Committed r117162: <http://trac.webkit.org/changeset/117162>
Comment 5 WebKit Review Bot 2012-05-15 14:33:06 PDT
All reviewed patches have been landed.  Closing bug.