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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 2527763003: [DevTools] Turn links into spans to prevent default behavior. (Closed)
Patch Set: fixed comments Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after
3006 var isQuoted = /^'.*'$/.test(url) || /^".*"$/.test(url); 3006 var isQuoted = /^'.*'$/.test(url) || /^".*"$/.test(url);
3007 if (isQuoted) 3007 if (isQuoted)
3008 url = url.substring(1, url.length - 1); 3008 url = url.substring(1, url.length - 1);
3009 var container = createDocumentFragment(); 3009 var container = createDocumentFragment();
3010 container.createTextChild('url('); 3010 container.createTextChild('url(');
3011 var hrefUrl = null; 3011 var hrefUrl = null;
3012 if (this._rule && this._rule.resourceURL()) 3012 if (this._rule && this._rule.resourceURL())
3013 hrefUrl = Common.ParsedURL.completeURL(this._rule.resourceURL(), url); 3013 hrefUrl = Common.ParsedURL.completeURL(this._rule.resourceURL(), url);
3014 else if (this._node) 3014 else if (this._node)
3015 hrefUrl = this._node.resolveURL(url); 3015 hrefUrl = this._node.resolveURL(url);
3016 container.appendChild(Components.Linkifier.linkifyURL(hrefUrl || url, url)); 3016 container.appendChild(Components.Linkifier.linkifyURL(hrefUrl || url, url, ' ', undefined, undefined, true));
3017 container.createTextChild(')'); 3017 container.createTextChild(')');
3018 return container; 3018 return container;
3019 } 3019 }
3020 }; 3020 };
3021 3021
3022 /** 3022 /**
3023 * @implements {UI.ToolbarItem.Provider} 3023 * @implements {UI.ToolbarItem.Provider}
3024 * @unrestricted 3024 * @unrestricted
3025 */ 3025 */
3026 Elements.StylesSidebarPane.ButtonProvider = class { 3026 Elements.StylesSidebarPane.ButtonProvider = class {
(...skipping 29 matching lines...) Expand all
3056 } 3056 }
3057 3057
3058 /** 3058 /**
3059 * @override 3059 * @override
3060 * @return {!UI.ToolbarItem} 3060 * @return {!UI.ToolbarItem}
3061 */ 3061 */
3062 item() { 3062 item() {
3063 return this._button; 3063 return this._button;
3064 } 3064 }
3065 }; 3065 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698