Source/WebCore/ChangeLog

 12012-09-05 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
 2
 3 [css3-text] Add parsing support for -webkit-text-decoration-skip
 4 https://bugs.webkit.org/show_bug.cgi?id=95848
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This patch intends to add parsing support for "text-decoration-skip" CSS3
 9 property. More details about it on the link below:
 10 http://dev.w3.org/csswg/css3-text/#text-decoration-skip
 11
 12 Test: fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-skip.html
 13
 14 * css/CSSComputedStyleDeclaration.cpp:
 15 (WebCore::renderTextDecorationSkipFlagsToCSSValue):
 16 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
 17 * css/CSSParser.cpp:
 18 (WebCore::CSSParser::parseValue):
 19 (WebCore::CSSParser::parseTextDecorationSkip):
 20 * css/CSSParser.h:
 21 * css/CSSPrimitiveValueMappings.h:
 22 (WebCore::CSSPrimitiveValue::operator TextDecorationSkip):
 23 * css/CSSProperty.cpp:
 24 (WebCore::CSSProperty::isInheritedProperty):
 25 Added parsing-related checks for text-decoration-skip property.
 26 * css/CSSPropertyNames.in: Added '-webkit-text-decoration-skip' property.
 27 * css/CSSValueKeywords.in: Added missing 'objects', 'spaces' and 'ink' values.
 28 * css/StyleBuilder.cpp:
 29 (ApplyPropertyTextDecorationSkip):
 30 (WebCore::ApplyPropertyTextDecorationSkip::applyValue):
 31 (WebCore::ApplyPropertyTextDecorationSkip::createHandler):
 32 (WebCore::StyleBuilder::StyleBuilder):
 33 Set property handler for text-decoration-skip (including bitwise aggregator).
 34 * rendering/style/RenderStyle.h:
 35 * rendering/style/RenderStyleConstants.h:
 36 (WebCore::operator| ):
 37 (WebCore::operator|=):
 38 Added bitwise TextDecorationSkip enum with operator functions | and |= operator (used in StyleBuilder).
 39 * rendering/style/StyleRareInheritedData.cpp:
 40 (WebCore::StyleRareInheritedData::StyleRareInheritedData):
 41 (WebCore::StyleRareInheritedData::operator==):
 42 Added support for m_textDecorationSkip on copy constructor and operator
 43 assignment functions.
 44 * rendering/style/StyleRareInheritedData.h:
 45 (StyleRareInheritedData): Added m_textDecorationSkip here as it won't be used regularly.
 46
1472012-09-05 Ilya Tikhonovsky <loislo@chromium.org>
248
349 Web Inspector: NMI: extract overloaded instrumentation members for WebCore classes from core NMI code.

Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS;
4747ENABLE_CSS_COMPOSITING = ;
4848ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
4949ENABLE_CSS_VARIABLES = ;
50 ENABLE_CSS3_TEXT_DECORATION = ;
 50ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
5151ENABLE_CUSTOM_SCHEME_HANDLER = ;
5252ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
5353ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;

Source/WebCore/Configurations/FeatureDefines.xcconfig

@@ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS;
4848ENABLE_CSS_COMPOSITING = ;
4949ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
5050ENABLE_CSS_VARIABLES = ;
51 ENABLE_CSS3_TEXT_DECORATION = ;
 51ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
5252ENABLE_CUSTOM_SCHEME_HANDLER = ;
5353ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
5454ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;

Source/WebCore/css/CSSComputedStyleDeclaration.cpp

@@static const CSSPropertyID computedProperties[] = {
179179#if ENABLE(CSS3_TEXT_DECORATION)
180180 CSSPropertyWebkitTextDecorationLine,
181181 CSSPropertyWebkitTextDecorationStyle,
 182 CSSPropertyWebkitTextDecorationSkip,
182183#endif // CSS3_TEXT_DECORATION
183184 CSSPropertyTextIndent,
184185 CSSPropertyTextRendering,

@@static PassRefPtr<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorat
12221223 ASSERT_NOT_REACHED();
12231224 return cssValuePool().createExplicitInitialValue();
12241225}
 1226
 1227static PassRefPtr<CSSValue> renderTextDecorationSkipFlagsToCSSValue(TextDecorationSkip textDecorationSkip)
 1228{
 1229 if (textDecorationSkip == TextDecorationSkipNone)
 1230 return cssValuePool().createIdentifierValue(CSSValueNone);
 1231
 1232 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
 1233 if (textDecorationSkip & TextDecorationSkipObjects)
 1234 list->append(cssValuePool().createIdentifierValue(CSSValueObjects));
 1235 if (textDecorationSkip & TextDecorationSkipSpaces)
 1236 list->append(cssValuePool().createIdentifierValue(CSSValueSpaces));
 1237 if (textDecorationSkip & TextDecorationSkipInk)
 1238 list->append(cssValuePool().createIdentifierValue(CSSValueInk));
 1239 if (textDecorationSkip & TextDecorationSkipEdges)
 1240 list->append(cssValuePool().createIdentifierValue(CSSValueEdges));
 1241
 1242 if (list->length())
 1243 return list;
 1244
 1245 ASSERT_NOT_REACHED();
 1246 return cssValuePool().createExplicitInitialValue();
 1247}
