- Revision
- 103211
- Author
- macpher...@chromium.org
- Date
- 2011-12-18 19:27:43 -0800 (Sun, 18 Dec 2011)
Log Message
Implement CSS outline shorthand property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74467
Reviewed by Andreas Kling.
No new tests / refactoring only.
RenderStyle::resetOutline was removed in favor of explicity expanding to the
initial values of the shorthand expansion. This improves consistency because
the initial values to use are more clearly (and singularly) defined.
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103210 => 103211)
--- trunk/Source/WebCore/ChangeLog 2011-12-19 03:13:08 UTC (rev 103210)
+++ trunk/Source/WebCore/ChangeLog 2011-12-19 03:27:43 UTC (rev 103211)
@@ -1,3 +1,22 @@
+2011-12-18 Luke Macpherson <macpher...@chromium.org>
+
+ Implement CSS outline shorthand property in CSSStyleApplyProperty.
+ https://bugs.webkit.org/show_bug.cgi?id=74467
+
+ Reviewed by Andreas Kling.
+
+ No new tests / refactoring only.
+
+ RenderStyle::resetOutline was removed in favor of explicity expanding to the
+ initial values of the shorthand expansion. This improves consistency because
+ the initial values to use are more clearly (and singularly) defined.
+
+ * css/CSSStyleApplyProperty.cpp:
+ (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ * rendering/style/RenderStyle.h:
+
2011-12-18 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r103205.
Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (103210 => 103211)
--- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:13:08 UTC (rev 103210)
+++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:27:43 UTC (rev 103211)
@@ -1656,6 +1656,8 @@
setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor<InheritFromParent, &RenderStyle::outlineColor, &RenderStyle::setOutlineColor, &RenderStyle::setVisitedLinkOutlineColor, &RenderStyle::color>::createHandler());
setPropertyHandler(CSSPropertyOutlineOffset, ApplyPropertyComputeLength<int, &RenderStyle::outlineOffset, &RenderStyle::setOutlineOffset, &RenderStyle::initialOutlineOffset>::createHandler());
+ setPropertyHandler(CSSPropertyOutline, ApplyPropertyExpanding<SuppressValue, CSSPropertyOutlineWidth, CSSPropertyOutlineColor, CSSPropertyOutlineStyle>::createHandler());
+
setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowX, EOverflow, &RenderStyle::setOverflowX, EOverflow, &RenderStyle::initialOverflowX>::createHandler());
setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault<EOverflow, &RenderStyle::overflowY, EOverflow, &RenderStyle::setOverflowY, EOverflow, &RenderStyle::initialOverflowY>::createHandler());
setPropertyHandler(CSSPropertyOverflow, ApplyPropertyExpanding<ExpandValue, CSSPropertyOverflowX, CSSPropertyOverflowY>::createHandler());
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (103210 => 103211)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-19 03:13:08 UTC (rev 103210)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-19 03:27:43 UTC (rev 103211)
@@ -3063,16 +3063,6 @@
}
return;
- case CSSPropertyOutline:
- if (isInherit) {
- m_style->setOutlineWidth(m_parentStyle->outlineWidth());
- m_style->setOutlineColor(m_parentStyle->outlineColor().isValid() ? m_parentStyle->outlineColor() : m_parentStyle->color());
- m_style->setOutlineStyle(m_parentStyle->outlineStyle());
- }
- else if (isInitial)
- m_style->resetOutline();
- return;
-
// CSS3 Properties
case CSSPropertyWebkitAppearance:
HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(appearance, Appearance)
@@ -3731,6 +3721,7 @@
case CSSPropertyWebkitTextOrientation:
case CSSPropertyWebkitFontSmoothing:
case CSSPropertyFontWeight:
+ case CSSPropertyOutline:
case CSSPropertyOutlineStyle:
case CSSPropertyOutlineWidth:
case CSSPropertyOutlineOffset:
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (103210 => 103211)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-19 03:13:08 UTC (rev 103210)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-19 03:27:43 UTC (rev 103211)
@@ -949,8 +949,6 @@
void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()) }
void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight, initialBorderRadius()) }
- void resetOutline() { SET_VAR(m_background, m_outline, OutlineValue()) }
-
void setBackgroundColor(const Color& v) { SET_VAR(m_background, m_color, v) }
void setBackgroundXPosition(Length l) { SET_VAR(m_background, m_background.m_xPosition, l) }