<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>95650</bug_id>
          
          <creation_ts>2012-09-01 18:01:42 -0700</creation_ts>
          <short_desc>REGRESSION (r123837): Full screen transition is broken at apple.com</short_desc>
          <delta_ts>2013-04-09 16:56:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.apple.com/macbook-pro/#macbookpro</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Jer Noble">jer.noble</assigned_to>
          <cc>esprehn+autocc</cc>
    
    <cc>jer.noble</cc>
    
    <cc>jonlee</cc>
    
    <cc>macpherson</cc>
    
    <cc>menard</cc>
    
    <cc>mikelawther</cc>
    
    <cc>ojan.autocc</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>710300</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2012-09-01 18:01:42 -0700</bug_when>
    <thetext>To reproduce: navigate to the URL. When the video starts playing, click the full screen arrows in the playback controls. Observe the transition into full-screen playback. Press Esc to exit full screen mode and observe the transition. Rather than animate smoothly, the video content scale changes instantaneously, while remaining clipped to its original bounds. Its position the animates to the center of the screen, without resizing. Then the size changes abruptly.

This was caused by &lt;http://trac.webkit.org/r123837&gt;, the fix for bug 92220.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710302</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2012-09-01 18:02:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/12222130&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710441</commentid>
    <comment_count>2</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2012-09-03 00:07:43 -0700</bug_when>
    <thetext>I can reproduce this, but only with Safari. I tested with the shipping Safari 6.0 (7536.25) on MacOS 10.7, and with a locally built WebKit synced past r123837.

The transition to fullscreen is transitioning from a fixed width,height of 848,480 to a a percent based width,height of 100%,100%. I have not dived into the fullscreen or video player code, but I&apos;m assuming 100% in this case is the extent of the monitor size.

From what I see, the blend of these is performed correctly - my monitor is 2560x1600 and the values appear correct, eg:

eval&apos;d blending of (type Fixed, value 848.000000) to (type Percent, value 100.000000) at 13.0802% = 1071.932983px
eval&apos;d blending of (type Fixed, value 480.000000) to (type Percent, value 100.000000) at 13.0802% = 626.498230px
[...]
eval&apos;d blending of (type Fixed, value 848.000000) to (type Percent, value 100.000000) at 84.5118% = 2294.842529px
eval&apos;d blending of (type Fixed, value 480.000000) to (type Percent, value 100.000000) at 84.5118% = 1426.532471px

Going back out of fullscreen, the numbers don&apos;t look the same, eg:

eval&apos;d blending of (type Percent, value 100.000000) to (type Fixed, value 848.000000) at 45.7933% = 848.000000px
eval&apos;d blending of (type percent, value 100.000000) to (type Fixed, value 480.000000) at 45.7933% = 480.000000px
[...]
eval&apos;d blending of (type Percent, value 100.000000) to (type Fixed, value 848.000000) at 78.0345% = 848.000000px
eval&apos;d blending of (type Percent, value 100.000000) to (type Fixed, value 480.000000) at 78.0345% = 480.000000px

It appears the container has already been resized to 848x480, and so the blended value is always 848,480.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>732764</commentid>
    <comment_count>3</comment_count>
    <who name="">mitz</who>
    <bug_when>2012-10-02 10:03:29 -0700</bug_when>
    <thetext>Mike, do you have any thoughts on how to address this regression? Should we just revert r123837?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>733214</commentid>
    <comment_count>4</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2012-10-02 16:41:04 -0700</bug_when>
    <thetext>From what I can see in the digging I did above, the smooth transition itself is working correctly.

My gut feel is that there is a workaround in the existing fullscreen code to make the transition smooth. Now that the underlying transition is actually smooth, the assumptions in the workaround are no longer valid, leading to weirdness.

@jer.noble - does that sound likely? 

If not, I suggest we:

 - revert r123837 (it&apos;s a dead simple patch)
 - someone helps me write a test for the existing fullscreen transition, and we land this
 - re-land the smooth transition patch, making sure fullscreen doesn&apos;t break

How does that sound?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>733251</commentid>
    <comment_count>5</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-10-02 17:21:53 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; From what I can see in the digging I did above, the smooth transition itself is working correctly.
&gt; 
&gt; My gut feel is that there is a workaround in the existing fullscreen code to make the transition smooth. Now that the underlying transition is actually smooth, the assumptions in the workaround are no longer valid, leading to weirdness.
&gt; 
&gt; @jer.noble - does that sound likely? 

The blending is happening at the window server level.  We resize the view to take up the entire screen, then ask for the element&apos;s screen rect.  The window server then interpolates from the original screen rect to the final one.

Before r123837, the full screen element&apos;s renderer&apos;s contentsBox() returned the full screen rect.
After r123837, the full screen element&apos;s renderer&apos;s contentsBox() returns the original box.

&gt; If not, I suggest we:
&gt; 
&gt;  - revert r123837 (it&apos;s a dead simple patch)
&gt;  - someone helps me write a test for the existing fullscreen transition, and we land this

