Skip to content

Commit 4f5b86f

Browse files
2011-04-15 Luke Macpherson <macpherson@chromium.org>
Reviewed by Dimitri Glazkov. Implement css overflow properties in CSSStyleApplyProperty https://bugs.webkit.org/show_bug.cgi?id=58633 No new tests required as no functionality changes. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Add initializers for CSSPropertyOverflowX, CSSPropertyOverflowY and CSSPropertyOverflow. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Delete existing implementations. Canonical link: https://commits.webkit.org/73740@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent cf534c8 commit 4f5b86f

3 files changed

Lines changed: 24 additions & 28 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2011-04-15 Luke Macpherson <macpherson@chromium.org>
2+
3+
Reviewed by Dimitri Glazkov.
4+
5+
Implement css overflow properties in CSSStyleApplyProperty
6+
https://bugs.webkit.org/show_bug.cgi?id=58633
7+
8+
No new tests required as no functionality changes.
9+
10+
* css/CSSStyleApplyProperty.cpp:
11+
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
12+
Add initializers for CSSPropertyOverflowX, CSSPropertyOverflowY and CSSPropertyOverflow.
13+
* css/CSSStyleSelector.cpp:
14+
(WebCore::CSSStyleSelector::applyProperty):
15+
Delete existing implementations.
16+
117
2011-04-15 Sam Weinig <sam@webkit.org>
218

319
Reviewed by Maciej Stachowiak.

Source/WebCore/css/CSSStyleApplyProperty.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,11 @@ CSSStyleApplyProperty::CSSStyleApplyProperty()
370370
setPropertyValue(CSSPropertyBorderLeftStyle, new ApplyPropertyDefault<EBorderStyle>(&RenderStyle::borderLeftStyle, &RenderStyle::setBorderLeftStyle, &RenderStyle::initialBorderStyle));
371371

372372
setPropertyValue(CSSPropertyOutlineColor, new ApplyPropertyColorBase(&RenderStyle::outlineColor, &RenderStyle::color, &RenderStyle::setOutlineColor));
373+
374+
setPropertyValue(CSSPropertyOverflowX, new ApplyPropertyDefault<EOverflow>(&RenderStyle::overflowX, &RenderStyle::setOverflowX, &RenderStyle::initialOverflowX));
375+
setPropertyValue(CSSPropertyOverflowY, new ApplyPropertyDefault<EOverflow>(&RenderStyle::overflowY, &RenderStyle::setOverflowY, &RenderStyle::initialOverflowY));
376+
setPropertyValue(CSSPropertyOverflow, new ApplyPropertyExpanding(propertyValue(CSSPropertyOverflowX), propertyValue(CSSPropertyOverflowY)));
377+
373378
setPropertyValue(CSSPropertyWebkitColumnRuleColor, new ApplyPropertyColorBase(&RenderStyle::columnRuleColor, &RenderStyle::color, &RenderStyle::setColumnRuleColor));
374379
setPropertyValue(CSSPropertyWebkitTextEmphasisColor, new ApplyPropertyColorBase(&RenderStyle::textEmphasisColor, &RenderStyle::color, &RenderStyle::setTextEmphasisColor));
375380
setPropertyValue(CSSPropertyWebkitTextFillColor, new ApplyPropertyColorBase(&RenderStyle::textFillColor, &RenderStyle::color, &RenderStyle::setTextFillColor));

Source/WebCore/css/CSSStyleSelector.cpp

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3759,33 +3759,6 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
37593759
case CSSPropertyListStyleType:
37603760
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(listStyleType, ListStyleType)
37613761
return;
3762-
case CSSPropertyOverflow:
3763-
{
3764-
if (isInherit) {
3765-
m_style->setOverflowX(m_parentStyle->overflowX());
3766-
m_style->setOverflowY(m_parentStyle->overflowY());
3767-
return;
3768-
}
3769-
3770-
if (isInitial) {
3771-
m_style->setOverflowX(RenderStyle::initialOverflowX());
3772-
m_style->setOverflowY(RenderStyle::initialOverflowY());
3773-
return;
3774-
}
3775-
3776-
EOverflow o = *primitiveValue;
3777-
3778-
m_style->setOverflowX(o);
3779-
m_style->setOverflowY(o);
3780-
return;
3781-
}
3782-
3783-
case CSSPropertyOverflowX:
3784-
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(overflowX, OverflowX)
3785-
return;
3786-
case CSSPropertyOverflowY:
3787-
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(overflowY, OverflowY)
3788-
return;
37893762
case CSSPropertyPageBreakBefore:
37903763
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(pageBreakBefore, PageBreakBefore, PageBreak)
37913764
return;
@@ -6075,9 +6048,11 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
60756048
case CSSPropertyWebkitMaskRepeat:
60766049
case CSSPropertyWebkitMaskRepeatX:
60776050
case CSSPropertyWebkitMaskRepeatY:
6051+
case CSSPropertyOverflow:
6052+
case CSSPropertyOverflowX:
6053+
case CSSPropertyOverflowY:
60786054
ASSERT_NOT_REACHED();
60796055
return;
6080-
60816056
#if ENABLE(SVG)
60826057
default:
60836058
// Try the SVG properties

0 commit comments

Comments
 (0)