Changeset 109592 in webkit


Ignore:
Timestamp:
Mar 2, 2012 11:48:17 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

https://bugs.webkit.org/show_bug.cgi?id=80161
PR: 141157

BlackBerryPlatformScreen.h API has been updated. Reflect those
changes in our usage.

Source/WebCore:

Patch by Adam Treat <atreat@rim.com> on 2012-03-02
Reviewed by Antonio Gomes.
Internally reviewed by Jakob Petsovits

  • platform/blackberry/PlatformScreenBlackBerry.cpp:

(WebCore::screenAvailableRect):
(WebCore::screenRect):

Source/WebKit/blackberry:

Patch by Adam Treat <atreat@rim.com> on 2012-03-02
Reviewed by Antonio Gomes.
Internally reviewed by Jakob Petsovits.

  • Api/BackingStore.cpp:

(BlackBerry::WebKit::BackingStorePrivate::tileWidth):
(BlackBerry::WebKit::BackingStorePrivate::tileHeight):

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
(BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
(BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
(BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
(BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

  • WebKitSupport/SurfacePool.cpp:

(BlackBerry::WebKit::createCompositingSurface):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109589 r109592  
     12012-03-02  Adam Treat  <atreat@rim.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=80161
     4        PR: 141157
     5
     6        BlackBerryPlatformScreen.h API has been updated.  Reflect those
     7        changes in our usage.
     8
     9        Reviewed by Antonio Gomes.
     10        Internally reviewed by Jakob Petsovits
     11
     12        * platform/blackberry/PlatformScreenBlackBerry.cpp:
     13        (WebCore::screenAvailableRect):
     14        (WebCore::screenRect):
     15
    1162012-03-02  Julien Chaffraix  <jchaffraix@webkit.org>
    217
  • trunk/Source/WebCore/platform/blackberry/PlatformScreenBlackBerry.cpp

    r106678 r109592  
    4444FloatRect screenAvailableRect(Widget* widget)
    4545{
    46     return FloatRect(FloatPoint(), FloatSize(IntSize(BlackBerry::Platform::Graphics::Screen::size())));
     46    return FloatRect(FloatPoint(), FloatSize(IntSize(BlackBerry::Platform::Graphics::Screen::primaryScreen()->size())));
    4747}
    4848
    4949FloatRect screenRect(Widget* widget)
    5050{
    51     return FloatRect(FloatPoint(), FloatSize(IntSize(BlackBerry::Platform::Graphics::Screen::size())));
     51    return FloatRect(FloatPoint(), FloatSize(IntSize(BlackBerry::Platform::Graphics::Screen::primaryScreen()->size())));
    5252}
    5353
  • trunk/Source/WebKit/blackberry/Api/BackingStore.cpp

    r107863 r109592  
    20702070int BackingStorePrivate::tileWidth()
    20712071{
    2072     static int tileWidth = BlackBerry::Platform::Graphics::Screen::landscapeWidth();
     2072    static int tileWidth = BlackBerry::Platform::Graphics::Screen::primaryScreen()->landscapeWidth();
    20732073    return tileWidth;
    20742074}
     
    20762076int BackingStorePrivate::tileHeight()
    20772077{
    2078     static int tileHeight = BlackBerry::Platform::Graphics::Screen::landscapeHeight();
     2078    static int tileHeight = BlackBerry::Platform::Graphics::Screen::primaryScreen()->landscapeHeight();
    20792079    return tileHeight;
    20802080}
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r109583 r109592  
    475475
    476476    m_page->settings()->setSpatialNavigationEnabled(m_webSettings->isSpatialNavigationEnabled());
    477     blockClickRadius = int(roundf(0.35 * Platform::Graphics::Screen::pixelsPerInch(0).width())); // The clicked rectangle area should be a fixed unit of measurement.
     477    blockClickRadius = int(roundf(0.35 * Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(0).width())); // The clicked rectangle area should be a fixed unit of measurement.
    478478
    479479    m_page->settings()->setDelegateSelectionPaint(true);
     
    16191619IntSize WebPagePrivate::transformedViewportSize() const
    16201620{
    1621     return Platform::Graphics::Screen::size();
     1621    return Platform::Graphics::Screen::primaryScreen()->size();
    16221622}
    16231623
     
    21552155#if ENABLE(ORIENTATION_EVENTS)
    21562156            minWidth = m_mainFrame->orientation() % 180
    2157                 ? Platform::Graphics::Screen::height()
    2158                 : Platform::Graphics::Screen::width();
     2157                ? Platform::Graphics::Screen::primaryScreen()->height()
     2158                : Platform::Graphics::Screen::primaryScreen()->width();
    21592159#else
    2160             minWidth = Platform::Graphics::Screen::width();
     2160            minWidth = Platform::Graphics::Screen::primaryScreen()->width();
    21612161#endif
    21622162        }
     
    30103010
    30113011    int desktopWidth = defaultMaxLayoutSize().width();
    3012     int deviceWidth = Platform::Graphics::Screen::width();
    3013     int deviceHeight = Platform::Graphics::Screen::height();
    3014     FloatSize currentPPI = Platform::Graphics::Screen::pixelsPerInch(-1);
     3012    int deviceWidth = Platform::Graphics::Screen::primaryScreen()->width();
     3013    int deviceHeight = Platform::Graphics::Screen::primaryScreen()->height();
     3014    FloatSize currentPPI = Platform::Graphics::Screen::primaryScreen()->pixelsPerInch(-1);
    30153015    int deviceDPI = int(roundf((currentPPI.width() + currentPPI.height()) / 2));
    30163016    if (m_viewportArguments.targetDensityDpi == ViewportArguments::ValueAuto) {
     
    33793379        return;
    33803380
    3381     IntSize screenSize = Platform::Graphics::Screen::size();
     3381    IntSize screenSize = Platform::Graphics::Screen::primaryScreen()->size();
    33823382    ASSERT(size.width() <= screenSize.width() && size.height() <= screenSize.height());
    33833383    m_defaultLayoutSize = size.expandedTo(minimumLayoutSize).shrunkTo(screenSize);
     
    55395539    static IntSize size;
    55405540    if (size.isEmpty())
    5541         size = IntSize(std::max(1024, Platform::Graphics::Screen::landscapeWidth()),
    5542                        std::max(768, Platform::Graphics::Screen::landscapeHeight()));
     5541        size = IntSize(std::max(1024, Platform::Graphics::Screen::primaryScreen()->landscapeWidth()),
     5542                       std::max(768, Platform::Graphics::Screen::primaryScreen()->landscapeHeight()));
    55435543
    55445544    return size;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r109583 r109592  
     12012-03-02  Adam Treat  <atreat@rim.com>
     2
     3        https://bugs.webkit.org/show_bug.cgi?id=80161
     4        PR: 141157
     5
     6        BlackBerryPlatformScreen.h API has been updated.  Reflect those
     7        changes in our usage.
     8
     9        Reviewed by Antonio Gomes.
     10        Internally reviewed by Jakob Petsovits.
     11
     12        * Api/BackingStore.cpp:
     13        (BlackBerry::WebKit::BackingStorePrivate::tileWidth):
     14        (BlackBerry::WebKit::BackingStorePrivate::tileHeight):
     15        * Api/WebPage.cpp:
     16        (BlackBerry::WebKit::WebPagePrivate::init):
     17        (BlackBerry::WebKit::WebPagePrivate::transformedViewportSize):
     18        (BlackBerry::WebKit::WebPagePrivate::fixedLayoutSize):
     19        (BlackBerry::WebKit::WebPagePrivate::recomputeVirtualViewportFromViewportArguments):
     20        (BlackBerry::WebKit::WebPagePrivate::setDefaultLayoutSize):
     21        (BlackBerry::WebKit::WebPagePrivate::defaultMaxLayoutSize):
     22        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     23        (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
     24        * WebKitSupport/SurfacePool.cpp:
     25        (BlackBerry::WebKit::createCompositingSurface):
     26
    1272012-03-02  Konrad Piascik  <kpiascik@rim.com>
    228
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r109506 r109592  
    10591059    // When rotate happens, only zoom when previous page was zoomToFitScale, otherwise keep old scale.
    10601060    if (orientationChanged && viewState.isZoomToFitScale)
    1061         scale = BlackBerry::Platform::Graphics::Screen::width() * scale / static_cast<double>(BlackBerry::Platform::Graphics::Screen::height());
     1061        scale = BlackBerry::Platform::Graphics::Screen::primaryScreen()->width() * scale / static_cast<double>(BlackBerry::Platform::Graphics::Screen::primaryScreen()->height());
    10621062    m_webPagePrivate->m_backingStore->d->suspendScreenAndBackingStoreUpdates(); // don't flash checkerboard for the setScrollPosition call
    10631063    m_frame->view()->setContentsSizeFromHistory(contentsSize);
  • trunk/Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp

    r107401 r109592  
    3939static PassRefPtr<BackingStoreCompositingSurface> createCompositingSurface()
    4040{
    41     BlackBerry::Platform::IntSize screenSize = BlackBerry::Platform::Graphics::Screen::size();
     41    BlackBerry::Platform::IntSize screenSize = BlackBerry::Platform::Graphics::Screen::primaryScreen()->size();
    4242    return BackingStoreCompositingSurface::create(screenSize, false /*doubleBuffered*/);
    4343}
Note: See TracChangeset for help on using the changeset viewer.