Changeset 86308 in webkit
- Timestamp:
- May 11, 2011 10:13:23 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86306 r86308 1 2011-05-11 Luke Macpherson <macpherson@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Implement CSSPropertyMargin and CSSPropertyPadding in CSSStyleApplyProperty. 6 https://bugs.webkit.org/show_bug.cgi?id=60609 7 8 No new tests - refactoring only. 9 10 * css/CSSStyleApplyProperty.cpp: 11 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 12 Initialise CSSPropertyMargin and CSSPropertyPadding handlers. 13 * css/CSSStyleSelector.cpp: 14 (WebCore::CSSStyleSelector::applyProperty): 15 Remove unused implementations. 16 1 17 2011-05-11 Robin Dunn <robin@alldunn.com> 2 18 -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r86044 r86308 506 506 setPropertyHandler(CSSPropertyMarginBottom, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginBottom, &RenderStyle::setMarginBottom, &RenderStyle::initialMargin)); 507 507 setPropertyHandler(CSSPropertyMarginLeft, new ApplyPropertyLength<AutoEnabled>(&RenderStyle::marginLeft, &RenderStyle::setMarginLeft, &RenderStyle::initialMargin)); 508 setPropertyHandler(CSSPropertyMargin, new ApplyPropertyExpandingSuppressValue(propertyHandler(CSSPropertyMarginTop), propertyHandler(CSSPropertyMarginRight), propertyHandler(CSSPropertyMarginBottom), propertyHandler(CSSPropertyMarginLeft))); 508 509 509 510 setPropertyHandler(CSSPropertyPaddingTop, new ApplyPropertyLength<>(&RenderStyle::paddingTop, &RenderStyle::setPaddingTop, &RenderStyle::initialPadding)); … … 511 512 setPropertyHandler(CSSPropertyPaddingBottom, new ApplyPropertyLength<>(&RenderStyle::paddingBottom, &RenderStyle::setPaddingBottom, &RenderStyle::initialPadding)); 512 513 setPropertyHandler(CSSPropertyPaddingLeft, new ApplyPropertyLength<>(&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding)); 514 setPropertyHandler(CSSPropertyPadding, new ApplyPropertyExpandingSuppressValue(propertyHandler(CSSPropertyPaddingTop), propertyHandler(CSSPropertyPaddingRight), propertyHandler(CSSPropertyPaddingBottom), propertyHandler(CSSPropertyPaddingLeft))); 513 515 514 516 setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, new ApplyPropertyLength<>(&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX)); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r86135 r86308 4442 4442 m_style->inheritMaskLayers(*m_parentStyle->maskLayers()); 4443 4443 return; 4444 case CSSPropertyMargin:4445 if (isInherit) {4446 m_style->setMarginTop(m_parentStyle->marginTop());4447 m_style->setMarginBottom(m_parentStyle->marginBottom());4448 m_style->setMarginLeft(m_parentStyle->marginLeft());4449 m_style->setMarginRight(m_parentStyle->marginRight());4450 }4451 else if (isInitial)4452 m_style->resetMargin();4453 return;4454 case CSSPropertyPadding:4455 if (isInherit) {4456 m_style->setPaddingTop(m_parentStyle->paddingTop());4457 m_style->setPaddingBottom(m_parentStyle->paddingBottom());4458 m_style->setPaddingLeft(m_parentStyle->paddingLeft());4459 m_style->setPaddingRight(m_parentStyle->paddingRight());4460 }4461 else if (isInitial)4462 m_style->resetPadding();4463 return;4464 4444 case CSSPropertyFont: 4465 4445 if (isInherit) { … … 5539 5519 case CSSPropertyMarginBottom: 5540 5520 case CSSPropertyMarginLeft: 5521 case CSSPropertyMargin: 5541 5522 case CSSPropertyPaddingTop: 5542 5523 case CSSPropertyPaddingRight: 5543 5524 case CSSPropertyPaddingBottom: 5544 5525 case CSSPropertyPaddingLeft: 5526 case CSSPropertyPadding: 5545 5527 case CSSPropertyTextIndent: 5546 5528 case CSSPropertyMaxHeight:
Note: See TracChangeset
for help on using the changeset viewer.