WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch V4
bug-63618-20110802145344.patch (text/plain), 40.57 KB, created by
Kenichi Ishibashi
on 2011-08-01 22:53:46 PDT
(
hide
)
Description:
Patch V4
Filename:
MIME Type:
Creator:
Kenichi Ishibashi
Created:
2011-08-01 22:53:46 PDT
Size:
40.57 KB
patch
obsolete
>Subversion Revision: 92151 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d877c48739247998b010b43e292e7f44453aebad..9141b535b99d5e0d474f60b84d804651e1946e7d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2011-08-01 Kenichi Ishibashi <bashi@chromium.org> >+ >+ Parsing CSS3 font-feature-settings property >+ https://bugs.webkit.org/show_bug.cgi?id=63618 >+ >+ Add parsing test case for -webkit-font-feature-settings property. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * css3/font-feature-settings-parsing-expected.txt: Added. >+ * css3/font-feature-settings-parsing.html: Added. >+ > 2011-08-01 Chris Rogers <crogers@google.com> > > One more test_expectations.txt fix for windows web audio >diff --git a/LayoutTests/css3/font-feature-settings-parsing-expected.txt b/LayoutTests/css3/font-feature-settings-parsing-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..d343a7398671381c4a933cb3364472973d28dcd3 >--- /dev/null >+++ b/LayoutTests/css3/font-feature-settings-parsing-expected.txt >@@ -0,0 +1,32 @@ >+Test parsing of the CSS3 font-feature-settings property. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+- Tests valid inputs >+PASS parseResultOf("normal") is "normal" >+PASS parseResultOf("'aaaa'") is "'aaaa'" >+PASS parseResultOf("'aaaa' 1") is "'aaaa' 1" >+PASS parseResultOf("\"aaaa\" 0") is "'aaaa' 0" >+PASS parseResultOf("'aaaa' on") is "'aaaa' on" >+PASS parseResultOf("\"aaaa\" off") is "'aaaa' off" >+PASS parseResultOf("aaaa, 'bbbb', cccc") is "'aaaa', 'bbbb', 'cccc'" >+PASS parseResultOf("'aaaa' on, bbbb 1, cccc off") is "'aaaa' on, 'bbbb' 1, 'cccc' off" >+PASS parseResultOf("aaaa, bbbb 0, \"cccc\"") is "'aaaa', 'bbbb' 0, 'cccc'" >+- Tests invalid inputs. Results should be empty strings. >+PASS parseResultOf("1") is "" >+PASS parseResultOf("off") is "" >+PASS parseResultOf("aaaaa") is "" >+PASS parseResultOf("\"aaaaa\"") is "" >+PASS parseResultOf("aaaa -1") is "" >+PASS parseResultOf("aaaa \"bbbb\"") is "" >+PASS parseResultOf("aaaa bbbb") is "" >+PASS parseResultOf("aaaa, on") is "" >+PASS parseResultOf("\"aaaa\" 1, \"bbbb\", 0") is "" >+PASS parseResultOf(",") is "" >+PASS parseResultOf("aaaa,") is "" >+PASS parseResultOf(", aaaa") is "" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/css3/font-feature-settings-parsing.html b/LayoutTests/css3/font-feature-settings-parsing.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9e92679e523d57171a1776ca6600d2c846c53912 >--- /dev/null >+++ b/LayoutTests/css3/font-feature-settings-parsing.html >@@ -0,0 +1,59 @@ >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> >+<html> >+<head> >+<link rel="stylesheet" href="../fast/js/resources/js-test-style.css"> >+<script src="../fast/js/resources/js-test-pre.js"></script> >+</head> >+<body> >+<p id="description"></p> >+<div id="console"></div> >+<script> >+description('Test parsing of the CSS3 font-feature-settings property.'); >+ >+function parseResultOf(value) { >+ var element = document.createElement('div'); >+ element.style['-webkit-font-feature-settings'] = value; >+ return element.style['-webkit-font-feature-settings']; >+} >+ >+var validInputsAndExpectedResults = [ >+ // Input, Expected >+ ['normal', "normal"], >+ ["'aaaa'", "'aaaa'"], >+ ["'aaaa' 1", "'aaaa' 1"], >+ ['\\"aaaa\\" 0', "'aaaa' 0"], >+ ["'aaaa' on", "'aaaa' on"], >+ ['\\"aaaa\\" off', "'aaaa' off"], >+ ["aaaa, 'bbbb', cccc", "'aaaa', 'bbbb', 'cccc'"], >+ ["'aaaa' on, bbbb 1, cccc off", "'aaaa' on, 'bbbb' 1, 'cccc' off"], >+ ['aaaa, bbbb 0, \\"cccc\\"', "'aaaa', 'bbbb' 0, 'cccc'"], >+]; >+ >+debug('- Tests valid inputs'); >+for (var i = 0; i < validInputsAndExpectedResults.length; ++i) >+ shouldBeEqualToString('parseResultOf("' + validInputsAndExpectedResults[i][0] + '")', validInputsAndExpectedResults[i][1]); >+ >+var invalidInputs = [ >+ '1', >+ 'off', >+ 'aaaaa', >+ '\\"aaaaa\\"', >+ 'aaaa -1', >+ 'aaaa \\"bbbb\\"', >+ 'aaaa bbbb', >+ 'aaaa, on', >+ '\\"aaaa\\" 1, \\"bbbb\\", 0', >+ ',', >+ 'aaaa,', >+ ', aaaa', >+]; >+ >+debug('- Tests invalid inputs. Results should be empty strings.'); >+for (var i = 0; i < invalidInputs.length; ++i) >+ shouldBe('parseResultOf("' + invalidInputs[i] + '")', '""'); >+ >+var successfullyParsed = true; >+</script> >+<script src="../fast/js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt >index 53bedb4b9468974d550532fef9d71a1439eb3826..396a21624e21046fc24b1e56bedf789eab31746b 100644 >--- a/Source/WebCore/CMakeLists.txt >+++ b/Source/WebCore/CMakeLists.txt >@@ -465,6 +465,7 @@ SET(WebCore_SOURCES > css/CSSUnicodeRangeValue.cpp > css/CSSValueList.cpp > css/FontFamilyValue.cpp >+ css/FontFeatureValue.cpp > css/FontValue.cpp > css/MediaFeatureNames.cpp > css/MediaList.cpp >@@ -1060,6 +1061,7 @@ SET(WebCore_SOURCES > platform/graphics/FontFallbackList.cpp > platform/graphics/FontFamily.cpp > platform/graphics/FontFastPath.cpp >+ platform/graphics/FontFeatureSettings.cpp > platform/graphics/GeneratedImage.cpp > platform/graphics/GlyphPageTreeNode.cpp > platform/graphics/Gradient.cpp >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 47b42b3deb8d8061c7e56df2865311ecee9ef277..0a522611f629ea9ff5ef2299221ffee172b7703d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,64 @@ >+2011-08-01 Kenichi Ishibashi <bashi@chromium.org> >+ >+ Parsing CSS3 font-feature-settings property >+ https://bugs.webkit.org/show_bug.cgi?id=63618 >+ >+ Introduces CSS3 font-feature-settings property as -webkit-font-feature-settings. This change only contains parsing and part. Parsed information are stored in FontDescription class. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: css3/font-feature-settings-parsing.html >+ >+ * CMakeLists.txt: Added FontFeatureValue.{h,cpp} and FontFeatureSettings.{h,cpp}. >+ * GNUmakefile.list.am: Ditto. >+ * WebCore.gypi: Ditto. >+ * WebCore.pro: Ditto. >+ * WebCore.vcproj/WebCore.vcproj: Ditto. >+ * WebCore.xcodeproj/project.pbxproj: Ditto. >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added CSSPropertyWebkitFontFeatureSettings as a shorthand property. >+ * css/CSSParser.cpp: >+ (WebCore::CSSParser::parseValue): Added parsing code for -webkit-font-feature-settings. >+ (WebCore::CSSParser::parseFontFeatureTag): Added. >+ (WebCore::CSSParser::parseFontFeatureSettings): Added. >+ * css/CSSParser.h: Added parseFontFeatureSettings(). >+ * css/CSSPropertyNames.in: Added -webkit-font-feature-settings. >+ * css/CSSStyleSelector.cpp: >+ (WebCore::CSSStyleSelector::applyDeclarations): Modified a compile assert to follow adding -webkit-font-feature-settings. >+ (WebCore::CSSStyleSelector::applyProperty): Added a case clause for CSSPropertyWebkitFontFeatureSettings. >+ * css/CSSValue.h: >+ (WebCore::CSSValue::isFontFeatureValue): Added. >+ * css/CSSValueKeywords.in: Added 'on' and 'off' keywords. >+ * css/FontFeatureValue.cpp: Added. >+ (WebCore::FontFeatureValue::FontFeatureValue): >+ (WebCore::FontFeatureValue::value): >+ (WebCore::FontFeatureValue::cssText): >+ * css/FontFeatureValue.h: Added. >+ (WebCore::FontFeatureValue::create): >+ (WebCore::FontFeatureValue::tag): >+ (WebCore::FontFeatureValue::setValue): >+ (WebCore::FontFeatureValue::isFontFeatureValue): >+ * platform/graphics/FontDescription.cpp: >+ (WebCore::FontDescription::makeNormalFeatureSettings): Added. >+ * platform/graphics/FontDescription.h: >+ (WebCore::FontDescription::FontDescription): Added m_featureSettings member variable. >+ (WebCore::FontDescription::featureSettings): Added. >+ (WebCore::FontDescription::setFeatureSettings): Added. >+ (WebCore::FontDescription::operator==): Modified to take into account m_featureSettings >+ * platform/graphics/FontFeatureSettings.cpp: Added. >+ (WebCore::FontFeature::FontFeature): >+ (WebCore::FontFeature::operator=): >+ (WebCore::FontFeature::operator==): >+ (WebCore::FontFeatureSettings::FontFeatureSettings): >+ * platform/graphics/FontFeatureSettings.h: Added. >+ (WebCore::FontFeature::tag): >+ (WebCore::FontFeature::value): >+ (WebCore::FontFeatureSettings::create): >+ (WebCore::FontFeatureSettings::append): >+ (WebCore::FontFeatureSettings::size): >+ (WebCore::FontFeatureSettings::operator[]): >+ (WebCore::FontFeatureSettings::at): >+ > 2011-08-01 Zhenyao Mo <zmo@google.com> > > Unreviewed, rolling out r92022. >diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am >index b388a3699db66a6cf4ddf990a9b33bd6544c6fe2..4aa746282537971f822722f61f2aff2a103153e4 100644 >--- a/Source/WebCore/GNUmakefile.list.am >+++ b/Source/WebCore/GNUmakefile.list.am >@@ -1011,6 +1011,8 @@ webcore_sources += \ > Source/WebCore/css/DashboardRegion.h \ > Source/WebCore/css/FontFamilyValue.cpp \ > Source/WebCore/css/FontFamilyValue.h \ >+ Source/WebCore/css/FontFeatureValue.cpp \ >+ Source/WebCore/css/FontFeatureValue.h \ > Source/WebCore/css/FontValue.cpp \ > Source/WebCore/css/FontValue.h \ > Source/WebCore/css/MediaFeatureNames.cpp \ >@@ -2492,6 +2494,8 @@ webcore_sources += \ > Source/WebCore/platform/graphics/FontFamily.cpp \ > Source/WebCore/platform/graphics/FontFamily.h \ > Source/WebCore/platform/graphics/FontFastPath.cpp \ >+ Source/WebCore/platform/graphics/FontFeatureSettings.cpp \ >+ Source/WebCore/platform/graphics/FontFeatureSettings.h \ > Source/WebCore/platform/graphics/Font.h \ > Source/WebCore/platform/graphics/FontMetrics.h \ > Source/WebCore/platform/graphics/FontOrientation.h \ >diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi >index 54c9a34d3b5b2ac1153700dc825140e6af729b02..8870f77fb0762ae99b0860a18444ee11a226fbb8 100644 >--- a/Source/WebCore/WebCore.gypi >+++ b/Source/WebCore/WebCore.gypi >@@ -737,6 +737,7 @@ > 'platform/graphics/FontDescription.h', > 'platform/graphics/FontFallbackList.h', > 'platform/graphics/FontFamily.h', >+ 'platform/graphics/FontFeatureSettings.h', > 'platform/graphics/FontMetrics.h', > 'platform/graphics/FontOrientation.h', > 'platform/graphics/FontRenderingMode.h', >@@ -2382,6 +2383,8 @@ > 'css/DashboardRegion.h', > 'css/FontFamilyValue.cpp', > 'css/FontFamilyValue.h', >+ 'css/FontFeatureValue.cpp', >+ 'css/FontFeatureValue.h', > 'css/FontValue.cpp', > 'css/FontValue.h', > 'css/MediaFeatureNames.cpp', >@@ -3337,6 +3340,7 @@ > 'platform/graphics/FontDescription.cpp', > 'platform/graphics/FontFallbackList.cpp', > 'platform/graphics/FontFamily.cpp', >+ 'platform/graphics/FontFeatureSettings.cpp', > 'platform/graphics/FontFastPath.cpp', > 'platform/graphics/FontPlatformData.cpp', > 'platform/graphics/FontPlatformData.h', >diff --git a/Source/WebCore/WebCore.pro b/Source/WebCore/WebCore.pro >index 7a3bef16f576d63bb42458705bf361b86c4c7a1f..a034edf105ee89e2fcf9be3cb1e233b2c00aafdd 100644 >--- a/Source/WebCore/WebCore.pro >+++ b/Source/WebCore/WebCore.pro >@@ -428,6 +428,7 @@ SOURCES += \ > css/CSSUnicodeRangeValue.cpp \ > css/CSSValueList.cpp \ > css/FontFamilyValue.cpp \ >+ css/FontFeatureValue.cpp \ > css/FontValue.cpp \ > css/MediaFeatureNames.cpp \ > css/MediaList.cpp \ >@@ -977,6 +978,7 @@ SOURCES += \ > platform/graphics/FontDescription.cpp \ > platform/graphics/FontFallbackList.cpp \ > platform/graphics/FontFamily.cpp \ >+ platform/graphics/FontFeatureSettings.cpp \ > platform/graphics/BitmapImage.cpp \ > platform/graphics/Color.cpp \ > platform/graphics/FloatPoint3D.cpp \ >@@ -1423,6 +1425,7 @@ HEADERS += \ > css/CSSUnicodeRangeValue.h \ > css/CSSValueList.h \ > css/FontFamilyValue.h \ >+ css/FontFeatureValue.h \ > css/FontValue.h \ > css/MediaFeatureNames.h \ > css/MediaList.h \ >@@ -1977,6 +1980,7 @@ HEADERS += \ > platform/graphics/FontData.h \ > platform/graphics/FontDescription.h \ > platform/graphics/FontFamily.h \ >+ platform/graphics/FontFeatureSettings.h \ > platform/graphics/FontMetrics.h \ > platform/graphics/Font.h \ > platform/graphics/GeneratedImage.h \ >diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj >index 91f2fa52e3181e7f14a1fc39eae3272410a3efe4..769c56cf04ba8be47b17ad90c3f8ff0cda5d0330 100755 >--- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj >+++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj >@@ -27585,6 +27585,14 @@ > > > </File> > <File >+ RelativePath="..\platform\graphics\FontFeatureSettings.cpp" >+ > >+ </File> >+ <File >+ RelativePath="..\platform\graphics\FontFeatureSettings.h" >+ > >+ </File> >+ <File > RelativePath="..\platform\graphics\FontFastPath.cpp" > > > </File> >@@ -32950,6 +32958,14 @@ > > > </File> > <File >+ RelativePath="..\css\FontFeatureValue.cpp" >+ > >+ </File> >+ <File >+ RelativePath="..\css\FontFeatureValue.h" >+ > >+ </File> >+ <File > RelativePath="..\css\FontValue.cpp" > > > </File> >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 682195945a1b8ff11a9111236bdc1fe3fc1e0f2b..d1a519497eb207e94683c6ae549532f6e2a8a925 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -1269,6 +1269,10 @@ > 49FFBF4011C93EE3006A7118 /* WebGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */; }; > 4A0DA2FE129B241900AB61E1 /* FormAssociatedElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */; }; > 4A0DA2FF129B241900AB61E1 /* FormAssociatedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A0DA2FD129B241900AB61E1 /* FormAssociatedElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 4A6E9FC313C17D1D0046A7F8 /* FontFeatureValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6E9FC113C17D1D0046A7F8 /* FontFeatureValue.cpp */; }; >+ 4A6E9FC413C17D1D0046A7F8 /* FontFeatureValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A6E9FC213C17D1D0046A7F8 /* FontFeatureValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 4A6E9FC713C17D570046A7F8 /* FontFeatureSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6E9FC513C17D570046A7F8 /* FontFeatureSettings.cpp */; }; >+ 4A6E9FC813C17D570046A7F8 /* FontFeatureSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A6E9FC613C17D570046A7F8 /* FontFeatureSettings.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 4A8C96EB0BE69032004EEFF0 /* FrameSelectionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */; }; > 4ACBC0BE12713CBD0094F9B2 /* ClassList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */; }; > 4ACBC0BF12713CBD0094F9B2 /* ClassList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4ACBC0BD12713CBD0094F9B2 /* ClassList.h */; }; >@@ -7846,6 +7850,10 @@ > 49FFBF3E11C93EE3006A7118 /* WebGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLLayer.mm; sourceTree = "<group>"; }; > 4A0DA2FC129B241900AB61E1 /* FormAssociatedElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormAssociatedElement.cpp; sourceTree = "<group>"; }; > 4A0DA2FD129B241900AB61E1 /* FormAssociatedElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormAssociatedElement.h; sourceTree = "<group>"; }; >+ 4A6E9FC113C17D1D0046A7F8 /* FontFeatureValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFeatureValue.cpp; sourceTree = "<group>"; }; >+ 4A6E9FC213C17D1D0046A7F8 /* FontFeatureValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontFeatureValue.h; sourceTree = "<group>"; }; >+ 4A6E9FC513C17D570046A7F8 /* FontFeatureSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FontFeatureSettings.cpp; sourceTree = "<group>"; }; >+ 4A6E9FC613C17D570046A7F8 /* FontFeatureSettings.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; path = FontFeatureSettings.h; sourceTree = "<group>"; }; > 4A8C96EA0BE69032004EEFF0 /* FrameSelectionMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = FrameSelectionMac.mm; path = mac/FrameSelectionMac.mm; sourceTree = "<group>"; }; > 4ACBC0BC12713CBD0094F9B2 /* ClassList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassList.cpp; sourceTree = "<group>"; }; > 4ACBC0BD12713CBD0094F9B2 /* ClassList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassList.h; sourceTree = "<group>"; }; >@@ -18142,6 +18150,8 @@ > B2C3DA580D006CD600EF6F26 /* FontFamily.cpp */, > B2C3DA590D006CD600EF6F26 /* FontFamily.h */, > 72626E010EF022FE00A07E20 /* FontFastPath.cpp */, >+ 4A6E9FC513C17D570046A7F8 /* FontFeatureSettings.cpp */, >+ 4A6E9FC613C17D570046A7F8 /* FontFeatureSettings.h */, > 0845680712B90DA600960A9F /* FontMetrics.h */, > F7A034C3126BF6BE007DC19E /* FontOrientation.h */, > 84B62684133138F90095A489 /* FontPlatformData.cpp */, >@@ -19354,6 +19364,8 @@ > A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */, > A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */, > A80E6CC30A1989CA007FB8C5 /* FontValue.h */, >+ 4A6E9FC113C17D1D0046A7F8 /* FontFeatureValue.cpp */, >+ 4A6E9FC213C17D1D0046A7F8 /* FontFeatureValue.h */, > CD4E0AFA11F7BC27009D3811 /* fullscreen.css */, > CDBD93BA1333BD4B002570E3 /* fullscreenQuickTime.css */, > 93CA4C9909DF93FA00DF8677 /* html.css */, >@@ -21371,6 +21383,8 @@ > B2C3DA680D006CD600EF6F26 /* FontFallbackList.h in Headers */, > B2C3DA6A0D006CD600EF6F26 /* FontFamily.h in Headers */, > A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */, >+ 4A6E9FC413C17D1D0046A7F8 /* FontFeatureValue.h in Headers */, >+ 4A6E9FC813C17D570046A7F8 /* FontFeatureSettings.h in Headers */, > 0845680812B90DA600960A9F /* FontMetrics.h in Headers */, > F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */, > B5320D6B122A24E9002D1440 /* FontPlatformData.h in Headers */, >@@ -24311,6 +24325,8 @@ > B2C3DA690D006CD600EF6F26 /* FontFamily.cpp in Sources */, > A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */, > 72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */, >+ 4A6E9FC313C17D1D0046A7F8 /* FontFeatureValue.cpp in Sources */, >+ 4A6E9FC713C17D570046A7F8 /* FontFeatureSettings.cpp in Sources */, > B2AFFC800D00A5C10030074D /* FontMac.mm in Sources */, > 84B62685133138F90095A489 /* FontPlatformData.cpp in Sources */, > B5320D6C122A24E9002D1440 /* FontPlatformDataCocoa.mm in Sources */, >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 5e710d74cd5c48bf28151e48f578062176dcae57..8f864e1db39059d1483d2171afd984292d61a45a 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -1701,6 +1701,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper > break; > > /* Unimplemented CSS 3 properties (including CSS3 shorthand properties) */ >+ case CSSPropertyWebkitFontFeatureSettings: > case CSSPropertyWebkitTextEmphasis: > case CSSPropertyTextLineThrough: > case CSSPropertyTextLineThroughColor: >diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp >index 5d8fde4b578d53f1a098a0df9ba6bdb9eeb8746e..2acabab791ea70903bd6e7c4e57ab5989b187621 100644 >--- a/Source/WebCore/css/CSSParser.cpp >+++ b/Source/WebCore/css/CSSParser.cpp >@@ -61,6 +61,7 @@ > #include "Document.h" > #include "FloatConversion.h" > #include "FontFamilyValue.h" >+#include "FontFeatureValue.h" > #include "FontValue.h" > #include "HTMLParserIdioms.h" > #include "HashTools.h" >@@ -2084,6 +2085,12 @@ bool CSSParser::parseValue(int propId, bool important) > else > return parseLineBoxContain(important); > break; >+ case CSSPropertyWebkitFontFeatureSettings: >+ if (id == CSSValueNormal) >+ validPrimitive = true; >+ else >+ return parseFontFeatureSettings(important); >+ break; > > #if ENABLE(CSS_EXCLUSIONS) > case CSSPropertyWebkitWrapShape: >@@ -6302,6 +6309,68 @@ bool CSSParser::parseLineBoxContain(bool important) > return true; > } > >+bool CSSParser::parseFontFeatureTag(CSSValueList* settings) >+{ >+ // Feature tag name consists of 4-letter characters. >+ static const int tagNameLength = 4; >+ >+ CSSParserValue* value = m_valueList->current(); >+ // Feature tag name comes first >+ if (value->unit != CSSPrimitiveValue::CSS_STRING && value->unit != CSSPrimitiveValue::CSS_IDENT) >+ return false; >+ if (value->string.length != tagNameLength) >+ return false; >+ RefPtr<FontFeatureValue> parsedValue = FontFeatureValue::create(value->string); >+ value = m_valueList->next(); >+ >+ // Feature tag values might follow >+ if (value) { >+ RefPtr<CSSPrimitiveValue> featureValue; >+ if (value->unit == CSSPrimitiveValue::CSS_NUMBER && value->fValue >= 0.) >+ featureValue = primitiveValueCache()->createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)); >+ else if (value->id == CSSValueOn || value->id == CSSValueOff) >+ featureValue = primitiveValueCache()->createIdentifierValue(value->id); >+ >+ if (featureValue) { >+ parsedValue->setValue(featureValue.release()); >+ value = m_valueList->next(); >+ } >+ } >+ settings->append(parsedValue.release()); >+ return true; >+} >+ >+bool CSSParser::parseFontFeatureSettings(bool important) >+{ >+ if (m_valueList->size() == 1 && m_valueList->current()->id == CSSValueNormal) { >+ RefPtr<CSSPrimitiveValue> normalValue = primitiveValueCache()->createIdentifierValue(CSSValueNormal); >+ m_valueList->next(); >+ addProperty(CSSPropertyWebkitFontFeatureSettings, normalValue.release(), important); >+ return true; >+ } >+ >+ RefPtr<CSSValueList> settings = CSSValueList::createCommaSeparated(); >+ CSSParserValue* value = m_valueList->current(); >+ while (value) { >+ if (!parseFontFeatureTag(settings.get())) >+ return false; >+ value = m_valueList->current(); >+ >+ if (value) { >+ // If the list isn't parsed fully, the current value should be comma. >+ if (!value->unit == CSSParserValue::Operator || value->iValue != ',') >+ return false; >+ value = m_valueList->next(); >+ } >+ } >+ >+ if (settings->length()) { >+ addProperty(CSSPropertyWebkitFontFeatureSettings, settings.release(), important); >+ return true; >+ } >+ return false; >+} >+ > static inline int yyerror(const char*) { return 1; } > > #define END_TOKEN 0 >diff --git a/Source/WebCore/css/CSSParser.h b/Source/WebCore/css/CSSParser.h >index bd1c74687c6190f54f8469ae353661c12e3ea447..109de05b97c122593e000ff623b09fd85f1907d3 100644 >--- a/Source/WebCore/css/CSSParser.h >+++ b/Source/WebCore/css/CSSParser.h >@@ -197,6 +197,9 @@ namespace WebCore { > > bool parseLineBoxContain(bool important); > >+ bool parseFontFeatureTag(CSSValueList*); >+ bool parseFontFeatureSettings(bool important); >+ > int yyparse(); > > CSSParserSelector* createFloatingSelector(); >diff --git a/Source/WebCore/css/CSSPropertyNames.in b/Source/WebCore/css/CSSPropertyNames.in >index 9c20f7fcf251c12d8b075d0b1e51e583968e77d1..4656e6c63be04569cbf911e58698824d5a46fc05 100644 >--- a/Source/WebCore/css/CSSPropertyNames.in >+++ b/Source/WebCore/css/CSSPropertyNames.in >@@ -20,6 +20,7 @@ font-style > font-variant > font-weight > text-rendering >+-webkit-font-feature-settings > -webkit-font-smoothing > -webkit-text-orientation > -epub-text-orientation = -webkit-text-orientation >diff --git a/Source/WebCore/css/CSSStyleSelector.cpp b/Source/WebCore/css/CSSStyleSelector.cpp >index 66134b9a8310b3cfc0459de5e08586466b302182..7590d362e5ffcc37e9a570b8f6276ee8027e69fc 100644 >--- a/Source/WebCore/css/CSSStyleSelector.cpp >+++ b/Source/WebCore/css/CSSStyleSelector.cpp >@@ -56,6 +56,7 @@ > #include "Counter.h" > #include "FocusController.h" > #include "FontFamilyValue.h" >+#include "FontFeatureValue.h" > #include "FontValue.h" > #include "Frame.h" > #include "FrameSelection.h" >@@ -3479,7 +3480,7 @@ void CSSStyleSelector::applyDeclarations(bool isImportant, int startIndex, int e > > if (applyFirst) { > COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property); >- COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 14, CSS_zoom_is_end_of_first_prop_range); >+ COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 15, CSS_zoom_is_end_of_first_prop_range); > COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom); > > // give special priority to font-xxx, color properties, etc >@@ -5149,6 +5150,34 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value) > return; > #endif > >+ // CSS Fonts Module Level 3 >+ case CSSPropertyWebkitFontFeatureSettings: { >+ if (primitiveValue && primitiveValue->getIdent() == CSSValueNormal) { >+ if (m_style->setFontDescription(m_style->fontDescription().makeNormalFeatureSettings())) >+ m_fontDirty = true; >+ return; >+ } >+ >+ if (!value->isValueList()) >+ return; >+ >+ FontDescription fontDescription = m_style->fontDescription(); >+ CSSValueList* list = static_cast<CSSValueList*>(value); >+ RefPtr<FontFeatureSettings> settings = FontFeatureSettings::create(); >+ int len = list->length(); >+ for (int i = 0; i < len; ++i) { >+ CSSValue* item = list->itemWithoutBoundsCheck(i); >+ if (!item->isFontFeatureValue()) >+ continue; >+ FontFeatureValue* feature = static_cast<FontFeatureValue*>(item); >+ settings->append(FontFeature(feature->tag(), feature->value())); >+ } >+ fontDescription.setFeatureSettings(settings.release()); >+ if (m_style->setFontDescription(fontDescription)) >+ m_fontDirty = true; >+ return; >+ } >+ > // These properties are implemented in the CSSStyleApplyProperty lookup table. > case CSSPropertyColor: > case CSSPropertyDirection: >diff --git a/Source/WebCore/css/CSSValue.h b/Source/WebCore/css/CSSValue.h >index 10ac35c3a27865a5c4ae855a051a080adb9f9f4c..c535da25e11496f00ea37e6b124d31b3f0323725 100644 >--- a/Source/WebCore/css/CSSValue.h >+++ b/Source/WebCore/css/CSSValue.h >@@ -58,6 +58,7 @@ public: > virtual bool isFlexValue() const { return false; } > #endif > virtual bool isFontFamilyValue() const { return false; } >+ virtual bool isFontFeatureValue() const { return false; } > virtual bool isFontValue() const { return false; } > virtual bool isImageGeneratorValue() const { return false; } > virtual bool isImageValue() const { return false; } >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 0535b5b592ed81748140b4792d9a6b302c68292c..06a6aa23654eaf8051e43b2f72be026f927f3294 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -806,6 +806,10 @@ glyphs > inline-box > replaced > >+// -webkit-font-feature-settings >+on >+off >+ > // image-rendering > //auto > //optimizeSpeed >diff --git a/Source/WebCore/css/FontFeatureValue.cpp b/Source/WebCore/css/FontFeatureValue.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..bc36c7c644a3f591ba33728349e3dc8ae949a4f4 >--- /dev/null >+++ b/Source/WebCore/css/FontFeatureValue.cpp >@@ -0,0 +1,73 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "FontFeatureValue.h" >+ >+#include "CSSParser.h" >+#include "CSSPrimitiveValue.h" >+#include "CSSValueKeywords.h" >+#include <wtf/text/StringBuilder.h> >+ >+namespace WebCore { >+ >+FontFeatureValue::FontFeatureValue(const String& tag) >+ : m_tag(tag) >+{ >+} >+ >+int FontFeatureValue::value() const >+{ >+ if (!m_value) >+ return 1; >+ if (m_value->primitiveType() == CSSPrimitiveValue::CSS_IDENT) { >+ switch (m_value->getIdent()) { >+ case CSSValueOn: >+ return 1; >+ case CSSValueOff: >+ return 0; >+ default: >+ return 0; >+ } >+ } >+ if (m_value->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) >+ return m_value->getIntValue(); >+ return 0; >+} >+ >+String FontFeatureValue::cssText() const >+{ >+ StringBuilder builder; >+ builder.append("'"); >+ builder.append(m_tag); >+ builder.append("'"); >+ if (m_value) { >+ builder.append(" "); >+ builder.append(m_value->cssText()); >+ } >+ return builder.toString(); >+} >+ >+} >diff --git a/Source/WebCore/css/FontFeatureValue.h b/Source/WebCore/css/FontFeatureValue.h >new file mode 100644 >index 0000000000000000000000000000000000000000..c0b6e52f17897e68eedc33671bd25d40ea7cbb48 >--- /dev/null >+++ b/Source/WebCore/css/FontFeatureValue.h >@@ -0,0 +1,56 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef FontFeatureValue_h >+#define FontFeatureValue_h >+ >+#include "CSSPrimitiveValue.h" >+#include "PlatformString.h" >+ >+namespace WebCore { >+ >+class FontFeatureValue : public CSSValue { >+public: >+ static PassRefPtr<FontFeatureValue> create(const String& tag) >+ { >+ return adoptRef(new FontFeatureValue(tag)); >+ } >+ >+ const String& tag() const { return m_tag; } >+ int value() const; >+ void setValue(PassRefPtr<CSSPrimitiveValue> value) { m_value = value; } >+ virtual String cssText() const; >+ >+private: >+ FontFeatureValue(const String& tag); >+ virtual bool isFontFeatureValue() const { return true; } >+ >+ String m_tag; >+ RefPtr<CSSPrimitiveValue> m_value; >+}; >+ >+} // namespace >+ >+#endif >diff --git a/Source/WebCore/platform/graphics/FontDescription.cpp b/Source/WebCore/platform/graphics/FontDescription.cpp >index 58ddf8192a422da1eb9519ef57d96cf736eabf20..46d108fe1a6a764c632b404600b11af87de668f7 100644 >--- a/Source/WebCore/platform/graphics/FontDescription.cpp >+++ b/Source/WebCore/platform/graphics/FontDescription.cpp >@@ -98,4 +98,11 @@ FontTraitsMask FontDescription::traitsMask() const > > } > >+FontDescription FontDescription::makeNormalFeatureSettings() const >+{ >+ FontDescription normalDescription(*this); >+ normalDescription.setFeatureSettings(0); >+ return normalDescription; >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/FontDescription.h b/Source/WebCore/platform/graphics/FontDescription.h >index 5d53388ddcb2583e1fe9642086e50e8da242ac9b..72c72bd3132bd9990dcc221cfbf85a24872e0a56 100644 >--- a/Source/WebCore/platform/graphics/FontDescription.h >+++ b/Source/WebCore/platform/graphics/FontDescription.h >@@ -26,6 +26,7 @@ > #define FontDescription_h > > #include "FontFamily.h" >+#include "FontFeatureSettings.h" > #include "FontOrientation.h" > #include "FontRenderingMode.h" > #include "FontSmoothingMode.h" >@@ -35,6 +36,8 @@ > #include "TextRenderingMode.h" > #include <wtf/MathExtras.h> > >+#include <wtf/RefPtr.h> >+ > namespace WebCore { > > enum FontWeight { >@@ -114,6 +117,8 @@ public: > FontOrientation orientation() const { return m_orientation; } > TextOrientation textOrientation() const { return m_textOrientation; } > FontWidthVariant widthVariant() const { return m_widthVariant; } >+ FontFeatureSettings* featureSettings() const { return m_featureSettings.get(); } >+ FontDescription makeNormalFeatureSettings() const; > > void setFamily(const FontFamily& family) { m_familyList = family; } > void setComputedSize(float s) { ASSERT(isfinite(s)); m_computedSize = s; } >@@ -138,6 +143,7 @@ public: > void setOrientation(FontOrientation orientation) { m_orientation = orientation; } > void setTextOrientation(TextOrientation textOrientation) { m_textOrientation = textOrientation; } > void setWidthVariant(FontWidthVariant widthVariant) { m_widthVariant = widthVariant; } >+ void setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) { m_featureSettings = settings; } > > private: > FontFamily m_familyList; // The list of font families to be used. >@@ -151,6 +157,8 @@ private: > > FontWidthVariant m_widthVariant; > >+ RefPtr<FontFeatureSettings> m_featureSettings; >+ > unsigned m_italic : 1; // FontItalic > unsigned m_smallCaps : 1; // FontSmallCaps > bool m_isAbsoluteSize : 1; // Whether or not CSS specified an explicit size >@@ -188,7 +196,8 @@ inline bool FontDescription::operator==(const FontDescription& other) const > && m_isSpecifiedFont == other.m_isSpecifiedFont > && m_orientation == other.m_orientation > && m_textOrientation == other.m_textOrientation >- && m_widthVariant == other.m_widthVariant; >+ && m_widthVariant == other.m_widthVariant >+ && m_featureSettings == other.m_featureSettings; > } > > } >diff --git a/Source/WebCore/platform/graphics/FontFeatureSettings.cpp b/Source/WebCore/platform/graphics/FontFeatureSettings.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..3713322f4c82ebf3cc75e810ced38dcf9153093e >--- /dev/null >+++ b/Source/WebCore/platform/graphics/FontFeatureSettings.cpp >@@ -0,0 +1,46 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "FontFeatureSettings.h" >+ >+namespace WebCore { >+ >+FontFeature::FontFeature(const AtomicString& tag, int value) >+ : m_tag(tag) >+ , m_value(value) >+{ >+} >+ >+bool FontFeature::operator==(const FontFeature& other) >+{ >+ return m_tag == other.m_tag && m_value == other.m_value; >+} >+ >+FontFeatureSettings::FontFeatureSettings() >+{ >+} >+ >+} >diff --git a/Source/WebCore/platform/graphics/FontFeatureSettings.h b/Source/WebCore/platform/graphics/FontFeatureSettings.h >new file mode 100644 >index 0000000000000000000000000000000000000000..80363b958f7a1a6e9e3c1af9dbbef713b1015f1c >--- /dev/null >+++ b/Source/WebCore/platform/graphics/FontFeatureSettings.h >@@ -0,0 +1,68 @@ >+/* >+ * Copyright (C) 2011 Google Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#ifndef FontFeatureSettings_h >+#define FontFeatureSettings_h >+ >+#include <wtf/PassRefPtr.h> >+#include <wtf/RefCounted.h> >+#include <wtf/RefPtr.h> >+#include <wtf/Vector.h> >+#include <wtf/text/AtomicString.h> >+ >+namespace WebCore { >+ >+class FontFeature { >+public: >+ FontFeature(const AtomicString& tag, int value); >+ bool operator==(const FontFeature&); >+ >+ const AtomicString& tag() const { return m_tag; } >+ int value() const { return m_value; } >+ >+private: >+ AtomicString m_tag; >+ int m_value; >+}; >+ >+class FontFeatureSettings : public RefCounted<FontFeatureSettings> { >+public: >+ static PassRefPtr<FontFeatureSettings> create() >+ { >+ return adoptRef(new FontFeatureSettings()); >+ } >+ void append(const FontFeature& feature) { m_list.append(feature); } >+ size_t size() const { return m_list.size(); } >+ const FontFeature& operator[](int index) const { return m_list[index]; } >+ const FontFeature& at(size_t index) const { return m_list.at(index); } >+ >+private: >+ FontFeatureSettings(); >+ Vector<FontFeature> m_list; >+}; >+ >+} >+ >+#endif // FontFeatureSettings_h
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 63618
:
99063
|
99603
|
99941
|
102606
|
102615
|
102648
|
102755
|
102879
|
103013