Chromium Code Reviews| 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 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2300 | 2300 |
| 2301 scrollerElement = colorSwatch.element.enclosingNodeOrSelfWithCla ss("scroll-target"); | 2301 scrollerElement = colorSwatch.element.enclosingNodeOrSelfWithCla ss("scroll-target"); |
| 2302 if (scrollerElement) | 2302 if (scrollerElement) |
| 2303 scrollerElement.addEventListener("scroll", repositionSpectru m, false); | 2303 scrollerElement.addEventListener("scroll", repositionSpectru m, false); |
| 2304 else | 2304 else |
| 2305 console.error("Unable to handle color picker scrolling"); | 2305 console.error("Unable to handle color picker scrolling"); |
| 2306 } | 2306 } |
| 2307 } | 2307 } |
| 2308 | 2308 |
| 2309 var colorValueElement = document.createElement("span"); | 2309 var colorValueElement = document.createElement("span"); |
| 2310 colorValueElement.textContent = color.toString(format); | 2310 if (format === WebInspector.Color.Format.Original) { |
|
vivekg
2014/07/08 11:03:36
This change is done to reflect the actual entered
| |
| 2311 colorValueElement.textContent = text; | |
| 2312 } else { | |
| 2313 colorValueElement.textContent = color.toString(format); | |
| 2314 } | |
| 2311 | 2315 |
| 2312 /** | 2316 /** |
| 2313 * @param {string} curFormat | 2317 * @param {string} curFormat |
| 2314 */ | 2318 */ |
| 2315 function nextFormat(curFormat) | 2319 function nextFormat(curFormat) |
| 2316 { | 2320 { |
| 2317 // The format loop is as follows: | 2321 // The format loop is as follows: |
| 2318 // * original | 2322 // * original |
| 2319 // * rgb(a) | 2323 // * rgb(a) |
| 2320 // * hsl(a) | 2324 // * hsl(a) |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3332 return; | 3336 return; |
| 3333 } | 3337 } |
| 3334 | 3338 |
| 3335 var results = this._cssCompletions.startsWith(prefix); | 3339 var results = this._cssCompletions.startsWith(prefix); |
| 3336 var selectedIndex = this._cssCompletions.mostUsedOf(results); | 3340 var selectedIndex = this._cssCompletions.mostUsedOf(results); |
| 3337 completionsReadyCallback(results, selectedIndex); | 3341 completionsReadyCallback(results, selectedIndex); |
| 3338 }, | 3342 }, |
| 3339 | 3343 |
| 3340 __proto__: WebInspector.TextPrompt.prototype | 3344 __proto__: WebInspector.TextPrompt.prototype |
| 3341 } | 3345 } |
| OLD | NEW |