12251248#endif // CSS3_TEXT_DECORATION
12261249
12271250static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepeat yRepeat)

@@PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
19711994 return renderTextDecorationFlagsToCSSValue(style->textDecoration());
19721995 case CSSPropertyWebkitTextDecorationStyle:
19731996 return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle());
 1997 case CSSPropertyWebkitTextDecorationSkip:
 1998 return renderTextDecorationSkipFlagsToCSSValue(style->textDecorationSkip());
19741999#endif // CSS3_TEXT_DECORATION
19752000 case CSSPropertyWebkitTextDecorationsInEffect:
19762001 return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());

Source/WebCore/css/CSSParser.cpp

@@bool CSSParser::parseValue(CSSPropertyID propId, bool important)
21862186 if (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy)
21872187 validPrimitive = true;
21882188 break;
 2189
 2190 case CSSPropertyWebkitTextDecorationSkip:
 2191 // none | [ objects || spaces || ink || edges ] | inherit
 2192 return parseTextDecorationSkip(important);
21892193#endif // CSS3_TEXT_DECORATION
21902194
21912195 case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit

@@bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
81128116 return false;
81138117}
81148118
 8119#if ENABLE(CSS3_TEXT_DECORATION)
 8120bool CSSParser::parseTextDecorationSkip(bool important)
 8121{
 8122 CSSParserValue* value = m_valueList->current();
 8123 if (value->id == CSSValueNone) {
 8124 addProperty(CSSPropertyWebkitTextDecorationSkip, cssValuePool().createIdentifierValue(value->id), important);
 8125 m_valueList->next();
 8126 return true;
 8127 }
 8128
 8129 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
 8130 bool isValid = true;
 8131 while (isValid && value) {
 8132 switch (value->id) {
 8133 case CSSValueObjects:
 8134 case CSSValueSpaces:
 8135 case CSSValueInk:
 8136 case CSSValueEdges:
 8137 list->append(cssValuePool().createIdentifierValue(value->id));
 8138 break;
 8139 default:
 8140 isValid = false;
 8141 break;
 8142 }
 8143 if (isValid)
 8144 value = m_valueList->next();
 8145 }
 8146
 8147 if (list->length() && isValid) {
 8148 addProperty(CSSPropertyWebkitTextDecorationSkip, list.release(), important);
 8149 return true;
 8150 }
 8151
 8152 return false;
 8153}
 8154#endif // CSS3_TEXT_DECORATION
 8155
81158156bool CSSParser::parseTextEmphasisStyle(bool important)
81168157{
81178158 unsigned valueListSize = m_valueList->size();

Source/WebCore/css/CSSParser.h

@@public:
239239
240240 void addTextDecorationProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important);
241241 bool parseTextDecoration(CSSPropertyID propId, bool important);
 242#if ENABLE(CSS3_TEXT_DECORATION)
 243 bool parseTextDecorationSkip(bool important);
 244#endif // CSS3_TEXT_DECORATION
242245
243246 bool parseLineBoxContain(bool important);
244247 bool parseCalculation(CSSParserValue*, CalculationPermittedValueRange);

Source/WebCore/css/CSSPrimitiveValueMappings.h

