Bug 48024

Summary: Composited elements drawn twice when WebView is layer-backed
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: WebKit Misc.Assignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch mitz: review+

Description Simon Fraser (smfr) 2010-10-20 16:29:41 PDT
If the WebView is layer backed (via -setWantsLayer:YES), then there are issues with the rendering of composited content. It draws twice.
Comment 1 Simon Fraser (smfr) 2010-10-20 16:30:04 PDT
<rdar://problem/7916580>
Comment 2 Simon Fraser (smfr) 2010-10-20 16:33:19 PDT
Created attachment 71358 [details]
Patch
Comment 3 mitz 2010-10-20 17:08:22 PDT
Comment on attachment 71358 [details]
Patch

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

> WebKit/mac/WebView/WebFrame.mm:532
> +- (BOOL)_showFlattenedCompositingLayers:(CGContextRef)context

This name is no good. This method doesn’t show anything.

> WebKit/mac/WebView/WebFrame.mm:540
> +    if (WKCGContextIsBitmapContext(context)) {

Can reverse the test and return early here.
Comment 4 Simon Fraser (smfr) 2010-10-20 17:31:11 PDT
Created attachment 71371 [details]
Patch
Comment 5 Simon Fraser (smfr) 2010-10-20 18:18:02 PDT
http://trac.webkit.org/changeset/70199