Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/HitTestResult.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/HitTestResult.cpp b/third_party/WebKit/Source/core/layout/HitTestResult.cpp |
| index 0e4ce899159275281c484bd0309a996356c2d400..e22a1971f0290a979f81faaa42f3f3a52e978900 100644 |
| --- a/third_party/WebKit/Source/core/layout/HitTestResult.cpp |
| +++ b/third_party/WebKit/Source/core/layout/HitTestResult.cpp |
| @@ -172,8 +172,14 @@ LayoutObject* HitTestResult::layoutObject() const { |
| void HitTestResult::setToShadowHostIfInUserAgentShadowRoot() { |
|
fs
2017/03/15 13:34:45
Maybe the method name should be updated to reflect
hayato
2017/03/16 03:57:33
Done
|
| if (Node* node = innerNode()) { |
| if (ShadowRoot* containingShadowRoot = node->containingShadowRoot()) { |
| - if (containingShadowRoot->type() == ShadowRootType::UserAgent) |
| + if (containingShadowRoot->type() == ShadowRootType::UserAgent) { |
| setInnerNode(node->ownerShadowHost()); |
| + } else if (containingShadowRoot->type() == ShadowRootType::Closed && |
| + isSVGUseElement(containingShadowRoot->host())) { |
| + // Consider a closed shadow tree of SVG's <use> element as a special |
| + // case. A toolip does not work in svg's <use> element without this. |
|
fs
2017/03/15 13:34:45
Nit: tooltip, also svg's -> SVG's (for consistency
hayato
2017/03/16 03:57:33
Done. I have rewritten it to drop the repetition.
|
| + setInnerNode(node->ownerShadowHost()); |
| + } |
| } |
| } |
| } |