Ignore:
Timestamp:
Sep 22, 2017, 1:15:14 PM (8 years ago)
Author:
[email protected]
Message:

Add env() as an alias of constant()
https://bugs.webkit.org/show_bug.cgi?id=177371

Reviewed by Simon Fraser.

Source/WebCore:

  • css/CSSValueKeywords.in:
  • css/CSSVariableData.cpp:

(WebCore::CSSVariableData::checkVariablesForCyclesWithRange const):
(WebCore::CSSVariableData::resolveTokenRange const):

  • css/parser/CSSVariableParser.cpp:

(WebCore::classifyBlock):
Add env() as an alias of constant() everywhere it is mentioned.

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

(WI.CSSKeywordCompletions.forProperty):
(WI.CSSKeywordCompletions.forFunction):
Add autocomplete support for env().

LayoutTests:

Duplicated constant() tests with env() instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSVariableData.cpp

    r218890 r222402  
    101101{
    102102    while (!range.atEnd()) {
    103         if (range.peek().functionId() == CSSValueVar || range.peek().functionId() == CSSValueConstant) {
     103        if (range.peek().functionId() == CSSValueVar || range.peek().functionId() == CSSValueConstant || range.peek().functionId() == CSSValueEnv) {
    104104            CSSParserTokenRange block = range.consumeBlock();
    105105           
     
    171171    bool success = true;
    172172    while (!range.atEnd()) {
    173         if (range.peek().functionId() == CSSValueVar || range.peek().functionId() == CSSValueConstant)
     173        if (range.peek().functionId() == CSSValueVar || range.peek().functionId() == CSSValueConstant || range.peek().functionId() == CSSValueEnv)
    174174            success &= resolveVariableReference(customProperties, range.consumeBlock(), result);
    175175        else
Note: See TracChangeset for help on using the changeset viewer.