<?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>105488</bug_id>
          
          <creation_ts>2012-12-19 18:13:06 -0800</creation_ts>
          <short_desc>[BlackBerry] Fullscreen video fixed position container horizontal position is wrong</short_desc>
          <delta_ts>2013-01-08 12:25:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit BlackBerry</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></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Max Feil">mfeil</reporter>
          <assigned_to name="Max Feil">mfeil</assigned_to>
          <cc>jkjiang</cc>
    
    <cc>mifenton</cc>
    
    <cc>rwlbuis</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>yong.li.webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>795082</commentid>
    <comment_count>0</comment_count>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-19 18:13:06 -0800</bug_when>
    <thetext>The fix for https://bugs.webkit.org/show_bug.cgi?id=105333 has broken fullscreen video, which was compensating by doing its own positioning in x. My patch fixes things by making vertical and horizontal handling symmetrical.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795086</commentid>
    <comment_count>1</comment_count>
      <attachid>180258</attachid>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-19 18:24:24 -0800</bug_when>
    <thetext>Created attachment 180258
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795087</commentid>
    <comment_count>2</comment_count>
      <attachid>180258</attachid>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-19 18:26:01 -0800</bug_when>
    <thetext>Comment on attachment 180258
Patch

Note: for whatever reason this function was not upstreamed before, so this is my actual diff:

diff --git a/Source/WebKit/blackberry/Api/WebPage.cpp b/Source/WebKit/blackberry/Api/WebPage.cpp
index 1d62d31..e7a9553 100644
--- a/Source/WebKit/blackberry/Api/WebPage.cpp
+++ b/Source/WebKit/blackberry/Api/WebPage.cpp
@@ -5960,19 +5960,15 @@ void WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded()
 
     // In order to compensate possible round errors when we scale the fullscreen
     // container element to fit to the viewport, lets make the fullscreen 1px wider
-    // than the viewport size on the right, and position it 1px position less left
+    // than the viewport size on the right, and one pixel longer at the bottom
     // of the scroll position.
     IntRect viewportRect = m_mainFrame-&gt;view()-&gt;visibleContentRect();
     int viewportWidth = viewportRect.width() + 1;
-    int viewportHeight = viewportRect.height();
-    // Given the way the BlackBerry port implements fixed position elements,
-    // we needs to set the left position ourselves, which matches the &apos;x&apos; scroll
-    // position of the main frame.
-    int viewportXScrollPosition = viewportRect.x() - 1;
+    int viewportHeight = viewportRect.height() + 1;
 
     fullScreenStyle-&gt;setWidth(Length(viewportWidth, WebCore::Fixed));
     fullScreenStyle-&gt;setHeight(Length(viewportHeight, WebCore::Fixed));
-    fullScreenStyle-&gt;setLeft(Length(viewportXScrollPosition, WebCore::Fixed));
+    fullScreenStyle-&gt;setLeft(Length(0, WebCore::Fixed));
     fullScreenStyle-&gt;setTop(Length(0, WebCore::Fixed));
     fullScreenStyle-&gt;setBackgroundColor(Color::black);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795377</commentid>
    <comment_count>3</comment_count>
      <attachid>180258</attachid>
    <who name="George Staikos">staikos</who>
    <bug_when>2012-12-20 05:09:01 -0800</bug_when>
    <thetext>Comment on attachment 180258
Patch

Looks ok to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795399</commentid>
    <comment_count>4</comment_count>
      <attachid>180258</attachid>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-12-20 06:18:14 -0800</bug_when>
    <thetext>Comment on attachment 180258
Patch

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

&gt; Source/WebKit/blackberry/Api/WebPage.cpp:5869
&gt; +    fullScreenStyle-&gt;setLeft(Length(0, WebCore::Fixed));

this is needed now because blackberry respects X on fixed position now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795442</commentid>
    <comment_count>5</comment_count>
    <who name="Jacky Jiang">jkjiang</who>
    <bug_when>2012-12-20 07:53:43 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 180258 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=180258&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/blackberry/Api/WebPage.cpp:5869
&gt; &gt; +    fullScreenStyle-&gt;setLeft(Length(0, WebCore::Fixed));
&gt; 
&gt; this is needed now because blackberry respects X on fixed position now?

