Bug 111703

Summary: Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
Product: WebKit Reporter: Antoine Quint <graouts>
Component: Web Inspector (Deprecated)Assignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, joepeck, keishi, loislo, pfeldman, pmuellr, timothy, vsevik, web-inspector-bugs, webkit-bug-importer, webkit.review.bot, yurys
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description Antoine Quint 2013-03-07 02:55:24 PST
The reasons why a layer was composited in the first place would be very useful information to developers.
Comment 1 Radar WebKit Bug Importer 2013-03-07 02:55:35 PST
<rdar://problem/13367507>
Comment 2 Antoine Quint 2013-03-07 06:49:53 PST
Created attachment 191987 [details]
Patch
Comment 3 Timothy Hatcher 2013-03-07 07:11:14 PST
Comment on attachment 191987 [details]
Patch

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

> Source/WebCore/inspector/Inspector.json:3708
> +                    { "name": "reasonsMask", "type": "integer", "description": "The reasons why the layer was composited." }

I don't think exposing the raw mask is safe and exposes internal WebCore data that might not be stable. There are no guarantees someone won't add an item in the middle later. Returning an array of values defined in the protocol as an enum is the safest option. That way the clients don't need internal knowledge of WebCore and everything is defined in the protocol. That would encourage anyone adding reasons in the future to also extend the protocol enums.
Comment 4 Antoine Quint 2013-03-07 10:13:20 PST
Created attachment 192038 [details]
Patch
Comment 5 WebKit Review Bot 2013-03-07 14:23:52 PST
Comment on attachment 192038 [details]
Patch

Clearing flags on attachment: 192038

Committed r145136: <http://trac.webkit.org/changeset/145136>
Comment 6 WebKit Review Bot 2013-03-07 14:23:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Joseph Pecoraro 2013-03-07 15:18:08 PST
Comment on attachment 192038 [details]
Patch

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

Could you follow-up fix the typos? (My tree isn't clean)

> Source/WebCore/inspector/Inspector.json:3685
> +                "description": "An object containg the reasons why the layer was composited as properties.",

Typo: "containg" => "containing"

> Source/WebCore/inspector/Inspector.json:3693
> +                    { "name": "clipsCompositingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element clippng compositing descendants." },

Typo: "clippng" => "clipping"
Comment 8 Antoine Quint 2013-03-08 00:59:07 PST
(In reply to comment #7)
> (From update of attachment 192038 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=192038&action=review
> 
> Could you follow-up fix the typos? (My tree isn't clean)
> 
> > Source/WebCore/inspector/Inspector.json:3685
> > +                "description": "An object containg the reasons why the layer was composited as properties.",
> 
> Typo: "containg" => "containing"
> 
> > Source/WebCore/inspector/Inspector.json:3693
> > +                    { "name": "clipsCompositingDescendants", "type": "boolean", "optional": true, "description": "Composition due to association with an element clippng compositing descendants." },
> 
> Typo: "clippng" => "clipping"

I fixed those typos in http://trac.webkit.org/changeset/145191. Thanks for spotting them Joe.