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

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

Issue 1750263002: Devtools: Do not greedily collapse URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/styles/url-multiple-collapsing-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after
2982 WebInspector.StylesSidebarPropertyRenderer._bezierRegex = /((cubic-bezier\([^)]+ \))|\b(linear|ease-in-out|ease-in|ease-out|ease)\b)/g; 2982 WebInspector.StylesSidebarPropertyRenderer._bezierRegex = /((cubic-bezier\([^)]+ \))|\b(linear|ease-in-out|ease-in|ease-out|ease)\b)/g;
2983 2983
2984 /** 2984 /**
2985 * @param {string} value 2985 * @param {string} value
2986 * @return {!RegExp} 2986 * @return {!RegExp}
2987 */ 2987 */
2988 WebInspector.StylesSidebarPropertyRenderer._urlRegex = function(value) 2988 WebInspector.StylesSidebarPropertyRenderer._urlRegex = function(value)
2989 { 2989 {
2990 // Heuristically choose between single-quoted, double-quoted or plain URL re gex. 2990 // Heuristically choose between single-quoted, double-quoted or plain URL re gex.
2991 if (/url\(\s*'.*\s*'\s*\)/.test(value)) 2991 if (/url\(\s*'.*\s*'\s*\)/.test(value))
2992 return /url\(\s*('.+')\s*\)/g; 2992 return /url\(\s*('.+?')\s*\)/g;
2993 if (/url\(\s*".*\s*"\s*\)/.test(value)) 2993 if (/url\(\s*".*\s*"\s*\)/.test(value))
2994 return /url\(\s*(".+")\s*\)/g; 2994 return /url\(\s*(".+?")\s*\)/g;
2995 return /url\(\s*([^)]+)\s*\)/g; 2995 return /url\(\s*([^)]+)\s*\)/g;
2996 } 2996 }
2997 2997
2998 WebInspector.StylesSidebarPropertyRenderer.prototype = { 2998 WebInspector.StylesSidebarPropertyRenderer.prototype = {
2999 /** 2999 /**
3000 * @param {function(string):!Node} handler 3000 * @param {function(string):!Node} handler
3001 */ 3001 */
3002 setColorHandler: function(handler) 3002 setColorHandler: function(handler)
3003 { 3003 {
3004 this._colorHandler = handler; 3004 this._colorHandler = handler;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3084 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged); 3084 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged);
3085 onNodeChanged(); 3085 onNodeChanged();
3086 return button; 3086 return button;
3087 3087
3088 function onNodeChanged() 3088 function onNodeChanged()
3089 { 3089 {
3090 var node = WebInspector.context.flavor(WebInspector.DOMNode); 3090 var node = WebInspector.context.flavor(WebInspector.DOMNode);
3091 button.setEnabled(!!node); 3091 button.setEnabled(!!node);
3092 } 3092 }
3093 } 3093 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/styles/url-multiple-collapsing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698