Commit c6dce2e5 authored by antti@apple.com's avatar antti@apple.com

Remove feature: CSS variables

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

.: 

Reviewed by Andreas Kling.

* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore: 

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore: 

Reviewed by Andreas Kling.
        
The feature is unmaintained and it is getting in the way of refactoring. Code quality is not up to
WebKit standards either.

* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSBasicShapes.cpp:
* css/CSSBasicShapes.h:
* css/CSSCalculationValue.cpp:
(WebCore::unitCategory):
(WebCore::hasDoubleValue):
(WebCore::CSSCalcPrimitiveValue::toCalcValue):
(WebCore::CSSCalcPrimitiveValue::computeLengthPx):
(WebCore::determineCategory):
(WebCore::CSSCalcBinaryOperation::primitiveType):
* css/CSSCalculationValue.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::filterProperties):
(WebCore::CSSParser::createStylePropertySet):
(WebCore::CSSParser::addProperty):
(WebCore::CSSParser::validCalculationUnit):
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseReflect):
(WebCore::CSSParser::detectDashToken):
(WebCore::CSSParser::realLex):
* css/CSSParser.h:
* css/CSSParserMode.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue):
* css/CSSParserValues.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::CSSPrimitiveValue::primitiveType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::getStringValue):
(WebCore::CSSPrimitiveValue::customCSSText):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::convertToLength):
* css/CSSProperty.cpp:
* css/CSSProperty.h:
(WebCore::CSSProperty::CSSProperty):
* css/CSSReflectValue.cpp:
* css/CSSReflectValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::setCssText):
* css/CSSValueList.cpp:
* css/CSSValueList.h:
* css/CSSVariableValue.h: Removed.
* css/Pair.h:
* css/Rect.h:
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::asText):
(WebCore::StylePropertySet::PropertyReference::cssName):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyProperties):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):
* css/StyleResolver.h:
* css/WebKitCSSTransformValue.cpp:
* css/WebKitCSSTransformValue.h:
(WebCore::WebKitCSSTransformValue::equals):
* css/makeprop.pl:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/style/StyleVariableData.h: Removed.
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit/mac: 

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2: 

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WTF: 

Reviewed by Andreas Kling.

* wtf/FeatureDefines.h:

Tools: 

Reviewed by Andreas Kling.

* Scripts/webkitperl/FeatureList.pm:

LayoutTests: 

Reviewed by Andreas Kling.

