Skip to content
Permalink
Browse files
[chromium] Update WebSettings to support per-script font settings
https://bugs.webkit.org/show_bug.cgi?id=66220

Patch by Matt Falkenhagen <falken@chromium.org> on 2011-08-22
Reviewed by Tony Chang.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setStandardFontFamily):
(WebKit::WebSettingsImpl::setFixedFontFamily):
(WebKit::WebSettingsImpl::setSerifFontFamily):
(WebKit::WebSettingsImpl::setSansSerifFontFamily):
(WebKit::WebSettingsImpl::setCursiveFontFamily):
(WebKit::WebSettingsImpl::setFantasyFontFamily):
* src/WebSettingsImpl.h:

Canonical link: https://commits.webkit.org/82553@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mfalken authored and webkit-commit-queue committed Aug 23, 2011
1 parent 511b781 commit 3846d35b7e832ca84ba15fff855f542cceec1b86
Showing 4 changed files with 47 additions and 24 deletions.
@@ -1,3 +1,20 @@
2011-08-22 Matt Falkenhagen <falken@chromium.org>

[chromium] Update WebSettings to support per-script font settings
https://bugs.webkit.org/show_bug.cgi?id=66220

Reviewed by Tony Chang.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setStandardFontFamily):
(WebKit::WebSettingsImpl::setFixedFontFamily):
(WebKit::WebSettingsImpl::setSerifFontFamily):
(WebKit::WebSettingsImpl::setSansSerifFontFamily):
(WebKit::WebSettingsImpl::setCursiveFontFamily):
(WebKit::WebSettingsImpl::setFantasyFontFamily):
* src/WebSettingsImpl.h:

2011-08-22 Iain Merrick <husky@google.com>

[chromium] WebViewImpl should not reshape the 3D context
@@ -32,6 +32,12 @@
#define WebSettings_h

#include "WebCommon.h"
#if WEBKIT_IMPLEMENTATION
#include <wtf/unicode/Unicode.h>
#else
#include <unicode/uchar.h>
#include <unicode/uscript.h>
#endif

#define HAS_WEBAUDIO_FEATURE_ENABLE 1

@@ -51,12 +57,12 @@ class WebSettings {
EditingBehaviorUnix
};

virtual void setStandardFontFamily(const WebString&) = 0;
virtual void setFixedFontFamily(const WebString&) = 0;
virtual void setSerifFontFamily(const WebString&) = 0;
virtual void setSansSerifFontFamily(const WebString&) = 0;
virtual void setCursiveFontFamily(const WebString&) = 0;
virtual void setFantasyFontFamily(const WebString&) = 0;
virtual void setStandardFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setFixedFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setSansSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setCursiveFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setFantasyFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON) = 0;
virtual void setDefaultFontSize(int) = 0;
virtual void setDefaultFixedFontSize(int) = 0;
virtual void setMinimumFontSize(int) = 0;
@@ -54,34 +54,34 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings)
ASSERT(settings);
}

void WebSettingsImpl::setStandardFontFamily(const WebString& font)
void WebSettingsImpl::setStandardFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setStandardFontFamily(font);
m_settings->setStandardFontFamily(font, script);
}

void WebSettingsImpl::setFixedFontFamily(const WebString& font)
void WebSettingsImpl::setFixedFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setFixedFontFamily((String)font);
m_settings->setFixedFontFamily(font, script);
}

void WebSettingsImpl::setSerifFontFamily(const WebString& font)
void WebSettingsImpl::setSerifFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setSerifFontFamily((String)font);
m_settings->setSerifFontFamily(font, script);
}

void WebSettingsImpl::setSansSerifFontFamily(const WebString& font)
void WebSettingsImpl::setSansSerifFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setSansSerifFontFamily((String)font);
m_settings->setSansSerifFontFamily(font, script);
}

void WebSettingsImpl::setCursiveFontFamily(const WebString& font)
void WebSettingsImpl::setCursiveFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setCursiveFontFamily((String)font);
m_settings->setCursiveFontFamily(font, script);
}

void WebSettingsImpl::setFantasyFontFamily(const WebString& font)
void WebSettingsImpl::setFantasyFontFamily(const WebString& font, UScriptCode script)
{
m_settings->setFantasyFontFamily((String)font);
m_settings->setFantasyFontFamily(font, script);
}

void WebSettingsImpl::setDefaultFontSize(int size)
@@ -44,12 +44,12 @@ class WebSettingsImpl : public WebSettings {
explicit WebSettingsImpl(WebCore::Settings*);
virtual ~WebSettingsImpl() { }

virtual void setStandardFontFamily(const WebString&);
virtual void setFixedFontFamily(const WebString&);
virtual void setSerifFontFamily(const WebString&);
virtual void setSansSerifFontFamily(const WebString&);
virtual void setCursiveFontFamily(const WebString&);
virtual void setFantasyFontFamily(const WebString&);
virtual void setStandardFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setFixedFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setSansSerifFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setCursiveFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setFantasyFontFamily(const WebString&, UScriptCode = USCRIPT_COMMON);
virtual void setDefaultFontSize(int);
virtual void setDefaultFixedFontSize(int);
virtual void setMinimumFontSize(int);

0 comments on commit 3846d35

Please sign in to comment.