Changeset 149820 in webkit


Ignore:
Timestamp:
May 9, 2013 9:54:24 AM (11 years ago)
Author:
mifenton@rim.com
Message:

[BlackBerry] Style updates required based on new check-webkit-style
https://bugs.webkit.org/show_bug.cgi?id=115857

Reviewed by Rob Buis.

Update WebPage and WebPageClient to match check-webkit-style updates.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::calculateReflowedScrollPosition):
(BlackBerry::WebKit::WebPagePrivate::centerOfVisibleContentsRect):
(BlackBerry::WebKit::WebPage::assignFocus):
(BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
(BlackBerry::WebKit::WebPage::addVisitedLink):
(BlackBerry::WebKit::WebPagePrivate::findPatternStringForUrl):
(BlackBerry::WebKit::WebPage::notifySwipeEvent):
(BlackBerry::WebKit::WebPage::notifyScreenPowerStateChanged):
(BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
(BlackBerry::WebKit::WebPagePrivate::setRootLayerWebKitThread):
(BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):

  • Api/WebPageClient.h:
  • Api/WebPage_p.h:
Location:
trunk/Source/WebKit/blackberry
Files:
4 edited

Legend:

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

    r149810 r149820  
    654654    // no overhead in the unlikely case where the compositor is not needed.
    655655    Platform::userInterfaceThreadMessageClient()->dispatchSyncMessage(
    656             createMethodCallMessage(&WebPagePrivate::createCompositor, this));
     656        createMethodCallMessage(&WebPagePrivate::createCompositor, this));
    657657#endif
    658658}
     
    844844bool WebPage::executeJavaScriptInIsolatedWorld(const std::wstring& script, JavaScriptDataType& returnType, BlackBerry::Platform::String& returnValue)
    845845{
    846     // On our platform wchar_t is unsigned int and UChar is unsigned short
     846    // On our platform wchar_t is unsigned and UChar is unsigned short
    847847    // so we have to convert using ICU conversion function
    848848    int lengthCopied = 0;
     
    12431243
    12441244    IntPoint newScrollPosition(IntPoint(max(0, static_cast<int>(roundf(anchor.x() - anchorOffset.x() / inverseScale))),
    1245                                         max(0, static_cast<int>(roundf(anchor.y() - anchorOffset.y() / inverseScale)))));
     1245        max(0, static_cast<int>(roundf(anchor.y() - anchorOffset.y() / inverseScale)))));
    12461246
    12471247    if (m_webPage->settings()->textReflowMode() == WebSettings::TextReflowEnabled) {
     
    12511251        if (m_currentPinchZoomNode)
    12521252            newScrollPosition = calculateReflowedScrollPosition(anchorOffset, scale == minimumScale() ? 1 : inverseScale);
    1253          m_currentPinchZoomNode = 0;
    1254          m_anchorInNodeRectRatio = FloatPoint(-1, -1);
     1253        m_currentPinchZoomNode = 0;
     1254        m_anchorInNodeRectRatio = FloatPoint(-1, -1);
    12551255    }
    12561256
     
    13051305
    13061306    return IntPoint(max(0, static_cast<int>(roundf(reflowedRect.x() + offsetX))),
    1307                     max(0, static_cast<int>(roundf(reflowedRect.y() + offsetY - anchorOffset.y() / inverseScale))));
     1307        max(0, static_cast<int>(roundf(reflowedRect.y() + offsetY - anchorOffset.y() / inverseScale))));
    13081308}
    13091309
     
    15001500    // The center of the visible contents rect in float.
    15011501    return FloatPoint(visibleContentsRect.x() + visibleContentsRect.width() / 2.0,
    1502                       visibleContentsRect.y() + visibleContentsRect.height() / 2.0);
     1502        visibleContentsRect.y() + visibleContentsRect.height() / 2.0);
    15031503}
    15041504
     
    25172517{
    25182518    if (d->m_page->defersLoading())
    2519        return;
     2519        return;
    25202520    d->assignFocus(direction);
    25212521}
     
    34903490    } else {
    34913491        if (m_backingStore->d->isOpenGLCompositing())
    3492            setCompositorDrawsRootLayer(false);
     3492            setCompositorDrawsRootLayer(false);
    34933493
    34943494        // Rendering was disabled while we were hidden, so we need to update all tiles.
     
    35533553    FloatPoint centerOfVisibleContentsRect = this->centerOfVisibleContentsRect();
    35543554    bool newVisibleRectContainsOldVisibleRect = (m_actualVisibleHeight <= transformedActualVisibleSize.height())
    3555                                           && (m_actualVisibleWidth <= transformedActualVisibleSize.width());
     3555        && (m_actualVisibleWidth <= transformedActualVisibleSize.width());
    35563556
    35573557    bool atInitialScale = m_webPage->isAtInitialZoom();
     
    42164216}
    42174217
    4218 bool WebPage::deleteTextRelativeToCursor(unsigned int leftOffset, unsigned int rightOffset)
     4218bool WebPage::deleteTextRelativeToCursor(unsigned leftOffset, unsigned rightOffset)
    42194219{
    42204220    if (d->m_page->defersLoading())
     
    48674867}
    48684868
    4869 void WebPage::addVisitedLink(const unsigned short* url, unsigned int length)
     4869void WebPage::addVisitedLink(const unsigned short* url, unsigned length)
    48704870{
    48714871    ASSERT(d->m_page);
     
    49484948{
    49494949    if ((m_webSettings->shouldHandlePatternUrls() && protocolIs(url, "pattern"))
    4950             || protocolIs(url, "tel")
    4951             || protocolIs(url, "wtai")
    4952             || protocolIs(url, "cti")
    4953             || protocolIs(url, "mailto")
    4954             || protocolIs(url, "sms")
    4955             || protocolIs(url, "pin")) {
     4950        || protocolIs(url, "tel")
     4951        || protocolIs(url, "wtai")
     4952        || protocolIs(url, "cti")
     4953        || protocolIs(url, "mailto")
     4954        || protocolIs(url, "sms")
     4955        || protocolIs(url, "pin")) {
    49564956        return url;
    49574957    }
     
    50415041{
    50425042    if (d->m_fullScreenPluginView.get())
    5043        d->m_fullScreenPluginView->handleSwipeEvent();
     5043        d->m_fullScreenPluginView->handleSwipeEvent();
    50445044    else
    5045        notifyFullScreenVideoExited(true);
     5045        notifyFullScreenVideoExited(true);
    50465046}
    50475047
     
    50495049{
    50505050    FOR_EACH_PLUGINVIEW(d->m_pluginViews)
    5051        (*it)->handleScreenPowerEvent(powered);
     5051        (*it)->handleScreenPowerEvent(powered);
    50525052}
    50535053
     
    54365436
    54375437    // Don't bail if the layers were removed and we now need a one shot drawing sync as a consequence.
    5438     if (!(m_frameLayers && m_frameLayers->hasLayer()) && !m_overlayLayer
    5439      && !m_needsOneShotDrawingSynchronization)
     5438    if (!(m_frameLayers && m_frameLayers->hasLayer()) && !m_overlayLayer && !m_needsOneShotDrawingSynchronization)
    54405439        return false;
    54415440
     
    55495548
    55505549    if (!layer) {
    5551          ASSERT(m_frameLayers);
    5552          m_frameLayers->removeLayerByFrame(frame);
    5553          if (!m_frameLayers->hasLayer())
    5554              m_frameLayers.clear();
     5550        ASSERT(m_frameLayers);
     5551        m_frameLayers->removeLayerByFrame(frame);
     5552        if (!m_frameLayers->hasLayer())
     5553            m_frameLayers.clear();
    55555554    } else {
    55565555        if (!m_frameLayers)
     
    56375636void WebPagePrivate::releaseLayerResourcesCompositingThread()
    56385637{
    5639      m_compositor->releaseLayerResources();
     5638    m_compositor->releaseLayerResources();
    56405639}
    56415640
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r149125 r149820  
    9191
    9292    virtual void notifyLoadStarted() = 0;
    93     virtual void notifyLoadCommitted(const unsigned short* originalUrl, unsigned int originalUrlLength, const unsigned short* finalUrl, unsigned int finalUrlLength, const unsigned short* networkToken, unsigned int networkTokenLength) = 0;
    94     virtual void notifyLoadFailedBeforeCommit(const unsigned short* originalUrl, unsigned int originalUrlLength, const unsigned short* finalUrl, unsigned int finalUrlLength, const unsigned short* networkToken, unsigned int networkTokenLength) = 0;
    95     virtual void notifyLoadToAnchor(const unsigned short* url, unsigned int urlLength, const unsigned short* networkToken, unsigned int networkTokenLength) = 0;
     93    virtual void notifyLoadCommitted(const unsigned short* originalUrl, unsigned originalUrlLength, const unsigned short* finalUrl, unsigned finalUrlLength, const unsigned short* networkToken, unsigned networkTokenLength) = 0;
     94    virtual void notifyLoadFailedBeforeCommit(const unsigned short* originalUrl, unsigned originalUrlLength, const unsigned short* finalUrl, unsigned finalUrlLength, const unsigned short* networkToken, unsigned networkTokenLength) = 0;
     95    virtual void notifyLoadToAnchor(const unsigned short* url, unsigned urlLength, const unsigned short* networkToken, unsigned networkTokenLength) = 0;
    9696    virtual void notifyLoadProgress(int percentage) = 0;
    9797    virtual void notifyLoadReadyToRender(bool pageIsVisuallyNonEmpty) = 0;
    9898    virtual void notifyFirstVisuallyNonEmptyLayout() = 0;
    9999    virtual void notifyLoadFinished(int status) = 0;
    100     virtual void notifyClientRedirect(const unsigned short* originalUrl, unsigned int originalUrlLength, const unsigned short* finalUrl, unsigned int finalUrlLength) = 0;
     100    virtual void notifyClientRedirect(const unsigned short* originalUrl, unsigned originalUrlLength, const unsigned short* finalUrl, unsigned finalUrlLength) = 0;
    101101
    102102    virtual void notifyFrameDetached(const WebFrame) = 0;
  • trunk/Source/WebKit/blackberry/Api/WebPage_p.h

    r149711 r149820  
    9797// and the viewport size is called the transformedActualVisibleSize.
    9898class WebPagePrivate : public PageClientBlackBerry
    99                      , public WebSettingsDelegate
     99    , public WebSettingsDelegate
    100100#if USE(ACCELERATED_COMPOSITING)
    101                      , public WebCore::GraphicsLayerClient
    102 #endif
    103                      , public Platform::GuardedPointerBase {
     101    , public WebCore::GraphicsLayerClient
     102#endif
     103    , public Platform::GuardedPointerBase {
    104104public:
    105105    enum ViewMode { Desktop, FixedDesktop };
  • trunk/Source/WebKit/blackberry/ChangeLog

    r149819 r149820  
     12013-05-09  Mike Fenton  <mifenton@rim.com>
     2
     3        [BlackBerry] Style updates required based on new check-webkit-style
     4        https://bugs.webkit.org/show_bug.cgi?id=115857
     5
     6        Reviewed by Rob Buis.
     7
     8        Update WebPage and WebPageClient to match check-webkit-style updates.
     9
     10        * Api/WebPage.cpp:
     11        (BlackBerry::WebKit::WebPagePrivate::init):
     12        (BlackBerry::WebKit::WebPage::executeJavaScriptInIsolatedWorld):
     13        (BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
     14        (BlackBerry::WebKit::WebPagePrivate::calculateReflowedScrollPosition):
     15        (BlackBerry::WebKit::WebPagePrivate::centerOfVisibleContentsRect):
     16        (BlackBerry::WebKit::WebPage::assignFocus):
     17        (BlackBerry::WebKit::WebPagePrivate::resumeBackingStore):
     18        (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
     19        (BlackBerry::WebKit::WebPage::deleteTextRelativeToCursor):
     20        (BlackBerry::WebKit::WebPage::addVisitedLink):
     21        (BlackBerry::WebKit::WebPagePrivate::findPatternStringForUrl):
     22        (BlackBerry::WebKit::WebPage::notifySwipeEvent):
     23        (BlackBerry::WebKit::WebPage::notifyScreenPowerStateChanged):
     24        (BlackBerry::WebKit::WebPagePrivate::commitRootLayerIfNeeded):
     25        (BlackBerry::WebKit::WebPagePrivate::setRootLayerWebKitThread):
     26        (BlackBerry::WebKit::WebPagePrivate::releaseLayerResourcesCompositingThread):
     27        * Api/WebPageClient.h:
     28        * Api/WebPage_p.h:
     29
    1302013-05-09  Mike Fenton  <mifenton@rim.com>
    231
Note: See TracChangeset for help on using the changeset viewer.