Changeset 134190 in webkit
- Timestamp:
- Nov 11, 2012 10:37:55 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r134187 r134190 1 2012-11-11 Dongwoo Joshua Im <dw.im@samsung.com> 2 3 [CSS3] Parsing the property, text-align-last. 4 https://bugs.webkit.org/show_bug.cgi?id=99439 5 6 Reviewed by Julien Chaffraix. 7 8 This patch implements the parsing side of the "text-align-last" 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-align-last 11 12 * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html: Added. 13 * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html: Added. 14 * fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last-inherited.js: Added. 15 (testComputedStyle): 16 * fast/css3-text/css3-text-align-last/getComputedStyle/script-tests/getComputedStyle-text-align-last.js: Added. 17 (testElementStyle): 18 (testComputedStyle): 19 * platform/chromium/TestExpectations: 20 * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-expected.txt: Added. 21 * fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited-expected.txt: Added. 22 * platform/mac/TestExpectations: 23 * platform/qt-4.8/TestExpectations: 24 * platform/qt-mac/TestExpectations: 25 * platform/qt/TestExpectations: 26 1 27 2012-11-11 Keishi Hattori <keishi@webkit.org> 2 28 -
trunk/LayoutTests/platform/chromium/TestExpectations
r134187 r134190 202 202 # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). 203 203 webkit.org/b/58491 fast/css3-text/css3-text-decoration 204 webkit.org/b/76173 fast/css3-text/css3-text-align-last 204 205 205 206 # Chromium does not support smart pasting in text controls yet. -
trunk/LayoutTests/platform/mac/TestExpectations
r134150 r134190 986 986 # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). 987 987 webkit.org/b/58491 fast/css3-text/css3-text-decoration 988 webkit.org/b/76173 fast/css3-text/css3-text-align-last 988 989 989 990 # Our slow tests, in alphabetical order. -
trunk/LayoutTests/platform/qt-4.8/TestExpectations
r134125 r134190 708 708 # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). 709 709 webkit.org/b/58491 fast/css3-text/css3-text-decoration 710 webkit.org/b/76173 fast/css3-text/css3-text-align-last 710 711 711 712 # Needs rebaseline after bug 86441 -
trunk/LayoutTests/platform/qt-mac/TestExpectations
r132043 r134190 5807 5807 # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). 5808 5808 webkit.org/b/58491 fast/css3-text/css3-text-decoration 5809 webkit.org/b/76173 fast/css3-text/css3-text-align-last 5809 5810 5810 5811 # Needs rebaseline after bug 86441 -
trunk/LayoutTests/platform/qt/TestExpectations
r134125 r134190 352 352 # CSS3 Text support is not yet enabled (needs ENABLE_CSS3_TEXT). 353 353 webkit.org/b/58491 fast/css3-text/css3-text-decoration 354 webkit.org/b/76173 fast/css3-text/css3-text-align-last 354 355 355 356 # Web Inspector: Implement support for InspectorClient::overrideDeviceMetrics() in platforms other than Chromium -
trunk/Source/WebCore/ChangeLog
r134189 r134190 1 2012-11-11 Dongwoo Joshua Im <dw.im@samsung.com> 2 3 [CSS3] Parsing the property, text-align-last. 4 https://bugs.webkit.org/show_bug.cgi?id=99439 5 6 Reviewed by Julien Chaffraix. 7 8 This patch implements the parsing side of the "text-align-last" 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-align-last 11 12 Tests: fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last-inherited.html 13 fast/css3-text/css3-text-align-last/getComputedStyle/getComputedStyle-text-align-last.html 14 15 * css/CSSComputedStyleDeclaration.cpp: 16 (WebCore): 17 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Get the value of the text-align-last property. 18 * css/CSSParser.cpp: 19 (WebCore::CSSParser::parseValue): Parse the value, and check whether it is a proper value which text-align-last can have. 20 * css/CSSPrimitiveValueMappings.h: 21 (WebCore): 22 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 23 (WebCore::CSSPrimitiveValue::operator ETextAlignLast): 24 * css/CSSProperty.cpp: 25 (WebCore::CSSProperty::isInheritedProperty): 26 * css/CSSPropertyNames.in: Add '-webkit-text-align-last' property. 27 * css/StyleBuilder.cpp: 28 (WebCore::StyleBuilder::StyleBuilder): 29 * css/StylePropertySet.cpp: 30 (WebCore): 31 * css/StyleResolver.cpp: 32 (WebCore::StyleResolver::applyProperty): 33 * rendering/style/RenderStyle.h: 34 * rendering/style/RenderStyleConstants.h: 35 * rendering/style/StyleRareInheritedData.cpp: 36 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 37 (WebCore::StyleRareInheritedData::operator==): 38 * rendering/style/StyleRareInheritedData.h: 39 (StyleRareInheritedData): Add m_textAlignLast. 40 1 41 2012-11-11 Shinya Kawanaka <shinyak@chromium.org> 2 42 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r133458 r134190 184 184 CSSPropertyWebkitTextDecorationLine, 185 185 CSSPropertyWebkitTextDecorationStyle, 186 CSSPropertyWebkitTextAlignLast, 186 187 #endif // CSS3_TEXT 187 188 CSSPropertyTextIndent, … … 2037 2038 case CSSPropertyWebkitTextDecorationStyle: 2038 2039 return renderTextDecorationStyleFlagsToCSSValue(style->textDecorationStyle()); 2040 case CSSPropertyWebkitTextAlignLast: 2041 return cssValuePool().createValue(style->textAlignLast()); 2039 2042 #endif // CSS3_TEXT 2040 2043 case CSSPropertyWebkitTextDecorationsInEffect: -
trunk/Source/WebCore/css/CSSParser.cpp
r134156 r134190 1865 1865 } 1866 1866 break; 1867 1868 #if ENABLE(CSS3_TEXT) 1869 case CSSPropertyWebkitTextAlignLast: 1870 // auto | start | end | left | right | center | justify 1871 if ((id >= CSSValueLeft && id <= CSSValueJustify) || id == CSSValueStart || id == CSSValueEnd || id == CSSValueAuto) 1872 validPrimitive = true; 1873 break; 1874 #endif // CSS3_TEXT 1867 1875 1868 1876 case CSSPropertyCursor: { -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r133227 r134190 2199 2199 } 2200 2200 } 2201 2202 #if ENABLE(CSS3_TEXT) 2203 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlignLast e) 2204 : CSSValue(PrimitiveClass) 2205 { 2206 m_primitiveUnitType = CSS_IDENT; 2207 switch (e) { 2208 case TextAlignLastStart: 2209 m_value.ident = CSSValueStart; 2210 break; 2211 case TextAlignLastEnd: 2212 m_value.ident = CSSValueEnd; 2213 break; 2214 case TextAlignLastLeft: 2215 m_value.ident = CSSValueLeft; 2216 break; 2217 case TextAlignLastRight: 2218 m_value.ident = CSSValueRight; 2219 break; 2220 case TextAlignLastCenter: 2221 m_value.ident = CSSValueCenter; 2222 break; 2223 case TextAlignLastJustify: 2224 m_value.ident = CSSValueJustify; 2225 break; 2226 case TextAlignLastAuto: 2227 m_value.ident = CSSValueAuto; 2228 break; 2229 } 2230 } 2231 2232 template<> inline CSSPrimitiveValue::operator ETextAlignLast() const 2233 { 2234 switch (m_value.ident) { 2235 case CSSValueAuto: 2236 return TextAlignLastAuto; 2237 case CSSValueStart: 2238 return TextAlignLastStart; 2239 case CSSValueEnd: 2240 return TextAlignLastEnd; 2241 case CSSValueLeft: 2242 return TextAlignLastLeft; 2243 case CSSValueRight: 2244 return TextAlignLastRight; 2245 case CSSValueCenter: 2246 return TextAlignLastCenter; 2247 case CSSValueJustify: 2248 return TextAlignLastJustify; 2249 } 2250 2251 ASSERT_NOT_REACHED(); 2252 return TextAlignLastAuto; 2253 } 2254 #endif // CSS3_TEXT 2201 2255 2202 2256 template<> inline CSSPrimitiveValue::operator ETextDecoration() const -
trunk/Source/WebCore/css/CSSProperty.cpp
r133458 r134190 328 328 #if ENABLE(CSS3_TEXT) 329 329 case CSSPropertyWebkitTextDecorationLine: 330 case CSSPropertyWebkitTextAlignLast: 330 331 #endif // CSS3_TEXT 331 332 case CSSPropertyWebkitTextDecorationsInEffect: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r133458 r134190 358 358 -webkit-text-decoration-line 359 359 -webkit-text-decoration-style 360 -webkit-text-align-last 360 361 #endif 361 362 -webkit-text-decorations-in-effect -
trunk/Source/WebCore/css/StyleBuilder.cpp
r132942 r134190 1920 1920 setPropertyHandler(CSSPropertyWebkitTextDecorationLine, ApplyPropertyTextDecoration::createHandler()); 1921 1921 setPropertyHandler(CSSPropertyWebkitTextDecorationStyle, ApplyPropertyDefault<TextDecorationStyle, &RenderStyle::textDecorationStyle, TextDecorationStyle, &RenderStyle::setTextDecorationStyle, TextDecorationStyle, &RenderStyle::initialTextDecorationStyle>::createHandler()); 1922 setPropertyHandler(CSSPropertyWebkitTextAlignLast, ApplyPropertyDefault<ETextAlignLast, &RenderStyle::textAlignLast, ETextAlignLast, &RenderStyle::setTextAlignLast, ETextAlignLast, &RenderStyle::initialTextAlignLast>::createHandler()); 1922 1923 #endif // CSS3_TEXT 1923 1924 setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler()); -
trunk/Source/WebCore/css/StylePropertySet.cpp
r133581 r134190 975 975 #endif 976 976 CSSPropertyTextAlign, 977 #if ENABLE(CSS3_TEXT) 978 CSSPropertyWebkitTextAlignLast, 979 #endif // CSS3_TEXT 977 980 CSSPropertyTextIndent, 978 981 CSSPropertyWidows -
trunk/Source/WebCore/css/StyleResolver.cpp
r133926 r134190 3853 3853 case CSSPropertyWebkitTextDecorationLine: 3854 3854 case CSSPropertyWebkitTextDecorationStyle: 3855 case CSSPropertyWebkitTextAlignLast: 3855 3856 #endif // CSS3_TEXT 3856 3857 case CSSPropertyWebkitTextEmphasisColor: -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r133926 r134190 620 620 #if ENABLE(CSS3_TEXT) 621 621 TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(rareNonInheritedData->m_textDecorationStyle); } 622 ETextAlignLast textAlignLast() const { return static_cast<ETextAlignLast>(rareInheritedData->m_textAlignLast); } 622 623 #else 623 624 TextDecorationStyle textDecorationStyle() const { return TextDecorationStyleSolid; } … … 1153 1154 #if ENABLE(CSS3_TEXT) 1154 1155 void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(rareNonInheritedData, m_textDecorationStyle, v); } 1156 void setTextAlignLast(ETextAlignLast v) { SET_VAR(rareInheritedData, m_textAlignLast, v) } 1155 1157 #endif // CSS3_TEXT 1156 1158 void setDirection(TextDirection v) { inherited_flags._direction = v; } … … 1612 1614 #if ENABLE(CSS3_TEXT) 1613 1615 static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; } 1616 static ETextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } 1614 1617 #endif // CSS3_TEXT 1615 1618 static float initialZoom() { return 1.0f; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r132942 r134190 347 347 }; 348 348 349 #if ENABLE(CSS3_TEXT) 350 enum ETextAlignLast { 351 TextAlignLastAuto, TextAlignLastStart, TextAlignLastEnd, TextAlignLastLeft, TextAlignLastRight, TextAlignLastCenter, TextAlignLastJustify 352 }; 353 #endif // CSS3_TEXT 354 349 355 enum EPageBreak { 350 356 PBAUTO, PBALWAYS, PBAVOID -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r132942 r134190 96 96 , m_imageResolutionSnap(RenderStyle::initialImageResolutionSnap()) 97 97 #endif 98 #if ENABLE(CSS3_TEXT) 99 , m_textAlignLast(RenderStyle::initialTextAlignLast()) 100 #endif // CSS3_TEXT 98 101 , hyphenationLimitBefore(-1) 99 102 , hyphenationLimitAfter(-1) … … 158 161 , m_imageResolutionSnap(o.m_imageResolutionSnap) 159 162 #endif 163 #if ENABLE(CSS3_TEXT) 164 , m_textAlignLast(o.m_textAlignLast) 165 #endif // CSS3_TEXT 160 166 , hyphenationString(o.hyphenationString) 161 167 , hyphenationLimitBefore(o.hyphenationLimitBefore) … … 247 253 && m_imageResolution == o.m_imageResolution 248 254 #endif 255 #if ENABLE(CSS3_TEXT) 256 && m_textAlignLast == o.m_textAlignLast 257 #endif // CSS3_TEXT 249 258 && m_lineSnap == o.m_lineSnap 250 259 #if ENABLE(CSS_VARIABLES) -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r132942 r134190 111 111 unsigned m_imageResolutionSnap : 1; // ImageResolutionSnap 112 112 #endif 113 #if ENABLE(CSS3_TEXT) 114 unsigned m_textAlignLast : 3; // ETextAlignLast 115 #endif // CSS3_TEXT 113 116 114 117 AtomicString hyphenationString;
Note: See TracChangeset
for help on using the changeset viewer.