Commit 25e58b47 authored by mihnea@adobe.com's avatar mihnea@adobe.com

CSS Exclusions: parse the wrap-margin and wrap-padding properties

https://bugs.webkit.org/show_bug.cgi?id=71900

Reviewed by Dean Jackson.

Source/WebCore:

Tests: fast/exclusions/wrap-margin-parsing.html
       fast/exclusions/wrap-padding-parsing.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::wrapPadding):
(WebCore::InheritedFlags::setWrapPadding):
(WebCore::InheritedFlags::initialWrapPadding):
(WebCore::InheritedFlags::wrapMargin):
(WebCore::InheritedFlags::setWrapMargin):
(WebCore::InheritedFlags::initialWrapMargin):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/exclusions/script-tests/wrap-margin-parsing.js: Added.
* fast/exclusions/script-tests/wrap-padding-parsing.js: Added.
* fast/exclusions/wrap-margin-parsing-expected.txt: Added.
* fast/exclusions/wrap-margin-parsing.html: Added.
* fast/exclusions/wrap-padding-parsing-expected.txt: Added.
* fast/exclusions/wrap-padding-parsing.html: Added.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 88189288
2011-11-17 Mihnea Ovidenie <mihnea@adobe.com>
CSS Exclusions: parse the wrap-margin and wrap-padding properties
https://bugs.webkit.org/show_bug.cgi?id=71900
Reviewed by Dean Jackson.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/exclusions/script-tests/wrap-margin-parsing.js: Added.
* fast/exclusions/script-tests/wrap-padding-parsing.js: Added.
* fast/exclusions/wrap-margin-parsing-expected.txt: Added.
* fast/exclusions/wrap-margin-parsing.html: Added.
* fast/exclusions/wrap-padding-parsing-expected.txt: Added.
* fast/exclusions/wrap-padding-parsing.html: Added.
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:
2011-11-17 Steve Block <steveblock@google.com>
CSS3 cross-fade tests failing on Chromium after r100535
......@@ -212,6 +212,8 @@ zoom: 1;
-webkit-region-break-before: auto;
-webkit-region-break-inside: auto;
-webkit-wrap-flow: auto;
-webkit-wrap-margin: 0px;
-webkit-wrap-padding: 0px;
-webkit-wrap-through: wrap;
clip-path: none;
clip-rule: nonzero;
......
......@@ -211,6 +211,8 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-region-break-before: auto
-webkit-region-break-inside: auto
-webkit-wrap-flow: auto
-webkit-wrap-margin: 0px
-webkit-wrap-padding: 0px
-webkit-wrap-through: wrap
clip-path: none
clip-rule: nonzero
......
description('Test parsing of the CSS wrap-margin property.');
function test(declaration) {
var div = document.createElement("div");
div.setAttribute("style", declaration);
return div.style.webkitWrapMargin;
}
function testComputedStyle(value) {
var div = document.createElement("div");
document.body.appendChild(div);
div.style.setProperty("-webkit-wrap-margin", value);
var webkitWrapMarginComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-margin");
document.body.removeChild(div);
return webkitWrapMarginComputedValue;
}
function testNotInherited(parentValue, childValue) {
var parentDiv = document.createElement("div");
document.body.appendChild(parentDiv);
parentDiv.style.setProperty("-webkit-wrap-margin", parentValue);
var childDiv = document.createElement("div");
parentDiv.appendChild(childDiv);
childDiv.style.setProperty("-webkit-wrap-margin", childValue);
var childWebKitWrapMarginComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-margin");
parentDiv.removeChild(childDiv);
document.body.removeChild(parentDiv);
return childWebKitWrapMarginComputedValue;
}
shouldBeEqualToString('test("-webkit-wrap-margin: 0")', "0px");
shouldBeEqualToString('test("-webkit-wrap-margin: 1.5ex")', "1.5ex");
shouldBeEqualToString('test("-webkit-wrap-margin: 2em")', "2em");
shouldBeEqualToString('test("-webkit-wrap-margin: 2.5in")', "2.5in");
shouldBeEqualToString('test("-webkit-wrap-margin: 3cm")', "3cm");
shouldBeEqualToString('test("-webkit-wrap-margin: 3.5mm")', "3.5mm");
shouldBeEqualToString('test("-webkit-wrap-margin: 4pt")', "4pt");
shouldBeEqualToString('test("-webkit-wrap-margin: 4.5pc")', "4.5pc");
shouldBeEqualToString('test("-webkit-wrap-margin: 5px")', "5px");
shouldBeEqualToString('test("-webkit-wrap-margin: -5px")', "");
shouldBeEqualToString('test("-webkit-wrap-margin: auto")', "");
shouldBeEqualToString('test("-webkit-wrap-margin: \'string\'")', "");
shouldBeEqualToString('test("-webkit-wrap-margin: 120%")', "");
shouldBeEqualToString('testComputedStyle("0")', "0px");
shouldBeEqualToString('testComputedStyle("1px")', "1px");
shouldBeEqualToString('testComputedStyle("-5em")', "0px");
shouldBeEqualToString('testComputedStyle("identifier")', "0px");
shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
shouldBeEqualToString('testNotInherited("0", "0")', "0px");
shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
description('Test parsing of the CSS wrap-padding property.');
function test(declaration) {
var div = document.createElement("div");
div.setAttribute("style", declaration);
return div.style.webkitWrapPadding;
}
function testComputedStyle(value) {
var div = document.createElement("div");
document.body.appendChild(div);
div.style.setProperty("-webkit-wrap-padding", value);
var webkitWrapPaddingComputedValue = getComputedStyle(div).getPropertyValue("-webkit-wrap-padding");
document.body.removeChild(div);
return webkitWrapPaddingComputedValue;
}
function testNotInherited(parentValue, childValue) {
var parentDiv = document.createElement("div");
document.body.appendChild(parentDiv);
parentDiv.style.setProperty("-webkit-wrap-padding", parentValue);
var childDiv = document.createElement("div");
parentDiv.appendChild(childDiv);
childDiv.style.setProperty("-webkit-wrap-padding", childValue);
var childWebKitWrapPaddingComputedValue = getComputedStyle(childDiv).getPropertyValue("-webkit-wrap-padding");
parentDiv.removeChild(childDiv);
document.body.removeChild(parentDiv);
return childWebKitWrapPaddingComputedValue;
}
shouldBeEqualToString('test("-webkit-wrap-padding: 0")', "0px");
shouldBeEqualToString('test("-webkit-wrap-padding: 1.5ex")', "1.5ex");
shouldBeEqualToString('test("-webkit-wrap-padding: 2em")', "2em");
shouldBeEqualToString('test("-webkit-wrap-padding: 2.5in")', "2.5in");
shouldBeEqualToString('test("-webkit-wrap-padding: 3cm")', "3cm");
shouldBeEqualToString('test("-webkit-wrap-padding: 3.5mm")', "3.5mm");
shouldBeEqualToString('test("-webkit-wrap-padding: 4pt")', "4pt");
shouldBeEqualToString('test("-webkit-wrap-padding: 4.5pc")', "4.5pc");
shouldBeEqualToString('test("-webkit-wrap-padding: 5px")', "5px");
shouldBeEqualToString('test("-webkit-wrap-padding: -5px")', "");
shouldBeEqualToString('test("-webkit-wrap-padding: auto")', "");
shouldBeEqualToString('test("-webkit-wrap-padding: \'string\'")', "");
shouldBeEqualToString('test("-webkit-wrap-padding: 120%")', "");
shouldBeEqualToString('testComputedStyle("0")', "0px");
shouldBeEqualToString('testComputedStyle("1px")', "1px");
shouldBeEqualToString('testComputedStyle("-5em")', "0px");
shouldBeEqualToString('testComputedStyle("identifier")', "0px");
shouldBeEqualToString('testComputedStyle("\'string\'")', "0px");
shouldBeEqualToString('testNotInherited("0", "0")', "0px");
shouldBeEqualToString('testNotInherited("0", "1px")', "1px");
shouldBeEqualToString('testNotInherited("1px", "-1em")', "0px");
shouldBeEqualToString('testNotInherited("2px", "1px")', "1px");
Test parsing of the CSS wrap-margin property.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS test("-webkit-wrap-margin: 0") is "0px"
PASS test("-webkit-wrap-margin: 1.5ex") is "1.5ex"
PASS test("-webkit-wrap-margin: 2em") is "2em"
PASS test("-webkit-wrap-margin: 2.5in") is "2.5in"
PASS test("-webkit-wrap-margin: 3cm") is "3cm"
PASS test("-webkit-wrap-margin: 3.5mm") is "3.5mm"
PASS test("-webkit-wrap-margin: 4pt") is "4pt"
PASS test("-webkit-wrap-margin: 4.5pc") is "4.5pc"
PASS test("-webkit-wrap-margin: 5px") is "5px"
PASS test("-webkit-wrap-margin: -5px") is ""
PASS test("-webkit-wrap-margin: auto") is ""
PASS test("-webkit-wrap-margin: 'string'") is ""
PASS test("-webkit-wrap-margin: 120%") is ""
PASS testComputedStyle("0") is "0px"
PASS testComputedStyle("1px") is "1px"
PASS testComputedStyle("-5em") is "0px"
PASS testComputedStyle("identifier") is "0px"
PASS testComputedStyle("'string'") is "0px"
PASS testNotInherited("0", "0") is "0px"
PASS testNotInherited("0", "1px") is "1px"
PASS testNotInherited("1px", "-1em") is "0px"
PASS testNotInherited("2px", "1px") is "1px"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/wrap-margin-parsing.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
Test parsing of the CSS wrap-padding property.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS test("-webkit-wrap-padding: 0") is "0px"
PASS test("-webkit-wrap-padding: 1.5ex") is "1.5ex"
PASS test("-webkit-wrap-padding: 2em") is "2em"
PASS test("-webkit-wrap-padding: 2.5in") is "2.5in"
PASS test("-webkit-wrap-padding: 3cm") is "3cm"
PASS test("-webkit-wrap-padding: 3.5mm") is "3.5mm"
PASS test("-webkit-wrap-padding: 4pt") is "4pt"
PASS test("-webkit-wrap-padding: 4.5pc") is "4.5pc"
PASS test("-webkit-wrap-padding: 5px") is "5px"
PASS test("-webkit-wrap-padding: -5px") is ""
PASS test("-webkit-wrap-padding: auto") is ""
PASS test("-webkit-wrap-padding: 'string'") is ""
PASS test("-webkit-wrap-padding: 120%") is ""
PASS testComputedStyle("0") is "0px"
PASS testComputedStyle("1px") is "1px"
PASS testComputedStyle("-5em") is "0px"
PASS testComputedStyle("identifier") is "0px"
PASS testComputedStyle("'string'") is "0px"
PASS testNotInherited("0", "0") is "0px"
PASS testNotInherited("0", "1px") is "1px"
PASS testNotInherited("1px", "-1em") is "0px"
PASS testNotInherited("2px", "1px") is "1px"
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../fast/js/resources/js-test-pre.js"></script>
</head>
<body>
<script src="script-tests/wrap-padding-parsing.js"></script>
<script src="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
......@@ -212,6 +212,8 @@ zoom: 1;
-webkit-region-break-before: auto;
-webkit-region-break-inside: auto;
-webkit-wrap-flow: auto;
-webkit-wrap-margin: 0px;
-webkit-wrap-padding: 0px;
-webkit-wrap-through: wrap;
clip-path: none;
clip-rule: nonzero;
......
......@@ -211,6 +211,8 @@ Computed style of an element whose parent's 'display' value is 'none':
-webkit-region-break-before: auto
-webkit-region-break-inside: auto
-webkit-wrap-flow: auto
-webkit-wrap-margin: 0px
-webkit-wrap-padding: 0px
-webkit-wrap-through: wrap
clip-path: none
clip-rule: nonzero
......
......@@ -422,6 +422,10 @@ rect: style.getPropertyValue(-webkit-region-break-inside) : auto
rect: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-flow) : auto
rect: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-margin) : 0px
rect: style.getPropertyCSSValue(-webkit-wrap-margin) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-padding) : 0px
rect: style.getPropertyCSSValue(-webkit-wrap-padding) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-through) : wrap
rect: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(clip-path) : none
......@@ -922,6 +926,10 @@ g: style.getPropertyValue(-webkit-region-break-inside) : auto
g: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-flow) : auto
g: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-margin) : 0px
g: style.getPropertyCSSValue(-webkit-wrap-margin) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-padding) : 0px
g: style.getPropertyCSSValue(-webkit-wrap-padding) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-through) : wrap
g: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
g: style.getPropertyValue(clip-path) : none
......
......@@ -422,6 +422,10 @@ rect: style.getPropertyValue(-webkit-region-break-inside) : auto
rect: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-flow) : auto
rect: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-margin) : 0px
rect: style.getPropertyCSSValue(-webkit-wrap-margin) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-padding) : 0px
rect: style.getPropertyCSSValue(-webkit-wrap-padding) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-wrap-through) : wrap
rect: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(clip-path) : none
......@@ -922,6 +926,10 @@ g: style.getPropertyValue(-webkit-region-break-inside) : auto
g: style.getPropertyCSSValue(-webkit-region-break-inside) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-flow) : auto
g: style.getPropertyCSSValue(-webkit-wrap-flow) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-margin) : 0px
g: style.getPropertyCSSValue(-webkit-wrap-margin) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-padding) : 0px
g: style.getPropertyCSSValue(-webkit-wrap-padding) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-wrap-through) : wrap
g: style.getPropertyCSSValue(-webkit-wrap-through) : [object CSSPrimitiveValue]
g: style.getPropertyValue(clip-path) : none
......
2011-11-17 Mihnea Ovidenie <mihnea@adobe.com>
CSS Exclusions: parse the wrap-margin and wrap-padding properties
https://bugs.webkit.org/show_bug.cgi?id=71900
Reviewed by Dean Jackson.
Tests: fast/exclusions/wrap-margin-parsing.html
fast/exclusions/wrap-padding-parsing.html
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::wrapPadding):
(WebCore::InheritedFlags::setWrapPadding):
(WebCore::InheritedFlags::initialWrapPadding):
(WebCore::InheritedFlags::wrapMargin):
(WebCore::InheritedFlags::setWrapMargin):
(WebCore::InheritedFlags::initialWrapMargin):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
2011-11-17 Kenichi Ishibashi <bashi@chromium.org>
[chromium] don't call fontconfig twice in complex text path
......@@ -286,6 +286,8 @@ static const int computedProperties[] = {
CSSPropertyWebkitRegionBreakBefore,
CSSPropertyWebkitRegionBreakInside,
CSSPropertyWebkitWrapFlow,
CSSPropertyWebkitWrapMargin,
CSSPropertyWebkitWrapPadding,
CSSPropertyWebkitWrapThrough
#if ENABLE(SVG)
,
......@@ -2036,6 +2038,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
return primitiveValueCache->createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING);
case CSSPropertyWebkitRegionOverflow:
return primitiveValueCache->createValue(style->regionOverflow());
case CSSPropertyWebkitWrapMargin:
return primitiveValueCache->createValue(style->wrapMargin());
case CSSPropertyWebkitWrapPadding:
return primitiveValueCache->createValue(style->wrapPadding());
#if ENABLE(CSS_FILTERS)
case CSSPropertyWebkitFilter:
return valueForFilter(style.get());
......
......@@ -384,6 +384,8 @@ static inline bool isSimpleLengthPropertyID(int propertyId, bool& acceptsNegativ
case CSSPropertyWebkitPaddingBefore:
case CSSPropertyWebkitPaddingEnd:
case CSSPropertyWebkitPaddingStart:
case CSSPropertyWebkitWrapMargin:
case CSSPropertyWebkitWrapPadding:
acceptsNegativeNumbers = false;
return true;
case CSSPropertyBottom:
......@@ -2199,7 +2201,6 @@ bool CSSParser::parseValue(int propId, bool important)
else if (value->unit == CSSParserValue::Function)
return parseWrapShape(important);
break;
case CSSPropertyWebkitWrapFlow:
if (id == CSSValueAuto || id == CSSValueBoth || id == CSSValueLeft || id == CSSValueRight || id == CSSValueMaximum || id == CSSValueClear)
validPrimitive = true;
......@@ -2209,7 +2210,10 @@ bool CSSParser::parseValue(int propId, bool important)
if (id == CSSValueWrap || id == CSSValueNone)
validPrimitive = true;
break;
case CSSPropertyWebkitWrapMargin:
case CSSPropertyWebkitWrapPadding:
validPrimitive = (!id && validUnit(value, FLength | FNonNeg, m_strict));
break;
#if ENABLE(SVG)
default:
return parseSVGValue(propId, important);
......
......@@ -632,6 +632,8 @@ bool CSSProperty::isInheritedProperty(unsigned propertyID)
case CSSPropertyWebkitFlowFrom:
case CSSPropertyWebkitRegionOverflow:
case CSSPropertyWebkitWrapShape:
case CSSPropertyWebkitWrapMargin:
case CSSPropertyWebkitWrapPadding:
case CSSPropertyWebkitRegionBreakAfter:
case CSSPropertyWebkitRegionBreakBefore:
case CSSPropertyWebkitRegionBreakInside:
......
......@@ -355,6 +355,8 @@ z-index
-webkit-flow-from
-webkit-region-overflow
-webkit-wrap-shape
-webkit-wrap-margin
-webkit-wrap-padding
-webkit-region-break-after
-webkit-region-break-before
-webkit-region-break-inside
......
......@@ -1047,6 +1047,9 @@ CSSStyleApplyProperty::CSSStyleApplyProperty()
setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault<TextEmphasisPosition, &RenderStyle::textEmphasisPosition, TextEmphasisPosition, &RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &RenderStyle::initialTextEmphasisPosition>::createHandler());
setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler());
setPropertyHandler(CSSPropertyWebkitWrapMargin, ApplyPropertyLength<&RenderStyle::wrapMargin, &RenderStyle::setWrapMargin, &RenderStyle::initialWrapMargin>::createHandler());
setPropertyHandler(CSSPropertyWebkitWrapPadding, ApplyPropertyLength<&RenderStyle::wrapPadding, &RenderStyle::setWrapPadding, &RenderStyle::initialWrapPadding>::createHandler());
setPropertyHandler(CSSPropertyZIndex, ApplyPropertyAuto<int, &RenderStyle::zIndex, &RenderStyle::setZIndex, &RenderStyle::hasAutoZIndex, &RenderStyle::setHasAutoZIndex>::createHandler());
}
......
......@@ -4055,6 +4055,8 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
case CSSPropertyWebkitTextCombine:
case CSSPropertyWebkitTextEmphasisPosition:
case CSSPropertyWebkitTextEmphasisStyle:
case CSSPropertyWebkitWrapMargin:
case CSSPropertyWebkitWrapPadding:
case CSSPropertyZIndex:
ASSERT_NOT_REACHED();
return;
......
......@@ -386,7 +386,9 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
return StyleDifferenceLayout;
if (rareNonInheritedData->m_wrapFlow != other->rareNonInheritedData->m_wrapFlow
|| rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough)
|| rareNonInheritedData->m_wrapThrough != other->rareNonInheritedData->m_wrapThrough
|| rareNonInheritedData->m_wrapMargin != other->rareNonInheritedData->m_wrapMargin
|| rareNonInheritedData->m_wrapPadding != other->rareNonInheritedData->m_wrapPadding)
return StyleDifferenceLayout;
if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other->rareNonInheritedData->m_deprecatedFlexibleBox.get()
......
......@@ -1286,6 +1286,14 @@ public:
CSSWrapShape* wrapShape() const { return rareNonInheritedData->m_wrapShape.get(); }
static CSSWrapShape* initialWrapShape() { return 0; }
Length wrapPadding() const { return rareNonInheritedData->m_wrapPadding; }
void setWrapPadding(Length wrapPadding) { SET_VAR(rareNonInheritedData, m_wrapPadding, wrapPadding); }
static Length initialWrapPadding() { return Length(0, Fixed); }
Length wrapMargin() const { return rareNonInheritedData->m_wrapMargin; }
void setWrapMargin(Length wrapMargin) { SET_VAR(rareNonInheritedData, m_wrapMargin, wrapMargin); }
static Length initialWrapMargin() { return Length(0, Fixed); }
bool hasContent() const { return contentData(); }
const ContentData* contentData() const { return rareNonInheritedData->m_content.get(); }
bool contentDataEquivalent(const RenderStyle* otherStyle) const { return const_cast<RenderStyle*>(this)->rareNonInheritedData->contentDataEquivalent(*const_cast<RenderStyle*>(otherStyle)->rareNonInheritedData); }
......
......@@ -44,6 +44,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
, m_mask(FillLayer(MaskFillLayer))
, m_pageSize()
, m_wrapShape(RenderStyle::initialWrapShape())
, m_wrapMargin(RenderStyle::initialWrapMargin())
, m_wrapPadding(RenderStyle::initialWrapPadding())
, m_visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor())
, m_flowThread(RenderStyle::initialFlowThread())
, m_regionThread(RenderStyle::initialRegionThread())
......@@ -98,6 +100,8 @@ StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonInherited
, m_maskBoxImage(o.m_maskBoxImage)
, m_pageSize(o.m_pageSize)
, m_wrapShape(o.m_wrapShape)
, m_wrapMargin(o.m_wrapMargin)
, m_wrapPadding(o.m_wrapPadding)
, m_visitedLinkBackgroundColor(o.m_visitedLinkBackgroundColor)
, m_visitedLinkOutlineColor(o.m_visitedLinkBackgroundColor)
, m_visitedLinkBorderLeftColor(o.m_visitedLinkBorderLeftColor)
......@@ -182,6 +186,8 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
&& (m_wrapShape == o.m_wrapShape)
&& (m_wrapFlow == o.m_wrapFlow)
&& (m_wrapThrough == o.m_wrapThrough)
&& (m_wrapMargin == o.m_wrapMargin)
&& (m_wrapPadding == o.m_wrapPadding)
&& m_visitedLinkBackgroundColor == o.m_visitedLinkBackgroundColor
&& m_visitedLinkOutlineColor == o.m_visitedLinkOutlineColor
&& m_visitedLinkBorderLeftColor == o.m_visitedLinkBorderLeftColor
......
......@@ -127,6 +127,8 @@ public:
LengthSize m_pageSize;
RefPtr<CSSWrapShape> m_wrapShape;
Length m_wrapMargin;
Length m_wrapPadding;
Color m_visitedLinkBackgroundColor;
Color m_visitedLinkOutlineColor;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment