| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 MediaQueryResultChanged: "MediaQueryResultChanged", | 77 MediaQueryResultChanged: "MediaQueryResultChanged", |
| 78 } | 78 } |
| 79 | 79 |
| 80 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; | 80 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; |
| 81 | 81 |
| 82 WebInspector.CSSStyleModel.prototype = { | 82 WebInspector.CSSStyleModel.prototype = { |
| 83 suspendModel: function() | 83 suspendModel: function() |
| 84 { | 84 { |
| 85 this._agent.disable(); | 85 this._agent.disable(); |
| 86 this._isEnabled = false; | 86 this._isEnabled = false; |
| 87 this._resetStyleSheets(); | |
| 88 }, | 87 }, |
| 89 | 88 |
| 90 resumeModel: function() | 89 resumeModel: function() |
| 91 { | 90 { |
| 91 this._resetStyleSheets(); |
| 92 this._agent.enable(this._wasEnabled.bind(this)); | 92 this._agent.enable(this._wasEnabled.bind(this)); |
| 93 }, | 93 }, |
| 94 | 94 |
| 95 /** | 95 /** |
| 96 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback | 96 * @param {function(!Array.<!WebInspector.CSSMedia>)} userCallback |
| 97 */ | 97 */ |
| 98 getMediaQueries: function(userCallback) | 98 getMediaQueries: function(userCallback) |
| 99 { | 99 { |
| 100 /** | 100 /** |
| 101 * @param {?Protocol.Error} error | 101 * @param {?Protocol.Error} error |
| (...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1820 // The loader has been reset. | 1820 // The loader has been reset. |
| 1821 if (!callbacks) | 1821 if (!callbacks) |
| 1822 return; | 1822 return; |
| 1823 | 1823 |
| 1824 delete this._nodeIdToCallbackData[nodeId]; | 1824 delete this._nodeIdToCallbackData[nodeId]; |
| 1825 for (var i = 0; i < callbacks.length; ++i) | 1825 for (var i = 0; i < callbacks.length; ++i) |
| 1826 callbacks[i](computedStyle); | 1826 callbacks[i](computedStyle); |
| 1827 } | 1827 } |
| 1828 } | 1828 } |
| 1829 } | 1829 } |
| OLD | NEW |