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

Side by Side Diff: sky/engine/core/html/HTMLStyleElement.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/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLTitleElement.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 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved.
6 * (C) 2007 Rob Buis (buis@kde.org) 6 * (C) 2007 Rob Buis (buis@kde.org)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 HTMLElement::parseAttribute(name, value); 60 HTMLElement::parseAttribute(name, value);
61 } 61 }
62 } 62 }
63 63
64 void HTMLStyleElement::finishParsingChildren() 64 void HTMLStyleElement::finishParsingChildren()
65 { 65 {
66 StyleElement::finishParsingChildren(this); 66 StyleElement::finishParsingChildren(this);
67 HTMLElement::finishParsingChildren(); 67 HTMLElement::finishParsingChildren();
68 } 68 }
69 69
70 Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode* insertionPoint) 70 void HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
71 { 71 {
72 HTMLElement::insertedInto(insertionPoint); 72 HTMLElement::insertedInto(insertionPoint);
73 if (insertionPoint->inDocument() && isInShadowTree()) { 73
74 if (ShadowRoot* scope = containingShadowRoot()) 74 if (!inDocument())
75 scope->registerScopedHTMLStyleChild(); 75 return;
76 } 76
77 return InsertionShouldCallDidNotifySubtreeInsertions; 77 StyleElement::processStyleSheet(document(), this);
78
79 if (ShadowRoot* scope = containingShadowRoot())
80 scope->registerScopedHTMLStyleChild();
78 } 81 }
79 82
80 void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint) 83 void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
81 { 84 {
82 HTMLElement::removedFrom(insertionPoint); 85 HTMLElement::removedFrom(insertionPoint);
83 86
84 if (!insertionPoint->inDocument()) 87 if (!insertionPoint->inDocument())
85 return; 88 return;
86 89
87 ShadowRoot* scopingNode = containingShadowRoot(); 90 ShadowRoot* scopingNode = containingShadowRoot();
88 if (!scopingNode) 91 if (!scopingNode)
89 scopingNode = insertionPoint->containingShadowRoot(); 92 scopingNode = insertionPoint->containingShadowRoot();
90 93
91 if (scopingNode) 94 if (scopingNode)
92 scopingNode->unregisterScopedHTMLStyleChild(); 95 scopingNode->unregisterScopedHTMLStyleChild();
93 96
94 TreeScope* containingScope = containingShadowRoot(); 97 TreeScope* containingScope = containingShadowRoot();
95 StyleElement::removedFromDocument(document(), this, scopingNode, containingS cope ? *containingScope : insertionPoint->treeScope()); 98 StyleElement::removedFromDocument(document(), this, scopingNode, containingS cope ? *containingScope : insertionPoint->treeScope());
96 } 99 }
97 100
98 void HTMLStyleElement::didNotifySubtreeInsertionsToDocument()
99 {
100 StyleElement::processStyleSheet(document(), this);
101 }
102
103 void HTMLStyleElement::childrenChanged(const ChildrenChange& change) 101 void HTMLStyleElement::childrenChanged(const ChildrenChange& change)
104 { 102 {
105 HTMLElement::childrenChanged(change); 103 HTMLElement::childrenChanged(change);
106 StyleElement::childrenChanged(this); 104 StyleElement::childrenChanged(this);
107 } 105 }
108 106
109 const AtomicString& HTMLStyleElement::media() const 107 const AtomicString& HTMLStyleElement::media() const
110 { 108 {
111 return getAttribute(HTMLNames::mediaAttr); 109 return getAttribute(HTMLNames::mediaAttr);
112 } 110 }
113 111
114 const AtomicString& HTMLStyleElement::type() const 112 const AtomicString& HTMLStyleElement::type() const
115 { 113 {
116 return getAttribute(HTMLNames::typeAttr); 114 return getAttribute(HTMLNames::typeAttr);
117 } 115 }
118 116
119 ContainerNode* HTMLStyleElement::scopingNode() 117 ContainerNode* HTMLStyleElement::scopingNode()
120 { 118 {
121 if (!inDocument()) 119 if (!inDocument())
122 return 0; 120 return 0;
123 121
124 if (isInShadowTree()) 122 if (isInShadowTree())
125 return containingShadowRoot(); 123 return containingShadowRoot();
126 124
127 return &document(); 125 return &document();
128 } 126 }
129 127
130 } 128 }
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLTitleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698