| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 result.push(new WebInspector.CSSStyleRule(cssModel, matchArray[i].rule,
matchArray[i].matchingSelectors)); | 63 result.push(new WebInspector.CSSStyleRule(cssModel, matchArray[i].rule,
matchArray[i].matchingSelectors)); |
| 64 return result; | 64 return result; |
| 65 } | 65 } |
| 66 WebInspector.CSSStyleModel.Events = { | 66 WebInspector.CSSStyleModel.Events = { |
| 67 LayoutEditorChange: "LayoutEditorChange", | 67 LayoutEditorChange: "LayoutEditorChange", |
| 68 MediaQueryResultChanged: "MediaQueryResultChanged", | 68 MediaQueryResultChanged: "MediaQueryResultChanged", |
| 69 ModelWasEnabled: "ModelWasEnabled", | 69 ModelWasEnabled: "ModelWasEnabled", |
| 70 PseudoStateForced: "PseudoStateForced", | 70 PseudoStateForced: "PseudoStateForced", |
| 71 StyleSheetAdded: "StyleSheetAdded", | 71 StyleSheetAdded: "StyleSheetAdded", |
| 72 StyleSheetChanged: "StyleSheetChanged", | 72 StyleSheetChanged: "StyleSheetChanged", |
| 73 StyleSheetRemoved: "StyleSheetRemoved" | 73 StyleSheetRemoved: "StyleSheetRemoved", |
| 74 ExternalRangeEdit: "ExternalRangeEdit" |
| 74 } | 75 } |
| 75 | 76 |
| 76 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; | 77 WebInspector.CSSStyleModel.MediaTypes = ["all", "braille", "embossed", "handheld
", "print", "projection", "screen", "speech", "tty", "tv"]; |
| 77 | 78 |
| 78 WebInspector.CSSStyleModel.PseudoStateMarker = "pseudo-state-marker"; | 79 WebInspector.CSSStyleModel.PseudoStateMarker = "pseudo-state-marker"; |
| 79 | 80 |
| 80 WebInspector.CSSStyleModel.prototype = { | 81 WebInspector.CSSStyleModel.prototype = { |
| 81 /** | 82 /** |
| 82 * @return {!Promise.<!Array.<!WebInspector.CSSMedia>>} | 83 * @return {!Promise.<!Array.<!WebInspector.CSSMedia>>} |
| 83 */ | 84 */ |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 556 |
| 556 /** | 557 /** |
| 557 * @param {?Protocol.Error} error | 558 * @param {?Protocol.Error} error |
| 558 * @return {?Protocol.Error} | 559 * @return {?Protocol.Error} |
| 559 * @this {WebInspector.CSSStyleModel} | 560 * @this {WebInspector.CSSStyleModel} |
| 560 */ | 561 */ |
| 561 function callback(error) | 562 function callback(error) |
| 562 { | 563 { |
| 563 if (error) | 564 if (error) |
| 564 return error; | 565 return error; |
| 565 | |
| 566 if (majorChange) | 566 if (majorChange) |
| 567 this._domModel.markUndoableState(); | 567 this._domModel.markUndoableState(); |
| 568 this._fireStyleSheetChanged(styleSheetId); | 568 this._fireStyleSheetChanged(styleSheetId); |
| 569 return null; | 569 return null; |
| 570 } | 570 } |
| 571 }, | 571 }, |
| 572 | 572 |
| 573 _mainFrameNavigated: function() | 573 _mainFrameNavigated: function() |
| 574 { | 574 { |
| 575 this._resetStyleSheets(); | 575 this._resetStyleSheets(); |
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1963 * @this {WebInspector.CSSStyleSheetHeader} | 1963 * @this {WebInspector.CSSStyleSheetHeader} |
| 1964 */ | 1964 */ |
| 1965 function callback(error, sourceMapURL) | 1965 function callback(error, sourceMapURL) |
| 1966 { | 1966 { |
| 1967 this.sourceMapURL = sourceMapURL; | 1967 this.sourceMapURL = sourceMapURL; |
| 1968 return error || null; | 1968 return error || null; |
| 1969 } | 1969 } |
| 1970 }, | 1970 }, |
| 1971 | 1971 |
| 1972 /** | 1972 /** |
| 1973 * @param {string} newText | |
| 1974 * @param {function(?Protocol.Error)} callback | |
| 1975 */ | |
| 1976 setContent: function(newText, callback) | |
| 1977 { | |
| 1978 this._setContentPromise(newText) | |
| 1979 .catchException(null) | |
| 1980 .then(callback); | |
| 1981 }, | |
| 1982 | |
| 1983 /** | |
| 1984 * @return {boolean} | 1973 * @return {boolean} |
| 1985 */ | 1974 */ |
| 1986 isViaInspector: function() | 1975 isViaInspector: function() |
| 1987 { | 1976 { |
| 1988 return this.origin === "inspector"; | 1977 return this.origin === "inspector"; |
| 1989 } | 1978 } |
| 1990 } | 1979 } |
| 1991 | 1980 |
| 1992 /** | 1981 /** |
| 1993 * @constructor | 1982 * @constructor |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2420 * @constructor | 2409 * @constructor |
| 2421 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle | 2410 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle |
| 2422 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle | 2411 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle |
| 2423 */ | 2412 */ |
| 2424 WebInspector.CSSStyleModel.InlineStyleResult = function(inlineStyle, attributesS
tyle) | 2413 WebInspector.CSSStyleModel.InlineStyleResult = function(inlineStyle, attributesS
tyle) |
| 2425 { | 2414 { |
| 2426 this.inlineStyle = inlineStyle; | 2415 this.inlineStyle = inlineStyle; |
| 2427 this.attributesStyle = attributesStyle; | 2416 this.attributesStyle = attributesStyle; |
| 2428 } | 2417 } |
| 2429 | 2418 |
| OLD | NEW |