Bug 117222

Summary: [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
Product: WebKit Reporter: Gwang Yoon Hwang <yoon>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, commit-queue, jaepark, luiz, noam, zeno
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108899    
Attachments:
Description Flags
Patch
none
Patch
noam: review+, noam: commit-queue-
Patch
none
Patch none

Description Gwang Yoon Hwang 2013-06-04 22:20:54 PDT
CoordinatedGraphicsLayer::flushCompositingState() will cross frame
boundaries if the GraphicsLayers are connected. In this case,
updateContentBuffers will invoke a painting of a sub-frame that causes
flushCompositingState recursively.

To prevent this behavior this patch extracts updateContentBuffers from
flushCompositingState, and places it in
updateContentBuffersIncludeSublayers, which is another tree traveler for
painting.
Comment 1 Gwang Yoon Hwang 2013-06-05 02:59:36 PDT
Created attachment 203779 [details]
Patch
Comment 2 Noam Rosenthal 2013-06-05 03:09:11 PDT
Comment on attachment 203779 [details]
Patch

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

Needs some renames, but I like the approach.

> Source/WebKit2/ChangeLog:16
> +        updateContentBuffersIncludeSublayers, which is another tree traveler for
> +        painting.

"tree traveler" you mean which traverses the tree separately from flushing the state.

> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:114
> +    void requestSyncStateChangesIncludeSubLayers();

syncPendingStateChangesIncludingSubLayers

> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:115
> +    void updateContentBuffersIncludeSubLayers();

updateContentBuffersIncludingSubLayeres
Comment 3 Gwang Yoon Hwang 2013-06-05 04:28:44 PDT
Created attachment 203801 [details]
Patch
Comment 4 Gwang Yoon Hwang 2013-06-05 04:30:10 PDT
(In reply to comment #2)
> (From update of attachment 203779 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203779&action=review
> 
> Needs some renames, but I like the approach.
> 
> > Source/WebKit2/ChangeLog:16
> > +        updateContentBuffersIncludeSublayers, which is another tree traveler for
> > +        painting.
> 
> "tree traveler" you mean which traverses the tree separately from flushing the state.

Yes. thanks for suggesting nice phrase.

> 
> > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:114
> > +    void requestSyncStateChangesIncludeSubLayers();
> 
> syncPendingStateChangesIncludingSubLayers
> 
> > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:115
> > +    void updateContentBuffersIncludeSubLayers();
> 
> updateContentBuffersIncludingSubLayeres

Good naming. I changed names of methods.
Comment 5 Noam Rosenthal 2013-06-05 05:27:16 PDT
Comment on attachment 203801 [details]
Patch

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

Has a typo, otherwise LGTM

> Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:1001
> +void CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayeres()

Layeres -> Layers
Comment 6 Gwang Yoon Hwang 2013-06-05 05:46:20 PDT
Created attachment 203812 [details]
Patch
Comment 7 Gwang Yoon Hwang 2013-06-05 05:47:06 PDT
(In reply to comment #5)
> (From update of attachment 203801 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=203801&action=review
> 
> Has a typo, otherwise LGTM
> 
> > Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:1001
> > +void CoordinatedGraphicsLayer::updateContentBuffersIncludingSubLayeres()
> 
> Layeres -> Layers

Thanks for review. I had fixed typo.
Comment 8 Gwang Yoon Hwang 2013-06-05 06:00:52 PDT
Created attachment 203813 [details]
Patch
Comment 9 WebKit Commit Bot 2013-06-05 06:32:16 PDT
The commit-queue encountered the following flaky tests while processing attachment 203812 [details]:

platform/mac/editing/deleting/deletionUI-single-instance.html bug 114181 (author: rniwa@webkit.org)
transitions/color-transition-rounding.html bug 114182 (author: simon.fraser@apple.com)
transitions/cubic-bezier-overflow-svg-length.html bug 114183 (author: peter@chromium.org)
transitions/interrupt-zero-duration.html bug 114184 (authors: cmarrin@apple.com, rniwa@webkit.org, and simon.fraser@apple.com)
transitions/multiple-background-transitions.html bug 114185 (author: simon.fraser@apple.com)
transitions/cubic-bezier-overflow-color.html bug 114186 (author: peter@chromium.org)
transitions/multiple-shadow-transitions.html bug 114187 (author: simon.fraser@apple.com)
transitions/mismatched-shadow-transitions.html bug 114188 (author: simon.fraser@apple.com)
transitions/color-transition-all.html bug 114189 (authors: ossy@webkit.org and simon.fraser@apple.com)
transitions/negative-delay.html bug 114190 (author: simon.fraser@apple.com)
transitions/cubic-bezier-overflow-shadow.html bug 114191 (author: peter@chromium.org)
transitions/min-max-width-height-transitions.html bug 114192 (author: simon.fraser@apple.com)
transitions/cancel-transition.html bug 114193 (authors: ojan@chromium.org, rniwa@webkit.org, and simon.fraser@apple.com)
transitions/border-radius-transition.html bug 114194 (author: simon.fraser@apple.com)
transitions/flex-transitions.html bug 114195 (author: tony@chromium.org)
transitions/mixed-type.html bug 114196 (author: mikelawther@chromium.org)
transitions/multiple-mask-transitions.html bug 114197 (author: simon.fraser@apple.com)
transitions/color-transition-premultiplied.html bug 114198 (author: simon.fraser@apple.com)
transitions/mismatched-shadow-styles.html bug 114199 (author: simon.fraser@apple.com)
transitions/mask-transitions.html bug 114200 (authors: ojan@chromium.org, oliver@apple.com, and simon.fraser@apple.com)
transitions/cubic-bezier-overflow-length.html bug 114201 (author: peter@chromium.org)
transitions/multiple-background-size-transitions.html bug 114202 (authors: mitz@webkit.org and simon.fraser@apple.com)
transitions/clip-transition.html bug 114203 (authors: dglazkov@chromium.org, krit@webkit.org, and simon.fraser@apple.com)
transitions/cubic-bezier-overflow-transform.html bug 114204 (author: peter@chromium.org)
transitions/interrupted-accelerated-transition.html bug 56242 (authors: rniwa@webkit.org, simon.fraser@apple.com, and tonyg@chromium.org)
transitions/background-transitions.html bug 114206 (author: simon.fraser@apple.com)
http/tests/security/mixedContent/redirect-https-to-http-iframe-in-main-frame.html bug 114208 (authors: abarth@webkit.org and rniwa@webkit.org)
http/tests/inspector/inspect-element.html bug 78869 (author: pfeldman@chromium.org)
fast/loader/javascript-url-in-object.html bug 114210 (authors: rniwa@webkit.org and sam@webkit.org)
svg/animations/smil-leak-dynamically-added-element-instances.svg bug 114281 (authors: fmalita@chromium.org and thorton@apple.com)
The commit-queue is continuing to process your patch.
Comment 10 WebKit Commit Bot 2013-06-05 06:33:51 PDT
Comment on attachment 203813 [details]
Patch

Clearing flags on attachment: 203813

Committed r151220: <http://trac.webkit.org/changeset/151220>
Comment 11 WebKit Commit Bot 2013-06-05 06:33:54 PDT
All reviewed patches have been landed.  Closing bug.