⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282706 in webkit


Ignore:
Timestamp:
Sep 17, 2021, 4:15:45 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Add CustomToJSObject wrapper for CSSStyleValueCustom
​https://bugs.webkit.org/show_bug.cgi?id=230422

Patch by Johnson Zhou <​qiaosong_zhou@apple.com> on 2021-09-17
Reviewed by Alex Christensen.

  • bindings/js/JSCSSStyleValueCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/typedom/CSSKeywordValue.h:

(isType):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r282702 r282706  
     12021-09-17  Johnson Zhou  <qiaosong_zhou@apple.com>
     2
     3        Add CustomToJSObject wrapper for CSSStyleValueCustom
     4        https://bugs.webkit.org/show_bug.cgi?id=230422
     5
     6        Reviewed by Alex Christensen.
     7
     8        * bindings/js/JSCSSStyleValueCustom.cpp:
     9        (WebCore::toJSNewlyCreated):
     10        * css/typedom/CSSKeywordValue.h:
     11        (isType):
     12
    1132021-09-17  Johnson Zhou  <qiaosong_zhou@apple.com>
    214
  • trunk/Source/WebCore/bindings/js/JSCSSStyleValueCustom.cpp

    r281786 r282706  
    2929#if ENABLE(CSS_TYPED_OM)
    3030
     31#include "JSCSSKeywordValue.h"
     32#include "JSCSSMathValue.h"
     33#include "JSCSSNumericValue.h"
    3134#include "JSCSSStyleImageValue.h"
    3235#include "JSCSSUnitValue.h"
    … …  
    4043{
    4144    switch (value->getType()) {
     45    case CSSStyleValueType::CSSStyleImageValue:
     46        return createWrapper<CSSStyleImageValue>(globalObject, WTFMove(value));
     47    case CSSStyleValueType::CSSNumericValue:
     48        return createWrapper<CSSNumericValue>(globalObject, WTFMove(value));
     49    case CSSStyleValueType::CSSMathValue:
     50        return createWrapper<CSSMathValue>(globalObject, WTFMove(value));
    4251    case CSSStyleValueType::CSSUnitValue:
    4352        return createWrapper<CSSUnitValue>(globalObject, WTFMove(value));
    4453    case CSSStyleValueType::CSSUnparsedValue:
    4554        return createWrapper<CSSUnparsedValue>(globalObject, WTFMove(value));
    46     case CSSStyleValueType::CSSStyleImageValue:
    47         return createWrapper<CSSStyleImageValue>(globalObject, WTFMove(value));
    48     default:
     55    case CSSStyleValueType::CSSKeywordValue:
     56        return createWrapper<CSSKeywordValue>(globalObject, WTFMove(value));
     57    case CSSStyleValueType::CSSTransformValue:
     58    case CSSStyleValueType::CSSStyleValue:
    4959        return createWrapper<CSSStyleValue>(globalObject, WTFMove(value));
    5060    }
    51 
    5261}
    5362
  • trunk/Source/WebCore/css/typedom/CSSKeywordValue.h

    r282356 r282706  
    5454
    5555SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::CSSKeywordValue)
    56     static bool isType(const WebCore::CSSKeywordValue& styleValue) { return styleValue.getType() == WebCore::CSSStyleValueType::CSSKeywordValue; }
     56    static bool isType(const WebCore::CSSStyleValue& styleValue) { return styleValue.getType() == WebCore::CSSStyleValueType::CSSKeywordValue; }
    5757SPECIALIZE_TYPE_TRAITS_END()
    5858
Note: See TracChangeset for help on using the changeset viewer.