CSS Custom Properties (Variables)

Support for CSS Custom Properties level 1: https://drafts.csswg.org/css-variables/

When enabled, the CSS parser falls back on checking for variable references
instead of just clearing for most parser errors (see
CSSParserValueList::checkForVariableReferencesOrDestroyAndClear). In these
cases, CSS parser tokens are copied into a CSSVariableData object which
also copies and concatenates the strings referenced by the tokens into a
single backing string.

CSSVariableParser handles validating the token ranges pass the relatively
permissive parsing specifications for custom properties.

An additional applyMatchedProperties phase is added to handle resolving
variables before high/low priority properties so they can use the
resolved values from variable references. This should be gated on the
presence of variable references in the document.

CSSVariableResolver handles validating and resolving variable references
in both custom and standard properties.

Notable pieces left to implement:
- support pending-substitution values for shorthands.
- support for custom properties in the CSSOM (not specced).
- optimize style recalc for changing properties.

The included tests (save one timloh suggested) are imported from Mozilla's
test suite.

Intent to implement: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/vZ0am_AdxxE/9MD8cDitXxMJ

BUG=465126

Committed: https://crrev.com/9c1158564a3da22aff4d6519ca876492d8c74105
Cr-Commit-Position: refs/heads/master@{#357448}

Review URL: https://codereview.chromium.org/1192983003

Cr-Commit-Position: refs/heads/master@{#357748}
388 files changed