Changeset 102544 in webkit
- Timestamp:
- Dec 11, 2011 4:24:29 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102543 r102544 1 2011-12-11 Luke Macpherson <macpherson@chromium.org> 2 3 Implement CSS resize property in CSSStyleApplyProperty. 4 https://bugs.webkit.org/show_bug.cgi?id=74162 5 6 Reviewed by Julien Chaffraix. 7 8 No new tests / refactoring only. 9 10 * css/CSSStyleApplyProperty.cpp: 11 (WebCore::ApplyPropertyResize::applyValue): 12 (WebCore::ApplyPropertyResize::createHandler): 13 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 14 * css/CSSStyleSelector.cpp: 15 (WebCore::CSSStyleSelector::applyProperty): 16 1 17 2011-12-11 Andreas Kling <kling@webkit.org> 2 18 -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r102528 r102544 38 38 #include "RenderObject.h" 39 39 #include "RenderStyle.h" 40 #include "Settings.h" 40 41 #include <wtf/StdLibExtras.h> 41 42 #include <wtf/UnusedParam.h> … … 1170 1171 }; 1171 1172 1173 class ApplyPropertyResize { 1174 public: 1175 static void applyValue(CSSStyleSelector* selector, CSSValue* value) 1176 { 1177 if (!value->isPrimitiveValue()) 1178 return; 1179 1180 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(value); 1181 1182 EResize r = RESIZE_NONE; 1183 switch (primitiveValue->getIdent()) { 1184 case 0: 1185 return; 1186 case CSSValueAuto: 1187 if (Settings* settings = selector->document()->settings()) 1188 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE; 1189 break; 1190 default: 1191 r = *primitiveValue; 1192 } 1193 selector->style()->setResize(r); 1194 } 1195 1196 static PropertyHandler createHandler() 1197 { 1198 PropertyHandler handler = ApplyPropertyDefaultBase<EResize, &RenderStyle::resize, EResize, &RenderStyle::setResize, EResize, &RenderStyle::initialResize>::createHandler(); 1199 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); 1200 } 1201 }; 1202 1172 1203 class ApplyPropertyVerticalAlign { 1173 1204 public: … … 1521 1552 setPropertyHandler(CSSPropertyPadding, ApplyPropertyExpanding<SuppressValue, CSSPropertyPaddingTop, CSSPropertyPaddingRight, CSSPropertyPaddingBottom, CSSPropertyPaddingLeft>::createHandler()); 1522 1553 1554 setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler()); 1555 1523 1556 setPropertyHandler(CSSPropertyVerticalAlign, ApplyPropertyVerticalAlign::createHandler()); 1524 1557 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r102479 r102544 2725 2725 HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(matchNearestMailBlockquoteColor, MatchNearestMailBlockquoteColor) 2726 2726 return; 2727 2728 case CSSPropertyResize:2729 {2730 HANDLE_INHERIT_AND_INITIAL(resize, Resize)2731 2732 if (!primitiveValue->getIdent())2733 return;2734 2735 EResize r = RESIZE_NONE;2736 if (primitiveValue->getIdent() == CSSValueAuto) {2737 if (Settings* settings = m_checker.document()->settings())2738 r = settings->textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE;2739 } else2740 r = *primitiveValue;2741 2742 m_style->setResize(r);2743 return;2744 }2745 2727 case CSSPropertyFontSize: 2746 2728 { … … 3933 3915 case CSSPropertyPaddingLeft: 3934 3916 case CSSPropertyPadding: 3917 case CSSPropertyResize: 3935 3918 case CSSPropertySize: 3936 3919 case CSSPropertyTextAlign:
Note: See TracChangeset
for help on using the changeset viewer.