OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 | 724 |
725 /** | 725 /** |
726 * @constructor | 726 * @constructor |
727 * @param {!WebInspector.CSSStyleModel} cssModel | 727 * @param {!WebInspector.CSSStyleModel} cssModel |
728 * @param {!CSSAgent.CSSStyle} payload | 728 * @param {!CSSAgent.CSSStyle} payload |
729 */ | 729 */ |
730 WebInspector.CSSStyleDeclaration = function(cssModel, payload) | 730 WebInspector.CSSStyleDeclaration = function(cssModel, payload) |
731 { | 731 { |
732 this._cssModel = cssModel; | 732 this._cssModel = cssModel; |
733 this.styleSheetId = payload.styleSheetId; | 733 this.styleSheetId = payload.styleSheetId; |
734 this.width = payload.width; | |
735 this.height = payload.height; | |
736 this.range = payload.range ? WebInspector.TextRange.fromObject(payload.range
) : null; | 734 this.range = payload.range ? WebInspector.TextRange.fromObject(payload.range
) : null; |
737 this._shorthandValues = WebInspector.CSSStyleDeclaration.buildShorthandValue
Map(payload.shorthandEntries); | 735 this._shorthandValues = WebInspector.CSSStyleDeclaration.buildShorthandValue
Map(payload.shorthandEntries); |
738 this._livePropertyMap = {}; // LIVE properties (source-based or style-based)
: { name -> CSSProperty } | 736 this._livePropertyMap = {}; // LIVE properties (source-based or style-based)
: { name -> CSSProperty } |
739 this._allProperties = []; // ALL properties: [ CSSProperty ] | 737 this._allProperties = []; // ALL properties: [ CSSProperty ] |
740 this.__disabledProperties = {}; // DISABLED properties: { index -> CSSProper
ty } | 738 this.__disabledProperties = {}; // DISABLED properties: { index -> CSSProper
ty } |
741 var payloadPropertyCount = payload.cssProperties.length; | 739 var payloadPropertyCount = payload.cssProperties.length; |
742 | 740 |
743 | 741 |
744 for (var i = 0; i < payloadPropertyCount; ++i) { | 742 for (var i = 0; i < payloadPropertyCount; ++i) { |
745 var property = WebInspector.CSSProperty.parsePayload(this, i, payload.cs
sProperties[i]); | 743 var property = WebInspector.CSSProperty.parsePayload(this, i, payload.cs
sProperties[i]); |
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 for (var i = 0; i < callbacks.length; ++i) | 1715 for (var i = 0; i < callbacks.length; ++i) |
1718 callbacks[i](computedStyle); | 1716 callbacks[i](computedStyle); |
1719 } | 1717 } |
1720 } | 1718 } |
1721 } | 1719 } |
1722 | 1720 |
1723 /** | 1721 /** |
1724 * @type {!WebInspector.CSSStyleModel} | 1722 * @type {!WebInspector.CSSStyleModel} |
1725 */ | 1723 */ |
1726 WebInspector.cssModel; | 1724 WebInspector.cssModel; |
OLD | NEW |