[Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 01:18:31 +0000 (01:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 01:18:31 +0000 (01:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89684

Source/WebKit/blackberry:

Patch by Parth Patel <parpatel@rim.com> on 2012-06-21
Reviewed by Yong Li.

Update setting instance access to use instance() instead of get().

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::globalInitialize):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init):
(BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
* WebCoreSupport/AboutData.cpp:
(WebCore::configPage):
* WebCoreSupport/CacheClientBlackBerry.cpp:
(WebCore::CacheClientBlackBerry::updateCacheCapacity):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::getPaddings):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::isInputModeEnabled):
(BlackBerry::WebKit::InputHandler::setInputModeEnabled):
(BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
* WebKitSupport/SurfacePool.cpp:
(BlackBerry::WebKit::SurfacePool::initialize):

Source/WTF:

Patch by Parth Patel <parpatel@rim.com> on 2012-06-21
Reviewed by Yong Li.

Update setting instance access to use instance() instead of get().

* wtf/ThreadingPthreads.cpp:
(WTF::createThreadInternal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120987 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WebKit/blackberry/Api/BlackBerryGlobal.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/AboutData.cpp
Source/WebKit/blackberry/WebCoreSupport/CacheClientBlackBerry.cpp
Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp
Source/WebKit/blackberry/WebKitSupport/InputHandler.cpp
Source/WebKit/blackberry/WebKitSupport/SurfacePool.cpp

index 3843972..6a40169 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-21  Parth Patel  <parpatel@rim.com>
+
+        [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
+        https://bugs.webkit.org/show_bug.cgi?id=89684
+
+        Reviewed by Yong Li.
+        
+        Update setting instance access to use instance() instead of get().
+
+        * wtf/ThreadingPthreads.cpp:
+        (WTF::createThreadInternal):
+
 2012-06-21  Kalev Lember  <kalevlember@gmail.com>
 
         [GTK] Fix NPAPI plugins on Windows
index f57f322..510173d 100644 (file)
@@ -178,7 +178,7 @@ ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, con
     if (pthread_attr_getstack(&attr, &stackAddr, &stackSize))
         LOG_ERROR("pthread_attr_getstack() failed: %d", errno);
     else {
-        stackSize = BlackBerry::Platform::Settings::get()->secondaryThreadStackSize();
+        stackSize = BlackBerry::Platform::Settings::instance()->secondaryThreadStackSize();
         if (pthread_attr_setstack(&attr, stackAddr, stackSize))
             LOG_ERROR("pthread_attr_getstack() failed: %d", errno);
     }
index 6177d1e..3a6033a 100644 (file)
@@ -75,7 +75,7 @@ void globalInitialize()
 
     CacheClientBlackBerry::get()->initialize();
 
-    BlackBerry::Platform::Settings* settings = BlackBerry::Platform::Settings::get();
+    BlackBerry::Platform::Settings* settings = BlackBerry::Platform::Settings::instance();
 
     ImageSource::setMaxPixelsPerDecodedImage(settings->maxPixelsPerDecodedImage());
 }
index c6c3d64..3efc6b0 100644 (file)
@@ -549,7 +549,7 @@ void WebPagePrivate::init(const WebString& pageGroupName)
     m_mainFrame->init();
 
 #if ENABLE(WEBGL)
-    Platform::Settings* settings = Platform::Settings::get();
+    Platform::Settings* settings = Platform::Settings::instance();
     m_page->settings()->setWebGLEnabled(settings && settings->isWebGLSupported());
 #endif
 #if ENABLE(ACCELERATED_2D_CANVAS)
@@ -1335,7 +1335,7 @@ bool WebPagePrivate::shouldSendResizeEvent()
     //            NOTE: Care must be exercised in the use of this option, as it bypasses
     //                  the sanity provided in 'isLoadingInAPISense()' below.
     //
-    static const bool unrestrictedResizeEvents = Platform::Settings::get()->unrestrictedResizeEvents();
+    static const bool unrestrictedResizeEvents = Platform::Settings::instance()->unrestrictedResizeEvents();
     if (unrestrictedResizeEvents)
         return true;
 
index f74b42f..d9d3e2f 100644 (file)
@@ -1,3 +1,30 @@
+2012-06-21  Parth Patel  <parpatel@rim.com>
+
+        [Blackberry] BlackBerry::Platform::Settings::get() rename to BlackBerry::Platform::Settings::instance() to make it consistent with our other singletons
+        https://bugs.webkit.org/show_bug.cgi?id=89684
+
+        Reviewed by Yong Li.
+   
+        Update setting instance access to use instance() instead of get().
+
+        * Api/BlackBerryGlobal.cpp:
+        (BlackBerry::WebKit::globalInitialize):
+        * Api/WebPage.cpp:
+        (BlackBerry::WebKit::WebPagePrivate::init):
+        (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
+        * WebCoreSupport/AboutData.cpp:
+        (WebCore::configPage):
+        * WebCoreSupport/CacheClientBlackBerry.cpp:
+        (WebCore::CacheClientBlackBerry::updateCacheCapacity):
+        * WebKitSupport/FatFingers.cpp:
+        (BlackBerry::WebKit::FatFingers::getPaddings):
+        * WebKitSupport/InputHandler.cpp:
+        (BlackBerry::WebKit::InputHandler::isInputModeEnabled):
+        (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
+        (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
+        * WebKitSupport/SurfacePool.cpp:
+        (BlackBerry::WebKit::SurfacePool::initialize):
+
 2012-06-21  Genevieve Mak  <gmak@rim.com>
 
         Add a parameter to handletTouchPoint to bypass FatFingers
index e217742..dc950b3 100644 (file)
@@ -99,7 +99,7 @@ String configPage()
 #endif
     + "</td></tr>";
 
-    BlackBerry::Platform::Settings* settings = BlackBerry::Platform::Settings::get();
+    BlackBerry::Platform::Settings* settings = BlackBerry::Platform::Settings::instance();
     page += String("</table><h2>Platform Settings</h2><table>");
     page += numberToHTMLTr("isRSSFilteringEnabled", settings->isRSSFilteringEnabled());
     page += numberToHTMLTr("secondaryThreadStackSize", settings->secondaryThreadStackSize());
index c203a18..1e4b451 100644 (file)
@@ -56,7 +56,7 @@ void CacheClientBlackBerry::updateCacheCapacity()
 #if ENABLE(BLACKBERRY_DEBUG_MEMORY)
     // We're debugging memory usage. So keep it disabled.
 #else
-    unsigned cacheCapacity = BlackBerry::Platform::Settings::get()->getSuggestedCacheCapacity(memoryCache()->totalSize());
+    unsigned cacheCapacity = BlackBerry::Platform::Settings::instance()->getSuggestedCacheCapacity(memoryCache()->totalSize());
     if (m_lastCapacity == cacheCapacity) {
         // Suggested capacity hasn't been changed.
         return;
index d9fa43b..381e7a1 100644 (file)
@@ -450,10 +450,10 @@ bool FatFingers::checkForText(Node* curNode, Vector<IntersectingRegion>& interse
 
 void FatFingers::getPaddings(unsigned& top, unsigned& right, unsigned& bottom, unsigned& left) const
 {
-    static unsigned topPadding = Platform::Settings::get()->topFatFingerPadding();
-    static unsigned rightPadding = Platform::Settings::get()->rightFatFingerPadding();
-    static unsigned bottomPadding = Platform::Settings::get()->bottomFatFingerPadding();
-    static unsigned leftPadding = Platform::Settings::get()->leftFatFingerPadding();
+    static unsigned topPadding = Platform::Settings::instance()->topFatFingerPadding();
+    static unsigned rightPadding = Platform::Settings::instance()->rightFatFingerPadding();
+    static unsigned bottomPadding = Platform::Settings::instance()->bottomFatFingerPadding();
+    static unsigned leftPadding = Platform::Settings::instance()->leftFatFingerPadding();
 
     double currentScale = m_webPage->currentScale();
     top = topPadding / currentScale;
index fec7657..7cd0b5f 100644 (file)
@@ -435,14 +435,14 @@ void InputHandler::setElementUnfocused(bool refocusOccuring)
 bool InputHandler::isInputModeEnabled() const
 {
     // Input mode is enabled when set, or when dump render tree or always show keyboard setting is enabled.
-    return m_inputModeEnabled || m_webPage->m_dumpRenderTree || Platform::Settings::get()->alwaysShowKeyboardOnFocus();
+    return m_inputModeEnabled || m_webPage->m_dumpRenderTree || Platform::Settings::intsance()->alwaysShowKeyboardOnFocus();
 }
 
 void InputHandler::setInputModeEnabled(bool active)
 {
     FocusLog(LogLevelInfo, "InputHandler::setInputModeEnabled '%s', override is '%s'"
              , active ? "true" : "false"
-             , m_webPage->m_dumpRenderTree || Platform::Settings::get()->alwaysShowKeyboardOnFocus() ? "true" : "false");
+             , m_webPage->m_dumpRenderTree || Platform::Settings::instance()->alwaysShowKeyboardOnFocus() ? "true" : "false");
 
     m_inputModeEnabled = active;
 
@@ -556,7 +556,7 @@ void InputHandler::ensureFocusTextElementVisible(CaretScrollType scrollType)
     if (!isActiveTextEdit() || !isInputModeEnabled() || !m_currentFocusElement->document())
         return;
 
-    if (!Platform::Settings::get()->allowCenterScrollAdjustmentForInputFields() && scrollType != EdgeIfNeeded)
+    if (!Platform::Settings::instance()->allowCenterScrollAdjustmentForInputFields() && scrollType != EdgeIfNeeded)
         return;
 
     Frame* elementFrame = m_currentFocusElement->document()->frame();
index bf2a58d..de4fe5c 100644 (file)
@@ -69,8 +69,8 @@ void SurfacePool::initialize(const BlackBerry::Platform::IntSize& tileSize)
         return;
     m_initialized = true;
 
-    const unsigned numberOfTiles = BlackBerry::Platform::Settings::get()->numberOfBackingStoreTiles();
-    const unsigned maxNumberOfTiles = BlackBerry::Platform::Settings::get()->maximumNumberOfBackingStoreTilesAcrossProcesses();
+    const unsigned numberOfTiles = BlackBerry::Platform::Settings::instance()->numberOfBackingStoreTiles();
+    const unsigned maxNumberOfTiles = BlackBerry::Platform::Settings::instance()->maximumNumberOfBackingStoreTilesAcrossProcesses();
 
     if (numberOfTiles) { // Only allocate if we actually use a backingstore.
         unsigned byteLimit = (maxNumberOfTiles /*pool*/ + 2 /*visible tile buffer, backbuffer*/) * tileSize.width() * tileSize.height() * 4;