WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
CSS3 ch unit patch (EWS only version)
bug-85755-20130123121416.patch (text/plain), 43.99 KB, created by
Lamarque V. Souza
on 2013-01-23 06:17:24 PST
(
hide
)
Description:
CSS3 ch unit patch (EWS only version)
Filename:
MIME Type:
Creator:
Lamarque V. Souza
Created:
2013-01-23 06:17:24 PST
Size:
43.99 KB
patch
obsolete
>Subversion Revision: 140327 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4cf365afdda4f8c135d031b8d1c022ba3af7e0df..69a7d4b282e86a82ec270c589ad20e8844c804bb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,48 @@ >+2013-01-21 Lamarque V. Souza <Lamarque.Souza@basyskom.com> >+ >+ Support the ch unit from css3-values >+ https://bugs.webkit.org/show_bug.cgi?id=85755 >+ >+ Patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com> on 2013-01-21 >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: fast/css/css3-ch-unit.html >+ >+ * css/CSSCalculationValue.cpp: >+ (WebCore::unitCategory): >+ * css/CSSGrammar.y.in: >+ * css/CSSParser.cpp: >+ (WebCore::CSSParser::validUnit): >+ (WebCore::CSSParser::createPrimitiveNumericValue): >+ (WebCore::CSSParser::parseValidPrimitive): >+ (WebCore::CSSParser::detectNumberToken): >+ * css/CSSParserValues.cpp: >+ (WebCore::CSSParserValue::createCSSValue): >+ * css/CSSPrimitiveValue.cpp: >+ (WebCore::isValidCSSUnitTypeForDoubleConversion): >+ (WebCore::CSSPrimitiveValue::cleanup): >+ (WebCore::CSSPrimitiveValue::computeLengthDouble): >+ (WebCore::CSSPrimitiveValue::customCssText): >+ (WebCore::CSSPrimitiveValue::cloneForCSSOM): >+ * css/CSSPrimitiveValue.h: >+ (WebCore::CSSPrimitiveValue::isFontRelativeLength): >+ (WebCore::CSSPrimitiveValue::isLength): >+ * platform/graphics/FontMetrics.h: >+ (WebCore::FontMetrics::FontMetrics): >+ (WebCore::FontMetrics::zeroWidth): >+ (WebCore::FontMetrics::setZeroWidth): >+ (FontMetrics): >+ (WebCore::FontMetrics::hasZeroWidth): >+ (WebCore::FontMetrics::setHasZeroWidth): >+ * platform/graphics/SimpleFontData.cpp: >+ (WebCore::SimpleFontData::platformGlyphInit): >+ * platform/graphics/SimpleFontData.h: >+ (WebCore::SimpleFontData::zeroGlyph): >+ (WebCore::SimpleFontData::setZeroGlyph): >+ (SimpleFontData): >+ * platform/graphics/qt/SimpleFontDataQt.cpp: >+ (WebCore::SimpleFontData::platformInit): >+ > 2013-01-21 Oleg Smirnov <oleg.smirnov@lge.com> > > [Gtk] [Cairo] Memory leak when is WebView destroy. >diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >index 15e7055b313424fd2f9e046872a1efbe9b9bd4d2..de2def1baa00f56da3cbb9d833ec2c4dc14795af 100644 >--- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >@@ -49,8 +49,8 @@ ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; > ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED = ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED; > ENABLE_CSS_VARIABLES = ; >-ENABLE_CSS3_CONDITIONAL_RULES = ; >-ENABLE_CSS3_TEXT = ; >+ENABLE_CSS3_CONDITIONAL_RULES = ENABLE_CSS3_CONDITIONAL_RULES; >+ENABLE_CSS3_TEXT = ENABLE_CSS3_TEXT; > ENABLE_CUSTOM_SCHEME_HANDLER = ; > ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME)); > ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; >diff --git a/Source/WebCore/Configurations/FeatureDefines.xcconfig b/Source/WebCore/Configurations/FeatureDefines.xcconfig >index 468afbd6c6d4eb40ac5a14b22b2e0293be1399c7..88aea8d112f067173ba645226b8f2dc6a18f434b 100644 >--- a/Source/WebCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebCore/Configurations/FeatureDefines.xcconfig >@@ -49,8 +49,8 @@ ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; > ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED = ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED; > ENABLE_CSS_VARIABLES = ; >-ENABLE_CSS3_CONDITIONAL_RULES = ; >-ENABLE_CSS3_TEXT = ; >+ENABLE_CSS3_CONDITIONAL_RULES = ENABLE_CSS3_CONDITIONAL_RULES; >+ENABLE_CSS3_TEXT = ENABLE_CSS3_TEXT; > ENABLE_CUSTOM_SCHEME_HANDLER = ; > ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME)); > ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; >diff --git a/Source/WebCore/GNUmakefile.features.am.in b/Source/WebCore/GNUmakefile.features.am.in >index 5bd37c774bc44d08d9656bbbb382dcb29c4c87d0..6e5f19b9aa552558d9392c509d9fc3ed7e61d2f3 100644 >--- a/Source/WebCore/GNUmakefile.features.am.in >+++ b/Source/WebCore/GNUmakefile.features.am.in >@@ -6,7 +6,7 @@ feature_defines_defaults += \ > ENABLE_CANVAS_PROXY=0 \ > ENABLE_CHANNEL_MESSAGING=1 \ > ENABLE_CSP_NEXT=0 \ >- ENABLE_CSS3_TEXT=0 \ >+ ENABLE_CSS3_TEXT=1 \ > ENABLE_CSS_BOX_DECORATION_BREAK=1 \ > ENABLE_CSS_COMPOSITING=0 \ > ENABLE_CSS_DEVICE_ADAPTATION=0 \ >@@ -19,7 +19,7 @@ feature_defines_defaults += \ > ENABLE_CSS_STICKY_POSITION=0 \ > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED=1 \ > ENABLE_CSS_VARIABLES=0 \ >- ENABLE_CSS3_CONDITIONAL_RULES=0 \ >+ ENABLE_CSS3_CONDITIONAL_RULES=1 \ > ENABLE_CUSTOM_SCHEME_HANDLER=0 \ > ENABLE_DASHBOARD_SUPPORT=0 \ > ENABLE_DATALIST_ELEMENT=0 \ >diff --git a/Source/WebCore/css/CSSCalculationValue.cpp b/Source/WebCore/css/CSSCalculationValue.cpp >index e90a7d019616b468af6e054491b0c056a8f66d0a..fb7152ceb0dcec7fb707b86ebf2c413e22e98d6c 100644 >--- a/Source/WebCore/css/CSSCalculationValue.cpp >+++ b/Source/WebCore/css/CSSCalculationValue.cpp >@@ -67,6 +67,7 @@ static CalculationCategory unitCategory(CSSPrimitiveValue::UnitTypes type) > case CSSPrimitiveValue::CSS_PT: > case CSSPrimitiveValue::CSS_PC: > case CSSPrimitiveValue::CSS_REMS: >+ case CSSPrimitiveValue::CSS_CHS: > return CalcLength; > #if ENABLE(CSS_VARIABLES) > case CSSPrimitiveValue::CSS_VARIABLE_NAME: >diff --git a/Source/WebCore/css/CSSGrammar.y.in b/Source/WebCore/css/CSSGrammar.y.in >index 6187d6c1545a8e3c07176420e04a93ed41ec0812..c5c6d090a377f67540ae65d479687abcd31b0e4c 100644 >--- a/Source/WebCore/css/CSSGrammar.y.in >+++ b/Source/WebCore/css/CSSGrammar.y.in >@@ -61,7 +61,7 @@ static inline int cssyyerror(void*, const char*) > > %} > >-%expect 65 >+%expect 66 > > %nonassoc LOWEST_PREC > >@@ -93,6 +93,7 @@ static inline int cssyyerror(void*, const char*) > %token PAGE_SYM > %token MEDIA_SYM > #if ENABLE_CSS3_CONDITIONAL_RULES >+/* Line added just to force this file to be processed during incremental build. */ > %token SUPPORTS_SYM > #endif > %token FONT_FACE_SYM >@@ -141,6 +142,7 @@ static inline int cssyyerror(void*, const char*) > #endif > > %token <number> REMS >+%token <number> CHS > %token <number> QEMS > %token <number> EMS > %token <number> EXS >@@ -1684,6 +1686,7 @@ unary_term: > if (parser->m_styleSheet) > parser->m_styleSheet->parserSetUsesRemUnits(true); > } >+ | CHS maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_CHS; } > | VW maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VW; } > | VH maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VH; } > | VMIN maybe_space { $$.id = 0; $$.fValue = $1; $$.unit = CSSPrimitiveValue::CSS_VMIN; } >diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp >index 592b46799edd6767ab7e86efa09eaa748d3ee424..869603926292fc6904ad7988af9bafba57e2c475 100644 >--- a/Source/WebCore/css/CSSParser.cpp >+++ b/Source/WebCore/css/CSSParser.cpp >@@ -1576,6 +1576,7 @@ bool CSSParser::validUnit(CSSParserValue* value, Units unitflags, CSSParserMode > case CSSParserValue::Q_EMS: > case CSSPrimitiveValue::CSS_EMS: > case CSSPrimitiveValue::CSS_REMS: >+ case CSSPrimitiveValue::CSS_CHS: > case CSSPrimitiveValue::CSS_EXS: > case CSSPrimitiveValue::CSS_PX: > case CSSPrimitiveValue::CSS_CM: >@@ -1630,13 +1631,13 @@ inline PassRefPtr<CSSPrimitiveValue> CSSParser::createPrimitiveNumericValue(CSSP > > #if ENABLE(CSS_IMAGE_RESOLUTION) || ENABLE(RESOLUTION_MEDIA_QUERY) > ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ) >- || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS) >- || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN) >- || (value->unit >= CSSPrimitiveValue::CSS_DPPX && value->unit <= CSSPrimitiveValue::CSS_DPCM)); >+ || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_CHS) >+ || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN) >+ || (value->unit >= CSSPrimitiveValue::CSS_DPPX && value->unit <= CSSPrimitiveValue::CSS_DPCM)); > #else > ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ) >- || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS) >- || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN)); >+ || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_CHS) >+ || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN)); > #endif > return cssValuePool().createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)); > } >@@ -1692,7 +1693,7 @@ inline PassRefPtr<CSSPrimitiveValue> CSSParser::parseValidPrimitive(int identifi > return createPrimitiveStringValue(value); > if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ) > return createPrimitiveNumericValue(value); >- if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS) >+ if (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_CHS) > return createPrimitiveNumericValue(value); > if (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN) > return createPrimitiveNumericValue(value); >@@ -9776,6 +9777,8 @@ inline void CSSParser::detectNumberToken(CharacterType* type, int length) > case 'c': > if (length == 2 && isASCIIAlphaCaselessEqual(type[1], 'm')) > m_token = CMS; >+ else if (length == 2 && isASCIIAlphaCaselessEqual(type[1], 'h')) >+ m_token = CHS; > return; > > case 'd': >diff --git a/Source/WebCore/css/CSSParserValues.cpp b/Source/WebCore/css/CSSParserValues.cpp >index d23b8585d5d7bb8eb0f268234b6ed06a5881df27..b6bb466a63a294f4e3a8345532f8f67b4ffd634d 100644 >--- a/Source/WebCore/css/CSSParserValues.cpp >+++ b/Source/WebCore/css/CSSParserValues.cpp >@@ -113,6 +113,7 @@ PassRefPtr<CSSValue> CSSParserValue::createCSSValue() > case CSSPrimitiveValue::CSS_VMIN: > case CSSPrimitiveValue::CSS_TURN: > case CSSPrimitiveValue::CSS_REMS: >+ case CSSPrimitiveValue::CSS_CHS: > return CSSPrimitiveValue::create(fValue, primitiveUnit); > case CSSPrimitiveValue::CSS_UNKNOWN: > case CSSPrimitiveValue::CSS_DIMENSION: >diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp >index 4804e19843f5ff0520f628175ace922f8b458e6a..a3189931a112b484206acdab476f54d39b492b33 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.cpp >+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp >@@ -88,6 +88,7 @@ static inline bool isValidCSSUnitTypeForDoubleConversion(CSSPrimitiveValue::Unit > case CSSPrimitiveValue::CSS_PX: > case CSSPrimitiveValue::CSS_RAD: > case CSSPrimitiveValue::CSS_REMS: >+ case CSSPrimitiveValue::CSS_CHS: > case CSSPrimitiveValue::CSS_S: > case CSSPrimitiveValue::CSS_TURN: > case CSSPrimitiveValue::CSS_VW: >@@ -419,6 +420,7 @@ void CSSPrimitiveValue::cleanup() > case CSS_EMS: > case CSS_EXS: > case CSS_REMS: >+ case CSS_CHS: > case CSS_PX: > case CSS_CM: > case CSS_MM: >@@ -538,6 +540,9 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* r > else > factor = 1.0; > break; >+ case CSS_CHS: >+ factor = style->fontMetrics().zeroWidth(); >+ break; > case CSS_PX: > factor = 1.0; > break; >@@ -895,6 +900,9 @@ String CSSPrimitiveValue::customCssText() const > case CSS_REMS: > text = formatNumber(m_value.num, "rem"); > break; >+ case CSS_CHS: >+ text = formatNumber(m_value.num, "ch"); >+ break; > case CSS_PX: > text = formatNumber(m_value.num, "px"); > break; >@@ -1216,6 +1224,7 @@ PassRefPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() const > case CSS_EMS: > case CSS_EXS: > case CSS_REMS: >+ case CSS_CHS: > case CSS_PX: > case CSS_CM: > case CSS_MM: >diff --git a/Source/WebCore/css/CSSPrimitiveValue.h b/Source/WebCore/css/CSSPrimitiveValue.h >index fcc5b83b877e42bd91ee6a4683dd8548bee9851f..ff863c6dcbaca8bca92bae794653610fe1f30cde 100644 >--- a/Source/WebCore/css/CSSPrimitiveValue.h >+++ b/Source/WebCore/css/CSSPrimitiveValue.h >@@ -115,22 +115,23 @@ public: > // These are from CSS3 Values and Units, but that isn't a finished standard yet > CSS_TURN = 107, > CSS_REMS = 108, >+ CSS_CHS = 109, > > // This is used internally for counter names (as opposed to counter values) >- CSS_COUNTER_NAME = 109, >+ CSS_COUNTER_NAME = 110, > > // This is used by the CSS Exclusions draft >- CSS_SHAPE = 110, >+ CSS_SHAPE = 111, > > // Used by border images. >- CSS_QUAD = 111, >+ CSS_QUAD = 112, > >- CSS_CALC = 112, >- CSS_CALC_PERCENTAGE_WITH_NUMBER = 113, >- CSS_CALC_PERCENTAGE_WITH_LENGTH = 114, >+ CSS_CALC = 113, >+ CSS_CALC_PERCENTAGE_WITH_NUMBER = 114, >+ CSS_CALC_PERCENTAGE_WITH_LENGTH = 115, > > #if ENABLE(CSS_VARIABLES) >- CSS_VARIABLE_NAME = 115, >+ CSS_VARIABLE_NAME = 116, > #endif > }; > >@@ -161,13 +162,16 @@ public: > bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX && m_primitiveUnitType <= CSS_PC; } > bool isFontRelativeLength() const > { >- return m_primitiveUnitType == CSS_EMS || m_primitiveUnitType == CSS_EXS || m_primitiveUnitType == CSS_REMS; >+ return m_primitiveUnitType == CSS_EMS >+ || m_primitiveUnitType == CSS_EXS >+ || m_primitiveUnitType == CSS_REMS >+ || m_primitiveUnitType == CSS_CHS; > } > bool isIdent() const { return m_primitiveUnitType == CSS_IDENT; } > bool isLength() const > { > unsigned short type = primitiveType(); >- return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS; >+ return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type == CSS_CHS; > } > bool isNumber() const { return primitiveType() == CSS_NUMBER; } > bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; } >diff --git a/Source/WebCore/css/CSSPropertyNames.in b/Source/WebCore/css/CSSPropertyNames.in >index 1b34edc2745a72dbe0729428d35bd82b7b4b0a91..59aa51cc28502e99fb32d815d7a1fce910d33722 100644 >--- a/Source/WebCore/css/CSSPropertyNames.in >+++ b/Source/WebCore/css/CSSPropertyNames.in >@@ -362,6 +362,7 @@ z-index > -webkit-text-combine > -epub-text-combine = -webkit-text-combine > #if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT >+// Line added just to force this file to be processed during incremental build. > -webkit-text-decoration-line > -webkit-text-decoration-style > -webkit-text-align-last >diff --git a/Source/WebCore/css/CSSRule.idl b/Source/WebCore/css/CSSRule.idl >index 8e73e5ea10d88c54fec57bf90c5280dc1f74f2b1..24d89234e6dd06624d036aab2f82d7bc00cb7f49 100644 >--- a/Source/WebCore/css/CSSRule.idl >+++ b/Source/WebCore/css/CSSRule.idl >@@ -38,6 +38,7 @@ > const unsigned short WEBKIT_KEYFRAMES_RULE = 7; > const unsigned short WEBKIT_KEYFRAME_RULE = 8; > #if defined(ENABLE_CSS3_CONDITIONAL_RULES) && ENABLE_CSS3_CONDITIONAL_RULES >+ /* Line added just to force this file to be processed during incremental build. */ > const unsigned short SUPPORTS_RULE = 12; > #endif > #if defined(ENABLE_CSS_DEVICE_ADAPTATION) && ENABLE_CSS_DEVICE_ADAPTATION >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 75926f627a37f206f114f16a77729e8fd936e80b..a698f6e39da6cbc7c073e656325c35af2afdef68 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -452,6 +452,7 @@ thick > thin > underline > #if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT >+// Line added just to force this file to be processed during incremental build. > wavy > #endif > -webkit-nowrap >diff --git a/Source/WebCore/platform/graphics/FontMetrics.h b/Source/WebCore/platform/graphics/FontMetrics.h >index 7981d8eead53ad8eb92ffe7561341784fecbfe35..5142ffe2537821b8c84b6a9a7f6d88dde8ea5d4d 100644 >--- a/Source/WebCore/platform/graphics/FontMetrics.h >+++ b/Source/WebCore/platform/graphics/FontMetrics.h >@@ -36,7 +36,9 @@ public: > , m_lineGap(0) > , m_lineSpacing(0) > , m_xHeight(0) >+ , m_zeroWidth(0) > , m_hasXHeight(false) >+ , m_hasZeroWidth(false) > { > } > >@@ -110,6 +112,16 @@ public: > return ascent() == other.ascent() && descent() == other.descent() && lineGap() == other.lineGap(); > } > >+ float zeroWidth() const { return m_zeroWidth; } >+ void setZeroWidth(float zeroWidth) >+ { >+ m_zeroWidth = zeroWidth; >+ m_hasZeroWidth = true; >+ } >+ >+ bool hasZeroWidth() const { return m_hasZeroWidth; } >+ void setHasZeroWidth(bool hasZeroWidth) { m_hasZeroWidth = hasZeroWidth; } >+ > private: > friend class SimpleFontData; > >@@ -130,7 +142,9 @@ private: > float m_lineGap; > float m_lineSpacing; > float m_xHeight; >+ float m_zeroWidth; > bool m_hasXHeight; >+ bool m_hasZeroWidth; > }; > > static inline float scaleEmToUnits(float x, unsigned unitsPerEm) >diff --git a/Source/WebCore/platform/graphics/SimpleFontData.cpp b/Source/WebCore/platform/graphics/SimpleFontData.cpp >index 65194f0120a5f9d9a9b54fa4dcaea3f9c2512c0f..1dded40ebdd4b3308902d9788d6f4d4b7b3c6118 100644 >--- a/Source/WebCore/platform/graphics/SimpleFontData.cpp >+++ b/Source/WebCore/platform/graphics/SimpleFontData.cpp >@@ -113,6 +113,7 @@ void SimpleFontData::platformGlyphInit() > LOG_ERROR("Failed to get glyph page zero."); > m_spaceGlyph = 0; > m_spaceWidth = 0; >+ m_zeroGlyph = 0; > m_adjustedSpaceWidth = 0; > determinePitch(); > m_zeroWidthSpaceGlyph = 0; >@@ -129,6 +130,8 @@ void SimpleFontData::platformGlyphInit() > m_spaceGlyph = glyphPageZero->glyphDataForCharacter(' ').glyph; > float width = widthForGlyph(m_spaceGlyph); > m_spaceWidth = width; >+ m_zeroGlyph = glyphPageZero->glyphDataForCharacter('0').glyph; >+ m_fontMetrics.setZeroWidth(widthForGlyph(m_zeroGlyph)); > determinePitch(); > m_adjustedSpaceWidth = m_treatAsFixedPitch ? ceilf(width) : roundf(width); > >diff --git a/Source/WebCore/platform/graphics/SimpleFontData.h b/Source/WebCore/platform/graphics/SimpleFontData.h >index 41f8015d13e2e54e69860210332645b9a82e3029..bc3881dac7d39790392e97746a58f69ba534b1eb 100644 >--- a/Source/WebCore/platform/graphics/SimpleFontData.h >+++ b/Source/WebCore/platform/graphics/SimpleFontData.h >@@ -160,6 +160,8 @@ public: > Glyph zeroWidthSpaceGlyph() const { return m_zeroWidthSpaceGlyph; } > void setZeroWidthSpaceGlyph(Glyph spaceGlyph) { m_zeroWidthSpaceGlyph = spaceGlyph; } > bool isZeroWidthSpaceGlyph(Glyph glyph) const { return glyph == m_zeroWidthSpaceGlyph && glyph; } >+ Glyph zeroGlyph() const { return m_zeroGlyph; } >+ void setZeroGlyph(Glyph zeroGlyph) { m_zeroGlyph = zeroGlyph; } > > virtual const SimpleFontData* fontDataForCharacter(UChar32) const; > virtual bool containsCharacters(const UChar*, int length) const; >@@ -280,6 +282,7 @@ private: > > Glyph m_spaceGlyph; > float m_spaceWidth; >+ Glyph m_zeroGlyph; > float m_adjustedSpaceWidth; > > Glyph m_zeroWidthSpaceGlyph; >diff --git a/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp b/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp >index 44099b3eb2c198dc410bd76cf2fd0e26715f0908..dc9ea9223a1b780eb19c90db70fc215dbc36ffd9 100644 >--- a/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp >+++ b/Source/WebCore/platform/graphics/qt/SimpleFontDataQt.cpp >@@ -88,6 +88,10 @@ void SimpleFontData::platformInit() > QVector<QPointF> advances = rawFont.advancesForGlyphIndexes(indexes); > float spaceWidth = advances.at(0).x(); > >+ indexes = rawFont.glyphIndexesForString(QLatin1String("0")); >+ advances = rawFont.advancesForGlyphIndexes(indexes); >+ float zeroWidth = advances.at(0).x(); >+ > // The line spacing should always be >= (ascent + descent), but this > // may be false in some cases due to misbehaving platform libraries. > // Workaround from SimpleFontPango.cpp and SimpleFontFreeType.cpp >@@ -104,6 +108,7 @@ void SimpleFontData::platformInit() > m_fontMetrics.setLineSpacing(lineSpacing); > m_fontMetrics.setXHeight(xHeight); > m_fontMetrics.setLineGap(lineGap); >+ m_fontMetrics.setZeroWidth(zeroWidth); > m_spaceWidth = spaceWidth; > } > >diff --git a/Source/WebKit/chromium/features.gypi b/Source/WebKit/chromium/features.gypi >index 0760fa32641ce790bdc42d7233337afef62ca904..d5ec61096da48b600f759fd754d209e15da344dc 100644 >--- a/Source/WebKit/chromium/features.gypi >+++ b/Source/WebKit/chromium/features.gypi >@@ -39,8 +39,8 @@ > 'ENABLE_CANVAS_PROXY=1', > 'ENABLE_CHANNEL_MESSAGING=1', > 'ENABLE_CSP_NEXT=1', >- 'ENABLE_CSS3_CONDITIONAL_RULES=0', >- 'ENABLE_CSS3_TEXT=0', >+ 'ENABLE_CSS3_CONDITIONAL_RULES=1', >+ 'ENABLE_CSS3_TEXT=1', > 'ENABLE_CSS_BOX_DECORATION_BREAK=1', > 'ENABLE_CSS_COMPOSITING=0', > 'ENABLE_CSS_DEVICE_ADAPTATION=0', >diff --git a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig b/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig >index ffd82a0254e7838f4971c138c985b7c9852e9272..d38ba1cd08b15143865c817357428296388ec74c 100644 >--- a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig >@@ -49,8 +49,8 @@ ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; > ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED = ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED; > ENABLE_CSS_VARIABLES = ; >-ENABLE_CSS3_CONDITIONAL_RULES = ; >-ENABLE_CSS3_TEXT = ; >+ENABLE_CSS3_CONDITIONAL_RULES = ENABLE_CSS3_CONDITIONAL_RULES; >+ENABLE_CSS3_TEXT = ENABLE_CSS3_TEXT; > ENABLE_CUSTOM_SCHEME_HANDLER = ; > ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME)); > ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; >diff --git a/Source/WebKit2/Configurations/FeatureDefines.xcconfig b/Source/WebKit2/Configurations/FeatureDefines.xcconfig >index ffd82a0254e7838f4971c138c985b7c9852e9272..d38ba1cd08b15143865c817357428296388ec74c 100644 >--- a/Source/WebKit2/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKit2/Configurations/FeatureDefines.xcconfig >@@ -49,8 +49,8 @@ ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; > ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED = ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED; > ENABLE_CSS_VARIABLES = ; >-ENABLE_CSS3_CONDITIONAL_RULES = ; >-ENABLE_CSS3_TEXT = ; >+ENABLE_CSS3_CONDITIONAL_RULES = ENABLE_CSS3_CONDITIONAL_RULES; >+ENABLE_CSS3_TEXT = ENABLE_CSS3_TEXT; > ENABLE_CUSTOM_SCHEME_HANDLER = ; > ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(PLATFORM_NAME)); > ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; >diff --git a/Source/cmake/OptionsCommon.cmake b/Source/cmake/OptionsCommon.cmake >index 4137d3b630d23cc3aabe7c0b07940deabedebbae..7195a7111dd91793f3b3f749a678590adb543e72 100644 >--- a/Source/cmake/OptionsCommon.cmake >+++ b/Source/cmake/OptionsCommon.cmake >@@ -37,3 +37,6 @@ set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)") > > set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Where to install libraries (lib${LIB_SUFFIX})") > set(EXEC_INSTALL_DIR "bin" CACHE PATH "Where to install executables") >+ >+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS3_CONDITIONAL_RULES ON) >+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CSS3_TEXT ON) >diff --git a/Source/cmake/WebKitFeatures.cmake b/Source/cmake/WebKitFeatures.cmake >index 9600b374907aa9d09d9dcc3cc585a94c5fc0208b..297ef4d65a0ad633878550ec539eab6258fa92e3 100644 >--- a/Source/cmake/WebKitFeatures.cmake >+++ b/Source/cmake/WebKitFeatures.cmake >@@ -21,8 +21,8 @@ macro(WEBKIT_OPTION_BEGIN) > WEBKIT_OPTION_DEFINE(ENABLE_CANVAS_PROXY "Toggle CanvasProxy support" OFF) > WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" ON) > WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" OFF) >- WEBKIT_OPTION_DEFINE(ENABLE_CSS3_CONDITIONAL_RULES "Toggle CSS3 Conditional Rules support" OFF) >- WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT "Toggle CSS3 Text support" OFF) >+ WEBKIT_OPTION_DEFINE(ENABLE_CSS3_CONDITIONAL_RULES "Toggle CSS3 Conditional Rules support" ON) >+ WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT "Toggle CSS3 Text support" ON) > WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration break (CSS Backgrounds and Borders) support" ON) > WEBKIT_OPTION_DEFINE(ENABLE_CSS_COMPOSITING "Toggle CSS COMPOSITING support" OFF) > WEBKIT_OPTION_DEFINE(ENABLE_CSS_DEVICE_ADAPTATION "Toggle CSS Device Adaptation support" OFF) >diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm >index 295db8d2d6f920491ce7ba1565b4b1c70d9758b2..05edb7e1ac4ad7f5ca1b4a88cff70620e5464457 100644 >--- a/Tools/Scripts/webkitperl/FeatureList.pm >+++ b/Tools/Scripts/webkitperl/FeatureList.pm >@@ -185,10 +185,13 @@ my @features = ( > define => "ENABLE_CSS_FILTERS", default => isAppleWebKit() || isBlackBerry(), value => \$cssFiltersSupport }, > > { option => "css3-conditional-rules", desc => "Toggle CSS3 Conditional Rules support (i.e. \@supports)", >- define => "ENABLE_CSS3_CONDITIONAL_RULES", default => 0, value => \$css3ConditionalRulesSupport }, >+ define => "ENABLE_CSS3_CONDITIONAL_RULES", default => 1, value => \$css3ConditionalRulesSupport }, > > { option => "css3-text", desc => "Toggle CSS3 Text support", >- define => "ENABLE_CSS3_TEXT", default => (isEfl() || isGtk()), value => \$css3TextSupport }, >+ define => "ENABLE_CSS3_TEXT", default => 1, value => \$css3TextSupport }, >+ >+ { option => "css-hierarchies", desc => "Toggle CSS Hierarchy support", >+ define => "ENABLE_CSS_HIERARCHIES", default => 0, value => \$cssHierarchiesSupport }, > > { option => "css-box-decoration-break", desc => "Toggle CSS box-decoration-break support", > define => "ENABLE_CSS_BOX_DECORATION_BREAK", default => 1, value => \$cssBoxDecorationBreakSupport }, >diff --git a/Tools/qmake/mkspecs/features/features.pri b/Tools/qmake/mkspecs/features/features.pri >index e3e408bedabe9aa5ae5d43ab82d9bc7ba8d1ab70..883737315401ac60c037e24267bbbcc6b34aad32 100644 >--- a/Tools/qmake/mkspecs/features/features.pri >+++ b/Tools/qmake/mkspecs/features/features.pri >@@ -34,8 +34,8 @@ FEATURE_DEFAULTS = \ > ENABLE_CSS_STICKY_POSITION=1 \ > ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED=1 \ > ENABLE_CSS_VARIABLES=0 \ >- ENABLE_CSS3_CONDITIONAL_RULES=0 \ >- ENABLE_CSS3_TEXT=0 \ >+ ENABLE_CSS3_CONDITIONAL_RULES=1 \ >+ ENABLE_CSS3_TEXT=1 \ > ENABLE_DASHBOARD_SUPPORT=0 \ > ENABLE_DATAGRID=0 \ > ENABLE_DATALIST_ELEMENT=1 \ >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 51dccc0d140e949016271814078c926bfdb46463..2a7811c8cb2db9e1bfb8aa57539138d221418c77 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2013-01-21 Lamarque V. Souza <Lamarque.Souza@basyskom.com> >+ >+ Support the ch unit from css3-values >+ https://bugs.webkit.org/show_bug.cgi?id=85755 >+ >+ Patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com> on 2013-01-21 >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/css/css3-ch-unit.html: Added. >+ * platform/chromium-linux/fast/css/css3-ch-unit-expected.png: Added. >+ * platform/chromium-linux/fast/css/css3-ch-unit-expected.txt: Added. >+ * platform/mac-wk2/TestExpectations: Unit test needs rebaselining. >+ * platform/qt/fast/css/css3-ch-unit-expected.txt: Added. >+ > 2013-01-21 Kent Tamura <tkent@chromium.org> > > INPUT_MULTIPLE_FIELDS_UI: should not dispatch 'input' events if the element value is not updated >diff --git a/LayoutTests/fast/css/css3-ch-unit-expected.txt b/LayoutTests/fast/css/css3-ch-unit-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..fbae3deee3c484dec8d2e970fb7a7db42d279d15 >--- /dev/null >+++ b/LayoutTests/fast/css/css3-ch-unit-expected.txt >@@ -0,0 +1,58 @@ >+This is a test to make sure ch units work as intended. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS document.getElementById("box_mono_zero").clientWidth is 0 >+PASS document.getElementById("box_mono_four1").clientWidth is document.getElementById("box_mono_four2").clientWidth >+PASS document.getElementById("box_monofallthrough_four1").clientWidth is document.getElementById("box_monofallthrough_four2").clientWidth >+PASS document.getElementById("mono_box_alphalen1").clientWidth is document.getElementById("mono_box_alphalen2").clientWidth >+PASS document.getElementById("box_one").clientWidth * 26 is document.getElementById("box_alphalen").clientWidth >+PASS document.getElementById("arial_box_one").clientWidth * 26 is document.getElementById("arial_box_alphalen").clientWidth >+PASS document.getElementById("helvetica_box_one").clientWidth * 26 is document.getElementById("helvetica_box_alphalen").clientWidth >+PASS document.getElementById("times_box_one").clientWidth * 4 is document.getElementById("box_times_four").clientWidth >+PASS document.getElementById("arial_box_one").clientWidth * 4 is document.getElementById("box_arial_four").clientWidth >+PASS document.getElementById("helvetica_box_one").clientWidth * 4 is document.getElementById("box_helvetica_four").clientWidth >+PASS document.getElementById("ref_box_arial_one").clientWidth is >= document.getElementById("box_arial_one").clientWidth >+PASS document.getElementById("ref_box_times_one").clientWidth is >= document.getElementById("box_times_one").clientWidth >+PASS document.getElementById("ref_box_sansserif_one").clientWidth is >= document.getElementById("box_sansserif_one").clientWidth >+PASS forcedsmall is chsmall >+PASS The first line is higher than the other two. >+PASS document.getElementById("box_mono_one").clientWidth is document.getElementById("box_mono").clientWidth >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+This is a test to make sure ch units work as intended. You should not see anything red on this page. >+ >+Only 'PASS' should be visible in a web browser (it is Ok to see some 'FAIL' in DumpRenderTree): >+PASSFAIL >+PASS >+PASSFAIL >+PASS >+The whole lower case alphabet should be readable: >+abcdefghijklmnopqrstuvwxyzFAIL >+abcdefghijklmnopqrstuvwxyz >+abcdefghijklmnopqrstuvwxyz >+abcdefghijklmnopqrstuvwxyz >+abcdefghijklmnopqrstuvwxyz >+Four zeroes should be visible, nothing else: >+0000FAIL >+0000FAIL >+0000FAIL >+There should be more than one green '|' visible (non-monospaced fonts): >+|||0|||| >+||| >+|||0|||| >+||| >+|||0|||| >+||| >+This box has a 20px font size. The last two '0's should be the same size. >+0 >+0 >+0 >+PASS >+I'm a pseudo selected first line, I should be bigger than the rest. >+I'm the second line. >+Last in line. But one day... the throne will be mine! >+PASS >+0 >diff --git a/LayoutTests/fast/css/css3-ch-unit.html b/LayoutTests/fast/css/css3-ch-unit.html >new file mode 100644 >index 0000000000000000000000000000000000000000..864e5d448fd8552b91990e1d5f150dd35685a5bd >--- /dev/null >+++ b/LayoutTests/fast/css/css3-ch-unit.html >@@ -0,0 +1,192 @@ >+<!doctype html> >+<html> >+<head> >+<style type="text/css"> >+ .box { >+ margin: 0px; >+ padding: 0px; >+ overflow: hidden; >+ } >+ .border { border:1px solid black; } >+ >+ /* font family classes */ >+ .mono { font-family: monospace; } >+ .monofallthrough { font-family: nonexistant, monospace; } >+ .serif { font-family: serif; } >+ .sans-serif { font-family: sans-serif; } >+ .courier { font-family: courier; } >+ .arial { font-family: arial; } >+ .times { font-family: times; } >+ .helvetica { font-family: helvetica; } >+ >+ /* ch-length containers */ >+ .one { width: 1ch; } >+ .four { width: 4ch; } >+ .zero { width: 0ch; } >+ .alphalen { width: 26ch; } >+ >+ /* font sizes for the relative size test */ >+ .large { font-size:20px; } >+ .relative { font-size:1ch; } >+ >+ /* pass/fail colors */ >+ .pass { color: green; } >+ .fail { color: red; } >+ >+ /* pseudo-elements */ >+ #pseudo{ >+ font-size:2ch; >+ } >+ #pseudo:first-line { >+ font-size:3ch; >+ } >+ #pseudo span:last-child { >+ font-size:1ch; >+ } >+</style> >+<script src="../js/resources/js-test-pre.js"></script> >+<script type="text/javascript"> >+function pass() { >+ document.write('<span class="pass">PASS</span>'); >+} >+function fail(msg) { >+ document.write('<span class="fail">FAIL ('+msg+')</span>'); >+} >+//testRunner.dumpAsText(true); >+</script> >+</head> >+<body> >+ <p>This is a test to make sure ch units work as intended. You should not see <b>anything</b> red on this page.</p> >+ Only 'PASS' should be visible in a web browser (it is Ok to see some 'FAIL' in DumpRenderTree): >+ <div id="box_mono_zero" class="box mono zero"></div> >+ <script type="text/javascript"> >+ description("This is a test to make sure ch units work as intended.") >+ shouldEvaluateTo('document.getElementById("box_mono_zero").clientWidth', "0"); >+ </script> >+ >+ <div id="box_mono_four1" class="box mono four"><span class="pass">PASS</span><span class="fail">FAIL</span></div> >+ <div id="box_mono_four2" class="box mono four"><span class="pass">PASS</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("box_mono_four1").clientWidth', 'document.getElementById("box_mono_four2").clientWidth'); >+ </script> >+ >+ <div id="box_monofallthrough_four1" class="box monofallthrough four"><span class="pass">PASS</span><span class="fail">FAIL</span></div> >+ <div id="box_monofallthrough_four2" class="box monofallthrough four"><span class="pass">PASS</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("box_monofallthrough_four1").clientWidth', 'document.getElementById("box_monofallthrough_four2").clientWidth'); >+ </script> >+ >+ The whole lower case alphabet should be readable: >+ <div id="mono_box_alphalen1" class="mono box alphalen"><span class="pass">abcdefghijklmnopqrstuvwxyz</span><span class="fail">FAIL</span></div> >+ <div id="mono_box_alphalen2" class="mono box alphalen"><span class="pass">abcdefghijklmnopqrstuvwxyz</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("mono_box_alphalen1").clientWidth', 'document.getElementById("mono_box_alphalen2").clientWidth'); >+ </script> >+ >+ <div id="box_one" class="box one"></div> >+ <div id="box_alphalen" class="box alphalen"><span class="pass">abcdefghijklmnopqrstuvwxyz</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("box_one").clientWidth * 26', 'document.getElementById("box_alphalen").clientWidth'); >+ </script> >+ >+ <div id="arial_box_one" class="arial box one"></div> >+ <div id="arial_box_alphalen" class="arial box alphalen"><span class="pass">abcdefghijklmnopqrstuvwxyz</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("arial_box_one").clientWidth * 26', 'document.getElementById("arial_box_alphalen").clientWidth'); >+ </script> >+ >+ <div id="helvetica_box_one" class="helvetica box one"></div> >+ <div id="helvetica_box_alphalen" class="helvetica box alphalen"><span class="pass">abcdefghijklmnopqrstuvwxyz</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("helvetica_box_one").clientWidth * 26', 'document.getElementById("helvetica_box_alphalen").clientWidth'); >+ </script> >+ >+ Four zeroes should be visible, nothing else: >+ <div id="times_box_one" class="times box one"></div> >+ <div id="box_times_four" class="box times four"><span class="pass">0000</span><span class="fail">FAIL</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("times_box_one").clientWidth * 4', 'document.getElementById("box_times_four").clientWidth'); >+ </script> >+ >+ <div id="box_arial_four" class="box arial four"><span class="pass">0000</span><span class="fail">FAIL</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("arial_box_one").clientWidth * 4', 'document.getElementById("box_arial_four").clientWidth'); >+ </script> >+ >+ <div id="box_helvetica_four" class="box helvetica four"><span class="pass">0000</span><span class="fail">FAIL</span></div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("helvetica_box_one").clientWidth * 4', 'document.getElementById("box_helvetica_four").clientWidth'); >+ </script> >+ >+ There should be more than one green '|' visible (non-monospaced fonts): >+ <div id="box_arial_one" class="box arial one"><span class="pass">|</span><span class="pass">||0</span><span class="fail">||||</span></div> >+ <div id="ref_box_arial_one" class="box arial" style="display:inline-block"><span class="pass">|</span><span class="pass">||</span></div> >+ <script type="text/javascript"> >+ shouldBeGreaterThanOrEqual('document.getElementById("ref_box_arial_one").clientWidth', 'document.getElementById("box_arial_one").clientWidth'); >+ </script> >+ >+ <div id="box_times_one" class="box times one"><span class="pass">|</span><span class="pass">||0</span><span class="fail">||||</span></div> >+ <div id="ref_box_times_one" class="box times" style="display:inline-block"><span class="pass">|</span><span class="pass">||</span></div> >+ <script type="text/javascript"> >+ shouldBeGreaterThanOrEqual('document.getElementById("ref_box_times_one").clientWidth', 'document.getElementById("box_times_one").clientWidth'); >+ </script> >+ >+ <div id="box_sansserif_one" class="box sansserif one"><span class="pass">|</span><span class="pass">||0</span><span class="fail">||||</span></div> >+ <div id="ref_box_sansserif_one" class="box times" style="display:inline-block"><span class="pass">|</span><span class="pass">||</span></div> >+ <script type="text/javascript"> >+ shouldBeGreaterThanOrEqual('document.getElementById("ref_box_sansserif_one").clientWidth', 'document.getElementById("box_sansserif_one").clientWidth'); >+ </script> >+ >+ <div class="border"> >+ This box has a 20px font size. >+ The last two '0's should be the same size. >+ <div class="large pass"> >+ <div id="reference" class="one">0</div> >+ <div id="forcedsmall" class="box one">0</div> >+ <div id="chsmall" class="box one relative">0</div> >+ </div> >+ <script type="text/javascript"> >+ var ref = document.getElementById("reference"); >+ var refWidth = ref.clientWidth; >+ var small = document.getElementById("forcedsmall"); >+ small.style.fontSize = refWidth +"px"; >+ var w1 = small.clientWidth; >+ var h1 = small.clientHeight; >+ var chsmall = document.getElementById("chsmall"); >+ var w2 = chsmall.clientWidth; >+ var h2 = chsmall.clientHeight; >+ if(w1 !== w2 || h1 !== h2) { >+ fail(''+w1+'/'+w2+'|'+h1+'/'+h2); >+ testFailed(''+w1+'/'+w2+'|'+h1+'/'+h2); >+ } else { >+ pass(); >+ testPassed("forcedsmall is chsmall"); >+ } >+ </script> >+ </div> >+ <div id="pseudo"> >+ <span id="ps1">I'm a pseudo selected first line, I should be bigger than the rest.</span><br> >+ <span id="ps2">I'm the second line.</span><br> >+ <span id="ps3">Last in line. But one day... the throne will be mine!</span> >+ </div> >+ <script> >+ var ps1h = document.getElementById('ps1').offsetHeight; >+ var ps2h = document.getElementById('ps2').offsetHeight; >+ var ps3h = document.getElementById('ps3').offsetHeight; >+ if((ps1h > ps2h) && (ps1h > ps3h)) { >+ pass(); >+ testPassed('The first line is higher than the other two.'); >+ } else { >+ fail('The first line is not higher than the other two.' + ps1h + '/' + ps2h + '/' +ps3h); >+ testFailed('The first line is not higher than the other two.' + ps1h + '/' + ps2h + '/' +ps3h); >+ } >+ </script> >+ >+ <div id="box_mono_one" class="box mono one"></div> >+ <div id="box_mono" class="box mono" style="display:inline-block">0</div> >+ <script type="text/javascript"> >+ shouldEvaluateTo('document.getElementById("box_mono_one").clientWidth', 'document.getElementById("box_mono").clientWidth'); >+ </script> >+ <script src="../js/resources/js-test-post.js"></script> >+</body> >+</html> >diff --git a/LayoutTests/platform/chromium/TestExpectations b/LayoutTests/platform/chromium/TestExpectations >index 0528e791f264a1978d7804175963594b3d74920f..ae888680921f292d4c04fabd770a903fbccf137c 100644 >--- a/LayoutTests/platform/chromium/TestExpectations >+++ b/LayoutTests/platform/chromium/TestExpectations >@@ -218,7 +218,7 @@ webkit.org/b/85262 fast/media/mq-resolution-dpi-dpcm-warning.html [ Skip ] > # CSS image-orientation is not yet enabled. > webkit.org/b/89052 fast/css/image-orientation > >-# CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). >+# Those two still lack -expected.png files. See https://bugs.webkit.org/show_bug.cgi?id=100546. > webkit.org/b/58491 fast/css3-text/css3-text-decoration > webkit.org/b/76173 fast/css3-text/css3-text-align-last > >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index 9df61fd57f2feef8ac340b1b792cfe12f2351903..515f3779310ce59852cc736ea10a7e23f21066b1 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -316,6 +316,9 @@ webkit.org/b/106405 http/tests/xmlhttprequest/remember-bad-password.html [ Failu > > webkit.org/b/107356 fast/css/sticky/sticky-top-zoomed.html [ ImageOnlyFailure ] > >+# Transient. Needs rebaseline. >+webkit.org/b/85755 fast/css/css3-ch-unit.html [ Missing ] >+ > ### END OF (1) Classified failures with bug reports > ######################################## > >diff --git a/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops b/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops >index 83e83570afd15095d5f4127136619ef753bc00f0..369d3162e27d5fef71d853990ef1f89d8cb3e6aa 100644 >--- a/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops >+++ b/WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops >@@ -48,12 +48,12 @@ > /> > <UserMacro > Name="ENABLE_CSS3_CONDITIONAL_RULES" >- Value="" >+ Value="ENABLE_CSS3_CONDITIONAL_RULES" > PerformEnvironmentSet="true" > /> > <UserMacro > Name="ENABLE_CSS3_TEXT" >- Value="" >+ Value="ENABLE_CSS3_TEXT" > PerformEnvironmentSet="true" > /> > <UserMacro >diff --git a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops >index 5d5d2b9724615365360ffc0a29051b715d93287b..7b64d37579d0e5483eac86530d99d73d1a957a84 100644 >--- a/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops >+++ b/WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops >@@ -43,12 +43,12 @@ > /> > <UserMacro > Name="ENABLE_CSS3_CONDITIONAL_RULES" >- Value="" >+ Value="ENABLE_CSS3_CONDITIONAL_RULES" > PerformEnvironmentSet="true" > /> > <UserMacro > Name="ENABLE_CSS3_TEXT" >- Value="" >+ Value="ENABLE_CSS3_TEXT" > PerformEnvironmentSet="true" > /> > <UserMacro >diff --git a/configure.ac b/configure.ac >index d45d3c864786c50fb6d2f5fb0561e65ae88cd07c..46f3ee7e62b6d12c8edbbf7f89830094ca945eb3 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -733,6 +733,24 @@ AC_ARG_ENABLE(coverage, > [],[enable_coverage="no"]) > AC_MSG_RESULT([$enable_coverage]) > >+# check whether to enable CSS3 conditional rules support >+AC_MSG_CHECKING([whether to enable CSS3 conditional rules support]) >+AC_ARG_ENABLE(css3_conditional_rules, >+ AC_HELP_STRING([--enable-conditional-rules], >+ [enable CSS3 conditional rules support [default=yes]]), >+ [],[enable_css3_conditional_rules="yes"]) >+AC_MSG_RESULT([$enable_css3_conditional_rules]) >+AM_CONDITIONAL([ENABLE_CSS3_CONDITIONAL_RULES],[test "$enable_css3_conditional_rules" = "yes"]) >+ >+# check whether to enable CSS3 text decoration support >+AC_MSG_CHECKING([whether to enable CSS3 text decoration support]) >+AC_ARG_ENABLE(css3_text, >+ AC_HELP_STRING([--enable-css3-text-decoration], >+ [enable CSS3 text decoration support [default=yes]]), >+ [],[enable_css3_text="yes"]) >+AC_MSG_RESULT([$enable_css3_text]) >+AM_CONDITIONAL([ENABLE_CSS3_TEXT],[test "$enable_css3_text" = "yes"]) >+ > # check whether to enable FastMalloc > AC_MSG_CHECKING([whether to enable optimized memory allocator]) > AC_ARG_ENABLE(fast_malloc,
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 85755
:
151038
|
151463
|
151616
|
151623
|
151630
|
153006
|
153012
|
157997
|
158001
|
158042
|
158067
|
174491
|
179815
|
183785
|
183832
|
184100
|
184102
|
184103
|
184214
|
184243
|
184510
|
184616
|
187182
|
187376
|
188399