There are some helper functions in Internals that let you do processing between when full screen starts and ends.  That would be a good time to check the bounds of the full screen element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>733296</commentid>
    <comment_count>6</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2012-10-02 18:25:55 -0700</bug_when>
    <thetext>&gt; The blending is happening at the window server level.  We resize the view to take up the entire screen, then ask for the element&apos;s screen rect.  The window server then interpolates from the original screen rect to the final one.
&gt; 
&gt; Before r123837, the full screen element&apos;s renderer&apos;s contentsBox() returned the full screen rect.
&gt; After r123837, the full screen element&apos;s renderer&apos;s contentsBox() returns the original box.

This sounds like the assumption that has been violated. Prior to r123837, the transition between a fixed size and a percent would &apos;snap&apos; instantly to the final state. 

Is the fix here is to simply remove the CSS transition upon the view resize? It sounds like you actually want it to be instantaneous.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>756709</commentid>
    <comment_count>7</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2012-11-01 16:21:19 -0700</bug_when>
    <thetext>Hey Dan, Jer - did you try removing the CSS transition on the view resize? It really feels like this is the right solution here, as Jer points out in this case the blending is happening at the window server level.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>756718</commentid>
    <comment_count>8</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-11-01 16:30:52 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Hey Dan, Jer - did you try removing the CSS transition on the view resize? It really feels like this is the right solution here, as Jer points out in this case the blending is happening at the window server level.

I&apos;m confused.  Is there a CSS transition which is being added to the page through a style sheet?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>756746</commentid>
    <comment_count>9</comment_count>
    <who name="Mike Lawther">mikelawther</who>
    <bug_when>2012-11-01 17:16:52 -0700</bug_when>
    <thetext>There is definitely a CSS transition happening there, evidenced both by what you describe, and the measurements I took in comment #2. It&apos;s a transition from a fixed size (eg a pixel size of 848x480) to a percentage size (100%x100%).

This is the assumption that I reckon has been violated - prior to r123837, a mixed unit transition would instantly &apos;snap&apos; from begin to end, with no interpolation. And so the window server code provides the interpolation instead (I&apos;m guessing animateFromRect in Source/WebCore/platform/mac/WebVideoFullscreenController.mm). Now, the CSS transition actually interpolates as well, and there are too many cooks in the animation kitchen.

I&apos;m afraid I don&apos;t know where the CSS transition is coming from - I had a quick dig around in likely sounding culprits such as Source/WebCore/css/fullscreenQuickTime.css.

My Mac dev machine is currently hosed, so I can&apos;t check any of this stuff :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>870073</commentid>
    <comment_count>10</comment_count>
      <attachid>196681</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2013-04-05 14:17:27 -0700</bug_when>
    <thetext>Created attachment 196681
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>872367</commentid>
    <comment_count>11</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2013-04-09 16:56:17 -0700</bug_when>
    <thetext>Committed r148065: &lt;http://trac.webkit.org/changeset/148065&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>196681</attachid>
            <date>2013-04-05 14:17:27 -0700</date>
            <delta_ts>2013-04-05 14:43:06 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-95650-20130405141714.patch</filename>
            <type>text/plain</type>
            <size>1489</size>
            <attacher name="Jer Noble">jer.noble</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ3NjYzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNDk0MGRkYzc3ZWIwNTYx
ZTUzOTE3NzcyODNkZTU2NmU1MzRiZmY0NS4uYTFlM2ViNjE5YjgzOGEyYzM1YTZmZWEyYzdmYzQ1
ZGNjZDY5NzE1MyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZ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L2Z1bGxzY3JlZW4uY3NzCmluZGV4IGY2YzJiM2Y3MzUxYzVl
OTllZDBhMTAyMzY2Y2E3M2YzZTQ1OGQ2YjUuLjYwN2JiMzViMDNlZDU3NzQ3NjYwOTEwZTkzMTJl
MjUyMGFjYzI4NzIgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJDb3JlL2Nzcy9mdWxsc2NyZWVuLmNz
cworKysgYi9Tb3VyY2UvV2ViQ29yZS9jc3MvZnVsbHNjcmVlbi5jc3MKQEAgLTI5LDYgKzI5LDcg
QEAgdmlkZW86LXdlYmtpdC1mdWxsLXNjcmVlbiwgYXVkaW86LXdlYmtpdC1mdWxsLXNjcmVlbiB7
CiAgICAgd2lkdGg6IDEwMCUgIWltcG9ydGFudDsKICAgICAtd2Via2l0LWZsZXg6IDEgIWltcG9y
dGFudDsKICAgICBkaXNwbGF5OiBibG9jayAhaW1wb3J0YW50OworICAgIC13ZWJraXQtdHJhbnNp
dGlvbjogbm9uZSAhaW1wb3J0YW50OwogfQogCiA6LXdlYmtpdC1mdWxsLXNjcmVlbiB2aWRlbzpo
b3ZlciB7Cg==
</data>
<flag name="review"
          id="218802"
          type_id="1"
          status="+"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>