| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 return v8::Handle<v8::Object>(); | 62 return v8::Handle<v8::Object>(); |
| 63 | 63 |
| 64 CustomElementBinding* customElementBinding = perContextData->customElementBi
nding(definition->type()); | 64 CustomElementBinding* customElementBinding = perContextData->customElementBi
nding(definition->type()); |
| 65 | 65 |
| 66 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, customElementBinding->wrapperType(), impl.get(), isolate); | 66 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, customElementBinding->wrapperType(), impl.get(), isolate); |
| 67 if (wrapper.IsEmpty()) | 67 if (wrapper.IsEmpty()) |
| 68 return v8::Handle<v8::Object>(); | 68 return v8::Handle<v8::Object>(); |
| 69 | 69 |
| 70 wrapper->SetPrototype(customElementBinding->prototype()); | 70 wrapper->SetPrototype(customElementBinding->prototype()); |
| 71 | 71 |
| 72 V8DOMWrapper::associateObjectWithWrapper(impl, customElementBinding->wrapper
Type(), wrapper, isolate, WrapperConfiguration::Dependent); | 72 V8DOMWrapper::associateObjectWithWrapper<V8Element>(impl, customElementBindi
ng->wrapperType(), wrapper, isolate, WrapperConfiguration::Dependent); |
| 73 return wrapper; | 73 return wrapper; |
| 74 } | 74 } |
| 75 | 75 |
| 76 v8::Handle<v8::Object> CustomElementHelpers::CreateWrapperFunction::invoke(Eleme
nt* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) const | 76 v8::Handle<v8::Object> CustomElementHelpers::CreateWrapperFunction::invoke(Eleme
nt* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) const |
| 77 { | 77 { |
| 78 if (element->isHTMLElement()) { | 78 if (element->isHTMLElement()) { |
| 79 if (m_html) | 79 if (m_html) |
| 80 return m_html(toHTMLElement(element), creationContext, isolate); | 80 return m_html(toHTMLElement(element), creationContext, isolate); |
| 81 return createV8HTMLFallbackWrapper(toHTMLUnknownElement(toHTMLElement(el
ement)), creationContext, isolate); | 81 return createV8HTMLFallbackWrapper(toHTMLUnknownElement(toHTMLElement(el
ement)), creationContext, isolate); |
| 82 } else if (element->isSVGElement()) { | 82 } else if (element->isSVGElement()) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 100 ASSERT(0); | 100 ASSERT(0); |
| 101 return v8::Handle<v8::Object>(); | 101 return v8::Handle<v8::Object>(); |
| 102 } | 102 } |
| 103 } else { | 103 } else { |
| 104 // It's a type extension | 104 // It's a type extension |
| 105 return createTypeExtensionUpgradeCandidateWrapper.invoke(element.get(),
creationContext, isolate); | 105 return createTypeExtensionUpgradeCandidateWrapper.invoke(element.get(),
creationContext, isolate); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace WebCore | 109 } // namespace WebCore |
| OLD | NEW |