Changeset 140849 in webkit


Ignore:
Timestamp:
Jan 25, 2013 11:00:37 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Pop-up WebViews should not take ownership of the backing store.
https://bugs.webkit.org/show_bug.cgi?id=107957

Patch by Andrew Lo <anlo@rim.com> on 2013-01-25
Reviewed by Rob Buis.
Internally reviewed by Jakob Petsovits.

Internal PR 274581.
Add web setting for whether a WebPage should take the backing store.
Prevent pop-up WebView from taking ownership of the backing
store when it becomes visible.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPage::setVisible):

  • Api/WebSettings.cpp:

(WebKit):
(BlackBerry::WebKit::WebSettings::standardSettings):
(BlackBerry::WebKit::WebSettings::isBackingStoreEnabled):
(BlackBerry::WebKit::WebSettings::setBackingStoreEnabled):

  • Api/WebSettings.h:
  • WebCoreSupport/PagePopupBlackBerry.cpp:

(WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
(WebCore::PagePopupBlackBerry::init):

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

Legend:

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

    r140816 r140849  
    32613261#endif
    32623262
     3263    // We want to become visible but not get backing store ownership.
     3264    if (d->m_backingStore->d->isOpenGLCompositing() && !d->m_webSettings->isBackingStoreEnabled()) {
     3265        d->setCompositorDrawsRootLayer(true);
     3266#if USE(ACCELERATED_COMPOSITING)
     3267        d->setNeedsOneShotDrawingSynchronization();
     3268#endif
     3269        d->setShouldResetTilesWhenShown(true);
     3270        return;
     3271    }
     3272
    32633273    // Push this WebPage to the top of the visible pages list.
    32643274    if (!visibleWebPages()->isEmpty() && visibleWebPages()->last() != this) {
  • trunk/Source/WebKit/blackberry/Api/WebSettings.cpp

    r133802 r140849  
    6262DEFINE_STATIC_LOCAL(String, BlackBerryCredentialAutofillEnabled, (ASCIILiteral("BlackBerryCredentialAutofillEnabled")));
    6363DEFINE_STATIC_LOCAL(String, BlackBerryFormAutofillEnabled, (ASCIILiteral("BlackBerryFormAutofillEnabled")));
    64 DEFINE_STATIC_LOCAL(String, BlackBerryDevicePixelRatio, (ASCCIILiteral("BlackBerryDevicePixelRatio")));
     64DEFINE_STATIC_LOCAL(String, BlackBerryDevicePixelRatio, (ASCIILiteral("BlackBerryDevicePixelRatio")));
     65DEFINE_STATIC_LOCAL(String, BlackBerryBackingStoreEnabled, (ASCIILiteral("BlackBerryBackingStoreEnabled")));
    6566DEFINE_STATIC_LOCAL(String, SpatialNavigationEnabled, (ASCIILiteral("SpatialNavigationEnabled")));
    6667DEFINE_STATIC_LOCAL(String, WebKitDatabasePath, (ASCIILiteral("WebKitDatabasePath")));
     
    162163    settings->m_private->setUnsigned(BlackBerryBackgroundColor, WebCore::Color::white);
    163164    settings->m_private->setBoolean(BlackBerryCookiesEnabled, true);
     165    settings->m_private->setBoolean(BlackBerryBackingStoreEnabled, true);
    164166    settings->m_private->setDouble(BlackBerryInitialScale, -1);
    165167    settings->m_private->setUnsigned(BlackBerryMaxPluginInstances, 1);
     
    751753}
    752754
     755bool WebSettings::isBackingStoreEnabled() const
     756{
     757    return m_private->getBoolean(BlackBerryBackingStoreEnabled);
     758}
     759
     760void WebSettings::setBackingStoreEnabled(bool enable)
     761{
     762    m_private->setBoolean(BlackBerryBackingStoreEnabled, enable);
     763}
     764
    753765unsigned WebSettings::maxPluginInstances() const
    754766{
  • trunk/Source/WebKit/blackberry/Api/WebSettings.h

    r137908 r140849  
    242242    void setDevicePixelRatio(double);
    243243
     244    bool isBackingStoreEnabled() const;
     245    void setBackingStoreEnabled(bool);
     246
    244247private:
    245248    WebSettingsPrivate* m_private;
  • trunk/Source/WebKit/blackberry/ChangeLog

    r140816 r140849  
     12013-01-25  Andrew Lo  <anlo@rim.com>
     2
     3        [BlackBerry] Pop-up WebViews should not take ownership of the backing store.
     4        https://bugs.webkit.org/show_bug.cgi?id=107957
     5
     6        Reviewed by Rob Buis.
     7        Internally reviewed by Jakob Petsovits.
     8
     9        Internal PR 274581.
     10        Add web setting for whether a WebPage should take the backing store.
     11        Prevent pop-up WebView from taking ownership of the backing
     12        store when it becomes visible.
     13
     14        * Api/WebPage.cpp:
     15        (BlackBerry::WebKit::WebPage::setVisible):
     16        * Api/WebSettings.cpp:
     17        (WebKit):
     18        (BlackBerry::WebKit::WebSettings::standardSettings):
     19        (BlackBerry::WebKit::WebSettings::isBackingStoreEnabled):
     20        (BlackBerry::WebKit::WebSettings::setBackingStoreEnabled):
     21        * Api/WebSettings.h:
     22        * WebCoreSupport/PagePopupBlackBerry.cpp:
     23        (WebCore::PagePopupBlackBerry::PagePopupBlackBerry):
     24        (WebCore::PagePopupBlackBerry::init):
     25
    1262013-01-25  Arvid Nilsson  <anilsson@rim.com>
    227
  • trunk/Source/WebKit/blackberry/WebCoreSupport/PagePopupBlackBerry.cpp

    r138490 r140849  
    4040#include <JavaScriptCore/JSValueRef.h>
    4141
    42 // Fixme: should get the height from runtime.
    43 #define URL_BAR_HEIGHT 70
    4442#define PADDING 80
    4543
     
    5351    , m_sharedClientPointer(adoptRef(new PagePopupBlackBerry::SharedClientPointer(client)))
    5452{
    55     m_rect = IntRect(rect.x(), rect.y() - URL_BAR_HEIGHT, client->contentSize().width(), client->contentSize().height());
     53    m_rect = IntRect(rect.x(), rect.y(), client->contentSize().width(), client->contentSize().height());
    5654}
    5755
     
    6866bool PagePopupBlackBerry::init(WebPage* webpage)
    6967{
     68    // Don't use backing store for the pop-up web page.
     69    webpage->settings()->setBackingStoreEnabled(false);
     70
    7071    webpage->d->setLoadState(WebPagePrivate::Committed);
    7172
     
    7475
    7576    webpage->d->setLoadState(WebPagePrivate::Finished);
     77    webpage->client()->notifyLoadFinished(0);
     78
    7679    return true;
    7780}
Note: See TracChangeset for help on using the changeset viewer.