Changeset 148070 in webkit
- Timestamp:
- Apr 9, 2013 5:32:39 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148066 r148070 1 2013-04-09 Dongwoo Joshua Im <dw.im@samsung.com> 2 3 [CSS3] Parsing the property, text-justify. 4 https://bugs.webkit.org/show_bug.cgi?id=100058 5 6 Reviewed by Andreas Kling. 7 8 This patch implements the parsing side of the "text-justify" property specified 9 in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag. 10 Specification link : http://www.w3.org/TR/css3-text/#text-justify 11 12 * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-expected.txt: Added. 13 * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited-expected.txt: Added. 14 * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html: Added. 15 * fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html: Added. 16 * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify-inherited.js: Added. 17 (testComputedStyle): 18 (ownValueTest): 19 (inheritanceTest): 20 * fast/css3-text/css3-text-justify/getComputedStyle/script-tests/getComputedStyle-text-justify.js: Added. 21 (testElementStyle): 22 (testComputedStyle): 23 (valueSettingTest): 24 (invalidValueSettingTest): 25 * platform/mac/TestExpectations: ditto 26 * platform/qt-4.8/TestExpectations: ditto 27 * platform/qt-mac/TestExpectations: ditto 28 * platform/qt/TestExpectations: ditto 29 1 30 2013-04-09 Simon Fraser <simon.fraser@apple.com> 2 31 -
trunk/LayoutTests/platform/mac/TestExpectations
r148066 r148070 1166 1166 webkit.org/b/58491 fast/css3-text/css3-text-decoration 1167 1167 webkit.org/b/76173 fast/css3-text/css3-text-align-last 1168 webkit.org/b/99945 fast/css3-text/css3-text-justify [ Failure ] 1168 1169 webkit.org/b/112755 fast/css3-text/css3-text-indent [ Failure ImageOnlyFailure ] 1169 1170 -
trunk/LayoutTests/platform/qt-mac/TestExpectations
r147956 r148070 5798 5798 webkit.org/b/58491 fast/css3-text/css3-text-decoration 5799 5799 webkit.org/b/76173 fast/css3-text/css3-text-align-last 5800 webkit.org/b/99945 fast/css3-text/css3-text-justify [ Failure ] 5800 5801 webkit.org/b/112755 fast/css3-text/css3-text-indent [ Failure ImageOnlyFailure ] 5801 5802 -
trunk/LayoutTests/platform/qt/TestExpectations
r148009 r148070 352 352 webkit.org/b/58491 fast/css3-text/css3-text-decoration 353 353 webkit.org/b/76173 fast/css3-text/css3-text-align-last 354 webkit.org/b/99945 fast/css3-text/css3-text-justify [ Failure ] 354 355 webkit.org/b/112755 fast/css3-text/css3-text-indent [ Failure ImageOnlyFailure ] 355 356 -
trunk/Source/WebCore/ChangeLog
r148069 r148070 1 2013-04-09 Dongwoo Joshua Im <dw.im@samsung.com> 2 3 [CSS3] Parsing the property, text-justify. 4 https://bugs.webkit.org/show_bug.cgi?id=100058 5 6 Reviewed by Andreas Kling. 7 8 This patch implements the parsing side of the "text-justify" property specified 9 in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag. 10 Specification link : http://www.w3.org/TR/css3-text/#text-justify 11 12 Tests: fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html 13 fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html 14 15 * css/CSSComputedStyleDeclaration.cpp: 16 (WebCore): 17 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 18 * css/CSSParser.cpp: 19 (WebCore::isValidKeywordPropertyAndValue): 20 (WebCore::isKeywordPropertyID): 21 (WebCore::CSSParser::parseValue): 22 * css/CSSPrimitiveValueMappings.h: 23 (WebCore): 24 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 25 (WebCore::CSSPrimitiveValue::operator TextJustify): 26 * css/CSSProperty.cpp: 27 (WebCore::CSSProperty::isInheritedProperty): 28 * css/CSSPropertyNames.in: 29 * css/CSSValueKeywords.in: 30 * css/StyleBuilder.cpp: 31 (WebCore::StyleBuilder::StyleBuilder): 32 * css/StylePropertySet.cpp: 33 (WebCore): 34 * css/StyleResolver.cpp: 35 (WebCore::StyleResolver::applyProperty): 36 * rendering/style/RenderStyle.h: 37 * rendering/style/RenderStyleConstants.h: 38 * rendering/style/StyleRareInheritedData.cpp: 39 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 40 (WebCore::StyleRareInheritedData::operator==): 41 * rendering/style/StyleRareInheritedData.h: 42 (StyleRareInheritedData): 43 1 44 2013-04-09 Joone Hur <joone.hur@intel.com> 2 45 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r148049 r148070 193 193 CSSPropertyWebkitTextDecorationColor, 194 194 CSSPropertyWebkitTextAlignLast, 195 CSSPropertyWebkitTextJustify, 195 196 CSSPropertyWebkitTextUnderlinePosition, 196 197 #endif // CSS3_TEXT … … 2162 2163 case CSSPropertyWebkitTextAlignLast: 2163 2164 return cssValuePool().createValue(style->textAlignLast()); 2165 case CSSPropertyWebkitTextJustify: 2166 return cssValuePool().createValue(style->textJustify()); 2164 2167 case CSSPropertyWebkitTextUnderlinePosition: 2165 2168 return cssValuePool().createValue(style->textUnderlinePosition()); -
trunk/Source/WebCore/css/CSSParser.cpp
r147430 r148070 998 998 return true; 999 999 break; 1000 #if ENABLE(CSS3_TEXT) 1001 case CSSPropertyWebkitTextJustify: 1002 // auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida 1003 if ((valueID >= CSSValueInterWord && valueID <= CSSValueKashida) || valueID == CSSValueAuto || valueID == CSSValueNone) 1004 return true; 1005 break; 1006 #endif // CSS3_TEXT 1000 1007 case CSSPropertyWebkitTextSecurity: 1001 1008 // disc | circle | square | none | inherit … … 1153 1160 case CSSPropertyWebkitTextCombine: 1154 1161 case CSSPropertyWebkitTextEmphasisPosition: 1162 #if ENABLE(CSS3_TEXT) 1163 case CSSPropertyWebkitTextJustify: 1164 #endif // CSS3_TEXT 1155 1165 case CSSPropertyWebkitTextSecurity: 1156 1166 case CSSPropertyWebkitTransformStyle: … … 3062 3072 case CSSPropertyWebkitTextCombine: 3063 3073 case CSSPropertyWebkitTextEmphasisPosition: 3074 #if ENABLE(CSS3_TEXT) 3075 case CSSPropertyWebkitTextJustify: 3076 #endif // CSS3_TEXT 3064 3077 case CSSPropertyWebkitTextSecurity: 3065 3078 case CSSPropertyWebkitTransformStyle: -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r147348 r148070 2357 2357 ASSERT_NOT_REACHED(); 2358 2358 return TextAlignLastAuto; 2359 } 2360 2361 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextJustify e) 2362 : CSSValue(PrimitiveClass) 2363 { 2364 m_primitiveUnitType = CSS_IDENT; 2365 switch (e) { 2366 case TextJustifyAuto: 2367 m_value.ident = CSSValueAuto; 2368 break; 2369 case TextJustifyNone: 2370 m_value.ident = CSSValueNone; 2371 break; 2372 case TextJustifyInterWord: 2373 m_value.ident = CSSValueInterWord; 2374 break; 2375 case TextJustifyInterIdeograph: 2376 m_value.ident = CSSValueInterIdeograph; 2377 break; 2378 case TextJustifyInterCluster: 2379 m_value.ident = CSSValueInterCluster; 2380 break; 2381 case TextJustifyDistribute: 2382 m_value.ident = CSSValueDistribute; 2383 break; 2384 case TextJustifyKashida: 2385 m_value.ident = CSSValueKashida; 2386 break; 2387 } 2388 } 2389 2390 template<> inline CSSPrimitiveValue::operator TextJustify() const 2391 { 2392 switch (m_value.ident) { 2393 case CSSValueAuto: 2394 return TextJustifyAuto; 2395 case CSSValueNone: 2396 return TextJustifyNone; 2397 case CSSValueInterWord: 2398 return TextJustifyInterWord; 2399 case CSSValueInterIdeograph: 2400 return TextJustifyInterIdeograph; 2401 case CSSValueInterCluster: 2402 return TextJustifyInterCluster; 2403 case CSSValueDistribute: 2404 return TextJustifyDistribute; 2405 case CSSValueKashida: 2406 return TextJustifyKashida; 2407 } 2408 2409 ASSERT_NOT_REACHED(); 2410 return TextJustifyAuto; 2359 2411 } 2360 2412 #endif // CSS3_TEXT -
trunk/Source/WebCore/css/CSSProperty.cpp
r147348 r148070 333 333 case CSSPropertyWebkitTextDecorationLine: 334 334 case CSSPropertyWebkitTextAlignLast: 335 case CSSPropertyWebkitTextJustify: 335 336 case CSSPropertyWebkitTextUnderlinePosition: 336 337 #endif // CSS3_TEXT -
trunk/Source/WebCore/css/CSSPropertyNames.in
r146274 r148070 376 376 -webkit-text-decoration-color 377 377 -webkit-text-align-last 378 -webkit-text-justify 378 379 -webkit-text-underline-position 379 380 #endif -
trunk/Source/WebCore/css/CSSValueKeywords.in
r146408 r148070 220 220 -webkit-center 221 221 -webkit-match-parent 222 // 223 // CSS_PROP_TEXT_JUSTIFY: 224 // 225 //auto 226 //none 227 inter-word 228 inter-ideograph 229 inter-cluster 230 distribute 231 kashida 222 232 // 223 233 // CSS_PROP_LIST_STYLE_POSITION: -
trunk/Source/WebCore/css/StyleBuilder.cpp
r148059 r148070 2188 2188 setPropertyHandler(CSSPropertyWebkitTextDecorationColor, ApplyPropertyColor<NoInheritFromParent, &RenderStyle::textDecorationColor, &RenderStyle::setTextDecorationColor, &RenderStyle::setVisitedLinkTextDecorationColor, &RenderStyle::color>::createHandler()); 2189 2189 setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<TextAlignLast, &RenderStyle::textAlignLast, TextAlignLast, &RenderStyle::setTextAlignLast, TextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler()); 2190 setPropertyHandler(CSSPropertyWebkitTextJustify, ApplyPropertyDefault<TextJustify, &RenderStyle::textJustify, TextJustify, &RenderStyle::setTextJustify, TextJustify, &RenderStyle::initialTextJustify>::createHandler()); 2190 2191 setPropertyHandler(CSSPropertyWebkitTextUnderlinePosition, ApplyPropertyTextUnderlinePosition::createHandler()); 2191 2192 #endif // CSS3_TEXT -
trunk/Source/WebCore/css/StylePropertySet.cpp
r147962 r148070 1098 1098 #if ENABLE(CSS3_TEXT) 1099 1099 CSSPropertyWebkitTextAlignLast, 1100 CSSPropertyWebkitTextJustify, 1100 1101 #endif // CSS3_TEXT 1101 1102 CSSPropertyTextIndent, -
trunk/Source/WebCore/css/StyleResolver.cpp
r147350 r148070 3119 3119 case CSSPropertyWebkitTextDecorationColor: 3120 3120 case CSSPropertyWebkitTextAlignLast: 3121 case CSSPropertyWebkitTextJustify: 3121 3122 case CSSPropertyWebkitTextUnderlinePosition: 3122 3123 #endif // CSS3_TEXT -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r147350 r148070 579 579 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); } 580 580 TextAlignLast textAlignLast() const { return static_cast<TextAlignLast>(rareInheritedData->m_textAlignLast); } 581 TextJustify textJustify() const { return static_cast<TextJustify>(rareInheritedData->m_textJustify); } 581 582 TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(rareInheritedData->m_textUnderlinePosition); } 582 583 #else … … 1147 1148 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); } 1148 1149 void setTextAlignLast(TextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v); } 1150 void setTextJustify(TextJustify v) { SET_VAR(rareInheritedData, m_textJustify, v); } 1149 1151 void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(rareInheritedData, m_textUnderlinePosition, v); } 1150 1152 #endif // CSS3_TEXT … … 1630 1632 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; } 1631 1633 static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 1634 static TextJustify initialTextJustify() { return TextJustifyAuto; } 1632 1635 static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePositionAuto; } 1633 1636 #endif // CSS3_TEXT -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r146408 r148070 364 364 TextUnderlinePositionAuto = 0x1, TextUnderlinePositionAlphabetic = 0x2, TextUnderlinePositionUnder = 0x4 365 365 }; 366 367 enum TextJustify { 368 TextJustifyAuto, TextJustifyNone, TextJustifyInterWord, TextJustifyInterIdeograph, TextJustifyInterCluster, TextJustifyDistribute, TextJustifyKashida 369 }; 366 370 #endif // CSS3_TEXT 367 371 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r146408 r148070 107 107 #if ENABLE(CSS3_TEXT) 108 108 , m_textAlignLast(RenderStyle::initialTextAlignLast()) 109 , m_textJustify(RenderStyle::initialTextJustify()) 109 110 , m_textUnderlinePosition(RenderStyle::initialTextUnderlinePosition()) 110 111 #endif // CSS3_TEXT … … 180 181 #if ENABLE(CSS3_TEXT) 181 182 , m_textAlignLast(o.m_textAlignLast) 183 , m_textJustify(o.m_textJustify) 182 184 , m_textUnderlinePosition(o.m_textUnderlinePosition) 183 185 #endif // CSS3_TEXT … … 279 281 #if ENABLE(CSS3_TEXT) 280 282 && m_textAlignLast == o.m_textAlignLast 283 && m_textJustify == o.m_textJustify 281 284 && m_textUnderlinePosition == o.m_textUnderlinePosition 282 285 #endif // CSS3_TEXT -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r146408 r148070 121 121 #if ENABLE(CSS3_TEXT) 122 122 unsigned m_textAlignLast : 3; // TextAlignLast 123 unsigned m_textJustify : 3; // TextJustify 123 124 unsigned m_textUnderlinePosition : 3; // TextUnderlinePosition 124 125 #endif // CSS3_TEXT
Note: See TracChangeset
for help on using the changeset viewer.