https://bugs.webkit.org/show_bug.cgi?id=150766
Reviewed by Darin Adler.
Source/WebCore:
The spec has changed the initial value of text-orientation from "vertical-right"
to "mixed." This patch follows this movement, but also keeps the existing
property working (the parser will treat both values the same).
Test: fast/text/vertical-mixed.html
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::checkForOrientationChange):
* platform/graphics/FontCascadeFonts.cpp:
(WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
* platform/graphics/FontDescription.cpp:
(WebCore::FontDescription::FontDescription):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::fontForCombiningCharacterSequence):
* platform/text/TextFlags.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::getFontAndGlyphOrientation):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
LayoutTests:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/inherited-properties-rare-text-expected.txt:
* fast/text/vertical-mixed-expected.html: Added.
* fast/text/vertical-mixed.html: Added.
* svg/css/getComputedStyle-basic-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191935
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-11-02 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
+ https://bugs.webkit.org/show_bug.cgi?id=150766
+
+ Reviewed by Darin Adler.
+
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * fast/css/inherited-properties-rare-text-expected.txt:
+ * fast/text/vertical-mixed-expected.html: Added.
+ * fast/text/vertical-mixed.html: Added.
+ * svg/css/getComputedStyle-basic-expected.txt:
+
2015-11-02 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Support WOFF2
-webkit-text-emphasis-position: over right;
-webkit-text-emphasis-style: none;
-webkit-text-fill-color: rgb(0, 0, 0);
--webkit-text-orientation: vertical-right;
+-webkit-text-orientation: mixed;
-webkit-text-security: none;
-webkit-text-stroke-color: rgb(0, 0, 0);
-webkit-text-stroke-width: 0px;
-webkit-text-emphasis-position: over right
-webkit-text-emphasis-style: none
-webkit-text-fill-color: rgb(0, 0, 0)
--webkit-text-orientation: vertical-right
+-webkit-text-orientation: mixed
-webkit-text-security: none
-webkit-text-stroke-color: rgb(0, 0, 0)
-webkit-text-stroke-width: 0px
test1 -webkit-font-smoothing: antialiased
test2 -webkit-font-smoothing: auto
test1 -webkit-text-orientation: upright
-test2 -webkit-text-orientation: vertical-right
+test2 -webkit-text-orientation: mixed
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that text-orientation: mixed works the same as text-orientation: vertical-right.
+<div style="font-size: 100px; -webkit-writing-mode: vertical-rl; -webkit-text-orientation: vertical-right;">asdf网</div>
+</body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This test makes sure that text-orientation: mixed works the same as text-orientation: vertical-right.
+<div style="-webkit-text-orientation: upright;">
+<div style="font-size: 100px; -webkit-writing-mode: vertical-rl; -webkit-text-orientation: mixed;">asdf网</div>
+</div>
+</body>
+</html>
rect: style.getPropertyCSSValue(-webkit-text-emphasis-style) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
rect: style.getPropertyCSSValue(-webkit-text-fill-color) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-text-orientation) : vertical-right
+rect: style.getPropertyValue(-webkit-text-orientation) : mixed
rect: style.getPropertyCSSValue(-webkit-text-orientation) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-text-security) : none
rect: style.getPropertyCSSValue(-webkit-text-security) : [object CSSPrimitiveValue]
g: style.getPropertyCSSValue(-webkit-text-emphasis-style) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
g: style.getPropertyCSSValue(-webkit-text-fill-color) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-text-orientation) : vertical-right
+g: style.getPropertyValue(-webkit-text-orientation) : mixed
g: style.getPropertyCSSValue(-webkit-text-orientation) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-text-security) : none
g: style.getPropertyCSSValue(-webkit-text-security) : [object CSSPrimitiveValue]
+2015-11-02 Myles C. Maxfield <mmaxfield@apple.com>
+
+ [Vertical Writing Mode] Rename "vertical-right" CSS value to match spec
+ https://bugs.webkit.org/show_bug.cgi?id=150766
+
+ Reviewed by Darin Adler.
+
+ The spec has changed the initial value of text-orientation from "vertical-right"
+ to "mixed." This patch follows this movement, but also keeps the existing
+ property working (the parser will treat both values the same).
+
+ Test: fast/text/vertical-mixed.html
+
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator TextOrientation):
+ * css/CSSValueKeywords.in:
+ * css/StyleResolver.cpp:
+ (WebCore::checkForOrientationChange):
+ * platform/graphics/FontCascadeFonts.cpp:
+ (WebCore::glyphDataForNonCJKCharacterWithGlyphOrientation):
+ * platform/graphics/FontDescription.cpp:
+ (WebCore::FontDescription::FontDescription):
+ * platform/graphics/cocoa/FontCascadeCocoa.mm:
+ (WebCore::FontCascade::fontForCombiningCharacterSequence):
+ * platform/text/TextFlags.h:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::getFontAndGlyphOrientation):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ * style/StyleResolveForDocument.cpp:
+ (WebCore::Style::resolveForDocument):
+
2015-11-02 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Support WOFF2
return parseTextEmphasisPosition(important);
case CSSPropertyWebkitTextOrientation:
- // FIXME: For now just support sideways, sideways-right, upright and vertical-right.
- if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSValueVerticalRight || id == CSSValueUpright)
+ if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSValueVerticalRight || id == CSSValueMixed || id == CSSValueUpright)
validPrimitive = true;
break;
{
m_primitiveUnitType = CSS_VALUE_ID;
switch (e) {
- case TextOrientationSideways:
+ case TextOrientation::Sideways:
m_value.valueID = CSSValueSideways;
break;
- case TextOrientationSidewaysRight:
+ case TextOrientation::SidewaysRight:
m_value.valueID = CSSValueSidewaysRight;
break;
- case TextOrientationVerticalRight:
- m_value.valueID = CSSValueVerticalRight;
+ case TextOrientation::Mixed:
+ m_value.valueID = CSSValueMixed;
break;
- case TextOrientationUpright:
+ case TextOrientation::Upright:
m_value.valueID = CSSValueUpright;
break;
}
switch (m_value.valueID) {
case CSSValueSideways:
- return TextOrientationSideways;
+ return TextOrientation::Sideways;
case CSSValueSidewaysRight:
- return TextOrientationSidewaysRight;
+ return TextOrientation::SidewaysRight;
case CSSValueVerticalRight:
- return TextOrientationVerticalRight;
+ return TextOrientation::Mixed;
+ case CSSValueMixed:
+ return TextOrientation::Mixed;
case CSSValueUpright:
- return TextOrientationUpright;
+ return TextOrientation::Upright;
default:
break;
}
ASSERT_NOT_REACHED();
- return TextOrientationVerticalRight;
+ return TextOrientation::Mixed;
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
sideways-right
upright
vertical-right
+mixed
// -webkit-line-box-contain
font
{
FontOrientation fontOrientation;
NonCJKGlyphOrientation glyphOrientation;
- style->getFontAndGlyphOrientation(fontOrientation, glyphOrientation);
+ std::tie(fontOrientation, glyphOrientation) = style->fontAndGlyphOrientation();
const auto& fontDescription = style->fontDescription();
if (fontDescription.orientation() == fontOrientation && fontDescription.nonCJKGlyphOrientation() == glyphOrientation)
{
if (fontRenderingMode() == mode)
return;
- m_fontRenderingMode = mode;
+ m_fontRenderingMode = static_cast<int>(mode);
if (m_page)
m_page->setNeedsRecalcStyleInAllFrames();
}
static GlyphData glyphDataForNonCJKCharacterWithGlyphOrientation(UChar32 character, NonCJKGlyphOrientation orientation, const GlyphData& data)
{
- if (orientation == NonCJKGlyphOrientationUpright || shouldIgnoreRotation(character)) {
+ if (orientation == NonCJKGlyphOrientation::Upright || shouldIgnoreRotation(character)) {
GlyphData uprightData = data.font->uprightOrientationFont().glyphDataForCharacter(character);
// If the glyphs are the same, then we know we can just use the horizontal glyph rotated vertically to be upright.
if (data.glyph == uprightData.glyph)
// glyph, so we fall back to the upright data and use the horizontal glyph.
if (uprightData.font)
return uprightData;
- } else if (orientation == NonCJKGlyphOrientationVerticalRight) {
+ } else if (orientation == NonCJKGlyphOrientation::Mixed) {
GlyphData verticalRightData = data.font->verticalRightOrientationFont().glyphDataForCharacter(character);
// If the glyphs are distinct, we will make the assumption that the font has a vertical-right glyph baked
// into it.
FontDescription::FontDescription()
: m_orientation(Horizontal)
- , m_nonCJKGlyphOrientation(NonCJKGlyphOrientationVerticalRight)
+ , m_nonCJKGlyphOrientation(static_cast<unsigned>(NonCJKGlyphOrientation::Mixed))
, m_widthVariant(RegularWidth)
, m_italic(FontItalicOff)
, m_smallCaps(FontSmallCapsOff)
, m_weight(FontWeightNormal)
- , m_renderingMode(NormalRenderingMode)
+ , m_renderingMode(static_cast<unsigned>(FontRenderingMode::Normal))
, m_textRendering(AutoTextRendering)
, m_script(USCRIPT_COMMON)
, m_fontSynthesis(FontSynthesisWeight | FontSynthesisStyle)
void setSmallCaps(FontSmallCaps c) { m_smallCaps = c; }
void setIsSmallCaps(bool c) { setSmallCaps(c ? FontSmallCapsOn : FontSmallCapsOff); }
void setWeight(FontWeight w) { m_weight = w; }
- void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; }
+ void setRenderingMode(FontRenderingMode mode) { m_renderingMode = static_cast<unsigned>(mode); }
void setTextRenderingMode(TextRenderingMode rendering) { m_textRendering = rendering; }
void setOrientation(FontOrientation orientation) { m_orientation = orientation; }
- void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJKGlyphOrientation = orientation; }
+ void setNonCJKGlyphOrientation(NonCJKGlyphOrientation orientation) { m_nonCJKGlyphOrientation = static_cast<unsigned>(orientation); }
void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; } // Make sure new callers of this sync with FontPlatformData::isForTextCombine()!
void setScript(UScriptCode s) { m_script = s; }
void setFeatureSettings(FontFeatureSettings&& settings) { m_featureSettings = WTF::move(settings); }
GlyphData baseCharacterGlyphData = glyphDataForCharacter(baseCharacter, false, variant);
if (!baseCharacterGlyphData.glyph)
- return 0;
+ return nullptr;
if (length == baseCharacterLength)
return baseCharacterGlyphData.font;
if (isCJKIdeographOrSymbol(baseCharacter) && !font->hasVerticalGlyphs()) {
variant = BrokenIdeographVariant;
font = &font->brokenIdeographFont();
- } else if (m_fontDescription.nonCJKGlyphOrientation() == NonCJKGlyphOrientationVerticalRight) {
+ } else if (m_fontDescription.nonCJKGlyphOrientation() == NonCJKGlyphOrientation::Mixed) {
const Font& verticalRightFont = font->verticalRightOrientationFont();
Glyph verticalRightGlyph = verticalRightFont.glyphForCharacter(baseCharacter);
if (verticalRightGlyph == baseCharacterGlyphData.glyph)
if (equalIgnoringCase(family, lucidaStr))
isLucidaGrande = true;
- bool useGDI = fontDescription.renderingMode() == AlternateRenderingMode && !isLucidaGrande;
+ bool useGDI = fontDescription.renderingMode() == FontRenderingMode::Alternate && !isLucidaGrande;
// The logical size constant is 32. We do this for subpixel precision when rendering using Uniscribe.
// This masks rounding errors related to the HFONT metrics being different from the CGFont metrics.
memcpy(logFont.lfFaceName, m_name.charactersWithNullTermination().data(), sizeof(logFont.lfFaceName[0]) * std::min<size_t>(static_cast<size_t>(LF_FACESIZE), 1 + m_name.length()));
logFont.lfHeight = -size;
- if (renderingMode == NormalRenderingMode)
+ if (renderingMode == FontRenderingMode::Normal)
logFont.lfHeight *= 32;
logFont.lfWidth = 0;
logFont.lfEscapement = 0;
auto hfont = adoptGDIObject(::CreateFontIndirect(&logFont));
RetainPtr<CGFontRef> cgFont = adoptCF(CGFontCreateWithPlatformFont(&logFont));
- return FontPlatformData(WTF::move(hfont), cgFont.get(), size, bold, italic, renderingMode == AlternateRenderingMode);
+ return FontPlatformData(WTF::move(hfont), cgFont.get(), size, bold, italic, renderingMode == FontRenderingMode::Alternate);
}
// Creates a unique and unpredictable font name, in order to avoid collisions and to
wcsncpy(logFont.lfFaceName, m_name.charactersWithNullTermination().data(), LF_FACESIZE - 1);
logFont.lfHeight = -size;
- if (renderingMode == NormalRenderingMode)
+ if (renderingMode == FontRenderingMode::Normal)
logFont.lfHeight *= 32;
logFont.lfWidth = 0;
logFont.lfEscapement = 0;
// This setting is used to provide ways of switching between multiple rendering modes that may have different
// metrics. It is used to switch between CG and GDI text on Windows.
-enum FontRenderingMode { NormalRenderingMode, AlternateRenderingMode };
+enum class FontRenderingMode { Normal, Alternate };
enum FontOrientation { Horizontal, Vertical };
-enum NonCJKGlyphOrientation { NonCJKGlyphOrientationVerticalRight, NonCJKGlyphOrientationUpright };
+enum class NonCJKGlyphOrientation { Mixed, Upright };
// Here, "Leading" and "Trailing" are relevant after the line has been rearranged for bidi.
// ("Leading" means "left" and "Trailing" means "right.")
const FontCascade* labelFont;
const FontCascade* urlFont;
- if (fontRenderingMode == AlternateRenderingMode) {
- static const FontCascade alternateRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, AlternateRenderingMode);
- static const FontCascade alternateRenderingModeURLFont = dragLabelFont(DragLinkUrlFontSize, false, AlternateRenderingMode);
+ if (fontRenderingMode == FontRenderingMode::Alternate) {
+ static const FontCascade alternateRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, FontRenderingMode::Alternate);
+ static const FontCascade alternateRenderingModeURLFont = dragLabelFont(DragLinkUrlFontSize, false, FontRenderingMode::Alternate);
labelFont = &alternateRenderingModeLabelFont;
urlFont = &alternateRenderingModeURLFont;
} else {
- static const FontCascade normalRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, NormalRenderingMode);
- static const FontCascade normalRenderingModeURLFont = dragLabelFont(DragLinkUrlFontSize, false, NormalRenderingMode);
+ static const FontCascade normalRenderingModeLabelFont = dragLabelFont(DragLinkLabelFontsize, true, FontRenderingMode::Normal);
+ static const FontCascade normalRenderingModeURLFont = dragLabelFont(DragLinkUrlFontSize, false, FontRenderingMode::Normal);
labelFont = &normalRenderingModeLabelFont;
urlFont = &normalRenderingModeURLFont;
}
return false;
const RenderStyle& lineStyle = this->lineStyle();
- if (lineStyle.fontDescription().nonCJKGlyphOrientation() == NonCJKGlyphOrientationUpright
+ if (lineStyle.fontDescription().nonCJKGlyphOrientation() == NonCJKGlyphOrientation::Upright
|| lineStyle.fontCascade().primaryFont().hasVerticalGlyphs())
return true;
NinePieceImage::computeOutset(image.outset().left(), borderLeftWidth()));
}
-void RenderStyle::getFontAndGlyphOrientation(FontOrientation& fontOrientation, NonCJKGlyphOrientation& glyphOrientation)
+std::pair<FontOrientation, NonCJKGlyphOrientation> RenderStyle::fontAndGlyphOrientation()
{
- if (isHorizontalWritingMode()) {
- fontOrientation = Horizontal;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
- }
+ // FIXME: TextOrientationSideways should map to sideways-left in vertical-lr, which is not supported yet.
+
+ if (isHorizontalWritingMode())
+ return { Horizontal, NonCJKGlyphOrientation::Mixed };
switch (textOrientation()) {
- case TextOrientationVerticalRight:
- fontOrientation = Vertical;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
- case TextOrientationUpright:
- fontOrientation = Vertical;
- glyphOrientation = NonCJKGlyphOrientationUpright;
- return;
- case TextOrientationSideways:
- if (writingMode() == LeftToRightWritingMode) {
- // FIXME: This should map to sideways-left, which is not supported yet.
- fontOrientation = Vertical;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
- }
- fontOrientation = Horizontal;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
- case TextOrientationSidewaysRight:
- fontOrientation = Horizontal;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
+ case TextOrientation::Mixed:
+ return { Vertical, NonCJKGlyphOrientation::Mixed };
+ case TextOrientation::Upright:
+ return { Vertical, NonCJKGlyphOrientation::Upright };
+ case TextOrientation::Sideways:
+ return { Horizontal, NonCJKGlyphOrientation::Mixed };
+ case TextOrientation::SidewaysRight:
+ return { Horizontal, NonCJKGlyphOrientation::Mixed };
default:
ASSERT_NOT_REACHED();
- fontOrientation = Horizontal;
- glyphOrientation = NonCJKGlyphOrientationVerticalRight;
- return;
+ return { Horizontal, NonCJKGlyphOrientation::Mixed };
}
}
float specifiedFontSize() const;
float computedFontSize() const;
int fontSize() const;
- void getFontAndGlyphOrientation(FontOrientation&, NonCJKGlyphOrientation&);
+ std::pair<FontOrientation, NonCJKGlyphOrientation> fontAndGlyphOrientation();
#if ENABLE(TEXT_AUTOSIZING)
float textAutosizingMultiplier() const { return visual->m_textAutosizingMultiplier; }
static TextDirection initialDirection() { return LTR; }
static WritingMode initialWritingMode() { return TopToBottomWritingMode; }
static TextCombine initialTextCombine() { return TextCombineNone; }
- static TextOrientation initialTextOrientation() { return TextOrientationVerticalRight; }
+ static TextOrientation initialTextOrientation() { return TextOrientation::
+ Mixed; }
static ObjectFit initialObjectFit() { return ObjectFitFill; }
static EEmptyCell initialEmptyCells() { return SHOW; }
static EListStylePosition initialListStylePosition() { return OUTSIDE; }
inline bool RenderStyle::setTextOrientation(TextOrientation textOrientation)
{
- if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
+ if (compareEqual(rareInheritedData->m_textOrientation, static_cast<unsigned>(textOrientation)))
return false;
- rareInheritedData.access()->m_textOrientation = textOrientation;
+ rareInheritedData.access()->m_textOrientation = static_cast<unsigned>(textOrientation);
return true;
}
};
typedef unsigned TextEmphasisPosition;
-enum TextOrientation { TextOrientationVerticalRight, TextOrientationUpright, TextOrientationSideways, TextOrientationSidewaysRight };
+enum class TextOrientation { Mixed, Upright, Sideways, SidewaysRight };
enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };
, textEmphasisFill(TextEmphasisFillFilled)
, textEmphasisMark(TextEmphasisMarkNone)
, textEmphasisPosition(TextEmphasisPositionOver | TextEmphasisPositionRight)
- , m_textOrientation(TextOrientationVerticalRight)
+ , m_textOrientation(static_cast<unsigned>(TextOrientation::Mixed))
#if ENABLE(CSS3_TEXT)
, m_textIndentLine(RenderStyle::initialTextIndentLine())
, m_textIndentType(RenderStyle::initialTextIndentType())
FontOrientation fontOrientation;
NonCJKGlyphOrientation glyphOrientation;
- documentStyle.get().getFontAndGlyphOrientation(fontOrientation, glyphOrientation);
+ std::tie(fontOrientation, glyphOrientation) = documentStyle.get().fontAndGlyphOrientation();
fontDescription.setOrientation(fontOrientation);
fontDescription.setNonCJKGlyphOrientation(glyphOrientation);
FontSmoothingType smoothingType;
if (SUCCEEDED(WebPreferences::sharedStandardPreferences()->fontSmoothing(&smoothingType)))
- f.setRenderingMode(smoothingType == FontSmoothingTypeWindows ? AlternateRenderingMode : NormalRenderingMode);
+ f.setRenderingMode(smoothingType == FontSmoothingTypeWindows ? FontRenderingMode::Alternate : FontRenderingMode::Normal);
FontCascade font(f, 0, 0);
font.update(0);
hr = preferences->fontSmoothing(&smoothingType);
if (FAILED(hr))
return hr;
- settings.setFontRenderingMode(smoothingType != FontSmoothingTypeWindows ? NormalRenderingMode : AlternateRenderingMode);
+ settings.setFontRenderingMode(smoothingType != FontSmoothingTypeWindows ? FontRenderingMode::Normal : FontRenderingMode::Alternate);
#if USE(AVFOUNDATION)
hr = preferences->avFoundationEnabled(&enabled);