Changeset 139110 in webkit


Ignore:
Timestamp:
Jan 8, 2013 2:03:24 PM (11 years ago)
Author:
zhajiang@rim.com
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 <zhajiang@rim.com>.
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):

Location:
trunk/Source/WebKit/blackberry
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r138979 r139110  
    14801480
    14811481#if ENABLE(FULLSCREEN_API)
    1482         // If we are in fullscreen video mode, and we change the FrameView::viewportRect,
    1483         // we need to adjust the media container to the new size.
    1484         if (m_fullscreenVideoNode) {
    1485             Document* document = m_fullscreenVideoNode->document();
    1486             ASSERT(document);
    1487             ASSERT(document->fullScreenRenderer());
    1488 
    1489             int width = m_mainFrame->view()->visibleContentRect().size().width();
    1490             document->fullScreenRenderer()->style()->setWidth(Length(width, Fixed));
    1491         }
     1482        adjustFullScreenElementDimensionsIfNeeded();
    14921483#endif
    14931484    }
     
    19911982    m_backingStore->d->scrollChanged(pos);
    19921983    m_client->scrollChanged();
     1984
     1985#if ENABLE(FULLSCREEN_API)
     1986    adjustFullScreenElementDimensionsIfNeeded();
     1987#endif
    19931988}
    19941989
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r137743 r139110  
    220220    void enterFullScreenForElement(WebCore::Element*);
    221221    void exitFullScreenForElement(WebCore::Element*);
     222    void adjustFullScreenElementDimensionsIfNeeded();
    222223#endif
    223224    void contentsSizeChanged(const WebCore::IntSize&);
  • trunk/Source/WebKit/blackberry/ChangeLog

    r139078 r139110  
     12013-01-08  Jacky Jiang  <zhajiang@rim.com>
     2
     3        [Blackberry][FullScreen] Create a helper method to adjust the fullscreen renderer dimensions
     4        https://bugs.webkit.org/show_bug.cgi?id=91748
     5
     6        Reviewed by Antonio Gomes.
     7
     8        PR: 195524
     9        The was originally from Antonio Gomes on PR195524. Bug 105488 has
     10        partially upstreamed that patch. This patch upstreams the rest of it.
     11
     12        * Api/WebPage.cpp:
     13        (BlackBerry::WebKit::WebPagePrivate::updateViewportSize):
     14        (BlackBerry::WebKit::WebPagePrivate::notifyTransformedScrollChanged):
     15        * Api/WebPage_p.h:
     16        (WebPagePrivate):
     17        * WebCoreSupport/ChromeClientBlackBerry.cpp:
     18        (WebCore::ChromeClientBlackBerry::fullScreenRendererChanged):
     19
    1202013-01-08  Mark Lam  <mark.lam@apple.com>
    221
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp

    r139078 r139110  
    766766}
    767767
    768 void ChromeClientBlackBerry::fullScreenRendererChanged(RenderBox* fullScreenRenderer)
    769 {
    770     // Once we go fullscreen using the new FULLSCREEN_API code path, we have to take into account
    771     // our port specific page scaling.
    772     if (fullScreenRenderer) {
    773         int width = m_webPagePrivate->m_mainFrame->view()->visibleContentRect().size().width();
    774         fullScreenRenderer->style()->setWidth(Length(width, Fixed));
    775     }
     768void ChromeClientBlackBerry::fullScreenRendererChanged(RenderBox*)
     769{
     770    m_webPagePrivate->adjustFullScreenElementDimensionsIfNeeded();
    776771}
    777772#endif
Note: See TracChangeset for help on using the changeset viewer.