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

Unified Diff: third_party/WebKit/Source/core/layout/HitTestResult.cpp

Issue 2752763002: Change the type of a SVG <use> element's shadow tree from "user agent" to "closed" (Closed)
Patch Set: Created 3 years, 9 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
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());
+ }
}
}
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGElement.cpp » ('j') | third_party/WebKit/Source/core/svg/SVGElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698