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

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

Issue 2902273002: DevTools: convert linkifyURL params into options object (Closed)
Patch Set: rebase and ac Created 3 years, 6 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 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 3079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 var isQuoted = /^'.*'$/.test(url) || /^".*"$/.test(url); 3090 var isQuoted = /^'.*'$/.test(url) || /^".*"$/.test(url);
3091 if (isQuoted) 3091 if (isQuoted)
3092 url = url.substring(1, url.length - 1); 3092 url = url.substring(1, url.length - 1);
3093 var container = createDocumentFragment(); 3093 var container = createDocumentFragment();
3094 container.createTextChild('url('); 3094 container.createTextChild('url(');
3095 var hrefUrl = null; 3095 var hrefUrl = null;
3096 if (this._rule && this._rule.resourceURL()) 3096 if (this._rule && this._rule.resourceURL())
3097 hrefUrl = Common.ParsedURL.completeURL(this._rule.resourceURL(), url); 3097 hrefUrl = Common.ParsedURL.completeURL(this._rule.resourceURL(), url);
3098 else if (this._node) 3098 else if (this._node)
3099 hrefUrl = this._node.resolveURL(url); 3099 hrefUrl = this._node.resolveURL(url);
3100 container.appendChild(Components.Linkifier.linkifyURL(hrefUrl || url, url, ' ', undefined, undefined, true)); 3100 container.appendChild(Components.Linkifier.linkifyURL(hrefUrl || url, {text: url, preventClick: true}));
3101 container.createTextChild(')'); 3101 container.createTextChild(')');
3102 return container; 3102 return container;
3103 } 3103 }
3104 }; 3104 };
3105 3105
3106 /** 3106 /**
3107 * @implements {UI.ToolbarItem.Provider} 3107 * @implements {UI.ToolbarItem.Provider}
3108 */ 3108 */
3109 Elements.StylesSidebarPane.ButtonProvider = class { 3109 Elements.StylesSidebarPane.ButtonProvider = class {
3110 constructor() { 3110 constructor() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 } 3142 }
3143 3143
3144 /** 3144 /**
3145 * @override 3145 * @override
3146 * @return {!UI.ToolbarItem} 3146 * @return {!UI.ToolbarItem}
3147 */ 3147 */
3148 item() { 3148 item() {
3149 return this._button; 3149 return this._button;
3150 } 3150 }
3151 }; 3151 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698