* fast/css/variables: Removed.
* fast/css/variables/border-width-expected.html: Removed.
* fast/css/variables/border-width.html: Removed.
* fast/css/variables/build-supports-variables-expected.txt: Removed.
* fast/css/variables/build-supports-variables.html: Removed.
* fast/css/variables/calc-expected.html: Removed.
* fast/css/variables/calc-inside-calc-expected.html: Removed.
* fast/css/variables/calc-inside-calc.html: Removed.
* fast/css/variables/calc-invalid-value-expected.html: Removed.
* fast/css/variables/calc-invalid-value.html: Removed.
* fast/css/variables/calc-invalid-variable-expected.html: Removed.
* fast/css/variables/calc-invalid-variable.html: Removed.
* fast/css/variables/calc-negated-variable-expected.html: Removed.
* fast/css/variables/calc-negated-variable.html: Removed.
* fast/css/variables/calc-vw-crash-expected.txt: Removed.
* fast/css/variables/calc-vw-crash.html: Removed.
* fast/css/variables/calc.html: Removed.
* fast/css/variables/case-sensitive-expected.html: Removed.
* fast/css/variables/case-sensitive.html: Removed.
* fast/css/variables/colors-test-expected.html: Removed.
* fast/css/variables/colors-test.html: Removed.
* fast/css/variables/complex-cycle-expected.html: Removed.
* fast/css/variables/complex-cycle.html: Removed.
* fast/css/variables/computed-style-expected.html: Removed.
* fast/css/variables/computed-style.html: Removed.
* fast/css/variables/deferred-image-load-from-variable-expected.txt: Removed.
* fast/css/variables/deferred-image-load-from-variable.html: Removed.
* fast/css/variables/inherited-values-expected.html: Removed.
* fast/css/variables/inherited-values.html: Removed.
* fast/css/variables/inline-styles-expected.html: Removed.
* fast/css/variables/inline-styles.html: Removed.
* fast/css/variables/invalid-font-reference-expected.txt: Removed.
* fast/css/variables/invalid-font-reference.html: Removed.
* fast/css/variables/invalid-shorthand-expected.html: Removed.
* fast/css/variables/invalid-shorthand.html: Removed.
* fast/css/variables/invalid-value-list-crash-expected.txt: Removed.
* fast/css/variables/invalid-value-list-crash.html: Removed.
* fast/css/variables/invalid-variable-value-expected.html: Removed.
* fast/css/variables/invalid-variable-value.html: Removed.
* fast/css/variables/multi-level-cycle-expected.html: Removed.
* fast/css/variables/multi-level-cycle.html: Removed.
* fast/css/variables/redefinition-expected.html: Removed.
* fast/css/variables/redefinition.html: Removed.
* fast/css/variables/root-background-size-expected.html: Removed.
* fast/css/variables/root-background-size.html: Removed.
* fast/css/variables/shorthand-expected.html: Removed.
* fast/css/variables/shorthand.html: Removed.
* fast/css/variables/simple-cycle-expected.html: Removed.
* fast/css/variables/simple-cycle.html: Removed.
* fast/css/variables/transform-test-expected.html: Removed.
* fast/css/variables/transform-test.html: Removed.
* fast/css/variables/undefined-expected.html: Removed.
* fast/css/variables/undefined.html: Removed.
* fast/css/variables/use-before-defined-expected.html: Removed.
* fast/css/variables/use-before-defined.html: Removed.
* fast/css/variables/var-filter-expected.txt: Removed.
* fast/css/variables/var-filter.html: Removed.
* fast/css/variables/var-inside-box-reflect-expected.html: Removed.
* fast/css/variables/var-inside-box-reflect.html: Removed.
* fast/css/variables/var-inside-pair-expected.html: Removed.
* fast/css/variables/var-inside-pair.html: Removed.
* fast/css/variables/var-inside-quad-expected.html: Removed.
* fast/css/variables/var-inside-quad.html: Removed.
* fast/css/variables/var-inside-shape-expected.html: Removed.
* fast/css/variables/var-inside-shape.html: Removed.
* fast/css/variables/var-inside-shorthand-expected.html: Removed.
* fast/css/variables/var-inside-shorthand.html: Removed.
* fast/css/variables/variable-chain-expected.html: Removed.
* fast/css/variables/variable-chain.html: Removed.
* fast/css/variables/variable-unparseable-value-crash-expected.txt: Removed.
* fast/css/variables/variable-unparseable-value-crash.html: Removed.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 94141258
2013-11-28 Antti Koivisto <antti@apple.com>
Remove feature: CSS variables
https://bugs.webkit.org/show_bug.cgi?id=114119
Reviewed by Andreas Kling.
* Source/cmakeconfig.h.cmake:
2013-11-27 László Langó <lango@inf.u-szeged.hu>
[EFL] The remote inspector does not show the base page.
......
2013-11-28 Antti Koivisto <antti@apple.com>
Remove feature: CSS variables
https://bugs.webkit.org/show_bug.cgi?id=114119
Reviewed by Andreas Kling.
* fast/css/variables: Removed.
* fast/css/variables/border-width-expected.html: Removed.
* fast/css/variables/border-width.html: Removed.
* fast/css/variables/build-supports-variables-expected.txt: Removed.
* fast/css/variables/build-supports-variables.html: Removed.
* fast/css/variables/calc-expected.html: Removed.
* fast/css/variables/calc-inside-calc-expected.html: Removed.
* fast/css/variables/calc-inside-calc.html: Removed.
* fast/css/variables/calc-invalid-value-expected.html: Removed.
* fast/css/variables/calc-invalid-value.html: Removed.
* fast/css/variables/calc-invalid-variable-expected.html: Removed.
* fast/css/variables/calc-invalid-variable.html: Removed.
* fast/css/variables/calc-negated-variable-expected.html: Removed.
* fast/css/variables/calc-negated-variable.html: Removed.
* fast/css/variables/calc-vw-crash-expected.txt: Removed.
* fast/css/variables/calc-vw-crash.html: Removed.
* fast/css/variables/calc.html: Removed.
* fast/css/variables/case-sensitive-expected.html: Removed.
* fast/css/variables/case-sensitive.html: Removed.
* fast/css/variables/colors-test-expected.html: Removed.
* fast/css/variables/colors-test.html: Removed.
* fast/css/variables/complex-cycle-expected.html: Removed.
* fast/css/variables/complex-cycle.html: Removed.
* fast/css/variables/computed-style-expected.html: Removed.
* fast/css/variables/computed-style.html: Removed.
* fast/css/variables/deferred-image-load-from-variable-expected.txt: Removed.
* fast/css/variables/deferred-image-load-from-variable.html: Removed.
* fast/css/variables/inherited-values-expected.html: Removed.
* fast/css/variables/inherited-values.html: Removed.
* fast/css/variables/inline-styles-expected.html: Removed.
* fast/css/variables/inline-styles.html: Removed.
* fast/css/variables/invalid-font-reference-expected.txt: Removed.
* fast/css/variables/invalid-font-reference.html: Removed.
* fast/css/variables/invalid-shorthand-expected.html: Removed.
* fast/css/variables/invalid-shorthand.html: Removed.
* fast/css/variables/invalid-value-list-crash-expected.txt: Removed.
* fast/css/variables/invalid-value-list-crash.html: Removed.
* fast/css/variables/invalid-variable-value-expected.html: Removed.
* fast/css/variables/invalid-variable-value.html: Removed.
* fast/css/variables/multi-level-cycle-expected.html: Removed.
* fast/css/variables/multi-level-cycle.html: Removed.
* fast/css/variables/redefinition-expected.html: Removed.
* fast/css/variables/redefinition.html: Removed.
* fast/css/variables/root-background-size-expected.html: Removed.
* fast/css/variables/root-background-size.html: Removed.
* fast/css/variables/shorthand-expected.html: Removed.
* fast/css/variables/shorthand.html: Removed.
* fast/css/variables/simple-cycle-expected.html: Removed.
* fast/css/variables/simple-cycle.html: Removed.
* fast/css/variables/transform-test-expected.html: Removed.
* fast/css/variables/transform-test.html: Removed.
* fast/css/variables/undefined-expected.html: Removed.
* fast/css/variables/undefined.html: Removed.
* fast/css/variables/use-before-defined-expected.html: Removed.
* fast/css/variables/use-before-defined.html: Removed.
* fast/css/variables/var-filter-expected.txt: Removed.
* fast/css/variables/var-filter.html: Removed.
* fast/css/variables/var-inside-box-reflect-expected.html: Removed.
* fast/css/variables/var-inside-box-reflect.html: Removed.
* fast/css/variables/var-inside-pair-expected.html: Removed.
* fast/css/variables/var-inside-pair.html: Removed.
* fast/css/variables/var-inside-quad-expected.html: Removed.
* fast/css/variables/var-inside-quad.html: Removed.
* fast/css/variables/var-inside-shape-expected.html: Removed.
* fast/css/variables/var-inside-shape.html: Removed.
* fast/css/variables/var-inside-shorthand-expected.html: Removed.
* fast/css/variables/var-inside-shorthand.html: Removed.
* fast/css/variables/variable-chain-expected.html: Removed.
* fast/css/variables/variable-chain.html: Removed.
* fast/css/variables/variable-unparseable-value-crash-expected.txt: Removed.
* fast/css/variables/variable-unparseable-value-crash.html: Removed.
2013-11-28 Jongwoo Choi <jw0330.choi@samsung.com>
[EFL] Layout tests need to be rebaselined.
......
<style>
div {
border-color: green;
border-style: solid;
border-width: 3px 10px;
}
</style>
<div>This text should have top and bottom borders of 3px and left and right borders of 10px</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-var(a) -webkit-var(b);
-webkit-var-a: 3px;
-webkit-var-b: 10px
}
</style>
<div>This text should have top and bottom borders of 3px and left and right borders of 10px</div>
<body>NO</body>
<script>
if (window.testRunner)
testRunner.dumpAsText();
internals.settings.setCSSVariablesEnabled(true);
if (internals.settings.cssVariablesEnabled())
document.body.innerHTML = "YES";
</script>
<!DOCTYPE html>
<html>
<style>
div {
border-color: green;
border-style: solid;
border-width: 3px 10px;
}
</style>
<div>This text should have top and bottom borders of 3px and left and right borders of 10px</div>
</html>
<!DOCTYPE html>
<html>
<style>
div {
border-color: green;
border-style: solid;
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-calc(-webkit-var(a) + 1px);
-webkit-var-a: -webkit-calc(1px + 3px);
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<style>
div {
border-color: green;
border-style: solid;
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-calc(-webkit-var(a) + 1px);
-webkit-var-a: black;
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<style>
div {
border-color: green;
border-style: solid;
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-calc(-webkit-var(a) + 1px);
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<style>
div {
border-color: green;
border-style: solid;
}
</style>
<div>This text should have the default border width</div>
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-calc(--webkit-var(a) + 1px);
-webkit-var-a: 5px;
}
</style>
<div>This text should have the default border width</div>
</html>
This test is successful if it does not crash.
<!DOCTYPE html>
<html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
internals.settings.setCSSVariablesEnabled(true);
}
</script>
<style>
#foo {
-webkit-var-var23: -webkit-calc(0vw);
}
</style>
This test is successful if it does not crash.
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
border-color: green;
border-style: solid;
border-width: -webkit-calc(-webkit-var(a) + -webkit-var(b)) -webkit-calc(-webkit-var(c) * -webkit-var(d));
-webkit-var-a: 2px;
-webkit-var-b: 1px;
-webkit-var-c: 5;
-webkit-var-d: 2px;
}
</style>
<div>This text should have top and bottom borders of 3px and left and right borders of 10px</div>
</html>
<!DOCTYPE html>
<html>
<div>This text should have a transparent background and no left padding.</div>
</html>
<!DOCTYPE html>
<html>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
background-color: -webkit-var(NaMe);
-webkit-var-nAmE: green;
padding-left: -webkit-var(padding);
-WEBKIT-VAR-padding: 200px;
}
</style>
<div>This text should have a transparent background and no left padding.</div>
</html>
<style>
body {
color: green;
background-color: red;
background-color: rgb(255, 255, 255);
}
</style>
This text should be green on a white background. There should be no red visible.
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
body {
-webkit-var-foreground: green;
-webkit-var-background: rgb(255, 255, 255);
color: -webkit-var(foreground);
background-color: red;
background-color: -webkit-var(background);
}
</style>
This text should be green on a white background. There should be no red visible.
This test is successful if it does not result in a crash.
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
body {
-webkit-var-a: -webkit-var(f);
-webkit-var-b: -webkit-var(a);
-webkit-var-c: -webkit-var(b);
-webkit-var-d: -webkit-var(c);
-webkit-var-e: -webkit-var(d);
-webkit-var-f: -webkit-var(e);
color: -webkit-var(a);
}
</style>
This test is successful if it does not result in a crash.
<style>
body {
font-weight: bold;
}
</style>
<body>
Test passed - computed font weight is bold
</body>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
body {
-webkit-var-a: bold;
font-weight: normal;
font-weight: -webkit-var(a);
}
</style>
<body>
Test failed - JS did not run
</body>
<script>
var element = document.body;
var weight = window.getComputedStyle(element, null).getPropertyValue("font-weight");
if (weight == "bold")
element.innerHTML = "Test passed - computed font weight is bold";
else
element.innerHTML = "Test failed - computed color is " + weight;
</script>
<!DOCTYPE html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
internals.settings.setCSSVariablesEnabled(true);
}
</script>
<style>
div {
-webkit-var-a: url(1);
-webkit-mask: -webkit-var(a);
}
</style>
<div></div>
This test is successful if it does not crash.
<style>
div {
color: green;
background-color: rgb(255, 255, 255);
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
body {
-webkit-var-foreground: green;
-webkit-var-background: rgb(255, 255, 255);
}
div {
color: -webkit-var(foreground);
background-color: red;
background-color: -webkit-var(background);
}
</style>
<div>
This text should be green on a white background. There should be no red visible.
</div>
<div style="color: green;">
This text should be green on a white background.
</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<body style="-webkit-var-a: green;">
<div style="color: -webkit-var(a);">
This text should be green on a white background.
</div>
</body>
<!DOCTYPE html>
<html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
internals.settings.setCSSVariablesEnabled(true);
}
</script>
<style>
body {
font: -webkit-var(var6) hangul mongolian;
}
</style>
This test is successful if it does not crash.
</html>
<div>
This text should not be surrounded by a border.
</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
-webkit-var-a: 10px solid green;
border: 10px -webkit-var(a) blue;
}
</style>
<div>
This text should not be surrounded by a border.
</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
-webkit-var-a: -webkit-var(b) &#0;
}
</style>
This test is successful if it does not crash.
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
div {
-webkit-var-a: green;
-webkit-var-a: 10px;
color: -webkit-var(a);
}
</style>
<div>
This text should be black.
</div>
<div>
<div>
<div>
This test is successful if this text is black, and the test does not result in a crash.
</div>
</div>
</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
.a {
-webkit-var-a: -webkit-var(b);
-webkit-var-b: red;
}
.b {
-webkit-var-b: -webkit-var(a);
}
.c {
-webkit-var-c: -webkit-var(a);
color: -webkit-var(c);
}
</style>
<div id="a">
<div id="b">
<div id="c">
This test is successful if this text is black, and the test does not result in a crash.
</div>
</div>
</div>
<div style="color: red;">
This text should be red.
</div>
<div id="a" style="color: green;">
This text should be green.
</div>
<div id="b" style="color: blue;">
This text should be blue.
</div>
<script>
internals.settings.setCSSVariablesEnabled(true);
</script>
<style>
body {
-webkit-var-a: red;
}