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

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

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 } 64 }
65 this._values.sort(); 65 this._values.sort();
66 } 66 }
67 67
68 /** 68 /**
69 * @type {!WebInspector.CSSMetadata} 69 * @type {!WebInspector.CSSMetadata}
70 */ 70 */
71 WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadata([] ); 71 WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadata([] );
72 72
73 /**
74 * @param {string} propertyName
75 * @return {boolean}
76 */
73 WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName) 77 WebInspector.CSSMetadata.isColorAwareProperty = function(propertyName)
74 { 78 {
75 return WebInspector.CSSMetadata._colorAwareProperties[propertyName] === true ; 79 return WebInspector.CSSMetadata._colorAwareProperties[propertyName] === true ;
76 } 80 }
77 81
82 /**
83 * @return {!Object.<string, boolean>}
84 */
78 WebInspector.CSSMetadata.colors = function() 85 WebInspector.CSSMetadata.colors = function()
79 { 86 {
80 if (!WebInspector.CSSMetadata._colorsKeySet) 87 if (!WebInspector.CSSMetadata._colorsKeySet)
81 WebInspector.CSSMetadata._colorsKeySet = WebInspector.CSSMetadata._color s.keySet(); 88 WebInspector.CSSMetadata._colorsKeySet = WebInspector.CSSMetadata._color s.keySet();
82 return WebInspector.CSSMetadata._colorsKeySet; 89 return WebInspector.CSSMetadata._colorsKeySet;
83 } 90 }
84 91
85 // Taken from http://www.w3.org/TR/CSS21/propidx.html. 92 // Taken from http://www.w3.org/TR/CSS21/propidx.html.
86 WebInspector.CSSMetadata.InheritedProperties = [ 93 WebInspector.CSSMetadata.InheritedProperties = [
87 "azimuth", "border-collapse", "border-spacing", "caption-side", "color", "cu rsor", "direction", "elevation", 94 "azimuth", "border-collapse", "border-spacing", "caption-side", "color", "cu rsor", "direction", "elevation",
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 if (!entry && unprefixedName !== propertyName) 729 if (!entry && unprefixedName !== propertyName)
723 entry = WebInspector.CSSMetadata._propertyDataMap[unprefixedName]; 730 entry = WebInspector.CSSMetadata._propertyDataMap[unprefixedName];
724 return entry || null; 731 return entry || null;
725 } 732 }
726 733
727 WebInspector.CSSMetadata.initializeWithSupportedProperties = function(properties ) 734 WebInspector.CSSMetadata.initializeWithSupportedProperties = function(properties )
728 { 735 {
729 WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadat a(properties); 736 WebInspector.CSSMetadata.cssPropertiesMetainfo = new WebInspector.CSSMetadat a(properties);
730 } 737 }
731 738
739 /**
740 * @return {!Object.<string, boolean>}
741 */
732 WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet = function() 742 WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet = function()
733 { 743 {
734 if (!WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet) 744 if (!WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet)
735 WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet = WebInspector.CSS Metadata.cssPropertiesMetainfo.keySet(); 745 WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet = WebInspector.CSS Metadata.cssPropertiesMetainfo.keySet();
736 return WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet; 746 return WebInspector.CSSMetadata._cssPropertiesMetainfoKeySet;
737 } 747 }
738 748
739 // Weight of CSS properties based on their usage on a few popular websites: http s://gist.github.com/3751436 749 // Weight of CSS properties based on their usage on a few popular websites: http s://gist.github.com/3751436
740 WebInspector.CSSMetadata.Weight = { 750 WebInspector.CSSMetadata.Weight = {
741 "-webkit-animation": 1, 751 "-webkit-animation": 1,
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 * @param {string} longhand 1004 * @param {string} longhand
995 * @return {?Array.<string>} 1005 * @return {?Array.<string>}
996 */ 1006 */
997 shorthands: function(longhand) 1007 shorthands: function(longhand)
998 { 1008 {
999 return this._shorthands[longhand]; 1009 return this._shorthands[longhand];
1000 } 1010 }
1001 } 1011 }
1002 1012
1003 WebInspector.CSSMetadata.initializeWithSupportedProperties([]); 1013 WebInspector.CSSMetadata.initializeWithSupportedProperties([]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698