@@template<> inline CSSPrimitiveValue::operator TextDecorationStyle() const
22222222 ASSERT_NOT_REACHED();
22232223 return TextDecorationStyleSolid;
22242224}
 2225
 2226template<> inline CSSPrimitiveValue::operator TextDecorationSkip() const
 2227{
 2228 switch (m_value.ident) {
 2229 case CSSValueNone:
 2230 return TextDecorationSkipNone;
 2231 case CSSValueObjects:
 2232 return TextDecorationSkipObjects;
 2233 case CSSValueSpaces:
 2234 return TextDecorationSkipSpaces;
 2235 case CSSValueInk:
 2236 return TextDecorationSkipInk;
 2237 case CSSValueEdges:
 2238 return TextDecorationSkipEdges;
 2239 }
 2240
 2241 ASSERT_NOT_REACHED();
 2242 return TextDecorationSkipObjects;
 2243}
22252244#endif // CSS3_TEXT_DECORATION
22262245
22272246template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextSecurity e)

Source/WebCore/css/CSSProperty.cpp

@@bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
351351 case CSSPropertyWebkitTextCombine:
352352#if ENABLE(CSS3_TEXT_DECORATION)
353353 case CSSPropertyWebkitTextDecorationLine:
 354 case CSSPropertyWebkitTextDecorationSkip:
354355#endif // CSS3_TEXT_DECORATION
355356 case CSSPropertyWebkitTextDecorationsInEffect:
356357 case CSSPropertyWebkitTextEmphasis:

Source/WebCore/css/CSSPropertyNames.in

@@z-index
356356#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
357357-webkit-text-decoration-line
358358-webkit-text-decoration-style
359 #endif
 359-webkit-text-decoration-skip
 360#endif // CSS3_TEXT_DECORATION
360361-webkit-text-decorations-in-effect
361362-webkit-text-emphasis
362363-epub-text-emphasis = -webkit-text-emphasis

Source/WebCore/css/CSSValueKeywords.in

@@wrap
915915// -webkit-line-align
916916edges
917917
 918#if defined(ENABLE_CSS3_TEXT_DECORATION) && ENABLE_CSS3_TEXT_DECORATION
 919// -webkit-text-decoration-skip
 920objects
 921spaces
 922ink
 923#endif // CSS3_TEXT_DECORATION
 924
918925// position
919926#if defined(ENABLE_CSS_STICKY_POSITION) && ENABLE_CSS_STICKY_POSITION
920927-webkit-sticky

Source/WebCore/css/StyleBuilder.cpp

@@public:
11671167 }
11681168};
11691169
 1170#if ENABLE(CSS3_TEXT_DECORATION)
 1171class ApplyPropertyTextDecorationSkip {
 1172public:
 1173 static void applyValue(StyleResolver* styleResolver, CSSValue* value)
 1174 {
 1175 // Value 'none' equals to zero, but is not initial.
 1176 TextDecorationSkip t = TextDecorationSkipNone;
 1177 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) {
 1178 CSSValue* item = i.value();
 1179 ASSERT(item->isPrimitiveValue());
 1180 t |= *static_cast<CSSPrimitiveValue*>(item);
 1181 }
 1182 styleResolver->style()->setTextDecorationSkip(t);
 1183 }
 1184 static PropertyHandler createHandler()
 1185 {
 1186 PropertyHandler handler = ApplyPropertyDefaultBase<TextDecorationSkip, &RenderStyle::textDecorationSkip, TextDecorationSkip, &RenderStyle::setTextDecorationSkip, TextDecorationSkip, &RenderStyle::initialTextDecorationSkip>::createHandler();
 1187 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue);
 1188 }
 1189};
 1190#endif // CSS3_TEXT_DECORATION
 1191
11701192class ApplyPropertyLineHeight {
11711193public:
11721194 static void applyValue(StyleResolver* styleResolver, CSSValue* value)

@@StyleBuilder::StyleBuilder()
19251947#if ENABLE(CSS3_TEXT_DECORATION)
19261948 setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler());
19271949 setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler());
 1950 setPropertyHandler(CSSPropertyWebkitTextDecorationSkip, ApplyPropertyTextDecorationSkip::createHandler());
19281951#endif // CSS3_TEXT_DECORATION
19291952 setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler());
19301953 setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault<TextOverflow, &RenderStyle::textOverflow, TextOverflow, &RenderStyle::setTextOverflow, TextOverflow, &RenderStyle::initialTextOverflow>::createHandler());

Source/WebCore/rendering/style/RenderStyle.h

