RESOLVED FIXED 105488
[BlackBerry] Fullscreen video fixed position container horizontal position is wrong
https://bugs.webkit.org/show_bug.cgi?id=105488
Summary [BlackBerry] Fullscreen video fixed position container horizontal position is...
Max Feil
Reported 2012-12-19 18:13:06 PST
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.
Attachments
Patch (3.23 KB, patch)
2012-12-19 18:24 PST, Max Feil
no flags
Max Feil
Comment 1 2012-12-19 18:24:24 PST
Max Feil
Comment 2 2012-12-19 18:26:01 PST
Comment on attachment 180258 [details] 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->view()->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 'x' scroll - // position of the main frame. - int viewportXScrollPosition = viewportRect.x() - 1; + int viewportHeight = viewportRect.height() + 1; fullScreenStyle->setWidth(Length(viewportWidth, WebCore::Fixed)); fullScreenStyle->setHeight(Length(viewportHeight, WebCore::Fixed)); - fullScreenStyle->setLeft(Length(viewportXScrollPosition, WebCore::Fixed)); + fullScreenStyle->setLeft(Length(0, WebCore::Fixed)); fullScreenStyle->setTop(Length(0, WebCore::Fixed)); fullScreenStyle->setBackgroundColor(Color::black);
George Staikos
Comment 3 2012-12-20 05:09:01 PST
Comment on attachment 180258 [details] Patch Looks ok to me.
Antonio Gomes
Comment 4 2012-12-20 06:18:14 PST
Comment on attachment 180258 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=180258&action=review > Source/WebKit/blackberry/Api/WebPage.cpp:5869 > + fullScreenStyle->setLeft(Length(0, WebCore::Fixed)); this is needed now because blackberry respects X on fixed position now?
Jacky Jiang
Comment 5 2012-12-20 07:53:43 PST
(In reply to comment #4) > (From update of attachment 180258 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=180258&action=review > > > Source/WebKit/blackberry/Api/WebPage.cpp:5869 > > + fullScreenStyle->setLeft(Length(0, WebCore::Fixed)); > > 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<RenderStyle> 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 'x' scroll // position of the main frame. int viewportXScrollPosition = viewportRect.x() - 1; fullscreenStyle->setWidth(Length(viewportWidth, WebCore::Fixed)); fullscreenStyle->setHeight(Length(viewportHeight, WebCore::Fixed)); fullscreenStyle->setLeft(Length(viewportXScrollPosition, WebCore::Fixed)); // Get rid of this as well. fullscreenStyle->setTop(Length(0, WebCore::Fixed)); ... }
Antonio Gomes
Comment 6 2012-12-20 07:57:57 PST
> ... > 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 'x' scroll > // position of the main frame. > int viewportXScrollPosition = viewportRect.x() - 1; > > fullscreenStyle->setWidth(Length(viewportWidth, WebCore::Fixed)); > fullscreenStyle->setHeight(Length(viewportHeight, WebCore::Fixed)); > fullscreenStyle->setLeft(Length(viewportXScrollPosition, WebCore::Fixed)); // Get rid of this as well. > fullscreenStyle->setTop(Length(0, WebCore::Fixed)); > ... > } Absolutely, but it is downstream code, so easier :)
Max Feil
Comment 7 2012-12-20 12:05:13 PST
(In reply to comment #5) > 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't know about that one...
Max Feil
Comment 8 2012-12-20 12:46:18 PST
(In reply to comment #7) > (In reply to comment #5) > > 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'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).
Max Feil
Comment 9 2012-12-21 10:29:56 PST
Ping... I need commit queue approval on this. Thanks! Max
WebKit Review Bot
Comment 10 2012-12-21 10:58:54 PST
Comment on attachment 180258 [details] Patch Clearing flags on attachment: 180258 Committed r138389: <http://trac.webkit.org/changeset/138389>
WebKit Review Bot
Comment 11 2012-12-21 10:58:58 PST
All reviewed patches have been landed. Closing bug.
Max Feil
Comment 12 2012-12-28 14:38:39 PST
(In reply to comment #8) > 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?
Antonio Gomes
Comment 13 2012-12-28 19:54:01 PST
(In reply to comment #12) > (In reply to comment #8) > > 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? That was the only method to be changed.
Antonio Gomes
Comment 14 2013-01-08 12:09:31 PST
*** Bug 91748 has been marked as a duplicate of this bug. ***
Jacky Jiang
Comment 15 2013-01-08 12:25:11 PST
*** Bug 94601 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.