| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 namespace WebCore { | 53 namespace WebCore { |
| 54 | 54 |
| 55 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex
t, v8::Isolate* isolate) | 55 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex
t, v8::Isolate* isolate) |
| 56 { | 56 { |
| 57 ASSERT(impl); | 57 ASSERT(impl); |
| 58 switch (impl->type()) { | 58 switch (impl->type()) { |
| 59 case CSSRule::UNKNOWN_RULE: | 59 case CSSRule::UNKNOWN_RULE: |
| 60 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything | 60 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything |
| 61 // over CSSRule.idl (see WebCore.gyp/WebCore.gyp: 'bindings_idl_files'). | 61 // over CSSRule.idl (see bindings/derived_sources.gyp: 'idl_files'). |
| 62 // -> Use the base class wrapper here. | 62 // -> Use the base class wrapper here. |
| 63 return V8CSSRule::createWrapper(impl, creationContext, isolate); | 63 return V8CSSRule::createWrapper(impl, creationContext, isolate); |
| 64 case CSSRule::STYLE_RULE: | 64 case CSSRule::STYLE_RULE: |
| 65 return wrap(static_cast<CSSStyleRule*>(impl), creationContext, isolate); | 65 return wrap(static_cast<CSSStyleRule*>(impl), creationContext, isolate); |
| 66 case CSSRule::CHARSET_RULE: | 66 case CSSRule::CHARSET_RULE: |
| 67 return wrap(static_cast<CSSCharsetRule*>(impl), creationContext, isolate
); | 67 return wrap(static_cast<CSSCharsetRule*>(impl), creationContext, isolate
); |
| 68 case CSSRule::IMPORT_RULE: | 68 case CSSRule::IMPORT_RULE: |
| 69 return wrap(static_cast<CSSImportRule*>(impl), creationContext, isolate)
; | 69 return wrap(static_cast<CSSImportRule*>(impl), creationContext, isolate)
; |
| 70 case CSSRule::MEDIA_RULE: | 70 case CSSRule::MEDIA_RULE: |
| 71 return wrap(static_cast<CSSMediaRule*>(impl), creationContext, isolate); | 71 return wrap(static_cast<CSSMediaRule*>(impl), creationContext, isolate); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 89 return wrap(static_cast<WebKitCSSRegionRule*>(impl), creationContext, is
olate); | 89 return wrap(static_cast<WebKitCSSRegionRule*>(impl), creationContext, is
olate); |
| 90 case CSSRule::HOST_RULE: | 90 case CSSRule::HOST_RULE: |
| 91 return wrap(static_cast<CSSHostRule*>(impl), creationContext, isolate); | 91 return wrap(static_cast<CSSHostRule*>(impl), creationContext, isolate); |
| 92 case CSSRule::WEBKIT_FILTER_RULE: | 92 case CSSRule::WEBKIT_FILTER_RULE: |
| 93 return wrap(static_cast<WebKitCSSFilterRule*>(impl), creationContext, is
olate); | 93 return wrap(static_cast<WebKitCSSFilterRule*>(impl), creationContext, is
olate); |
| 94 } | 94 } |
| 95 return V8CSSRule::createWrapper(impl, creationContext, isolate); | 95 return V8CSSRule::createWrapper(impl, creationContext, isolate); |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace WebCore | 98 } // namespace WebCore |
| OLD | NEW |