@@public:
618618 ETextDecoration textDecoration() const { return static_cast<ETextDecoration>(visual->textDecoration); }
619619#if ENABLE(CSS3_TEXT_DECORATION)
620620 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); }
 621 TextDecorationSkip textDecorationSkip() const { return static_cast<TextDecorationSkip>(rareInheritedData->m_textDecorationSkip); }
621622#endif // CSS3_TEXT_DECORATION
622623 int wordSpacing() const;
623624 int letterSpacing() const;

@@public:
11461147 void setTextDecoration(ETextDecoration v) { SET_VAR(visual, textDecoration, v); }
11471148#if ENABLE(CSS3_TEXT_DECORATION)
11481149 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); }
 1150 void setTextDecorationSkip(TextDecorationSkip v) { SET_VAR(rareInheritedData, m_textDecorationSkip, v); }
11491151#endif // CSS3_TEXT_DECORATION
11501152 void setDirection(TextDirection v) { inherited_flags._direction = v; }
11511153 void setLineHeight(Length specifiedLineHeight);

@@public:
16041606 static ETextDecoration initialTextDecoration() { return TDNONE; }
16051607#if ENABLE(CSS3_TEXT_DECORATION)
16061608 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; }
 1609 static TextDecorationSkip initialTextDecorationSkip() { return TextDecorationSkipObjects; }
16071610#endif // CSS3_TEXT_DECORATION
16081611 static float initialZoom() { return 1.0f; }
16091612 static int initialOutlineOffset() { return 0; }

Source/WebCore/rendering/style/RenderStyleConstants.h

@@enum TextDecorationStyle {
348348 TextDecorationStyleDashed,
349349 TextDecorationStyleWavy
350350};
 351
 352enum TextDecorationSkip {
 353 TextDecorationSkipNone = 0x0, TextDecorationSkipObjects = 0x1, TextDecorationSkipSpaces = 0x2, TextDecorationSkipInk = 0x4, TextDecorationSkipEdges = 0x8
 354};
 355inline TextDecorationSkip operator| (TextDecorationSkip a, TextDecorationSkip b) { return TextDecorationSkip(int(a) | int(b)); }
 356inline TextDecorationSkip& operator|=(TextDecorationSkip& a, TextDecorationSkip b) { return a = a | b; }
351357#endif // CSS3_TEXT_DECORATION
352358
353359enum EPageBreak {

Source/WebCore/rendering/style/StyleRareInheritedData.cpp

@@StyleRareInheritedData::StyleRareInheritedData()
9595 , m_imageResolutionSource(RenderStyle::initialImageResolutionSource())
9696 , m_imageResolutionSnap(RenderStyle::initialImageResolutionSnap())
9797#endif
 98#if ENABLE(CSS3_TEXT_DECORATION)
 99 , m_textDecorationSkip(RenderStyle::initialTextDecorationSkip())
 100#endif // CSS3_TEXT_DECORATION
98101 , hyphenationLimitBefore(-1)
99102 , hyphenationLimitAfter(-1)
100103 , hyphenationLimitLines(-1)

@@StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
157160 , m_imageResolutionSource(o.m_imageResolutionSource)
158161 , m_imageResolutionSnap(o.m_imageResolutionSnap)
159162#endif
 163#if ENABLE(CSS3_TEXT_DECORATION)
 164 , m_textDecorationSkip(o.m_textDecorationSkip)
 165#endif // CSS3_TEXT_DECORATION
160166 , hyphenationString(o.hyphenationString)
161167 , hyphenationLimitBefore(o.hyphenationLimitBefore)
162168 , hyphenationLimitAfter(o.hyphenationLimitAfter)

@@bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
246252 && m_imageResolutionSnap == o.m_imageResolutionSnap
247253 && m_imageResolution == o.m_imageResolution
248254#endif
 255#if ENABLE(CSS3_TEXT_DECORATION)
 256 && m_textDecorationSkip == o.m_textDecorationSkip
 257#endif // CSS3_TEXT_DECORATION
249258 && m_lineSnap == o.m_lineSnap
250259#if ENABLE(CSS_VARIABLES)
251260 && m_variables == o.m_variables

Source/WebCore/rendering/style/StyleRareInheritedData.h

@@public:
111111 unsigned m_imageResolutionSource : 1; // ImageResolutionSource
112112 unsigned m_imageResolutionSnap : 1; // ImageResolutionSnap
113113#endif
 114#if ENABLE(CSS3_TEXT_DECORATION)
 115 unsigned m_textDecorationSkip : 4; // TextDecorationSkip
 116#endif // CSS3_TEXT_DECORATION
114117
115118 AtomicString hyphenationString;
116119 short hyphenationLimitBefore;

Source/WebKit/chromium/features.gypi

3838 'ENABLE_BLOB_SLICE=1',
3939 'ENABLE_CHANNEL_MESSAGING=1',
4040 'ENABLE_CSP_NEXT=1',
41  'ENABLE_CSS3_TEXT_DECORATION=0',
 41 'ENABLE_CSS3_TEXT_DECORATION=1',
4242 'ENABLE_CSS_BOX_DECORATION_BREAK=1',
4343 'ENABLE_CSS_COMPOSITING=0',
4444 'ENABLE_CSS_EXCLUSIONS=1',

Source/WebKit/mac/Configurations/FeatureDefines.xcconfig

@@ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS;
4848ENABLE_CSS_COMPOSITING = ;
4949ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
5050ENABLE_CSS_VARIABLES = ;
51 ENABLE_CSS3_TEXT_DECORATION = ;
 51ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
5252ENABLE_CUSTOM_SCHEME_HANDLER = ;
5353ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
5454ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;

Source/WebKit2/Configurations/FeatureDefines.xcconfig

@@ENABLE_CSS_REGIONS = ENABLE_CSS_REGIONS;
4848ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS;
4949ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION;
5050ENABLE_CSS_VARIABLES = ;
51 ENABLE_CSS3_TEXT_DECORATION = ;
 51ENABLE_CSS3_TEXT_DECORATION = ENABLE_CSS3_TEXT_DECORATION;
5252ENABLE_CUSTOM_SCHEME_HANDLER = ;
5353ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME));
5454ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT;

