WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-168771-20170223172239.patch (text/plain), 23.82 KB, created by
Javier Fernandez
on 2017-02-23 08:25:28 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Javier Fernandez
Created:
2017-02-23 08:25:28 PST
Size:
23.82 KB
patch
obsolete
>Subversion Revision: 212712 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b1c296488d2260bc25ec912bd2d5603330ccf211..610997d4a67ed8a587f7bbe06713bf57e20a9ddb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,30 @@ >+2017-02-23 Javier Fernandez <jfernandez@igalia.com> >+ >+ [css-align] Implement the place-content shorthand >+ https://bugs.webkit.org/show_bug.cgi?id=168771 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The CSS Box Alignment specification defines a new shorthand to set the >+ Content Alignment properties (align-content and justify-content) at the >+ same time. >+ >+ This patch provides the implementation of the CSS parsing logic and the >+ required regression tests. >+ >+ Test: css3/parse-place-content.html >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::propertyValue): >+ * css/CSSProperties.json: >+ * css/StyleProperties.cpp: >+ (WebCore::StyleProperties::getPropertyValue): >+ * css/parser/CSSPropertyParser.cpp: >+ (WebCore::consumeSimplifiedContentPosition): >+ (WebCore::CSSPropertyParser::consumePlaceContentShorthand): >+ (WebCore::CSSPropertyParser::parseShorthand): >+ * css/parser/CSSPropertyParser.h: >+ > 2017-02-21 Carlos Garcia Campos <cgarcia@igalia.com> > > REGRESSION(r212681): Crash when dragging links without a drag image >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index e1908692911081461e894f469b91d3b23ba11e47..4ca6b48d2049dcf0bf49e158a0a36d5ad8e73bbe 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -320,6 +320,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyJustifyContent, > CSSPropertyJustifySelf, > CSSPropertyJustifyItems, >+ CSSPropertyPlaceContent, > #if ENABLE(FILTERS_LEVEL_2) > CSSPropertyWebkitBackdropFilter, > #endif >@@ -2869,6 +2870,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propertyID, > return valueForItemPositionWithOverflowAlignment(resolveJustifyItemsAuto(style->justifyItems(), styledElement->parentNode())); > case CSSPropertyJustifySelf: > return valueForItemPositionWithOverflowAlignment(resolveJustifySelfAuto(style->justifySelf(), styledElement->parentNode())); >+ case CSSPropertyPlaceContent: >+ return getCSSPropertyValuesForShorthandProperties(placeContentShorthand()); > case CSSPropertyOrder: > return cssValuePool.createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER); > case CSSPropertyFloat: >diff --git a/Source/WebCore/css/CSSProperties.json b/Source/WebCore/css/CSSProperties.json >index 97677395fd1641af62f7ee8dba1212cef5dc358d..fa43a946a950c0cf69fefd774f13f3b6c2cb95ce 100644 >--- a/Source/WebCore/css/CSSProperties.json >+++ b/Source/WebCore/css/CSSProperties.json >@@ -3084,6 +3084,14 @@ > "converter": "SelfOrDefaultAlignmentData" > } > }, >+ "place-content": { >+ "codegen-properties": { >+ "longhands": [ >+ "align-content", >+ "justify-content" >+ ] >+ } >+ }, > "grid": { > "codegen-properties": { > "longhands": [ >diff --git a/Source/WebCore/css/StyleProperties.cpp b/Source/WebCore/css/StyleProperties.cpp >index ea1f9f109934521ad4ce41909d742f820992c9a0..2b3fa3d380785fd689b2ac85dbd58b06190ec501 100644 >--- a/Source/WebCore/css/StyleProperties.cpp >+++ b/Source/WebCore/css/StyleProperties.cpp >@@ -187,6 +187,8 @@ String StyleProperties::getPropertyValue(CSSPropertyID propertyID) const > return getShorthandValue(gridColumnShorthand()); > case CSSPropertyGridRow: > return getShorthandValue(gridRowShorthand()); >+ case CSSPropertyPlaceContent: >+ return getShorthandValue(placeContentShorthand()); > case CSSPropertyFont: > return fontValue(); > case CSSPropertyMargin: >diff --git a/Source/WebCore/css/parser/CSSPropertyParser.cpp b/Source/WebCore/css/parser/CSSPropertyParser.cpp >index 129c2996ae6489656d592345a32f71fd06f0ae5a..4c7c7c5b63e66f2b505d74d68e0c7a719156bbe2 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParser.cpp >+++ b/Source/WebCore/css/parser/CSSPropertyParser.cpp >@@ -5254,6 +5254,39 @@ bool CSSPropertyParser::consumeGridShorthand(bool important) > return true; > } > >+static RefPtr<CSSValue> consumeSimplifiedContentPosition(CSSParserTokenRange& range) >+{ >+ CSSValueID id = range.peek().id(); >+ if (identMatches<CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline>(id)) >+ return CSSContentDistributionValue::create(CSSValueInvalid, range.consumeIncludingWhitespace().id(), CSSValueInvalid); >+ if (identMatches<CSSValueSpaceBetween, CSSValueSpaceAround, CSSValueSpaceEvenly, CSSValueStretch>(id)) >+ return CSSContentDistributionValue::create(range.consumeIncludingWhitespace().id(), CSSValueInvalid, CSSValueInvalid); >+ if (identMatches<CSSValueStart, CSSValueEnd, CSSValueCenter, CSSValueFlexStart, CSSValueFlexEnd, CSSValueLeft, CSSValueRight>(id)) >+ return CSSContentDistributionValue::create(CSSValueInvalid, range.consumeIncludingWhitespace().id(), CSSValueInvalid); >+ return nullptr; >+} >+ >+bool CSSPropertyParser::consumePlaceContentShorthand(bool important) >+{ >+ ASSERT(shorthandForProperty(CSSPropertyPlaceContent).length() == 2); >+ >+ if (m_range.atEnd()) >+ return false; >+ >+ RefPtr<CSSValue> alignContentValue = consumeSimplifiedContentPosition(m_range); >+ if (!alignContentValue) >+ return false; >+ RefPtr<CSSValue> justifyContentValue = m_range.atEnd() ? alignContentValue : consumeSimplifiedContentPosition(m_range); >+ if (!justifyContentValue) >+ return false; >+ if (!m_range.atEnd()) >+ return false; >+ >+ addProperty(CSSPropertyAlignContent, CSSPropertyPlaceContent, alignContentValue.releaseNonNull(), important); >+ addProperty(CSSPropertyJustifyContent, CSSPropertyPlaceContent, justifyContentValue.releaseNonNull(), important); >+ return true; >+} >+ > bool CSSPropertyParser::parseShorthand(CSSPropertyID property, bool important) > { > switch (property) { >@@ -5435,6 +5468,8 @@ bool CSSPropertyParser::parseShorthand(CSSPropertyID property, bool important) > return consumeGridTemplateShorthand(CSSPropertyGridTemplate, important); > case CSSPropertyGrid: > return consumeGridShorthand(important); >+ case CSSPropertyPlaceContent: >+ return consumePlaceContentShorthand(important); > case CSSPropertyWebkitMarquee: > return consumeShorthandGreedily(webkitMarqueeShorthand(), important); > default: >diff --git a/Source/WebCore/css/parser/CSSPropertyParser.h b/Source/WebCore/css/parser/CSSPropertyParser.h >index 76d3c712d31380230e60facbbba0a5ae1ce1acb5..bdde19c156637a9769e535379e47fb8c788e670b 100644 >--- a/Source/WebCore/css/parser/CSSPropertyParser.h >+++ b/Source/WebCore/css/parser/CSSPropertyParser.h >@@ -80,6 +80,8 @@ private: > bool consumeGridShorthand(bool important); > bool consumeGridAreaShorthand(bool important); > >+ bool consumePlaceContentShorthand(bool important); >+ > bool consumeFont(bool important); > bool consumeFontVariantShorthand(bool important); > bool consumeSystemFont(bool important); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 5a42573b9fdb33f18ca2affeb1b22dd7f37fb640..f997197c310e20bf79b40cbfcb543e0f2fdcc31d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,23 @@ >+2017-02-23 Javier Fernandez <jfernandez@igalia.com> >+ >+ [css-align] Implement the place-content shorthand >+ https://bugs.webkit.org/show_bug.cgi?id=168771 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Regression tests for the new place-content alignment shorthand. >+ Added also a new parsing utility script which uses the testharness functions. >+ >+ * css3/parse-place-content-expected.txt: Added. >+ * css3/parse-place-content.html: Added. >+ * css3/resources/alignment-parsing-utils-th.js: Added. >+ (checkValues): >+ (checkBadValues): >+ (checkInitialValues): >+ (checkInheritValues): >+ (checkLegacyValues): >+ (checkSupportedValues): >+ > 2017-02-21 Alex Christensen <achristensen@webkit.org> > > Unreviewed, rolling out r212699. >diff --git a/LayoutTests/css3/parse-place-content-expected.txt b/LayoutTests/css3/parse-place-content-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..880419af81bf99329a9d01f5def3041ae23f16c7 >--- /dev/null >+++ b/LayoutTests/css3/parse-place-content-expected.txt >@@ -0,0 +1,25 @@ >+Test to verify that the new place-content alignment shorthand is parsed as expected and correctly sets the longhand values. >+ >+ >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'normal' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'baseline' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'start' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'flex-start' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'end' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'space-between' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'stretch' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'start end' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'start space-evenly' value through CSS. >+PASS Test getting the Computed Value of place-content's longhand properties when setting 'start baseline' value through CSS. >+PASS Test setting '' as incorrect value through CSS. >+PASS Test setting 'auto' as incorrect value through CSS. >+PASS Test setting 'none' as incorrect value through CSS. >+PASS Test setting 'safe' as incorrect value through CSS. >+PASS Test setting 'start safe' as incorrect value through CSS. >+PASS Test setting 'baseline safe' as incorrect value through CSS. >+PASS Test setting 'start end left' as incorrect value through CSS. >+FAIL Test setting values through JS. assert_equals: placeContent specified value is not what it should. expected "center" but got "center center" >+PASS Test setting incorrect values through JS. >+PASS Test the 'initial' value of the place-content shorthand and its longhand properties' Computed value >+PASS Test the 'inherit' value of the place-content shorthand and its longhand properties' Computed value >+ >diff --git a/LayoutTests/css3/parse-place-content.html b/LayoutTests/css3/parse-place-content.html >new file mode 100644 >index 0000000000000000000000000000000000000000..bc2f1cc88da9de79c24c1f554c3ddd90a330160a >--- /dev/null >+++ b/LayoutTests/css3/parse-place-content.html >@@ -0,0 +1,247 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<style> >+#placeContentNormal { >+ place-content: normal; >+} >+#placeContentBaseline { >+ place-content: baseline; >+} >+#placeContentStart { >+ place-content: start; >+} >+#placeContentFlexStart { >+ place-content: flex-start; >+} >+#placeContentEnd { >+ place-content: end; >+} >+#placeContentSpaceBetween { >+ place-content: space-between; >+} >+#placeContentStretch { >+ place-content: stretch; >+} >+#placeContentStartEnd { >+ place-content: start end; >+} >+#placeContentStartSpaceEvenly { >+ place-content: start space-evenly; >+} >+#placeContentStartBaseline { >+ place-content: start baseline; >+} >+ >+<!-- Invalid CSS cases --> >+#placeContentEmpty { >+ place-content:; >+} >+#placeContentAuto { >+ place-content: auto; >+} >+#placeContentNone { >+ place-content: none; >+} >+#placeContentSafe { >+ place-content: safe; >+} >+#placeContentStartSafe { >+ place-content: start safe; >+} >+#placeContentStartEndLeft { >+ place-content: start end left; >+} >+</style> >+<script src="../resources/testharness.js"></script> >+<script src="../resources/testharnessreport.js"></script> >+<script src="resources/alignment-parsing-utils-th.js"></script> >+</head> >+<body> >+ <p>Test to verify that the new place-content alignment shorthand is parsed as expected and correctly sets the longhand values.</p> >+ <div id="log"></div> >+ >+ <div id="placeContentNormal"></div> >+ <div id="placeContentBaseline"></div> >+ <div id="placeContentStart"></div> >+ <div id="placeContentFlexStart"></div> >+ <div id="placeContentEnd"></div> >+ <div id="placeContentSpaceBetween"></div> >+ <div id="placeContentStretch"></div> >+ <div id="placeContentStartEnd"></div> >+ <div id="placeContentStartSpaceEvenly"></div> >+ <div id="placeContentStartBaseline"></div> >+ >+ <div id="placeContentEmpty"></div> >+ <div id="placeContentAuto"></div> >+ <div id="placeContentNone"></div> >+ <div id="placeContentSafe"></div> >+ <div id="placeContentStartSafe"></div> >+ <div id="placeContentBaselineSafe"></div> >+ <div id="placeContentStartEndLeft"></div> >+<script> >+function checkPlaceContentValues(element, value, alignValue, justifyValue) >+{ >+ var res = value.split(" "); >+ if (res.length < 2) >+ res[1] = res[0]; >+ checkValues(element, "alignContent", "align-content", res[0], alignValue); >+ checkValues(element, "justifyContent", "justify-content", res[1], justifyValue); >+} >+ >+function checkPlaceContentValuesJS(value, alignValue, justifyValue) >+{ >+ element = document.createElement("div"); >+ document.body.appendChild(element); >+ element.style.placeContent = value; >+ checkValues(element, "placeContent", "place-content", value, alignValue + ' ' + justifyValue) >+ checkPlaceContentValues(element, value, alignValue, justifyValue) >+} >+ >+function checkPlaceContentValuesBadJS(value) >+{ >+ element.style.placeContent = ""; >+ element.style.placeContent = value; >+ checkPlaceContentValues(element, "", "normal", "normal") >+} >+ >+function checkPlaceContentInitialValue() >+{ >+ element = document.createElement("div"); >+ document.body.appendChild(element); >+ checkValues(element, "placeContent", "place-content", "", "normal normal"); >+ element.style.placeContent = "center"; >+ checkPlaceContentValues(element, "center", "center", "center"); >+ element.style.placeContent = "initial"; >+ checkValues(element, "placeContent", "place-content", "initial", "normal normal"); >+ checkPlaceContentValues(element, "initial", "normal", "normal"); >+} >+ >+function checkPlaceContentInheritValue() >+{ >+ document.body.style.placeContent = "start"; >+ var anotherElement = document.createElement("div"); >+ document.body.appendChild(anotherElement); >+ checkPlaceContentValues(anotherElement, "", "normal", "normal"); >+ anotherElement.style.placeContent = "inherit"; >+ checkPlaceContentValues(anotherElement, "inherit", "start", "start"); >+} >+ >+ >+test(function() { >+ checkValues(placeContentNormal, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentNormal, "", "normal", "normal"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'normal' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentBaseline, "placeContent", "place-content", "", "baseline baseline"); >+ checkPlaceContentValues(placeContentBaseline, "", "baseline", "baseline"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'baseline' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStart, "placeContent", "place-content", "", "start start"); >+ checkPlaceContentValues(placeContentStart, "", "start", "start"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'start' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentFlexStart, "placeContent", "place-content", "", "flex-start flex-start"); >+ checkPlaceContentValues(placeContentFlexStart, "", "flex-start", "flex-start"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'flex-start' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentEnd, "placeContent", "place-content", "", "end end"); >+ checkPlaceContentValues(placeContentEnd, "", "end", "end"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'end' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentSpaceBetween, "placeContent", "place-content", "", "space-between space-between"); >+ checkPlaceContentValues(placeContentSpaceBetween, "", "space-between", "space-between"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'space-between' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStretch, "placeContent", "place-content", "", "stretch stretch"); >+ checkPlaceContentValues(placeContentStretch, "", "stretch", "stretch"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'stretch' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartEnd, "placeContent", "place-content", "", "start end"); >+ checkPlaceContentValues(placeContentStartEnd, "", "start", "end"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'start end' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartSpaceEvenly, "placeContent", "place-content", "", "start space-evenly"); >+ checkPlaceContentValues(placeContentStartSpaceEvenly, "", "start", "space-evenly"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'start space-evenly' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartBaseline, "placeContent", "place-content", "", "start baseline"); >+ checkPlaceContentValues(placeContentStartBaseline, "", "start", "baseline"); >+}, "Test getting the Computed Value of place-content's longhand properties when setting 'start baseline' value through CSS."); >+ >+test(function() { >+ checkValues(placeContentAuto, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentAuto, "", "normal", "normal"); >+}, "Test setting '' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentAuto, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentAuto, "", "normal", "normal"); >+}, "Test setting 'auto' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentNone, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentNone, "", "normal", "normal"); >+}, "Test setting 'none' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentSafe, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentSafe, "", "normal", "normal"); >+}, "Test setting 'safe' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartSafe, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentStartSafe, "", "normal", "normal"); >+}, "Test setting 'start safe' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartSafe, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentStartSafe, "", "normal", "normal"); >+}, "Test setting 'baseline safe' as incorrect value through CSS."); >+ >+test(function() { >+ checkValues(placeContentStartEndLeft, "placeContent", "place-content", "", "normal normal"); >+ checkPlaceContentValues(placeContentStartEndLeft, "", "normal", "normal"); >+}, "Test setting 'start end left' as incorrect value through CSS."); >+ >+test(function() { >+ // We will get FAIL for placeContent specified values tests because we still don't know how to serialize this shortand. >+ // https://github.com/w3c/csswg-drafts/issues/1041 >+ checkPlaceContentValuesJS("center", "center", "center"); >+ checkPlaceContentValuesJS("start start", "start", "start"); >+ checkPlaceContentValuesJS("center start", "center", "start"); >+ checkPlaceContentValuesJS("space-between end", "space-between", "end"); >+ checkPlaceContentValuesJS("normal end", "normal", "end"); >+}, "Test setting values through JS."); >+ >+test(function() { >+ checkPlaceContentValuesBadJS("center safe", "normal", "normal"); >+ checkPlaceContentValuesBadJS("center space-between center", "normal", "normal"); >+ checkPlaceContentValuesBadJS("asrt", "normal", "normal"); >+ checkPlaceContentValuesBadJS("auto", "normal", "normal"); >+ checkPlaceContentValuesBadJS("10px", "normal", "normal"); >+ checkPlaceContentValuesBadJS("stretch safe", "normal", "normal"); >+ checkPlaceContentValuesBadJS("space-between start end", "normal", "normal"); >+}, "Test setting incorrect values through JS."); >+ >+test(function() { >+ checkPlaceContentInitialValue(); >+}, "Test the 'initial' value of the place-content shorthand and its longhand properties' Computed value"); >+ >+test(function() { >+ checkPlaceContentInheritValue(); >+}, "Test the 'inherit' value of the place-content shorthand and its longhand properties' Computed value"); >+ >+ >+</script> >+</body> >+</html> >diff --git a/LayoutTests/css3/resources/alignment-parsing-utils-th.js b/LayoutTests/css3/resources/alignment-parsing-utils-th.js >new file mode 100644 >index 0000000000000000000000000000000000000000..4bfe5914f20eeb7d0dff6a57e49234b21a6a5334 >--- /dev/null >+++ b/LayoutTests/css3/resources/alignment-parsing-utils-th.js >@@ -0,0 +1,55 @@ >+function checkValues(element, property, propertyID, value, computedValue) >+{ >+ window.element = element; >+ var elementID = element.id || "element"; >+ assert_equals(eval('element.style.' + property), value, property + ' specified value is not what it should.'); >+ assert_equals(eval("window.getComputedStyle(" + elementID + ", '').getPropertyValue('" + propertyID + "')"), computedValue, property + " is not what it should."); >+} >+ >+function checkBadValues(element, property, propertyID, value) >+{ >+ var elementID = element.id || "element"; >+ var initialValue = eval("window.getComputedStyle(" + elementID + " , '').getPropertyValue('" + propertyID + "')"); >+ element.style[property] = value; >+ checkValues(element, property, propertyID, "", initialValue); >+} >+ >+function checkInitialValues(element, property, propertyID, value, initial) >+{ >+ element.style[property] = value; >+ checkValues(element, property, propertyID, value, value); >+ element.style[property] = "initial"; >+ checkValues(element, property, propertyID, "initial", initial); >+} >+ >+function checkInheritValues(property, propertyID, value) >+{ >+ var parentElement = document.createElement("div"); >+ document.body.appendChild(parentElement); >+ parentElement.style[property] = value; >+ checkValues(parentElement, property, propertyID, value, value); >+ >+ var element = document.createElement("div"); >+ parentElement.appendChild(element); >+ element.style[property] = "inherit"; >+ checkValues(element, property, propertyID, "inherit", value); >+} >+ >+function checkLegacyValues(property, propertyID, value) >+{ >+ var parentElement = document.createElement("div"); >+ document.body.appendChild(parentElement); >+ parentElement.style[property] = value; >+ checkValues(parentElement, property, propertyID, value, value); >+ >+ var element = document.createElement("div"); >+ parentElement.appendChild(element); >+ checkValues(element, property, propertyID, "", value); >+} >+ >+function checkSupportedValues(elementID, property) >+{ >+ var value = eval("window.getComputedStyle(" + elementID + " , '').getPropertyValue('" + property + "')"); >+ var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); >+ shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 168771
:
302504
|
302506
|
302508
|
302514
|
302521
|
302532
|
303059