OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/html/HTMLBlinkElement.h" |
| 7 |
| 8 #include "bindings/core/v8/PrivateScriptRunner.h" |
| 9 #include "bindings/core/v8/V8HTMLBlinkElement.h" |
| 10 #include "core/HTMLNames.h" |
| 11 #include "core/dom/Document.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 using namespace HTMLNames; |
| 16 |
| 17 inline HTMLBlinkElement::HTMLBlinkElement(Document& document) |
| 18 : HTMLElement(blinkTag, document) |
| 19 { |
| 20 ScriptWrappable::init(this); |
| 21 v8::Handle<v8::Value> classObject = PrivateScriptRunner::installClassIfNeede
d(document.frame(), "HTMLBlinkElement"); |
| 22 RELEASE_ASSERT(!classObject.IsEmpty()); |
| 23 } |
| 24 |
| 25 PassRefPtrWillBeRawPtr<HTMLBlinkElement> HTMLBlinkElement::create(Document& docu
ment) |
| 26 { |
| 27 return adoptRefWillBeNoop(new HTMLBlinkElement(document)); |
| 28 } |
| 29 |
| 30 Node::InsertionNotificationRequest HTMLBlinkElement::insertedInto(ContainerNode*
insertionPoint) |
| 31 { |
| 32 HTMLElement::insertedInto(insertionPoint); |
| 33 if (inDocument()) { |
| 34 V8HTMLBlinkElement::attachedCallbackMethodImplementedInPrivateScript(doc
ument().frame(), this); |
| 35 } |
| 36 return InsertionDone; |
| 37 } |
| 38 |
| 39 void HTMLBlinkElement::removedFrom(ContainerNode* insertionPoint) |
| 40 { |
| 41 HTMLElement::removedFrom(insertionPoint); |
| 42 if (insertionPoint->inDocument()) { |
| 43 V8HTMLBlinkElement::detachedCallbackMethodImplementedInPrivateScript(ins
ertionPoint->document().frame(), this); |
| 44 } |
| 45 } |
| 46 |
| 47 } // namespace blink |
OLD | NEW |