Source/cmake/WebKitFeatures.cmake

@@MACRO (WEBKIT_OPTION_BEGIN)
2020 WEBKIT_OPTION_DEFINE(ENABLE_BLOB "Toggle Blob support" OFF)
2121 WEBKIT_OPTION_DEFINE(ENABLE_CHANNEL_MESSAGING "Toggle MessageChannel and MessagePort support" ON)
2222 WEBKIT_OPTION_DEFINE(ENABLE_CSP_NEXT "Toggle Content Security Policy 1.1 support" OFF)
23  WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT_DECORATION "Toggle CSS3 Text Decoration support" OFF)
 23 WEBKIT_OPTION_DEFINE(ENABLE_CSS3_TEXT_DECORATION "Toggle CSS3 Text Decoration support" ON)
2424 WEBKIT_OPTION_DEFINE(ENABLE_CSS_BOX_DECORATION_BREAK "Toggle Box Decoration Break (CSS Backgrounds and Borders) support" ON)
2525 WEBKIT_OPTION_DEFINE(ENABLE_CSS_COMPOSITING "Toggle CSS COMPOSITING support" OFF)
2626 WEBKIT_OPTION_DEFINE(ENABLE_CSS_EXCLUSIONS "Toggle CSS Exclusion support" OFF)

Tools/Scripts/webkitperl/FeatureList.pm

@@my @features = (
168168 define => "ENABLE_CSS_FILTERS", default => isAppleWebKit() || isBlackBerry(), value => \$cssFiltersSupport },
169169
170170 { option => "css3-text-decoration", desc => "Toggle CSS3 Text Decoration support",
171  define => "ENABLE_CSS3_TEXT_DECORATION", default => isEfl(), value => \$css3TextDecorationSupport },
 171 define => "ENABLE_CSS3_TEXT_DECORATION", default => 1, value => \$css3TextDecorationSupport },
172172
173173 { option => "css-hierarchies", desc => "Toggle CSS Hierarchy support",
174174 define => "ENABLE_CSS_HIERARCHIES", default => 0, value => \$cssHierarchiesSupport },

Tools/qmake/mkspecs/features/features.pri

@@FEATURE_DEFAULTS = \
3232 ENABLE_CSS_SHADERS=0 \
3333 ENABLE_CSS_STICKY_POSITION=1 \
3434 ENABLE_CSS_VARIABLES=0 \
35  ENABLE_CSS3_TEXT_DECORATION=0 \
 35 ENABLE_CSS3_TEXT_DECORATION=1 \
3636 ENABLE_DASHBOARD_SUPPORT=0 \
3737 ENABLE_DATAGRID=0 \
3838 ENABLE_DATALIST_ELEMENT=1 \

