Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (133801 => 133802)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-11-07 21:24:03 UTC (rev 133801)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-11-07 21:30:05 UTC (rev 133802)
@@ -5906,9 +5906,7 @@
coreSettings->setSpatialNavigationEnabled(m_webSettings->isSpatialNavigationEnabled());
coreSettings->setAsynchronousSpellCheckingEnabled(m_webSettings->isAsynchronousSpellCheckingEnabled());
- BlackBerry::Platform::String stylesheetURL = webSettings->userStyleSheetString();
- if (stylesheetURL.empty())
- stylesheetURL = webSettings->userStyleSheetLocation();
+ BlackBerry::Platform::String stylesheetURL = webSettings->userStyleSheetLocation();
if (!stylesheetURL.empty())
coreSettings->setUserStyleSheetLocation(KURL(KURL(), stylesheetURL));
Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.cpp (133801 => 133802)
--- trunk/Source/WebKit/blackberry/Api/WebSettings.cpp 2012-11-07 21:24:03 UTC (rev 133801)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.cpp 2012-11-07 21:30:05 UTC (rev 133802)
@@ -31,8 +31,6 @@
#include <PageCache.h>
#include <ViewportArguments.h>
#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-#include <wtf/text/Base64.h>
namespace BlackBerry {
namespace WebKit {
@@ -94,7 +92,6 @@
DEFINE_STATIC_LOCAL(String, WebKitSansSeriffFontFamily, (ASCIILiteral("WebKitSansSeriffFontFamily")));
DEFINE_STATIC_LOCAL(String, WebKitSeriffFontFamily, (ASCIILiteral("WebKitSeriffFontFamily")));
DEFINE_STATIC_LOCAL(String, WebKitStandardFontFamily, (ASCIILiteral("WebKitStandardFontFamily")));
-DEFINE_STATIC_LOCAL(String, WebKitUserStyleSheet, (ASCIILiteral("WebKitUserStyleSheet")));
DEFINE_STATIC_LOCAL(String, WebKitUserStyleSheetLocation, (ASCIILiteral("WebKitUserStyleSheetLocation")));
DEFINE_STATIC_LOCAL(String, WebKitWebSocketsEnabled, (ASCIILiteral("WebKitWebSocketsEnabled")));
DEFINE_STATIC_LOCAL(String, WebKitXSSAuditorEnabled, (ASCIILiteral("WebKitXSSAuditorEnabled")));
@@ -458,32 +455,6 @@
m_private->setBoolean(BlackBerryGetFocusNodeContextEnabled, enabled);
}
-BlackBerry::Platform::String WebSettings::userStyleSheetString() const
-{
- return m_private->getString(WebKitUserStyleSheet);
-}
-
-void WebSettings::setUserStyleSheetString(const BlackBerry::Platform::String& userStyleSheetString)
-{
- // FIXME: This doesn't seem like the appropriate place to do this as WebSettings should ideally be a state store.
- // Either the caller of this function should do this conversion or caller of the getter corresponding to this function
- // should do this conversion.
-
- Vector<char> data;
- data.append(userStyleSheetString.c_str(), userStyleSheetString.length());
-
- Vector<char> encodedData;
- base64Encode(data, encodedData);
-
- const char prefix[] = "data:text/css;charset=utf-8;base64,";
- size_t prefixLength = sizeof(prefix) - 1;
- Vector<char> dataURL;
- dataURL.reserveCapacity(prefixLength + encodedData.size());
- dataURL.append(prefix, prefixLength);
- dataURL.append(encodedData);
- m_private->setString(WebKitUserStyleSheet, String(dataURL.data(), dataURL.size()));
-}
-
BlackBerry::Platform::String WebSettings::userStyleSheetLocation()
{
return m_private->getString(WebKitUserStyleSheetLocation);
Modified: trunk/Source/WebKit/blackberry/Api/WebSettings.h (133801 => 133802)
--- trunk/Source/WebKit/blackberry/Api/WebSettings.h 2012-11-07 21:24:03 UTC (rev 133801)
+++ trunk/Source/WebKit/blackberry/Api/WebSettings.h 2012-11-07 21:30:05 UTC (rev 133802)
@@ -126,9 +126,6 @@
bool doesGetFocusNodeContext() const;
void setGetFocusNodeContext(bool);
- BlackBerry::Platform::String userStyleSheetString() const;
- void setUserStyleSheetString(const BlackBerry::Platform::String&);
-
BlackBerry::Platform::String userStyleSheetLocation();
void setUserStyleSheetLocation(const BlackBerry::Platform::String&);
Modified: trunk/Source/WebKit/blackberry/ChangeLog (133801 => 133802)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-11-07 21:24:03 UTC (rev 133801)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-11-07 21:30:05 UTC (rev 133802)
@@ -1,3 +1,18 @@
+2012-11-07 Rob Buis <rb...@rim.com>
+
+ [BlackBerry] Remove setUserStyleSheetString/userStyleSheetString
+ https://bugs.webkit.org/show_bug.cgi?id=101490
+
+ Reviewed by Yong Li.
+
+ We no longer need this API.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
+ * Api/WebSettings.cpp:
+ (WebKit):
+ * Api/WebSettings.h:
+
2012-11-07 Christophe Dumez <christophe.du...@intel.com>
Add replaceWithLiteral() method to WTF::String