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

Unified Diff: sky/engine/core/html/HTMLImportElement.cpp

Issue 1215103007: Remove remaining HTML elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/engine/core/html/HTMLImportElement.h ('k') | sky/engine/core/html/HTMLImportElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLImportElement.cpp
diff --git a/sky/engine/core/html/HTMLImportElement.cpp b/sky/engine/core/html/HTMLImportElement.cpp
deleted file mode 100644
index ff7130a22bba388758b78f1878f3b21716d3ebbc..0000000000000000000000000000000000000000
--- a/sky/engine/core/html/HTMLImportElement.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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 "sky/engine/core/html/HTMLImportElement.h"
-
-#include "gen/sky/core/EventTypeNames.h"
-#include "sky/engine/core/dom/Document.h"
-#include "sky/engine/core/events/Event.h"
-#include "sky/engine/core/fetch/FetchRequest.h"
-#include "sky/engine/core/html/imports/HTMLImportChild.h"
-#include "sky/engine/core/html/imports/HTMLImportsController.h"
-
-namespace blink {
-
-HTMLImportElement::HTMLImportElement(Document& document)
- : HTMLElement(HTMLNames::importTag, document)
- , m_child(nullptr)
-{
-}
-
-HTMLImportElement::~HTMLImportElement()
-{
- if (m_child) {
- m_child->clearClient();
- m_child = nullptr;
- }
-}
-
-PassRefPtr<HTMLImportElement> HTMLImportElement::create(Document& document)
-{
- return adoptRef(new HTMLImportElement(document));
-}
-
-void HTMLImportElement::insertedInto(ContainerNode* insertionPoint)
-{
- HTMLElement::insertedInto(insertionPoint);
- if (!insertionPoint->inDocument() || isInShadowTree())
- return;
-
- if (shouldLoad())
- load();
-}
-
-bool HTMLImportElement::shouldLoad() const
-{
- return document().frame() || document().importsController();
-}
-
-void HTMLImportElement::load()
-{
- if (m_child || !hasAttribute(HTMLNames::srcAttr))
- return;
- KURL url = document().completeURL(getAttribute(HTMLNames::srcAttr));
- m_child = document().ensureImportsController().load(document().import(), this, FetchRequest(ResourceRequest(url)));
-
- if (m_child)
- m_child->ownerInserted();
-}
-
-void HTMLImportElement::didFinish()
-{
- dispatchEvent(Event::create(EventTypeNames::load));
-}
-
-void HTMLImportElement::importChildWasDestroyed(HTMLImportChild* child)
-{
- ASSERT(m_child == child);
- m_child = nullptr;
-}
-
-bool HTMLImportElement::isSync() const
-{
- return !hasAttribute(HTMLNames::asyncAttr);
-}
-
-Element* HTMLImportElement::link()
-{
- return this;
-}
-
-}
« no previous file with comments | « sky/engine/core/html/HTMLImportElement.h ('k') | sky/engine/core/html/HTMLImportElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698