Bug 75682

Summary: Regression (r98735): Video chat moles in Gmail render incorrectly on Mac OS
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cmarrin, enne, jamesr, shawnsingh, simon.fraser, vangelis, webkit-bug-importer
Priority: P1 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Bug Depends on: 38829    
Bug Blocks:    
Attachments:
Description Flags
Screen shot of correct behavior (from Safari 5.1.2)
none
Screen shot of incorrect behavior on WebKit nightly
none
Reduced test case
none
Patch jamesr: review+

Description Kenneth Russell 2012-01-05 19:21:36 PST
Created attachment 121387 [details]
Screen shot of correct behavior (from Safari 5.1.2)

(This is filed in Chromium as http://code.google.com/p/chromium/issues/detail?id=107283 .)

http://trac.webkit.org/changeset/98735/ introduced a regression where video chat moles in Gmail render incorrectly on Mac OS. Some of the elements of the chat mole do not render. See attached correct and incorrect screen shots from Safari; the incorrect one contains the composited layer borders. The problem is present in both Safari and Chromium. It is provoked by the embedded Core Animation plugin containing the video, though the problem is not related to plugins specifically. It can be triggered by forcing creation of a layer for one of the sub-elements of the chat mole using the Inspector.

I don't yet have a reduced test case but am continuing to investigate in order to create one. In the meantime, the failure can be reproduced in the following ways:

With video:

1) Install the Google Talk Video plugin from http://www.google.com/chat/video .
2) Log into Gmail.
3) In the gear menu in the upper right corner, select "Labs".
4) Enable the "Video Chat Enhancements" lab. (This isn't strictly needed but I was having problems getting video to work at all without it -- likely an unrelated Flash problem.)
5) Establish a chat connection to echocall@bot.talk.google.com and click the video camera icon.
6) When the video comes up, click the arrow pointing down and to the right to shrink the large video window into the chat mole.

Note that the text field and border of the chat mole disappear. This is the bug.

Without video:

1) Log into Gmail.
2) Establish a chat connection to echocall@bot.talk.google.com .
3) Type a little text.
4) Right-click some of the text and select "Inspect element".
5) In the style for the element, add the property "-webkit-transform: translateZ(0)".

The chat mole disappears entirely, leaving only the inspected element visible.

It seems that the visibility of some of the elements and/or their layers is being computed incorrectly.
Comment 1 Kenneth Russell 2012-01-05 19:50:36 PST
Created attachment 121389 [details]
Screen shot of incorrect behavior on WebKit nightly
Comment 2 Kenneth Russell 2012-01-12 18:27:06 PST
Created attachment 122357 [details]
Reduced test case

Here's a reduced test case demonstrating the problem, and that it's related to visibility computations. The green square should be visible rather than the red square. Use the Inspector to disable the -webkit-transform style on the innermost div to get correct rendering. Renders incorrectly in current WebKit nightly and in current Chromium builds on all platforms, correctly in shipping Safari 5.1.2.
Comment 3 Simon Fraser (smfr) 2012-01-12 19:28:54 PST
Thanks for the reduction.
Comment 4 Simon Fraser (smfr) 2012-01-19 15:47:35 PST
The issue seems to be that RenderLayerBacking::isSimpleContainerCompositingLayer() incorrectly computes that a layer has no visible contents.
Comment 5 Radar WebKit Bug Importer 2012-01-19 18:22:42 PST
<rdar://problem/10727416>
Comment 6 Simon Fraser (smfr) 2012-01-19 18:28:36 PST
Created attachment 123236 [details]
Patch
Comment 7 James Robinson 2012-01-19 18:33:32 PST
Comment on attachment 123236 [details]
Patch

R=me
Comment 8 Simon Fraser (smfr) 2012-01-19 18:43:36 PST
http://trac.webkit.org/changeset/105471