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

Unified Diff: Source/devtools/front_end/sdk/CSSMetadata.js

Issue 376803002: [DevTools] Color values should be case insensitive while suggestions should be case aware (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | Source/devtools/front_end/ui/TextPrompt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/CSSMetadata.js
diff --git a/Source/devtools/front_end/sdk/CSSMetadata.js b/Source/devtools/front_end/sdk/CSSMetadata.js
index 23b008648dab16fe8442cda6f11195a1509fa3bc..0775cab4fdbd631378e7d53cf174acc44bf68a55 100644
--- a/Source/devtools/front_end/sdk/CSSMetadata.js
+++ b/Source/devtools/front_end/sdk/CSSMetadata.js
@@ -76,7 +76,7 @@ WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadata([]
*/
WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName)
{
- return WebInspector.CSSMetadata._colorAwareProperties[propertyName] === true;
+ return !!WebInspector.CSSMetadata._colorAwareProperties[propertyName.toLowerCase()];
}
/**
@@ -729,7 +729,7 @@ WebInspector.CSSMetadata.keywordsForProperty = function(propertyName)
var descriptor = WebInspector.CSSMetadata.descriptor(propertyName);
if (descriptor && descriptor.values)
acceptedKeywords.push.apply(acceptedKeywords, descriptor.values);
- if (propertyName in WebInspector.CSSMetadata._colorAwareProperties)
+ if (WebInspector.CSSMetadata.isColorAwareProperty(propertyName))
acceptedKeywords.push.apply(acceptedKeywords, WebInspector.CSSMetadata._colors);
return new WebInspector.CSSMetadata(acceptedKeywords);
}
@@ -743,6 +743,7 @@ WebInspector.CSSMetadata.descriptor = function(propertyName)
if (!propertyName)
return null;
var unprefixedName = propertyName.replace(/^-webkit-/, "");
+ propertyName = propertyName.toLowerCase();
var entry = WebInspector.CSSMetadata._propertyDataMap[propertyName];
if (!entry && unprefixedName !== propertyName)
entry = WebInspector.CSSMetadata._propertyDataMap[unprefixedName];
« no previous file with comments | « Source/devtools/front_end/elements/StylesSidebarPane.js ('k') | Source/devtools/front_end/ui/TextPrompt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698