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

Side by Side Diff: Source/core/dom/custom/CustomElement.cpp

Issue 117313008: Update Custom Elements API to new names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update for forgotten tests. Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 { 117 {
118 ASSERT(element->customElementState() == Element::Upgraded); 118 ASSERT(element->customElementState() == Element::Upgraded);
119 CustomElementCallbackScheduler::scheduleAttributeChangedCallback(definitionF or(element)->callbacks(), element, name, oldValue, newValue); 119 CustomElementCallbackScheduler::scheduleAttributeChangedCallback(definitionF or(element)->callbacks(), element, name, oldValue, newValue);
120 } 120 }
121 121
122 void CustomElement::didEnterDocument(Element* element, const Document& document) 122 void CustomElement::didEnterDocument(Element* element, const Document& document)
123 { 123 {
124 ASSERT(element->customElementState() == Element::Upgraded); 124 ASSERT(element->customElementState() == Element::Upgraded);
125 if (!document.domWindow()) 125 if (!document.domWindow())
126 return; 126 return;
127 CustomElementCallbackScheduler::scheduleEnteredViewCallback(definitionFor(el ement)->callbacks(), element); 127 CustomElementCallbackScheduler::scheduleAttachedCallback(definitionFor(eleme nt)->callbacks(), element);
128 } 128 }
129 129
130 void CustomElement::didLeaveDocument(Element* element, const Document& document) 130 void CustomElement::didLeaveDocument(Element* element, const Document& document)
131 { 131 {
132 ASSERT(element->customElementState() == Element::Upgraded); 132 ASSERT(element->customElementState() == Element::Upgraded);
133 if (!document.domWindow()) 133 if (!document.domWindow())
134 return; 134 return;
135 CustomElementCallbackScheduler::scheduleLeftViewCallback(definitionFor(eleme nt)->callbacks(), element); 135 CustomElementCallbackScheduler::scheduleDetachedCallback(definitionFor(eleme nt)->callbacks(), element);
136 } 136 }
137 137
138 void CustomElement::wasDestroyed(Element* element) 138 void CustomElement::wasDestroyed(Element* element)
139 { 139 {
140 switch (element->customElementState()) { 140 switch (element->customElementState()) {
141 case Element::NotCustomElement: 141 case Element::NotCustomElement:
142 ASSERT_NOT_REACHED(); 142 ASSERT_NOT_REACHED();
143 break; 143 break;
144 144
145 case Element::WaitingForUpgrade: 145 case Element::WaitingForUpgrade:
(...skipping 11 matching lines...) Expand all
157 ASSERT_UNUSED(result, result.isNewEntry); 157 ASSERT_UNUSED(result, result.isNewEntry);
158 } 158 }
159 159
160 CustomElement::DefinitionMap& CustomElement::definitions() 160 CustomElement::DefinitionMap& CustomElement::definitions()
161 { 161 {
162 DEFINE_STATIC_LOCAL(DefinitionMap, map, ()); 162 DEFINE_STATIC_LOCAL(DefinitionMap, map, ());
163 return map; 163 return map;
164 } 164 }
165 165
166 } // namespace WebCore 166 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.idl ('k') | Source/core/dom/custom/CustomElementCallbackInvocation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698