Changeset 102650 in webkit
- Timestamp:
- Dec 12, 2011 6:36:47 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102649 r102650 1 2011-12-12 Luke Macpherson <macpherson@chromium.org> 2 3 Implement CSS text-decoration property in CSSStyleApplyProperty. 4 https://bugs.webkit.org/show_bug.cgi?id=74258 5 6 Reviewed by Andreas Kling. 7 8 No new tests / refactoring only. 9 10 * css/CSSStyleApplyProperty.cpp: 11 (WebCore::ApplyPropertyTextDecoration::applyValue): 12 (WebCore::ApplyPropertyTextDecoration::createHandler): 13 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 14 * css/CSSStyleSelector.cpp: 15 (WebCore::CSSStyleSelector::applyProperty): 16 1 17 2011-12-12 Adrienne Walker <enne@google.com> 2 18 -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r102557 r102650 867 867 { 868 868 PropertyHandler handler = ApplyPropertyDefaultBase<ETextAlign, &RenderStyle::textAlign, ETextAlign, &RenderStyle::setTextAlign, ETextAlign, &RenderStyle::initialTextAlign>::createHandler(); 869 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); 870 } 871 }; 872 873 class ApplyPropertyTextDecoration { 874 public: 875 static void applyValue(CSSStyleSelector* selector, CSSValue* value) 876 { 877 ETextDecoration t = RenderStyle::initialTextDecoration(); 878 for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { 879 CSSValue* item = i.value(); 880 ASSERT(item->isPrimitiveValue()); 881 t |= *static_cast<CSSPrimitiveValue*>(item); 882 } 883 selector->style()->setTextDecoration(t); 884 } 885 static PropertyHandler createHandler() 886 { 887 PropertyHandler handler = ApplyPropertyDefaultBase<ETextDecoration, &RenderStyle::textDecoration, ETextDecoration, &RenderStyle::setTextDecoration, ETextDecoration, &RenderStyle::initialTextDecoration>::createHandler(); 869 888 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); 870 889 } … … 1545 1564 1546 1565 setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler()); 1566 setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler()); 1547 1567 1548 1568 setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler()); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r102621 r102650 3049 3049 setFontDescription(fontDescription); 3050 3050 } 3051 return;3052 }3053 case CSSPropertyTextDecoration: {3054 // list of ident3055 HANDLE_INHERIT_AND_INITIAL(textDecoration, TextDecoration)3056 ETextDecoration t = RenderStyle::initialTextDecoration();3057 for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {3058 CSSValue* item = i.value();3059 ASSERT(item->isPrimitiveValue());3060 t |= *static_cast<CSSPrimitiveValue*>(item);3061 }3062 m_style->setTextDecoration(t);3063 3051 return; 3064 3052 } … … 3867 3855 case CSSPropertySize: 3868 3856 case CSSPropertyTextAlign: 3857 case CSSPropertyTextDecoration: 3869 3858 case CSSPropertyTextIndent: 3870 3859 case CSSPropertyMaxHeight:
Note: See TracChangeset
for help on using the changeset viewer.