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

Unified Diff: Source/WebCore/dom/EventDispatcher.cpp

Issue 10446075: Merge 117957 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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 | « no previous file | Source/WebCore/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/EventDispatcher.cpp
===================================================================
--- Source/WebCore/dom/EventDispatcher.cpp (revision 118878)
+++ Source/WebCore/dom/EventDispatcher.cpp (working copy)
@@ -66,16 +66,12 @@
// Spec: The event handling for the non-exposed tree works as if the referenced element had been textually included
// as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects
Element* shadowHostElement = referenceNode->treeScope()->rootNode()->shadowHost();
- // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do
- // have should be a use. The assert and following test is here to catch future shadow DOM changes
- // that do enable SVG in a shadow tree.
- ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::useTag));
- if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)) {
- SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostElement);
-
- if (SVGElementInstance* instance = useElement->instanceForShadowTreeElement(referenceNode))
- return instance;
- }
+ // At this time, SVG nodes are not supported in non-<use> shadow trees.
+ if (!shadowHostElement || !shadowHostElement->hasTagName(SVGNames::useTag))
+ return referenceNode;
+ SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostElement);
+ if (SVGElementInstance* instance = useElement->instanceForShadowTreeElement(referenceNode))
+ return instance;
#endif
return referenceNode;
« no previous file with comments | « no previous file | Source/WebCore/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698