Changeset 118879 in webkit
- Timestamp:
- May 29, 2012, 6:57:59 PM (14 years ago)
- Location:
- branches/chromium/1132/Source/WebCore
- Files:
-
- 2 edited
-
dom/EventDispatcher.cpp (modified) (1 diff)
-
page/EventHandler.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/chromium/1132/Source/WebCore/dom/EventDispatcher.cpp
r110314 r118879 67 67 // as a deeply cloned child of the 'use' element, except that events are dispatched to the SVGElementInstance objects 68 68 Element* shadowHostElement = referenceNode->treeScope()->rootNode()->shadowHost(); 69 // At this time, SVG nodes are not allowed in non-<use> shadow trees, so any shadow root we do 70 // have should be a use. The assert and following test is here to catch future shadow DOM changes 71 // that do enable SVG in a shadow tree. 72 ASSERT(!shadowHostElement || shadowHostElement->hasTagName(SVGNames::useTag)); 73 if (shadowHostElement && shadowHostElement->hasTagName(SVGNames::useTag)) { 74 SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostElement); 75 76 if (SVGElementInstance* instance = useElement->instanceForShadowTreeElement(referenceNode)) 77 return instance; 78 } 69 // At this time, SVG nodes are not supported in non-<use> shadow trees. 70 if (!shadowHostElement || !shadowHostElement->hasTagName(SVGNames::useTag)) 71 return referenceNode; 72 SVGUseElement* useElement = static_cast<SVGUseElement*>(shadowHostElement); 73 if (SVGElementInstance* instance = useElement->instanceForShadowTreeElement(referenceNode)) 74 return instance; 79 75 #endif 80 76 -
branches/chromium/1132/Source/WebCore/page/EventHandler.cpp
r115877 r118879 2097 2097 2098 2098 Element* shadowTreeParentElement = shadowTreeElement->shadowHost(); 2099 if (!shadowTreeParentElement )2099 if (!shadowTreeParentElement || !shadowTreeParentElement->hasTagName(useTag)) 2100 2100 return 0; 2101 2101 2102 ASSERT(shadowTreeParentElement->hasTagName(useTag));2103 2102 return static_cast<SVGUseElement*>(shadowTreeParentElement)->instanceForShadowTreeElement(referenceNode); 2104 2103 }
Note:
See TracChangeset
for help on using the changeset viewer.