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

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

Issue 1986053004: Devtools Color: Basic support for #RRGGBBAA and #RGBA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 */ 3024 */
3025 WebInspector.StylesSidebarPropertyRenderer = function(rule, node, name, value) 3025 WebInspector.StylesSidebarPropertyRenderer = function(rule, node, name, value)
3026 { 3026 {
3027 this._rule = rule; 3027 this._rule = rule;
3028 this._node = node; 3028 this._node = node;
3029 this._propertyName = name; 3029 this._propertyName = name;
3030 this._propertyValue = value; 3030 this._propertyValue = value;
3031 } 3031 }
3032 3032
3033 WebInspector.StylesSidebarPropertyRenderer._variableRegex = /(var\(--.*?\))/g; 3033 WebInspector.StylesSidebarPropertyRenderer._variableRegex = /(var\(--.*?\))/g;
3034 WebInspector.StylesSidebarPropertyRenderer._colorRegex = /((?:rgb|hsl)a?\([^)]+\ )|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3}|\b\w+\b(?!-))/g; 3034 WebInspector.StylesSidebarPropertyRenderer._colorRegex = /((?:rgb|hsl)a?\([^)]+\ )|#[0-9a-fA-F]{8}|#[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,4}|\b\w+\b(?!-))/g;
3035 WebInspector.StylesSidebarPropertyRenderer._bezierRegex = /((cubic-bezier\([^)]+ \))|\b(linear|ease-in-out|ease-in|ease-out|ease)\b)/g; 3035 WebInspector.StylesSidebarPropertyRenderer._bezierRegex = /((cubic-bezier\([^)]+ \))|\b(linear|ease-in-out|ease-in|ease-out|ease)\b)/g;
3036 3036
3037 /** 3037 /**
3038 * @param {string} value 3038 * @param {string} value
3039 * @return {!RegExp} 3039 * @return {!RegExp}
3040 */ 3040 */
3041 WebInspector.StylesSidebarPropertyRenderer._urlRegex = function(value) 3041 WebInspector.StylesSidebarPropertyRenderer._urlRegex = function(value)
3042 { 3042 {
3043 // Heuristically choose between single-quoted, double-quoted or plain URL re gex. 3043 // Heuristically choose between single-quoted, double-quoted or plain URL re gex.
3044 if (/url\(\s*'.*\s*'\s*\)/.test(value)) 3044 if (/url\(\s*'.*\s*'\s*\)/.test(value))
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged); 3138 WebInspector.context.addFlavorChangeListener(WebInspector.DOMNode, onNodeCha nged);
3139 onNodeChanged(); 3139 onNodeChanged();
3140 return button; 3140 return button;
3141 3141
3142 function onNodeChanged() 3142 function onNodeChanged()
3143 { 3143 {
3144 var node = WebInspector.context.flavor(WebInspector.DOMNode); 3144 var node = WebInspector.context.flavor(WebInspector.DOMNode);
3145 button.setEnabled(!!node); 3145 button.setEnabled(!!node);
3146 } 3146 }
3147 } 3147 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698