Diff
Modified: trunk/LayoutTests/ChangeLog (91776 => 91777)
--- trunk/LayoutTests/ChangeLog 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/LayoutTests/ChangeLog 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1,3 +1,14 @@
+2011-07-26 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family
+ https://bugs.webkit.org/show_bug.cgi?id=65197
+
+ Reviewed by Anders Carlsson.
+
+ * fast/css/font-family-pictograph.html: Added.
+ * platform/mac/fast/css/font-family-pictograph-expected.png: Added.
+ * platform/mac/fast/css/font-family-pictograph-expected.txt: Added.
+
2011-07-26 Adrienne Walker <[email protected]>
[chromium] getClientRects now fails similarly on Mac after r91763.
Added: trunk/LayoutTests/fast/css/font-family-pictograph.html (0 => 91777)
--- trunk/LayoutTests/fast/css/font-family-pictograph.html (rev 0)
+++ trunk/LayoutTests/fast/css/font-family-pictograph.html 2011-07-26 20:23:50 UTC (rev 91777)
@@ -0,0 +1,3 @@
+<div style="font-size: 72px; font-family: -webkit-pictograph;">
+ ♥
+</div>
Added: trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt (0 => 91777)
--- trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt 2011-07-26 20:23:50 UTC (rev 91777)
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x95
+ RenderText {#text} at (0,0) size 72x95
+ text run at (0,0) width 72: "\x{2665}"
Modified: trunk/Source/WebCore/ChangeLog (91776 => 91777)
--- trunk/Source/WebCore/ChangeLog 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/ChangeLog 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1,3 +1,31 @@
+2011-07-26 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family
+ https://bugs.webkit.org/show_bug.cgi?id=65197
+
+ Reviewed by Anders Carlsson.
+
+ Test: fast/css/font-family-pictograph.html
+
+ * WebCore.exp.in: Export Settings::setPictographFontFamily().
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::identifierForFamily): Added -webkit-pictograph.
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
+ (WebCore::fontDataForGenericFamily): Ditto.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty): Ditto.
+ * css/CSSValueKeywords.in:
+ * inspector/front-end/CSSKeywordCompletions.js: Ditto.
+ * inspector/front-end/SourceCSSTokenizer.js: Ditto.
+ (WebInspector.SourceCSSTokenizer):
+ * inspector/front-end/SourceCSSTokenizer.re2js: Ditto.
+ * page/Settings.cpp:
+ (WebCore::Settings::pictographFontFamily): Added this getter.
+ (WebCore::Settings::setPictographFontFamily): Added this setter.
+ * page/Settings.h:
+ * platform/graphics/FontDescription.h: Added PictographFamily to the GenericFamilyType enum.
+
2011-07-26 Viet-Trung Luu <[email protected]>
Improve (i.e., speed up) .gyp(i) files for Chromium
Modified: trunk/Source/WebCore/WebCore.exp.in (91776 => 91777)
--- trunk/Source/WebCore/WebCore.exp.in 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-07-26 20:23:50 UTC (rev 91777)
@@ -884,6 +884,7 @@
__ZN7WebCore8Settings23setEditableLinkBehaviorENS_20EditableLinkBehaviorE
__ZN7WebCore8Settings23setLoadDeferringEnabledEb
__ZN7WebCore8Settings23setNeedsTigerMailQuirksEb
+__ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE11UScriptCode
__ZN7WebCore8Settings23setPluginAllowedRunTimeEj
__ZN7WebCore8Settings23setUsesEncodingDetectorEb
__ZN7WebCore8Settings24setApplicationChromeModeEb
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (91776 => 91777)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -681,17 +681,20 @@
static int identifierForFamily(const AtomicString& family)
{
- DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive"));
- DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy"));
- DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace"));
- DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif"));
- DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif"));
+ DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive"));
+ DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy"));
+ DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace"));
+ DEFINE_STATIC_LOCAL(AtomicString, pictographFamily, ("-webkit-pictograph"));
+ DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif"));
+ DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif"));
if (family == cursiveFamily)
return CSSValueCursive;
if (family == fantasyFamily)
return CSSValueFantasy;
if (family == monospaceFamily)
return CSSValueMonospace;
+ if (family == pictographFamily)
+ return CSSValueWebkitPictograph;
if (family == sansSerifFamily)
return CSSValueSansSerif;
if (family == serifFamily)
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (91776 => 91777)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -310,6 +310,9 @@
case CSSValueMonospace:
familyName = "-webkit-monospace";
break;
+ case CSSValueWebkitPictograph:
+ familyName = "-webkit-pictograph";
+ break;
default:
break;
}
@@ -399,6 +402,8 @@
genericFamily = settings->fantasyFontFamily();
else if (familyName == "-webkit-monospace")
genericFamily = settings->fixedFontFamily();
+ else if (familyName == "-webkit-pictograph")
+ genericFamily = settings->pictographFontFamily();
else if (familyName == "-webkit-standard")
genericFamily = settings->standardFontFamily();
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (91776 => 91777)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -4213,6 +4213,10 @@
face = "-webkit-monospace";
fontDescription.setGenericFamily(FontDescription::MonospaceFamily);
break;
+ case CSSValueWebkitPictograph:
+ face = "-webkit-pictograph";
+ fontDescription.setGenericFamily(FontDescription::PictographFamily);
+ break;
}
}
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (91776 => 91777)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2011-07-26 20:23:50 UTC (rev 91777)
@@ -104,6 +104,7 @@
fantasy
monospace
-webkit-body
+-webkit-pictograph
//
//
// CSS_PROP_*_COLOR
Modified: trunk/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js (91776 => 91777)
--- trunk/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js 2011-07-26 20:23:50 UTC (rev 91777)
@@ -289,7 +289,7 @@
"-webkit-control", "status-bar", "italic", "oblique", "small-caps", "normal", "bold", "bolder", "lighter",
"100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium",
"large", "x-large", "xx-large", "-webkit-xxx-large", "smaller", "larger", "serif", "sans-serif", "cursive",
- "fantasy", "monospace", "-webkit-body"
+ "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
],
"dominant-baseline": [
"middle", "auto", "central", "text-before-edge", "text-after-edge", "ideographic", "alphabetic", "hanging",
@@ -353,7 +353,7 @@
"absolute", "fixed", "relative", "static"
],
"font-family": [
- "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body"
+ "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
],
"text-overflow-mode": [
"clip", "ellipsis"
Modified: trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js (91776 => 91777)
--- trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js 2011-07-26 20:23:50 UTC (rev 91777)
@@ -93,8 +93,8 @@
"visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
"x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
"-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
- "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right",
- "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+ "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",
+ "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
].keySet();
this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();
Modified: trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js (91776 => 91777)
--- trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js 2011-07-26 20:23:50 UTC (rev 91777)
@@ -92,8 +92,8 @@
"visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
"x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
"-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
- "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right",
- "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+ "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",
+ "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
].keySet();
this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();
Modified: trunk/Source/WebCore/page/Settings.cpp (91776 => 91777)
--- trunk/Source/WebCore/page/Settings.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/page/Settings.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -275,6 +275,16 @@
setGenericFontFamilyMap(m_fantasyFontFamilyMap, family, script, m_page);
}
+const AtomicString& Settings::pictographFontFamily(UScriptCode script) const
+{
+ return getGenericFontFamilyForScript(m_pictographFontFamilyMap, script);
+}
+
+void Settings::setPictographFontFamily(const AtomicString& family, UScriptCode script)
+{
+ setGenericFontFamilyMap(m_pictographFontFamilyMap, family, script, m_page);
+}
+
void Settings::setMinimumFontSize(int minimumFontSize)
{
if (m_minimumFontSize == minimumFontSize)
Modified: trunk/Source/WebCore/page/Settings.h (91776 => 91777)
--- trunk/Source/WebCore/page/Settings.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/page/Settings.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -88,6 +88,9 @@
void setFantasyFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON);
const AtomicString& fantasyFontFamily(UScriptCode = USCRIPT_COMMON) const;
+ void setPictographFontFamily(const AtomicString&, UScriptCode = USCRIPT_COMMON);
+ const AtomicString& pictographFontFamily(UScriptCode = USCRIPT_COMMON) const;
+
void setMinimumFontSize(int);
int minimumFontSize() const { return m_minimumFontSize; }
@@ -462,6 +465,7 @@
ScriptFontFamilyMap m_sansSerifFontFamilyMap;
ScriptFontFamilyMap m_cursiveFontFamilyMap;
ScriptFontFamilyMap m_fantasyFontFamilyMap;
+ ScriptFontFamilyMap m_pictographFontFamilyMap;
EditableLinkBehavior m_editableLinkBehavior;
TextDirectionSubmenuInclusionBehavior m_textDirectionSubmenuInclusionBehavior;
int m_minimumFontSize;
Modified: trunk/Source/WebCore/platform/graphics/FontDescription.h (91776 => 91777)
--- trunk/Source/WebCore/platform/graphics/FontDescription.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebCore/platform/graphics/FontDescription.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -64,7 +64,7 @@
class FontDescription {
public:
enum GenericFamilyType { NoFamily, StandardFamily, SerifFamily, SansSerifFamily,
- MonospaceFamily, CursiveFamily, FantasyFamily };
+ MonospaceFamily, CursiveFamily, FantasyFamily, PictographFamily };
FontDescription()
: m_specifiedSize(0)
Modified: trunk/Source/WebKit/mac/ChangeLog (91776 => 91777)
--- trunk/Source/WebKit/mac/ChangeLog 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1,3 +1,20 @@
+2011-07-26 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9842889> Add a generic pictograph font family
+ https://bugs.webkit.org/show_bug.cgi?id=65197
+
+ Reviewed by Anders Carlsson.
+
+ * WebView/WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey.
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]): Set the default pictograph font family to
+ "Apple Color Emoji".
+ (-[WebPreferences pictographFontFamily]): Added this getter.
+ (-[WebPreferences setPictographFontFamily:]): Added this setter.
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]): Pass the preference through to WebCore.
+
2011-07-25 Ian Henderson <[email protected]>
WebFrame should have a method to determine its visual emptiness
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (91776 => 91777)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -36,6 +36,7 @@
#define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
#define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
#define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
+#define WebKitPictographFontPreferenceKey @"WebKitPictographFont"
#define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
#define WebKitMinimumLogicalFontSizePreferenceKey @"WebKitMinimumLogicalFontSize"
#define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (91776 => 91777)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2011-07-26 20:23:50 UTC (rev 91777)
@@ -306,6 +306,7 @@
@"Helvetica", WebKitSansSerifFontPreferenceKey,
@"Apple Chancery", WebKitCursiveFontPreferenceKey,
@"Papyrus", WebKitFantasyFontPreferenceKey,
+ @"Apple Color Emoji", WebKitPictographFontPreferenceKey,
@"0", WebKitMinimumFontSizePreferenceKey,
@"9", WebKitMinimumLogicalFontSizePreferenceKey,
@"16", WebKitDefaultFontSizePreferenceKey,
@@ -1506,6 +1507,17 @@
{
[self _setBoolValue:flag forKey:WebKitMediaPlaybackAllowsInlinePreferenceKey];
}
+
+- (NSString *)pictographFontFamily
+{
+ return [self _stringValueForKey: WebKitPictographFontPreferenceKey];
+}
+
+- (void)setPictographFontFamily:(NSString *)family
+{
+ [self _setStringValue: family forKey: WebKitPictographFontPreferenceKey];
+}
+
@end
@implementation WebPreferences (WebInternal)
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (91776 => 91777)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -216,6 +216,9 @@
- (void)setMediaPlaybackAllowsInline:(BOOL)flag;
- (BOOL)mediaPlaybackAllowsInline;
+- (NSString *)pictographFontFamily;
+- (void)setPictographFontFamily:(NSString *)family;
+
// Other private methods
- (void)_postPreferencesChangedNotification;
- (void)_postPreferencesChangedAPINotification;
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (91776 => 91777)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1509,6 +1509,7 @@
settings->setJavaScriptCanOpenWindowsAutomatically([preferences _javascript_CanOpenWindowsAutomatically]);
settings->setMinimumFontSize([preferences minimumFontSize]);
settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
+ settings->setPictographFontFamily([preferences pictographFontFamily]);
settings->setPluginsEnabled([preferences arePlugInsEnabled]);
#if ENABLE(DATABASE)
AbstractDatabase::setIsAvailable([preferences databasesEnabled]);
Modified: trunk/Source/WebKit/win/ChangeLog (91776 => 91777)
--- trunk/Source/WebKit/win/ChangeLog 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/ChangeLog 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1,3 +1,23 @@
+2011-07-26 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9842889> Add a generic pictograph font family
+ https://bugs.webkit.org/show_bug.cgi?id=65197
+
+ Reviewed by Anders Carlsson.
+
+ * Interfaces/IWebPreferences.idl: Added pictographFontFamily() and
+ setPictographFontFamily().
+ * WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey.
+ * WebPreferences.cpp:
+ (WebPreferences::initializeDefaultSettings): Initialize the pictograph font
+ preference to "Times New Roman".
+ (WebPreferences::pictographFontFamily): Added this getter.
+ (WebPreferences::setPictographFontFamily): Added this setter.
+ * WebPreferences.h:
+ * WebView.cpp:
+ (WebView::notifyPreferencesChanged): Pass the preference value through to
+ WebCore.
+
2011-07-18 Dean Jackson <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=64742
Modified: trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl (91776 => 91777)
--- trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/Interfaces/IWebPreferences.idl 2011-07-26 20:23:50 UTC (rev 91777)
@@ -98,6 +98,9 @@
HRESULT fantasyFontFamily([out, retval] BSTR* family);
HRESULT setFantasyFontFamily([in] BSTR family);
+ HRESULT pictographFontFamily([out, retval] BSTR* family);
+ HRESULT setPictographFontFamily([in] BSTR family);
+
HRESULT defaultFontSize([out, retval] int* fontSize);
HRESULT setDefaultFontSize([in] int fontSize);
Modified: trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h (91776 => 91777)
--- trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/WebPreferenceKeysPrivate.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -36,6 +36,7 @@
#define WebKitSansSerifFontPreferenceKey "WebKitSansSerifFont"
#define WebKitCursiveFontPreferenceKey "WebKitCursiveFont"
#define WebKitFantasyFontPreferenceKey "WebKitFantasyFont"
+#define WebKitPictographFontPreferenceKey "WebKitPictographFont"
#define WebKitMinimumFontSizePreferenceKey "WebKitMinimumFontSize"
#define WebKitMinimumLogicalFontSizePreferenceKey "WebKitMinimumLogicalFontSize"
#define WebKitDefaultFontSizePreferenceKey "WebKitDefaultFontSize"
Modified: trunk/Source/WebKit/win/WebPreferences.cpp (91776 => 91777)
--- trunk/Source/WebKit/win/WebPreferences.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/WebPreferences.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -189,6 +189,7 @@
CFDictionaryAddValue(defaults, CFSTR(WebKitSansSerifFontPreferenceKey), CFSTR("Arial"));
CFDictionaryAddValue(defaults, CFSTR(WebKitCursiveFontPreferenceKey), CFSTR("Comic Sans MS"));
CFDictionaryAddValue(defaults, CFSTR(WebKitFantasyFontPreferenceKey), CFSTR("Comic Sans MS"));
+ CFDictionaryAddValue(defaults, CFSTR(WebKitPictographFontPreferenceKey), CFSTR("Times New Roman"));
CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR("0"));
CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumLogicalFontSizePreferenceKey), CFSTR("9"));
CFDictionaryAddValue(defaults, CFSTR(WebKitDefaultFontSizePreferenceKey), CFSTR("16"));
@@ -652,6 +653,20 @@
return S_OK;
}
+HRESULT STDMETHODCALLTYPE WebPreferences::pictographFontFamily(
+ /* [retval][out] */ BSTR* family)
+{
+ *family = stringValueForKey(CFSTR(WebKitPictographFontPreferenceKey));
+ return (*family) ? S_OK : E_FAIL;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setPictographFontFamily(
+ /* [in] */ BSTR family)
+{
+ setStringValue(CFSTR(WebKitPictographFontPreferenceKey), family);
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE WebPreferences::defaultFontSize(
/* [retval][out] */ int* fontSize)
{
Modified: trunk/Source/WebKit/win/WebPreferences.h (91776 => 91777)
--- trunk/Source/WebKit/win/WebPreferences.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/WebPreferences.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -91,6 +91,12 @@
virtual HRESULT STDMETHODCALLTYPE setFantasyFontFamily(
/* [in] */ BSTR family);
+ virtual HRESULT STDMETHODCALLTYPE pictographFontFamily(
+ /* [retval][out] */ BSTR* family);
+
+ virtual HRESULT STDMETHODCALLTYPE setPictographFontFamily(
+ /* [in] */ BSTR family);
+
virtual HRESULT STDMETHODCALLTYPE defaultFontSize(
/* [retval][out] */ int* fontSize);
Modified: trunk/Source/WebKit/win/WebView.cpp (91776 => 91777)
--- trunk/Source/WebKit/win/WebView.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit/win/WebView.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -4577,6 +4577,12 @@
settings->setFixedFontFamily(AtomicString(str, SysStringLen(str)));
SysFreeString(str);
+ hr = preferences->pictographFontFamily(&str);
+ if (FAILED(hr))
+ return hr;
+ settings->setPictographFontFamily(AtomicString(str, SysStringLen(str)));
+ SysFreeString(str);
+
hr = preferences->isJavaEnabled(&enabled);
if (FAILED(hr))
return hr;
Modified: trunk/Source/WebKit2/ChangeLog (91776 => 91777)
--- trunk/Source/WebKit2/ChangeLog 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-26 20:23:50 UTC (rev 91777)
@@ -1,3 +1,16 @@
+2011-07-26 Dan Bernstein <[email protected]>
+
+ <rdar://problem/9842889> Add a generic pictograph font family
+ https://bugs.webkit.org/show_bug.cgi?id=65197
+
+ Reviewed by Anders Carlsson.
+
+ * Shared/WebPreferencesStore.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetPictographFontFamily): Added.
+ (WKPreferencesCopyPictographFontFamily): Added.
+ * UIProcess/API/C/WKPreferences.h:
+
2011-07-26 Andras Becsi <[email protected]>
[Qt] [WK2] Disable the build with Qt versions older than 5.0
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (91776 => 91777)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -109,6 +109,7 @@
macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New") \
macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Arial") \
macro(SerifFontFamily, serifFontFamily, String, String, "Times New Roman") \
+ macro(PictographFontFamily, pictographFontFamily, String, String, "Times New Roman") \
\
#elif PLATFORM(MAC)
@@ -120,6 +121,7 @@
macro(FixedFontFamily, fixedFontFamily, String, String, "Courier") \
macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \
macro(SerifFontFamily, serifFontFamily, String, String, "Times") \
+ macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji") \
\
#elif PLATFORM(QT) || PLATFORM(GTK)
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (91776 => 91777)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-07-26 20:23:50 UTC (rev 91777)
@@ -232,6 +232,16 @@
return toCopiedAPI(toImpl(preferencesRef)->fantasyFontFamily());
}
+void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
+{
+ toImpl(preferencesRef)->setPictographFontFamily(toWTFString(family));
+}
+
+WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef)
+{
+ return toCopiedAPI(toImpl(preferencesRef)->pictographFontFamily());
+}
+
void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size)
{
toImpl(preferencesRef)->setDefaultFontSize(size);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h (91776 => 91777)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h 2011-07-26 19:54:40 UTC (rev 91776)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.h 2011-07-26 20:23:50 UTC (rev 91777)
@@ -107,6 +107,9 @@
WK_EXPORT void WKPreferencesSetFantasyFontFamily(WKPreferencesRef preferencesRef, WKStringRef family);
WK_EXPORT WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef);
+WK_EXPORT void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family);
+WK_EXPORT WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef);
+
// Defaults to 16.
WK_EXPORT void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t);
WK_EXPORT uint32_t WKPreferencesGetDefaultFontSize(WKPreferencesRef preferencesRef);