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

Side by Side Diff: sky/engine/core/html/HTMLImportElement.cpp

Issue 758623002: Remove didNotifySubtreeInsertionsToDocument. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/html/HTMLImportElement.h ('k') | sky/engine/core/html/HTMLStyleElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/html/HTMLImportElement.h" 6 #include "sky/engine/core/html/HTMLImportElement.h"
7 7
8 #include "gen/sky/core/EventTypeNames.h" 8 #include "gen/sky/core/EventTypeNames.h"
9 #include "sky/engine/core/dom/Document.h" 9 #include "sky/engine/core/dom/Document.h"
10 #include "sky/engine/core/events/Event.h" 10 #include "sky/engine/core/events/Event.h"
(...skipping 15 matching lines...) Expand all
26 m_child->clearClient(); 26 m_child->clearClient();
27 m_child = nullptr; 27 m_child = nullptr;
28 } 28 }
29 } 29 }
30 30
31 PassRefPtr<HTMLImportElement> HTMLImportElement::create(Document& document) 31 PassRefPtr<HTMLImportElement> HTMLImportElement::create(Document& document)
32 { 32 {
33 return adoptRef(new HTMLImportElement(document)); 33 return adoptRef(new HTMLImportElement(document));
34 } 34 }
35 35
36 Node::InsertionNotificationRequest HTMLImportElement::insertedInto(ContainerNode * insertionPoint) 36 void HTMLImportElement::insertedInto(ContainerNode* insertionPoint)
37 { 37 {
38 HTMLElement::insertedInto(insertionPoint); 38 HTMLElement::insertedInto(insertionPoint);
39 if (!insertionPoint->inDocument() || isInShadowTree()) 39 if (!insertionPoint->inDocument() || isInShadowTree())
40 return InsertionDone; 40 return;
41 41
42 if (shouldLoad()) 42 if (shouldLoad())
43 load(); 43 load();
44
45 return InsertionDone;
46 } 44 }
47 45
48 bool HTMLImportElement::shouldLoad() const 46 bool HTMLImportElement::shouldLoad() const
49 { 47 {
50 return document().frame() || document().importsController(); 48 return document().frame() || document().importsController();
51 } 49 }
52 50
53 void HTMLImportElement::load() 51 void HTMLImportElement::load()
54 { 52 {
55 if (m_child || !hasAttribute(HTMLNames::srcAttr)) 53 if (m_child || !hasAttribute(HTMLNames::srcAttr))
(...skipping 20 matching lines...) Expand all
76 { 74 {
77 return !hasAttribute(HTMLNames::asyncAttr); 75 return !hasAttribute(HTMLNames::asyncAttr);
78 } 76 }
79 77
80 Element* HTMLImportElement::link() 78 Element* HTMLImportElement::link()
81 { 79 {
82 return this; 80 return this;
83 } 81 }
84 82
85 } 83 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLImportElement.h ('k') | sky/engine/core/html/HTMLStyleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698