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

Side by Side Diff: Source/WebCore/dom/Element.cpp

Issue 7147011: Merge 88331 - 2011-06-07 Andrey Kosyakov <caseq@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/platform/win/Skipped ('k') | Source/WebCore/inspector/Inspector.json » ('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 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 return hasRareData() ? rareData()->m_shadowRoot : 0; 1195 return hasRareData() ? rareData()->m_shadowRoot : 0;
1196 } 1196 }
1197 1197
1198 ShadowRoot* Element::ensureShadowRoot() 1198 ShadowRoot* Element::ensureShadowRoot()
1199 { 1199 {
1200 if (ShadowRoot* existingRoot = shadowRoot()) 1200 if (ShadowRoot* existingRoot = shadowRoot())
1201 return existingRoot; 1201 return existingRoot;
1202 1202
1203 RefPtr<ShadowRoot> newRoot = ShadowRoot::create(document()); 1203 RefPtr<ShadowRoot> newRoot = ShadowRoot::create(document());
1204 ensureRareData()->m_shadowRoot = newRoot.get(); 1204 ensureRareData()->m_shadowRoot = newRoot.get();
1205 InspectorInstrumentation::willInsertDOMNode(document(), newRoot.get(), this) ;
1206 newRoot->setShadowHost(this); 1205 newRoot->setShadowHost(this);
1207 if (inDocument()) 1206 if (inDocument())
1208 newRoot->insertedIntoDocument(); 1207 newRoot->insertedIntoDocument();
1209 if (attached()) 1208 if (attached())
1210 newRoot->lazyAttach(); 1209 newRoot->lazyAttach();
1211 InspectorInstrumentation::didInsertDOMNode(document(), newRoot.get());
1212 return newRoot.get(); 1210 return newRoot.get();
1213 } 1211 }
1214 1212
1215 void Element::removeShadowRoot() 1213 void Element::removeShadowRoot()
1216 { 1214 {
1217 if (!hasRareData()) 1215 if (!hasRareData())
1218 return; 1216 return;
1219 1217
1220 ElementRareData* data = rareData(); 1218 ElementRareData* data = rareData();
1221 if (RefPtr<Node> oldRoot = data->m_shadowRoot) { 1219 if (RefPtr<Node> oldRoot = data->m_shadowRoot) {
1222 InspectorInstrumentation::willRemoveDOMNode(document(), oldRoot.get());
1223 data->m_shadowRoot = 0; 1220 data->m_shadowRoot = 0;
1224 document()->removeFocusedNodeOfSubtree(oldRoot.get()); 1221 document()->removeFocusedNodeOfSubtree(oldRoot.get());
1225 1222
1226 // Remove from rendering tree 1223 // Remove from rendering tree
1227 if (oldRoot->attached()) 1224 if (oldRoot->attached())
1228 oldRoot->detach(); 1225 oldRoot->detach();
1229 1226
1230 oldRoot->setShadowHost(0); 1227 oldRoot->setShadowHost(0);
1231 1228
1232 if (oldRoot->inDocument()) 1229 if (oldRoot->inDocument())
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1971 1968
1972 AnimationController* animController = renderer()->animation(); 1969 AnimationController* animController = renderer()->animation();
1973 1970
1974 if (!animController) 1971 if (!animController)
1975 return 0; 1972 return 0;
1976 1973
1977 return animController->animationsForRenderer(renderer()); 1974 return animController->animationsForRenderer(renderer());
1978 } 1975 }
1979 1976
1980 } // namespace WebCore 1977 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/platform/win/Skipped ('k') | Source/WebCore/inspector/Inspector.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698