Commit e6020fbc authored by efidler@rim.com's avatar efidler@rim.com

[BlackBerry] Default font settings are getting deleted

https://bugs.webkit.org/show_bug.cgi?id=88670

Reviewed by Rob Buis.

Source/WebKit/blackberry:

RIM PR: 163720

WebSettings is overriding the default font settings with "", which deletes them.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):

LayoutTests:

This test crashes if -webkit-body (i.e.  WebCore::Settings::standardFontFamily())
is not a valid font family.

* fonts/valid-standard-font.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 218a16a3
2012-06-08 Eli Fidler <efidler@rim.com>
[BlackBerry] Default font settings are getting deleted
https://bugs.webkit.org/show_bug.cgi?id=88670
Reviewed by Rob Buis.
This test crashes if -webkit-body (i.e. WebCore::Settings::standardFontFamily())
is not a valid font family.
* fonts/valid-standard-font.html: Added.
2012-06-08 Ojan Vafai <ojan@chromium.org> 2012-06-08 Ojan Vafai <ojan@chromium.org>
Final set of chromium rebaselines for skia change. See crbug.com/131829. Final set of chromium rebaselines for skia change. See crbug.com/131829.
......
<html>
<body style="font-family:-webkit-body">
<!-- WebKit assumes that -webkit-body is a valid font. The font-family:inherit will crash on load if it isn't -->
<input style="font-family:inherit"/>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
window.setTimeout(runTest, 0);
function runTest() {
document.getElementById("result").innerText = "PASS";
if (window.layoutTestController) {
layoutTestController.notifyDone();
}
}
</script>
<div id="result">FAIL</div>
</body>
</html>
...@@ -6206,10 +6206,14 @@ void WebPagePrivate::didChangeSettings(WebSettings* webSettings) ...@@ -6206,10 +6206,14 @@ void WebPagePrivate::didChangeSettings(WebSettings* webSettings)
coreSettings->setDefaultFixedFontSize(webSettings->defaultFixedFontSize()); coreSettings->setDefaultFixedFontSize(webSettings->defaultFixedFontSize());
coreSettings->setDefaultFontSize(webSettings->defaultFontSize()); coreSettings->setDefaultFontSize(webSettings->defaultFontSize());
coreSettings->setMinimumLogicalFontSize(webSettings->minimumFontSize()); coreSettings->setMinimumLogicalFontSize(webSettings->minimumFontSize());
coreSettings->setSerifFontFamily(webSettings->serifFontFamily().impl()); if (!webSettings->serifFontFamily().isEmpty())
coreSettings->setFixedFontFamily(webSettings->fixedFontFamily().impl()); coreSettings->setSerifFontFamily(webSettings->serifFontFamily().impl());
coreSettings->setSansSerifFontFamily(webSettings->sansSerifFontFamily().impl()); if (!webSettings->fixedFontFamily().isEmpty())
coreSettings->setStandardFontFamily(webSettings->standardFontFamily().impl()); coreSettings->setFixedFontFamily(webSettings->fixedFontFamily().impl());
if (!webSettings->sansSerifFontFamily().isEmpty())
coreSettings->setSansSerifFontFamily(webSettings->sansSerifFontFamily().impl());
if (!webSettings->standardFontFamily().isEmpty())
coreSettings->setStandardFontFamily(webSettings->standardFontFamily().impl());
coreSettings->setJavaScriptCanOpenWindowsAutomatically(webSettings->canJavaScriptOpenWindowsAutomatically()); coreSettings->setJavaScriptCanOpenWindowsAutomatically(webSettings->canJavaScriptOpenWindowsAutomatically());
coreSettings->setAllowScriptsToCloseWindows(webSettings->canJavaScriptOpenWindowsAutomatically()); // Why are we using the same value as setJavaScriptCanOpenWindowsAutomatically()? coreSettings->setAllowScriptsToCloseWindows(webSettings->canJavaScriptOpenWindowsAutomatically()); // Why are we using the same value as setJavaScriptCanOpenWindowsAutomatically()?
coreSettings->setPluginsEnabled(webSettings->arePluginsEnabled()); coreSettings->setPluginsEnabled(webSettings->arePluginsEnabled());
......
2012-06-08 Eli Fidler <efidler@rim.com>
[BlackBerry] Default font settings are getting deleted
https://bugs.webkit.org/show_bug.cgi?id=88670
Reviewed by Rob Buis.
RIM PR: 163720
WebSettings is overriding the default font settings with "", which deletes them.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
2012-06-07 Crystal Zhang <haizhang@rim.com> 2012-06-07 Crystal Zhang <haizhang@rim.com>
[BlackBerry] Should Use the WebPage Already Created by Client, No Need to Create New One. [BlackBerry] Should Use the WebPage Already Created by Client, No Need to Create New One.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment