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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js

Issue 2527763003: [DevTools] Turn links into spans to prevent default behavior. (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
Index: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
index 53ae0294454924ef4e0911bb594c6e398e1ac9ed..4492683065af9679dd8f7483e0cbc0f16ae151e7 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
@@ -387,8 +387,8 @@ Components.Linkifier = class {
* @returns{!Element}
*/
static _createLink(text, className, title, href, preventClick) {
- var link = createElementWithClass('a', className);
- link.classList.add('webkit-html-resource-link');
+ var link = createElementWithClass('span', className);
+ link.classList.add('devtools-link');
if (title)
link.title = title;
if (href)
@@ -405,10 +405,10 @@ Components.Linkifier = class {
revealable: null,
fallback: null
};
- if (preventClick)
- link.addEventListener('click', event => event.consume(true), false);
- else
+ if (!preventClick)
link.addEventListener('click', Components.Linkifier._handleClick, false);
+ else
+ link.classList.add('devtools-link-prevent-click');
return link;
}

Powered by Google App Engine
This is Rietveld 408576698