LayoutTests/ChangeLog

 12012-09-05 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
 2
 3 [css3-text] Add parsing support for -webkit-text-decoration-skip
 4 https://bugs.webkit.org/show_bug.cgi?id=95848
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Added getComputedStyle layout tests for 'text-decoration-skip' CSS3
 9 property.
 10
 11 * fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-skip-expected.txt: Added.
 12 * fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-skip.html: Added.
 13 * fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-skip.js: Added.
 14
1152012-09-05 Dominik Röttsches <dominik.rottsches@intel.com>
216
317 [EFL] Unreviewed gardening.

LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-skip-expected.txt

 1Test to make sure -webkit-text-decoration-skip property returns values properly.
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6Initial value:
 7PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip') is null
 8PASS computedStyle.webkitTextDecorationSkip is 'objects'
 9PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 10PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects'
 11
 12Value '':
 13PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip') is null
 14PASS computedStyle.webkitTextDecorationSkip is 'objects'
 15PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 16PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects'
 17
 18Initial value (explicit):
 19PASS e.style.webkitTextDecorationSkip is 'initial'
 20PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValue]'
 21PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'initial'
 22PASS computedStyle.webkitTextDecorationSkip is 'objects'
 23PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 24PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects'
 25
 26Value 'none':
 27PASS e.style.webkitTextDecorationSkip is 'none'
 28PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSPrimitiveValue]'
 29PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'none'
 30PASS computedStyle.webkitTextDecorationSkip is 'none'
 31PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSPrimitiveValue]'
 32PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'none'
 33
 34Value 'objects':
 35PASS e.style.webkitTextDecorationSkip is 'objects'
 36PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 37PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects'
 38PASS computedStyle.webkitTextDecorationSkip is 'objects'
 39PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 40PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects'
 41
 42Value 'spaces':
 43PASS e.style.webkitTextDecorationSkip is 'spaces'
 44PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 45PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'spaces'
 46PASS computedStyle.webkitTextDecorationSkip is 'spaces'
 47PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 48PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'spaces'
 49
 50Value 'ink':
 51PASS e.style.webkitTextDecorationSkip is 'ink'
 52PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 53PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'ink'
 54PASS computedStyle.webkitTextDecorationSkip is 'ink'
 55PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 56PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'ink'
 57
 58Value 'edges':
 59PASS e.style.webkitTextDecorationSkip is 'edges'
 60PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 61PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'edges'
 62PASS computedStyle.webkitTextDecorationSkip is 'edges'
 63PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 64PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'edges'
 65
 66Value 'objects spaces ink edges':
 67PASS e.style.webkitTextDecorationSkip is 'objects spaces ink edges'
 68PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 69PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects spaces ink edges'
 70PASS computedStyle.webkitTextDecorationSkip is 'objects spaces ink edges'
 71PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 72PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects spaces ink edges'
 73
 74Ancestor inherits values from parent:
 75PASS e.style.getPropertyCSSValue('-webkit-text-decoration-skip') is null
 76PASS computedStyle.webkitTextDecorationSkip is 'objects spaces ink edges'
 77PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').toString() is '[object CSSValueList]'
 78PASS computedStyle.getPropertyCSSValue('-webkit-text-decoration-skip').cssText is 'objects spaces ink edges'
 79
 80PASS successfullyParsed is true
 81
 82TEST COMPLETE
 83

LayoutTests/fast/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-skip.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<script src="../../js/resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7<script src="script-tests/getComputedStyle-text-decoration-skip.js"></script>
 8<script src="../../js/resources/js-test-post.js"></script>
 9</body>
 10</html>

