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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js

Issue 1534323003: DevTools: [CSS] do not treat random css comments as disabled properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline Created 4 years, 11 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) 2010 Nikita Vasilyev. All rights reserved. 2 * Copyright (C) 2010 Nikita Vasilyev. All rights reserved.
3 * Copyright (C) 2010 Joseph Pecoraro. All rights reserved. 3 * Copyright (C) 2010 Joseph Pecoraro. All rights reserved.
4 * Copyright (C) 2010 Google Inc. All rights reserved. 4 * Copyright (C) 2010 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 var hasSupportedProperties = WebInspector.CSSMetadata.cssPropertiesMetainfo. _values.length > 0; 131 var hasSupportedProperties = WebInspector.CSSMetadata.cssPropertiesMetainfo. _values.length > 0;
132 if (!match || (hasSupportedProperties && !propertiesSet.hasOwnProperty(match [1].toLowerCase()))) 132 if (!match || (hasSupportedProperties && !propertiesSet.hasOwnProperty(match [1].toLowerCase())))
133 return name.toLowerCase(); 133 return name.toLowerCase();
134 return match[1].toLowerCase(); 134 return match[1].toLowerCase();
135 } 135 }
136 136
137 /** 137 /**
138 * @param {string} propertyName 138 * @param {string} propertyName
139 * @return {boolean} 139 * @return {boolean}
140 */ 140 */
141 WebInspector.CSSMetadata.isCSSPropertyName = function(propertyName)
142 {
143 if (propertyName.startsWith("-moz-") || propertyName.startsWith("-o-") || pr opertyName.startsWith("-webkit-") || propertyName.startsWith("-ms-"))
144 return true;
145 var hasSupportedProperties = WebInspector.CSSMetadata.cssPropertiesMetainfo. _values.length > 0;
146 return !hasSupportedProperties || WebInspector.CSSMetadata.cssPropertiesMeta infoKeySet().hasOwnProperty(propertyName);
147 }
148
149 /**
150 * @param {string} propertyName
151 * @return {boolean}
152 */
141 WebInspector.CSSMetadata.isPropertyInherited = function(propertyName) 153 WebInspector.CSSMetadata.isPropertyInherited = function(propertyName)
142 { 154 {
143 return !!(WebInspector.CSSMetadata.InheritedProperties[WebInspector.CSSMetad ata.canonicalPropertyName(propertyName)] 155 return !!(WebInspector.CSSMetadata.InheritedProperties[WebInspector.CSSMetad ata.canonicalPropertyName(propertyName)]
144 || WebInspector.CSSMetadata.NonStandardInheritedProperties[propertyN ame.toLowerCase()]); 156 || WebInspector.CSSMetadata.NonStandardInheritedProperties[propertyN ame.toLowerCase()]);
145 } 157 }
146 158
147 WebInspector.CSSMetadata._distanceProperties = [ 159 WebInspector.CSSMetadata._distanceProperties = [
148 'background-position', 'border-spacing', 'bottom', 'font-size', 'height', 'l eft', 'letter-spacing', 'max-height', 'max-width', 'min-height', 160 'background-position', 'border-spacing', 'bottom', 'font-size', 'height', 'l eft', 'letter-spacing', 'max-height', 'max-width', 'min-height',
149 'min-width', 'right', 'text-indent', 'top', 'width', 'word-spacing' 161 'min-width', 'right', 'text-indent', 'top', 'width', 'word-spacing'
150 ]; 162 ];
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 * @param {string} longhand 1073 * @param {string} longhand
1062 * @return {?Array.<string>} 1074 * @return {?Array.<string>}
1063 */ 1075 */
1064 shorthands: function(longhand) 1076 shorthands: function(longhand)
1065 { 1077 {
1066 return this._shorthands[longhand]; 1078 return this._shorthands[longhand];
1067 } 1079 }
1068 } 1080 }
1069 1081
1070 WebInspector.CSSMetadata.initializeWithSupportedProperties([]); 1082 WebInspector.CSSMetadata.initializeWithSupportedProperties([]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698