Ensure variables are resolved for specialized CSS primitive value types.
https://bugs.webkit.org/show_bug.cgi?id=95930

Reviewed by Tony Chang.

Source/WebCore:

Sometimes CSSPrimitiveValue contains a collection of other CSSPrimitiveValues (eg. 2, 4 or n).
This patch makes sure any variables contained inside those child values are resolved.

Tests: fast/css/variables/root-background-size.html
       fast/css/variables/var-inside-pair.html
       fast/css/variables/var-inside-quad.html
       fast/css/variables/var-inside-shape.html

* css/CSSBasicShapes.cpp:
(WebCore::buildRectangleString):
(WebCore::CSSBasicShapeRectangle::cssText):
(WebCore):
(WebCore::CSSBasicShapeRectangle::serializeResolvingVariables):
Generates a string representation of this value with variables resolved from the provided HashMap of variables.
(WebCore::CSSBasicShapeRectangle::hasVariableReference):
Returns true if any of the values used to describe the rectange depend on the value of a variable.
(WebCore::buildCircleString):
(WebCore::CSSBasicShapeCircle::cssText):
(WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
(WebCore::CSSBasicShapeCircle::hasVariableReference):
(WebCore::buildEllipseString):
(WebCore::CSSBasicShapeEllipse::cssText):
(WebCore::CSSBasicShapeEllipse::serializeResolvingVariables):
(WebCore::CSSBasicShapeEllipse::hasVariableReference):
(WebCore::CSSBasicShapePolygon::serializeResolvingVariables):
(WebCore::CSSBasicShapePolygon::hasVariableReference):
* css/CSSBasicShapes.h:
(CSSBasicShapeRectangle):
(CSSBasicShapeCircle):
(CSSBasicShapeEllipse):
(CSSBasicShapePolygon):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::customCssText):
Move the logic for generating the strings for Rects, Quads, Pairs and Shapes into their respective classes.
(WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
Handle Rects, Quads, Pairs and Shapes when they contain variables, by calling their serializeResolvingVariables method.
(WebCore):
(WebCore::CSSPrimitiveValue::hasVariableReference):
Handle Rects, Quads, Pairs and Shapes by calling their respective hasVariableReference methods.
* css/CSSPrimitiveValue.h:
(CSSPrimitiveValue):
* css/Pair.h:
(WebCore::Pair::pairString):
(Pair):
(WebCore::Pair::cssText):
(WebCore::Pair::serializeResolvingVariables):
(WebCore::Pair::hasVariableReference):
* css/Rect.h:
(RectBase):
(WebCore::RectBase::hasVariableReference):
(WebCore::Rect::rectString):
(Rect):
(WebCore::Rect::cssText):
(WebCore::Rect::serializeResolvingVariables):
(WebCore::Quad::quadString):
(Quad):
(WebCore::Quad::cssText):
(WebCore::Quad::serializeResolvingVariables):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

LayoutTests:

Add tests that use specialized CSS values (eg. pairs, quads, rectangle, circle, ellipse etc.).

* fast/css/variables/root-background-size-expected.html: Added.
* fast/css/variables/root-background-size.html: Added.
* fast/css/variables/var-inside-pair-expected.html: Added.
* fast/css/variables/var-inside-pair.html: Added.
* fast/css/variables/var-inside-quad-expected.html: Added.
* fast/css/variables/var-inside-quad.html: Added.
* fast/css/variables/var-inside-shape-expected.html: Added.
* fast/css/variables/var-inside-shape.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-perf-tests: cleanup options and results generation code
https://bugs.webkit.org/show_bug.cgi?id=97611

Reviewed by Dirk Pranke.

Previously, --test-results-server triggered old JSOn format where the outermost structure was a dictionary
instead of an array, and also implicitly triggered --no-show-results, caused the old outputs not to merge,
and prevented the generation of results page. Also, it was not obvious that --source-json-path is an option
used only on buildbot slaves.

This patch will:
- Remove the old format since perf-o-matic supports new format now.
- Add --reset-results option so that we can explicitly clear existing outputs.
- Add --slave-config-json-path option to replace --source-json-path option.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._parse_args): Added --reset-results and --slave-config-json-path options.
(PerfTestsRunner._generate_and_show_results): Refactored. Also removed the code to strip "values" from
results since perf-o-matic can parse and store these values now.
(PerfTestsRunner._merge_outputs_if_needed): Renamed from _merge_outputs_if_needed.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_with_json_output): Test a harmless behavioral change to generate resuls page even when
--test-results-server is present.
(test_run_with_description):
(test_run_generates_json_by_default):
(test_run_merges_output_by_default): Added.
(test_run_respects_reset_results): Added.
(test_run_with_slave_config_json):
(test_run_with_bad_slave_config_json): Use --slave-config-json-path instead of --source-json-path to make
sure this optioon works as well.
(test_run_with_multiple_repositories):
(test_run_with_upload_json):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129580 268f45cc-cd09-0410-ab3c-d52691b4dbfc