| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "V8CSSValue.h" | 32 #include "V8CSSValue.h" |
| 33 | 33 |
| 34 #include "V8CSSPrimitiveValue.h" | 34 #include "V8CSSPrimitiveValue.h" |
| 35 #include "V8CSSValueList.h" | 35 #include "V8CSSValueList.h" |
| 36 #include "V8WebKitCSSTransformValue.h" | 36 #include "V8WebKitCSSTransformValue.h" |
| 37 | 37 |
| 38 #if ENABLE(CSS_FILTERS) | 38 #if ENABLE(CSS_FILTERS) |
| 39 #include "V8WebKitCSSFilterValue.h" | 39 #include "V8WebKitCSSFilterValue.h" |
| 40 #endif | 40 #endif |
| 41 | 41 |
| 42 #if ENABLE(CSS_SHADERS) | |
| 43 #include "V8WebKitCSSMixFunctionValue.h" | 42 #include "V8WebKitCSSMixFunctionValue.h" |
| 44 #include "WebKitCSSMixFunctionValue.h" | 43 #include "WebKitCSSMixFunctionValue.h" |
| 45 #endif | |
| 46 | 44 |
| 47 #if ENABLE(SVG) | 45 #if ENABLE(SVG) |
| 48 #include "V8SVGColor.h" | 46 #include "V8SVGColor.h" |
| 49 #include "V8SVGPaint.h" | 47 #include "V8SVGPaint.h" |
| 50 #endif | 48 #endif |
| 51 | 49 |
| 52 namespace WebCore { | 50 namespace WebCore { |
| 53 | 51 |
| 54 v8::Handle<v8::Object> wrap(CSSValue* impl, v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | 52 v8::Handle<v8::Object> wrap(CSSValue* impl, v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) |
| 55 { | 53 { |
| 56 ASSERT(impl); | 54 ASSERT(impl); |
| 57 if (impl->isWebKitCSSTransformValue()) | 55 if (impl->isWebKitCSSTransformValue()) |
| 58 return wrap(static_cast<WebKitCSSTransformValue*>(impl), creationContext
, isolate); | 56 return wrap(static_cast<WebKitCSSTransformValue*>(impl), creationContext
, isolate); |
| 59 #if ENABLE(CSS_FILTERS) | 57 #if ENABLE(CSS_FILTERS) |
| 60 if (impl->isWebKitCSSFilterValue()) | 58 if (impl->isWebKitCSSFilterValue()) |
| 61 return wrap(static_cast<WebKitCSSFilterValue*>(impl), creationContext, i
solate); | 59 return wrap(static_cast<WebKitCSSFilterValue*>(impl), creationContext, i
solate); |
| 62 #endif | 60 #endif |
| 63 #if ENABLE(CSS_SHADERS) | |
| 64 if (impl->isWebKitCSSMixFunctionValue()) | 61 if (impl->isWebKitCSSMixFunctionValue()) |
| 65 return wrap(static_cast<WebKitCSSMixFunctionValue*>(impl), creationConte
xt, isolate); | 62 return wrap(static_cast<WebKitCSSMixFunctionValue*>(impl), creationConte
xt, isolate); |
| 66 #endif | |
| 67 if (impl->isValueList()) | 63 if (impl->isValueList()) |
| 68 return wrap(static_cast<CSSValueList*>(impl), creationContext, isolate); | 64 return wrap(static_cast<CSSValueList*>(impl), creationContext, isolate); |
| 69 if (impl->isPrimitiveValue()) | 65 if (impl->isPrimitiveValue()) |
| 70 return wrap(static_cast<CSSPrimitiveValue*>(impl), creationContext, isol
ate); | 66 return wrap(static_cast<CSSPrimitiveValue*>(impl), creationContext, isol
ate); |
| 71 #if ENABLE(SVG) | 67 #if ENABLE(SVG) |
| 72 if (impl->isSVGPaint()) | 68 if (impl->isSVGPaint()) |
| 73 return wrap(static_cast<SVGPaint*>(impl), creationContext, isolate); | 69 return wrap(static_cast<SVGPaint*>(impl), creationContext, isolate); |
| 74 if (impl->isSVGColor()) | 70 if (impl->isSVGColor()) |
| 75 return wrap(static_cast<SVGColor*>(impl), creationContext, isolate); | 71 return wrap(static_cast<SVGColor*>(impl), creationContext, isolate); |
| 76 #endif | 72 #endif |
| 77 return V8CSSValue::createWrapper(impl, creationContext, isolate); | 73 return V8CSSValue::createWrapper(impl, creationContext, isolate); |
| 78 } | 74 } |
| 79 | 75 |
| 80 } // namespace WebCore | 76 } // namespace WebCore |
| OLD | NEW |