| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |