Ignore:
Timestamp:
Nov 12, 2021, 4:48:43 AM (4 years ago)
Author:
[email protected]
Message:

Re-use isCSSWideKeyword in CSSCustomPropertyValue::createWithID
https://bugs.webkit.org/show_bug.cgi?id=233035

Reviewed by Antti Koivisto.

  • css/CSSCustomPropertyValue.cpp:

(WebCore::CSSCustomPropertyValue::createWithID):

  • css/CSSCustomPropertyValue.h:
File:
1 edited

Legend:

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

    r284095 r285714  
    2727#include "CSSCustomPropertyValue.h"
    2828
     29#include "CSSParserIdioms.h"
    2930#include "CSSTokenizer.h"
    3031
     
    3435{
    3536    return adoptRef(*new CSSCustomPropertyValue(name, std::monostate { }));
     37}
     38
     39Ref<CSSCustomPropertyValue> CSSCustomPropertyValue::createWithID(const AtomString& name, CSSValueID id)
     40{
     41    ASSERT(WebCore::isCSSWideKeyword(id) || id == CSSValueInvalid);
     42    return adoptRef(*new CSSCustomPropertyValue(name, { id }));
    3643}
    3744
Note: See TracChangeset for help on using the changeset viewer.