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

Unified Diff: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js

Issue 2510193003: [DevTools] Move link click and context menu handling to Linkifier. (Closed)
Patch Set: fixed comments Created 4 years, 1 month 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 | « third_party/WebKit/Source/devtools/front_end/main/module.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
diff --git a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
index 3ae4256b849c6f78674f00bfc621bb2f891db59e..2a2cb03bd15e6062cdea6878f92a303e2264fb94 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js
@@ -246,7 +246,11 @@ Node.prototype.parentElementOrShadowHost = function() {
* @return {?Node}
*/
Node.prototype.parentNodeOrShadowHost = function() {
- return this.parentNode || this.host || null;
+ if (this.parentNode)
+ return this.parentNode;
+ if (this.nodeType === Node.DOCUMENT_FRAGMENT_NODE && this.host)
+ return this.host;
+ return null;
};
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/main/module.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698