Diff
Modified: trunk/LayoutTests/ChangeLog (108365 => 108366)
--- trunk/LayoutTests/ChangeLog 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/LayoutTests/ChangeLog 2012-02-21 18:00:00 UTC (rev 108366)
@@ -1,3 +1,13 @@
+2012-02-21 Andreas Kling <[email protected]>
+
+ Kill FontFamilyValue.
+ <http://webkit.org/b/79103>
+
+ Reviewed by Antti Koivisto.
+
+ * fast/css/font-family-trailing-bracket-gunk-expected.txt: Added.
+ * fast/css/font-family-trailing-bracket-gunk.html: Added.
+
2012-02-20 David Hyatt <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=79046
Added: trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk-expected.txt (0 => 108366)
--- trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk-expected.txt 2012-02-21 18:00:00 UTC (rev 108366)
@@ -0,0 +1,11 @@
+This test checks that we don't strip trailing gunk in brackets from font families.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS spanElement.innerHTML is 'foo'
+PASS computedStyle.getPropertyValue('font-family') is "'Arial [ding dong]', 'Helvetica [Xft]', Courier"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk.html (0 => 108366)
--- trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk.html (rev 0)
+++ trunk/LayoutTests/fast/css/font-family-trailing-bracket-gunk.html 2012-02-21 18:00:00 UTC (rev 108366)
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</head>
+<body>
+<span id="testspan" style="font-family: 'Arial [ding dong]', 'Helvetica [Xft]', Courier">foo</span>
+<script>
+
+description("This test checks that we don't strip trailing gunk in brackets from font families.");
+
+var spanElement = document.getElementById('testspan');
+
+var computedStyle = window.getComputedStyle(spanElement);
+shouldBe("spanElement.innerHTML", "'foo'");
+shouldBe("computedStyle.getPropertyValue('font-family')", "\"'Arial [ding dong]', 'Helvetica [Xft]', Courier\"");
+
+document.body.removeChild(spanElement);
+
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/CMakeLists.txt (108365 => 108366)
--- trunk/Source/WebCore/CMakeLists.txt 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-02-21 18:00:00 UTC (rev 108366)
@@ -479,7 +479,6 @@
css/CSSValueList.cpp
css/CSSValuePool.cpp
css/CSSWrapShapes.cpp
- css/FontFamilyValue.cpp
css/FontFeatureValue.cpp
css/FontValue.cpp
css/MediaFeatureNames.cpp
Modified: trunk/Source/WebCore/ChangeLog (108365 => 108366)
--- trunk/Source/WebCore/ChangeLog 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/ChangeLog 2012-02-21 18:00:00 UTC (rev 108366)
@@ -1,3 +1,42 @@
+2012-02-21 Andreas Kling <[email protected]>
+
+ Kill FontFamilyValue.
+ <http://webkit.org/b/79103>
+
+ Reviewed by Antti Koivisto.
+
+ Remove FontFamilyValue and replace all usage by CSSPrimitiveValue.
+ The class was only used to filter font family names, removing bracketed
+ suffixes, e.g "[Xft]".
+
+ This was added to KHTML in 2002 to support the use of specific X11 font
+ families inside KMail: <https://bugs.kde.org/show_bug.cgi?id=38808>
+
+ Test: fast/css/font-family-trailing-bracket-gunk.html
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.order:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/CSSFontSelector.cpp:
+ (WebCore::CSSFontSelector::addFontFaceRule):
+ * css/CSSParser.cpp:
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+ * css/CSSValue.cpp:
+ (WebCore::CSSValue::cssText):
+ (WebCore::CSSValue::destroy):
+ * css/CSSValue.h:
+ * css/CSSValuePool.cpp:
+ (WebCore::CSSValuePool::createFontFamilyValue):
+ * css/CSSValuePool.h:
+ (CSSValuePool):
+ * css/FontFamilyValue.cpp: Removed.
+ * css/FontFamilyValue.h: Removed.
+
2012-02-21 Alexis Menard <[email protected]>
Little optimization for CSSParser::parseFillShorthand.
Modified: trunk/Source/WebCore/GNUmakefile.list.am (108365 => 108366)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-02-21 18:00:00 UTC (rev 108366)
@@ -1388,8 +1388,6 @@
Source/WebCore/css/CSSValuePool.cpp \
Source/WebCore/css/CSSValuePool.h \
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 \
Modified: trunk/Source/WebCore/Target.pri (108365 => 108366)
--- trunk/Source/WebCore/Target.pri 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/Target.pri 2012-02-21 18:00:00 UTC (rev 108366)
@@ -441,7 +441,6 @@
css/CSSValueList.cpp \
css/CSSValuePool.cpp \
css/CSSWrapShapes.cpp \
- css/FontFamilyValue.cpp \
css/FontFeatureValue.cpp \
css/FontValue.cpp \
css/MediaFeatureNames.cpp \
@@ -1561,7 +1560,6 @@
css/CSSValueList.h \
css/CSSValuePool.h \
css/CSSWrapShapes.h \
- css/FontFamilyValue.h \
css/FontFeatureValue.h \
css/FontValue.h \
css/MediaFeatureNames.h \
Modified: trunk/Source/WebCore/WebCore.gypi (108365 => 108366)
--- trunk/Source/WebCore/WebCore.gypi 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/WebCore.gypi 2012-02-21 18:00:00 UTC (rev 108366)
@@ -2059,8 +2059,6 @@
'css/CSSWrapShapes.cpp',
'css/Counter.h',
'css/DashboardRegion.h',
- 'css/FontFamilyValue.cpp',
- 'css/FontFamilyValue.h',
'css/FontFeatureValue.cpp',
'css/FontFeatureValue.h',
'css/FontValue.cpp',
Modified: trunk/Source/WebCore/WebCore.order (108365 => 108366)
--- trunk/Source/WebCore/WebCore.order 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/WebCore.order 2012-02-21 18:00:00 UTC (rev 108366)
@@ -7902,12 +7902,8 @@
__ZN7WebCore23HTMLTableCaptionElementD0Ev
__ZN7WebCore13StyledElement11addCSSColorEPNS_9AttributeEiRKN3WTF6StringE
__ZN7WebCore16HTMLStyleElement20parseMappedAttributeEPNS_9AttributeE
-__ZN7WebCore15FontFamilyValueC1ERKN3WTF6StringE
-__ZN7WebCore15FontFamilyValueC2ERKN3WTF6StringE
__ZN7WebCore17CSSPrimitiveValueC2ERKN3WTF6StringENS0_9UnitTypesE
-__ZN7WebCore15FontFamilyValueD0Ev
__ZN7WebCore17CSSPrimitiveValueD2Ev
-__ZNK7WebCore15FontFamilyValue17isFontFamilyValueEv
__ZN7WebCore9CSSParser9parseFontEb
__ZN7WebCore16SharedFontFamilyD1Ev
__ZNK7WebCore8CSSValue12cssValueTypeEv
@@ -9548,7 +9544,6 @@
__ZN3WTF14derefIfNotNullIN7WebCore11BidiContextEEEvPT_
__ZN7WebCore24CanvasRenderingContext2D10strokeTextERKN3WTF6StringEff
__ZN7WebCore9FontCache24getFontDataForCharactersERKNS_4FontEPKti
-__ZN7WebCore15FontFamilyValue20appendSpaceSeparatedEPKtj
__ZN7WebCore17CSSInheritedValueD0Ev
__ZN7WebCore9CSSParser15invalidBlockHitEv
__ZN7WebCore13JSTextMetrics18getOwnPropertySlotEPN3JSC9ExecStateERKNS1_10IdentifierERNS1_12PropertySlotE
@@ -13828,7 +13823,6 @@
__ZN7WebCore11RenderStyle18setTextStrokeWidthEf
__ZN7WebCore23ReplaceSelectionCommand16handleStyleSpansEv
__ZN7WebCore12EditingStyleC1EPKNS_19CSSStyleDeclarationE
-__ZNK7WebCore15FontFamilyValue7cssTextEv
__ZN7WebCore23ReplaceSelectionCommand19copyStyleToChildrenEPNS_4NodeEPKNS_26CSSMutableStyleDeclarationE
__ZN7WebCore26CSSMutableStyleDeclarationaSERKS0_
__ZN7WebCore20CompositeEditCommand16setNodeAttributeEN3WTF10PassRefPtrINS_7ElementEEERKNS_13QualifiedNameERKNS1_12AtomicStringE
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (108365 => 108366)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2012-02-21 18:00:00 UTC (rev 108366)
@@ -35350,14 +35350,6 @@
>
</File>
<File
- RelativePath="..\css\FontFamilyValue.cpp"
- >
- </File>
- <File
- RelativePath="..\css\FontFamilyValue.h"
- >
- </File>
- <File
RelativePath="..\css\FontFeatureValue.cpp"
>
</File>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (108365 => 108366)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-02-21 18:00:00 UTC (rev 108366)
@@ -3640,14 +3640,12 @@
A80E6CE80A1989CA007FB8C5 /* ShadowValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */; };
A80E6CE90A1989CA007FB8C5 /* CSSValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CEB0A1989CA007FB8C5 /* CSSImportRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */; };
- A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */; };
A80E6CED0A1989CA007FB8C5 /* FontValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC30A1989CA007FB8C5 /* FontValue.h */; };
A80E6CEE0A1989CA007FB8C5 /* CSSValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC40A1989CA007FB8C5 /* CSSValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
A80E6CEF0A1989CA007FB8C5 /* CSSStyleRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC50A1989CA007FB8C5 /* CSSStyleRule.cpp */; };
A80E6CF00A1989CA007FB8C5 /* CSSInheritedValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC60A1989CA007FB8C5 /* CSSInheritedValue.cpp */; };
A80E6CF10A1989CA007FB8C5 /* FontValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */; };
A80E6CF20A1989CA007FB8C5 /* CSSRuleList.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC80A1989CA007FB8C5 /* CSSRuleList.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */; };
A80E6CF40A1989CA007FB8C5 /* ShadowValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */; };
A80E6CF50A1989CA007FB8C5 /* CSSPageRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */; };
A80E6CF60A1989CA007FB8C5 /* CSSImportRule.h in Headers */ = {isa = PBXBuildFile; fileRef = A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10523,14 +10521,12 @@
A80E6CBE0A1989CA007FB8C5 /* ShadowValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ShadowValue.h; sourceTree = "<group>"; };
A80E6CBF0A1989CA007FB8C5 /* CSSValueList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValueList.h; sourceTree = "<group>"; };
A80E6CC10A1989CA007FB8C5 /* CSSImportRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSImportRule.cpp; sourceTree = "<group>"; };
- A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontFamilyValue.cpp; sourceTree = "<group>"; };
A80E6CC30A1989CA007FB8C5 /* FontValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontValue.h; sourceTree = "<group>"; };
A80E6CC40A1989CA007FB8C5 /* CSSValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSValue.h; sourceTree = "<group>"; };
A80E6CC50A1989CA007FB8C5 /* CSSStyleRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSStyleRule.cpp; sourceTree = "<group>"; };
A80E6CC60A1989CA007FB8C5 /* CSSInheritedValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSInheritedValue.cpp; sourceTree = "<group>"; };
A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontValue.cpp; sourceTree = "<group>"; };
A80E6CC80A1989CA007FB8C5 /* CSSRuleList.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSRuleList.h; sourceTree = "<group>"; };
- A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FontFamilyValue.h; sourceTree = "<group>"; };
A80E6CCA0A1989CA007FB8C5 /* ShadowValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ShadowValue.cpp; sourceTree = "<group>"; };
A80E6CCB0A1989CA007FB8C5 /* CSSPageRule.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPageRule.cpp; sourceTree = "<group>"; };
A80E6CCC0A1989CA007FB8C5 /* CSSImportRule.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSImportRule.h; sourceTree = "<group>"; };
@@ -20202,8 +20198,6 @@
501BAAB11395114B00F7ACEB /* CSSWrapShapes.cpp */,
501BA9E11393CEA000F7ACEB /* CSSWrapShapes.h */,
A80E6CE10A1989CA007FB8C5 /* DashboardRegion.h */,
- A80E6CC20A1989CA007FB8C5 /* FontFamilyValue.cpp */,
- A80E6CC90A1989CA007FB8C5 /* FontFamilyValue.h */,
4A6E9FC113C17D1D0046A7F8 /* FontFeatureValue.cpp */,
4A6E9FC213C17D1D0046A7F8 /* FontFeatureValue.h */,
A80E6CC70A1989CA007FB8C5 /* FontValue.cpp */,
@@ -22304,7 +22298,6 @@
B2C3DA660D006CD600EF6F26 /* FontDescription.h in Headers */,
B2C3DA680D006CD600EF6F26 /* FontFallbackList.h in Headers */,
B2C3DA6A0D006CD600EF6F26 /* FontFamily.h in Headers */,
- A80E6CF30A1989CA007FB8C5 /* FontFamilyValue.h in Headers */,
4A6E9FC813C17D570046A7F8 /* FontFeatureSettings.h in Headers */,
4A6E9FC413C17D1D0046A7F8 /* FontFeatureValue.h in Headers */,
0845680812B90DA600960A9F /* FontMetrics.h in Headers */,
@@ -25383,7 +25376,6 @@
37ACCF690DA414E70089E602 /* FontDescription.cpp in Sources */,
B2C3DA670D006CD600EF6F26 /* FontFallbackList.cpp in Sources */,
B2C3DA690D006CD600EF6F26 /* FontFamily.cpp in Sources */,
- A80E6CEC0A1989CA007FB8C5 /* FontFamilyValue.cpp in Sources */,
72626E020EF022FE00A07E20 /* FontFastPath.cpp in Sources */,
4A6E9FC713C17D570046A7F8 /* FontFeatureSettings.cpp in Sources */,
4A6E9FC313C17D1D0046A7F8 /* FontFeatureValue.cpp in Sources */,
Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/CSSFontSelector.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -42,7 +42,6 @@
#include "CachedResourceLoader.h"
#include "Document.h"
#include "FontCache.h"
-#include "FontFamilyValue.h"
#include "Frame.h"
#include "RenderObject.h"
#include "Settings.h"
@@ -254,11 +253,10 @@
CSSPrimitiveValue* item = static_cast<CSSPrimitiveValue*>(familyList->itemWithoutBoundsCheck(i));
String familyName;
if (item->isString())
- familyName = static_cast<FontFamilyValue*>(item)->familyName();
+ familyName = item->getStringValue();
else if (item->isIdent()) {
// We need to use the raw text for all the generic family types, since @font-face is a way of actually
// defining what font to use for those types.
- String familyName;
switch (item->getIdent()) {
case CSSValueSerif:
familyName = serifFamily;
Modified: trunk/Source/WebCore/css/CSSParser.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/CSSParser.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSParser.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -61,7 +61,6 @@
#include "Counter.h"
#include "Document.h"
#include "FloatConversion.h"
-#include "FontFamilyValue.h"
#include "FontFeatureValue.h"
#include "FontValue.h"
#include "HTMLParserIdioms.h"
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -54,7 +54,6 @@
#include "CSSTimingFunctionValue.h"
#include "CSSValueList.h"
#include "CursorList.h"
-#include "FontFamilyValue.h"
#include "FontFeatureValue.h"
#include "FontValue.h"
#include "Frame.h"
@@ -3210,10 +3209,9 @@
CSSPrimitiveValue* contentValue = static_cast<CSSPrimitiveValue*>(item);
AtomicString face;
Settings* settings = m_checker.document()->settings();
- if (contentValue->isString()) {
- if (contentValue->isFontFamilyValue())
- face = static_cast<FontFamilyValue*>(contentValue)->familyName();
- } else if (settings) {
+ if (contentValue->isString())
+ face = contentValue->getStringValue();
+ else if (settings) {
switch (contentValue->getIdent()) {
case CSSValueWebkitBody:
face = settings->standardFontFamily();
Modified: trunk/Source/WebCore/css/CSSValue.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/CSSValue.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSValue.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -48,7 +48,6 @@
#include "CSSUnicodeRangeValue.h"
#include "CSSValueList.h"
#include "FontValue.h"
-#include "FontFamilyValue.h"
#include "FontFeatureValue.h"
#include "ShadowValue.h"
#include "SVGColor.h"
@@ -110,8 +109,6 @@
return static_cast<const FontValue*>(this)->customCssText();
case FontFaceSrcClass:
return static_cast<const CSSFontFaceSrcValue*>(this)->customCssText();
- case FontFamilyClass:
- return static_cast<const FontFamilyValue*>(this)->customCssText();
case FontFeatureClass:
return static_cast<const FontFeatureValue*>(this)->customCssText();
case FunctionClass:
@@ -192,9 +189,6 @@
case FontFaceSrcClass:
delete static_cast<CSSFontFaceSrcValue*>(this);
return;
- case FontFamilyClass:
- delete static_cast<FontFamilyValue*>(this);
- return;
case FontFeatureClass:
delete static_cast<FontFeatureValue*>(this);
return;
Modified: trunk/Source/WebCore/css/CSSValue.h (108365 => 108366)
--- trunk/Source/WebCore/css/CSSValue.h 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSValue.h 2012-02-21 18:00:00 UTC (rev 108366)
@@ -62,7 +62,6 @@
bool isAspectRatioValue() const { return m_classType == AspectRatioClass; }
bool isBorderImageSliceValue() const { return m_classType == BorderImageSliceClass; }
bool isCursorImageValue() const { return m_classType == CursorImageClass; }
- bool isFontFamilyValue() const { return m_classType == FontFamilyClass; }
bool isFontFeatureValue() const { return m_classType == FontFeatureClass; }
bool isFontValue() const { return m_classType == FontClass; }
bool isImageGeneratorValue() const { return m_classType >= CanvasClass && m_classType <= RadialGradientClass; }
@@ -97,7 +96,6 @@
// Primitive class types must appear before PrimitiveClass.
ImageClass,
CursorImageClass,
- FontFamilyClass,
PrimitiveClass,
// Image generator classes.
Modified: trunk/Source/WebCore/css/CSSValuePool.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/CSSValuePool.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSValuePool.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -120,11 +120,11 @@
return entry.first->second;
}
-PassRefPtr<FontFamilyValue> CSSValuePool::createFontFamilyValue(const String& familyName)
+PassRefPtr<CSSPrimitiveValue> CSSValuePool::createFontFamilyValue(const String& familyName)
{
- RefPtr<FontFamilyValue>& value = m_fontFamilyValueCache.add(familyName, 0).first->second;
+ RefPtr<CSSPrimitiveValue>& value = m_fontFamilyValueCache.add(familyName, 0).first->second;
if (!value)
- value = FontFamilyValue::create(familyName);
+ value = CSSPrimitiveValue::create(familyName, CSSPrimitiveValue::CSS_STRING);
return value;
}
Modified: trunk/Source/WebCore/css/CSSValuePool.h (108365 => 108366)
--- trunk/Source/WebCore/css/CSSValuePool.h 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/CSSValuePool.h 2012-02-21 18:00:00 UTC (rev 108366)
@@ -29,7 +29,6 @@
#include "CSSInheritedValue.h"
#include "CSSInitialValue.h"
#include "CSSPrimitiveValue.h"
-#include "FontFamilyValue.h"
#include <wtf/HashMap.h>
#include <wtf/RefPtr.h>
@@ -40,7 +39,7 @@
static PassRefPtr<CSSValuePool> create() { return adoptRef(new CSSValuePool); }
~CSSValuePool();
- PassRefPtr<FontFamilyValue> createFontFamilyValue(const String&);
+ PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&);
PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
PassRefPtr<CSSInitialValue> createImplicitInitialValue() { return m_implicitInitialValue; }
PassRefPtr<CSSInitialValue> createExplicitInitialValue() { return m_explicitInitialValue; }
@@ -74,7 +73,7 @@
IntegerValueCache m_percentValueCache;
IntegerValueCache m_numberValueCache;
- typedef HashMap<String, RefPtr<FontFamilyValue> > FontFamilyValueCache;
+ typedef HashMap<String, RefPtr<CSSPrimitiveValue> > FontFamilyValueCache;
FontFamilyValueCache m_fontFamilyValueCache;
};
Deleted: trunk/Source/WebCore/css/FontFamilyValue.cpp (108365 => 108366)
--- trunk/Source/WebCore/css/FontFamilyValue.cpp 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/FontFamilyValue.cpp 2012-02-21 18:00:00 UTC (rev 108366)
@@ -1,64 +0,0 @@
-/*
- * (C) 1999-2003 Lars Knoll ([email protected])
- * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "FontFamilyValue.h"
-
-#include "CSSParser.h"
-
-namespace WebCore {
-
-static String stripFontFamilyJunk(const String& familyName)
-{
- // If there is anything in parentheses or square brackets at the end, delete it.
- // FIXME: Do we really need this? The original code mentioned "a language tag in
- // braces at the end" and "[Xft] qualifiers", but it's not clear either of those
- // is in active use on the web.
- unsigned length = familyName.length();
- while (length >= 3) {
- UChar startCharacter = 0;
- switch (familyName[length - 1]) {
- case ']':
- startCharacter = '[';
- break;
- case ')':
- startCharacter = '(';
- break;
- }
- if (!startCharacter)
- break;
- unsigned first = 0;
- for (unsigned i = length - 2; i > 0; --i) {
- if (familyName[i - 1] == ' ' && familyName[i] == startCharacter)
- first = i - 1;
- }
- if (!first)
- break;
- length = first;
- }
- return familyName.left(length);
-}
-
-FontFamilyValue::FontFamilyValue(const String& familyName)
- : CSSPrimitiveValue(FontFamilyClass, stripFontFamilyJunk(familyName), CSS_STRING)
-{
-}
-
-}
Deleted: trunk/Source/WebCore/css/FontFamilyValue.h (108365 => 108366)
--- trunk/Source/WebCore/css/FontFamilyValue.h 2012-02-21 17:35:17 UTC (rev 108365)
+++ trunk/Source/WebCore/css/FontFamilyValue.h 2012-02-21 18:00:00 UTC (rev 108366)
@@ -1,43 +0,0 @@
-/*
- * (C) 1999-2003 Lars Knoll ([email protected])
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef FontFamilyValue_h
-#define FontFamilyValue_h
-
-#include "CSSPrimitiveValue.h"
-
-namespace WebCore {
-
-class FontFamilyValue : public CSSPrimitiveValue {
-public:
- static PassRefPtr<FontFamilyValue> create(const String& familyName)
- {
- return adoptRef(new FontFamilyValue(familyName));
- }
-
- String familyName() const { return getStringValue(); }
-
-private:
- FontFamilyValue(const String& familyName);
-};
-
-} // namespace
-
-#endif