Title: [139110] trunk/Source/WebKit/blackberry
Revision
139110
Author
[email protected]
Date
2013-01-08 14:03:24 -0800 (Tue, 08 Jan 2013)

Log Message

[Blackberry][FullScreen] Create a helper method to adjust the fullscreen renderer dimensions
https://bugs.webkit.org/show_bug.cgi?id=91748

Patch by Jacky Jiang <[email protected]>.
Reviewed by Antonio Gomes.

PR: 195524
The was originally from Antonio Gomes on PR195524. Bug 105488 has
partially upstreamed that patch. This patch upstreams the rest of it.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
(BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (139109 => 139110)


--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-01-08 22:02:04 UTC (rev 139109)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp	2013-01-08 22:03:24 UTC (rev 139110)
@@ -1479,16 +1479,7 @@
         m_mainFrame->view()->adjustViewSize();
 
 #if ENABLE(FULLSCREEN_API)
-        // If we are in fullscreen video mode, and we change the FrameView::viewportRect,
-        // we need to adjust the media container to the new size.
-        if (m_fullscreenVideoNode) {
-            Document* document = m_fullscreenVideoNode->document();
-            ASSERT(document);
-            ASSERT(document->fullScreenRenderer());
-
-            int width = m_mainFrame->view()->visibleContentRect().size().width();
-            document->fullScreenRenderer()->style()->setWidth(Length(width, Fixed));
-        }
+        adjustFullScreenElementDimensionsIfNeeded();
 #endif
     }
 
@@ -1990,6 +1981,10 @@
     const IntPoint pos = transformedScrollPosition();
     m_backingStore->d->scrollChanged(pos);
     m_client->scrollChanged();
+
+#if ENABLE(FULLSCREEN_API)
+    adjustFullScreenElementDimensionsIfNeeded();
+#endif
 }
 
 bool WebPagePrivate::setViewMode(ViewMode mode)

Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (139109 => 139110)


--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2013-01-08 22:02:04 UTC (rev 139109)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h	2013-01-08 22:03:24 UTC (rev 139110)
@@ -219,6 +219,7 @@
 #if ENABLE(FULLSCREEN_API)
     void enterFullScreenForElement(WebCore::Element*);
     void exitFullScreenForElement(WebCore::Element*);
+    void adjustFullScreenElementDimensionsIfNeeded();
 #endif
     void contentsSizeChanged(const WebCore::IntSize&);
     void overflowExceedsContentsSize();

Modified: trunk/Source/WebKit/blackberry/ChangeLog (139109 => 139110)


--- trunk/Source/WebKit/blackberry/ChangeLog	2013-01-08 22:02:04 UTC (rev 139109)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2013-01-08 22:03:24 UTC (rev 139110)
@@ -1,3 +1,22 @@
+2013-01-08  Jacky Jiang  <[email protected]>
+
+        [Blackberry][FullScreen] Create a helper method to adjust the fullscreen renderer dimensions
+        https://bugs.webkit.org/show_bug.cgi?id=91748
+
+        Reviewed by Antonio Gomes.
+
+        PR: 195524
+        The was originally from Antonio Gomes on PR195524. Bug 105488 has
+        partially upstreamed that patch. This patch upstreams the rest of it.
+
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
+        (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
+        * Api/WebPage_p.h:
+        (WebPagePrivate):
+        * WebCoreSupport/ChromeClientBlackBerry.cpp:
+        (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
+
 2013-01-08  Mark Lam  <[email protected]>
 
         Removed the need for the ProposedDatabase mechanism.

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (139109 => 139110)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2013-01-08 22:02:04 UTC (rev 139109)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp	2013-01-08 22:03:24 UTC (rev 139110)
@@ -765,14 +765,9 @@
     m_fullScreenElement.clear();
 }
 
-void ChromeClientBlackBerry::fullScreenRendererChanged(RenderBox* fullScreenRenderer)
+void ChromeClientBlackBerry::fullScreenRendererChanged(RenderBox*)
 {
-    // Once we go fullscreen using the new FULLSCREEN_API code path, we have to take into account
-    // our port specific page scaling.
-    if (fullScreenRenderer) {
-        int width = m_webPagePrivate->m_mainFrame->view()->visibleContentRect().size().width();
-        fullScreenRenderer->style()->setWidth(Length(width, Fixed));
-    }
+    m_webPagePrivate->adjustFullScreenElementDimensionsIfNeeded();
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to