| 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 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "bindings/core/v8/V8CSSRule.h" | 32 #include "bindings/core/v8/V8CSSRule.h" |
| 33 | 33 |
| 34 #include "bindings/core/v8/V8CSSFilterRule.h" | 34 #include "bindings/core/v8/V8CSSFilterRule.h" |
| 35 #include "bindings/core/v8/V8CSSFontFaceRule.h" | 35 #include "bindings/core/v8/V8CSSFontFaceRule.h" |
| 36 #include "bindings/core/v8/V8CSSKeyframeRule.h" | 36 #include "bindings/core/v8/V8CSSKeyframeRule.h" |
| 37 #include "bindings/core/v8/V8CSSKeyframesRule.h" | 37 #include "bindings/core/v8/V8CSSKeyframesRule.h" |
| 38 #include "bindings/core/v8/V8CSSMediaRule.h" | 38 #include "bindings/core/v8/V8CSSMediaRule.h" |
| 39 #include "bindings/core/v8/V8CSSStyleRule.h" | 39 #include "bindings/core/v8/V8CSSStyleRule.h" |
| 40 #include "bindings/core/v8/V8CSSSupportsRule.h" | 40 #include "bindings/core/v8/V8CSSSupportsRule.h" |
| 41 #include "bindings/core/v8/V8CSSViewportRule.h" | |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex
t, v8::Isolate* isolate) | 44 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex
t, v8::Isolate* isolate) |
| 46 { | 45 { |
| 47 ASSERT(impl); | 46 ASSERT(impl); |
| 48 switch (impl->type()) { | 47 switch (impl->type()) { |
| 49 case CSSRule::UNKNOWN_RULE: | 48 case CSSRule::UNKNOWN_RULE: |
| 50 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything | 49 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything |
| 51 // over CSSRule.idl (see core/core.gypi: 'core_idl_files'). | 50 // over CSSRule.idl (see core/core.gypi: 'core_idl_files'). |
| 52 // -> Use the base class wrapper here. | 51 // -> Use the base class wrapper here. |
| 53 return V8CSSRule::createWrapper(impl, creationContext, isolate); | 52 return V8CSSRule::createWrapper(impl, creationContext, isolate); |
| 54 case CSSRule::STYLE_RULE: | 53 case CSSRule::STYLE_RULE: |
| 55 return wrap(toCSSStyleRule(impl), creationContext, isolate); | 54 return wrap(toCSSStyleRule(impl), creationContext, isolate); |
| 56 case CSSRule::MEDIA_RULE: | 55 case CSSRule::MEDIA_RULE: |
| 57 return wrap(toCSSMediaRule(impl), creationContext, isolate); | 56 return wrap(toCSSMediaRule(impl), creationContext, isolate); |
| 58 case CSSRule::FONT_FACE_RULE: | 57 case CSSRule::FONT_FACE_RULE: |
| 59 return wrap(toCSSFontFaceRule(impl), creationContext, isolate); | 58 return wrap(toCSSFontFaceRule(impl), creationContext, isolate); |
| 60 case CSSRule::KEYFRAME_RULE: | 59 case CSSRule::KEYFRAME_RULE: |
| 61 return wrap(toCSSKeyframeRule(impl), creationContext, isolate); | 60 return wrap(toCSSKeyframeRule(impl), creationContext, isolate); |
| 62 case CSSRule::KEYFRAMES_RULE: | 61 case CSSRule::KEYFRAMES_RULE: |
| 63 return wrap(toCSSKeyframesRule(impl), creationContext, isolate); | 62 return wrap(toCSSKeyframesRule(impl), creationContext, isolate); |
| 64 case CSSRule::SUPPORTS_RULE: | 63 case CSSRule::SUPPORTS_RULE: |
| 65 return wrap(toCSSSupportsRule(impl), creationContext, isolate); | 64 return wrap(toCSSSupportsRule(impl), creationContext, isolate); |
| 66 case CSSRule::VIEWPORT_RULE: | |
| 67 return wrap(toCSSViewportRule(impl), creationContext, isolate); | |
| 68 case CSSRule::WEBKIT_FILTER_RULE: | 65 case CSSRule::WEBKIT_FILTER_RULE: |
| 69 return wrap(toCSSFilterRule(impl), creationContext, isolate); | 66 return wrap(toCSSFilterRule(impl), creationContext, isolate); |
| 70 } | 67 } |
| 71 return V8CSSRule::createWrapper(impl, creationContext, isolate); | 68 return V8CSSRule::createWrapper(impl, creationContext, isolate); |
| 72 } | 69 } |
| 73 | 70 |
| 74 } // namespace blink | 71 } // namespace blink |
| OLD | NEW |