Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: Source/core/html/HTMLBlinkElement.cpp

Issue 419213002: [Not for review] Implement a <blink> tag in Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLBlinkElement.h ('k') | Source/core/html/HTMLBlinkElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLBlinkElement.cpp
diff --git a/Source/core/html/HTMLBlinkElement.cpp b/Source/core/html/HTMLBlinkElement.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..3286823ce622e8d5197546cffcc9f5fd07ca33a0
--- /dev/null
+++ b/Source/core/html/HTMLBlinkElement.cpp
@@ -0,0 +1,47 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/html/HTMLBlinkElement.h"
+
+#include "bindings/core/v8/PrivateScriptRunner.h"
+#include "bindings/core/v8/V8HTMLBlinkElement.h"
+#include "core/HTMLNames.h"
+#include "core/dom/Document.h"
+
+namespace blink {
+
+using namespace HTMLNames;
+
+inline HTMLBlinkElement::HTMLBlinkElement(Document& document)
+ : HTMLElement(blinkTag, document)
+{
+ ScriptWrappable::init(this);
+ v8::Handle<v8::Value> classObject = PrivateScriptRunner::installClassIfNeeded(document.frame(), "HTMLBlinkElement");
+ RELEASE_ASSERT(!classObject.IsEmpty());
+}
+
+PassRefPtrWillBeRawPtr<HTMLBlinkElement> HTMLBlinkElement::create(Document& document)
+{
+ return adoptRefWillBeNoop(new HTMLBlinkElement(document));
+}
+
+Node::InsertionNotificationRequest HTMLBlinkElement::insertedInto(ContainerNode* insertionPoint)
+{
+ HTMLElement::insertedInto(insertionPoint);
+ if (inDocument()) {
+ V8HTMLBlinkElement::attachedCallbackMethodImplementedInPrivateScript(document().frame(), this);
+ }
+ return InsertionDone;
+}
+
+void HTMLBlinkElement::removedFrom(ContainerNode* insertionPoint)
+{
+ HTMLElement::removedFrom(insertionPoint);
+ if (insertionPoint->inDocument()) {
+ V8HTMLBlinkElement::detachedCallbackMethodImplementedInPrivateScript(insertionPoint->document().frame(), this);
+ }
+}
+
+} // namespace blink
« no previous file with comments | « Source/core/html/HTMLBlinkElement.h ('k') | Source/core/html/HTMLBlinkElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698