Looks like that, https://bugs.webkit.org/show_bug.cgi?id=105333.
But if we are doing so, we will also need to get rid of the fullscreen render initial style as well I think.
In WebCore RenderFullScreen.cpp:
static PassRefPtr&lt;RenderStyle&gt; createFullScreenStyle(FrameView* mainFrameView)
{

...
 int viewportWidth = viewportRect.width() + 1;
    int viewportHeight = viewportRect.height();
    // Given the way the BlackBerry port implements fixed position elements,
    // we needs to set the left position ourselves, which matches the &apos;x&apos; scroll
    // position of the main frame.
    int viewportXScrollPosition = viewportRect.x() - 1;

    fullscreenStyle-&gt;setWidth(Length(viewportWidth, WebCore::Fixed));
    fullscreenStyle-&gt;setHeight(Length(viewportHeight, WebCore::Fixed));
    fullscreenStyle-&gt;setLeft(Length(viewportXScrollPosition, WebCore::Fixed));   // Get rid of this as well.
    fullscreenStyle-&gt;setTop(Length(0, WebCore::Fixed));
...
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795444</commentid>
    <comment_count>6</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-12-20 07:57:57 -0800</bug_when>
    <thetext>
&gt; ...
&gt;  int viewportWidth = viewportRect.width() + 1;
&gt;     int viewportHeight = viewportRect.height();
&gt;     // Given the way the BlackBerry port implements fixed position elements,
&gt;     // we needs to set the left position ourselves, which matches the &apos;x&apos; scroll
&gt;     // position of the main frame.
&gt;     int viewportXScrollPosition = viewportRect.x() - 1;
&gt; 
&gt;     fullscreenStyle-&gt;setWidth(Length(viewportWidth, WebCore::Fixed));
&gt;     fullscreenStyle-&gt;setHeight(Length(viewportHeight, WebCore::Fixed));
&gt;     fullscreenStyle-&gt;setLeft(Length(viewportXScrollPosition, WebCore::Fixed));   // Get rid of this as well.
&gt;     fullscreenStyle-&gt;setTop(Length(0, WebCore::Fixed));
&gt; ...
&gt; }

Absolutely, but it is downstream code, so easier :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795636</commentid>
    <comment_count>7</comment_count>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-20 12:05:13 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; But if we are doing so, we will also need to get rid of the fullscreen render initial style as well I think.

Thanks, I didn&apos;t know about that one...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>795684</commentid>
    <comment_count>8</comment_count>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-20 12:46:18 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #5)
&gt; &gt; But if we are doing so, we will also need to get rid of the fullscreen render initial style as well I think.
&gt; 
&gt; Thanks, I didn&apos;t know about that one...

Would you guys know about any other place this was being compensated for? If you enter fullscreen while zoomed in, the touch coordinates are all shifted and its impossible to press media controls (or the press is in a different location to the left).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>796364</commentid>
    <comment_count>9</comment_count>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-21 10:29:56 -0800</bug_when>
    <thetext>Ping... I need commit queue approval on this.

Thanks!

Max</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>796381</commentid>
    <comment_count>10</comment_count>
      <attachid>180258</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-12-21 10:58:54 -0800</bug_when>
    <thetext>Comment on attachment 180258
Patch

Clearing flags on attachment: 180258

Committed r138389: &lt;http://trac.webkit.org/changeset/138389&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>796382</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-12-21 10:58:58 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>798001</commentid>
    <comment_count>12</comment_count>
    <who name="Max Feil">mfeil</who>
    <bug_when>2012-12-28 14:38:39 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Would you guys know about any other place this was being compensated for? If you enter fullscreen while zoomed in, the touch coordinates are all shifted and its impossible to press media controls (or the press is in a different location to the left).

Does anybody know the answer to this question?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>798026</commentid>
    <comment_count>13</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2012-12-28 19:54:01 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #8)
&gt; &gt; Would you guys know about any other place this was being compensated for? If you enter fullscreen while zoomed in, the touch coordinates are all shifted and its impossible to press media controls (or the press is in a different location to the left).
&gt; 
&gt; Does anybody know the answer to this question?

That was the only method to be changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802476</commentid>
    <comment_count>14</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2013-01-08 12:09:31 -0800</bug_when>
    <thetext>*** Bug 91748 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>802502</commentid>
    <comment_count>15</comment_count>
    <who name="Jacky Jiang">jkjiang</who>
    <bug_when>2013-01-08 12:25:11 -0800</bug_when>
    <thetext>*** Bug 94601 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>180258</attachid>
            <date>2012-12-19 18:24:24 -0800</date>
            <delta_ts>2012-12-21 10:58:54 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-105488-20121219212140.patch</filename>
            <type>text/plain</type>
            <size>3306</size>
            <attacher name="Max Feil">mfeil</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTM4MjEyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L2Js
YWNrYmVycnkvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9ibGFja2JlcnJ5L0NoYW5nZUxvZwpp
bmRleCBlZGRjMzQ0OWQ0ZTA5MzdlMTM3ODcwZTFkZTEwOTRiYjRjMjU5MTc5Li40MmEwNGRjZWM0
NjJiYjY3N2YyNGQ1NmFlMzBhYWMzZTM5NTNjMTRjIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
L2JsYWNrYmVycnkvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXQvYmxhY2tiZXJyeS9DaGFu
Z2VMb2cKQEAgLTEsMyArMSwyMSBAQAorMjAxMi0xMi0xOSAgTWF4IEZlaWwgIDxtZmVpbEByaW0u
Y29tPgorCisgICAgICAgIFtCbGFja0JlcnJ5XSBGdWxsc2NyZWVuIHZpZGVvIGZpeGVkIHBvc2l0
aW9uIGNvbnRhaW5lciBob3Jpem9udGFsIHBvc2l0aW9uIGlzIHdyb25nCisgICAgICAgIGh0dHBz
Oi8vYnVncy53ZWJraXQub3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