LayoutTests/fast/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-skip.js

 1function testElementStyle(propertyJS, propertyCSS, type, value)
 2{
 3 if (type != null) {
 4 shouldBe("e.style." + propertyJS, "'" + value + "'");
 5 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').toString()", "'" + type + "'");
 6 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'");
 7 } else
 8 shouldBeNull("e.style.getPropertyCSSValue('" + propertyCSS + "')");
 9}
 10
 11function testComputedStyle(propertyJS, propertyCSS, type, value)
 12{
 13 computedStyle = window.getComputedStyle(e, null);
 14 shouldBe("computedStyle." + propertyJS, "'" + value + "'");
 15 shouldBe("computedStyle.getPropertyCSSValue('" + propertyCSS + "').toString()", "'" + type + "'");
 16 shouldBe("computedStyle.getPropertyCSSValue('" + propertyCSS + "').cssText", "'" + value + "'");
 17}
 18
 19description("Test to make sure -webkit-text-decoration-skip property returns values properly.")
 20
 21var testContainer = document.createElement("div");
 22testContainer.contentEditable = true;
 23document.body.appendChild(testContainer);
 24
 25testContainer.innerHTML = '<div id="test">hello world</div>';
 26debug("Initial value:");
 27e = document.getElementById('test');
 28testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", null, '');
 29testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects");
 30debug('');
 31
 32debug("Value '':");
 33e.style.webkitTextDecorationSkip = '';
 34testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", null, '');
 35testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects");
 36debug('');
 37
 38debug("Initial value (explicit):");
 39e.style.webkitTextDecorationSkip = 'initial';
 40testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValue]", "initial");
 41testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects");
 42debug('');
 43
 44debug("Value 'none':");
 45e.style.webkitTextDecorationSkip = 'none';
 46testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSPrimitiveValue]", "none");
 47testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSPrimitiveValue]", "none");
 48debug('');
 49
 50debug("Value 'objects':");
 51e.style.webkitTextDecorationSkip = 'objects';
 52testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects");
 53testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects");
 54debug('');
 55
 56debug("Value 'spaces':");
 57e.style.webkitTextDecorationSkip = 'spaces';
 58testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "spaces");
 59testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "spaces");
 60debug('');
 61
 62debug("Value 'ink':");
 63e.style.webkitTextDecorationSkip = 'ink';
 64testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "ink");
 65testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "ink");
 66debug('');
 67
 68debug("Value 'edges':");
 69e.style.webkitTextDecorationSkip = 'edges';
 70testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "edges");
 71testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "edges");
 72debug('');
 73
 74debug("Value 'objects spaces ink edges':");
 75e.style.webkitTextDecorationSkip = 'objects spaces ink edges';
 76testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects spaces ink edges");
 77testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects spaces ink edges");
 78debug('');
 79
 80testContainer.innerHTML = '<div id="test-parent" style="-webkit-text-decoration-skip: objects spaces ink edges;">hello <span id="test-ancestor">world</span></div>';
 81debug("Ancestor inherits values from parent:");
 82e = document.getElementById('test-ancestor');
 83testElementStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", null, "");
 84testComputedStyle("webkitTextDecorationSkip", "-webkit-text-decoration-skip", "[object CSSValueList]", "objects spaces ink edges");
 85debug('');
 86
 87document.body.removeChild(testContainer);

LayoutTests/platform/chromium/TestExpectations

@@BUGWK85262 SKIP : fast/css/image-resolution = PASS
174174// CSS image-orientation is not yet enabled.
175175BUGWK89052 SKIP : fast/css/image-orientation = PASS
176176
177 // CSS3 Text Decoration support is not yet enabled (needs ENABLE_CSS3_TEXT_DECORATION).
178 BUGWK58491 SKIP : fast/css3-text-decoration = PASS
179 
180177// Chromium does not support smart pasting in text controls yet.
181178BUGWK60830 SKIP : editing/pasteboard/smart-paste-in-text-control.html = PASS
182179

WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops

3838 />
3939 <UserMacro
4040 Name="ENABLE_CSS3_TEXT_DECORATION"
41  Value=""
 41 Value="ENABLE_CSS3_TEXT_DECORATION"
4242 PerformEnvironmentSet="true"
4343 />
4444 <UserMacro

WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops

3838 />
3939 <UserMacro
4040 Name="ENABLE_CSS3_TEXT_DECORATION"
41  Value=""
 41 Value="ENABLE_CSS3_TEXT_DECORATION"
4242 PerformEnvironmentSet="true"
4343 />
4444 <UserMacro

configure.ac

@@AC_MSG_RESULT([$enable_coverage])
10081008AC_MSG_CHECKING([whether to enable CSS3 text decoration support])
10091009AC_ARG_ENABLE(css3_text_decoration,
10101010 AC_HELP_STRING([--enable-css3-text-decoration],
1011  [enable CSS3 text decoration support [default=no]]),
 1011 [enable CSS3 text decoration support [default=yes]]),
10121012 [],[enable_css3_text_decoration=$enable_unstable_features])
10131013AC_MSG_RESULT([$enable_css3_text_decoration])
10141014