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

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

Issue 1310433002: Devtools: [LayoutEditor] highlight changed value in the SSP (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 4 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
« no previous file with comments | « Source/devtools/front_end/elements/module.json ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 WebInspector.CSSStyleModel.parseRuleMatchArrayPayload = function(cssModel, match Array) 57 WebInspector.CSSStyleModel.parseRuleMatchArrayPayload = function(cssModel, match Array)
58 { 58 {
59 if (!matchArray) 59 if (!matchArray)
60 return []; 60 return [];
61 61
62 var result = []; 62 var result = [];
63 for (var i = 0; i < matchArray.length; ++i) 63 for (var i = 0; i < matchArray.length; ++i)
64 result.push(WebInspector.CSSRule.parsePayload(cssModel, matchArray[i].ru le, matchArray[i].matchingSelectors)); 64 result.push(WebInspector.CSSRule.parsePayload(cssModel, matchArray[i].ru le, matchArray[i].matchingSelectors));
65 return result; 65 return result;
66 } 66 }
67
68 WebInspector.CSSStyleModel.Events = { 67 WebInspector.CSSStyleModel.Events = {
68 LayoutEditorChange: "LayoutEditorChange",
69 MediaQueryResultChanged: "MediaQueryResultChanged", 69 MediaQueryResultChanged: "MediaQueryResultChanged",
70 ModelWasEnabled: "ModelWasEnabled", 70 ModelWasEnabled: "ModelWasEnabled",
71 PseudoStateForced: "PseudoStateForced", 71 PseudoStateForced: "PseudoStateForced",
72 StyleSheetAdded: "StyleSheetAdded", 72 StyleSheetAdded: "StyleSheetAdded",
73 StyleSheetChanged: "StyleSheetChanged", 73 StyleSheetChanged: "StyleSheetChanged",
74 StyleSheetRemoved: "StyleSheetRemoved" 74 StyleSheetRemoved: "StyleSheetRemoved"
75 } 75 }
76 76
77 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"];
78 78
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 { 592 {
593 if (WebInspector.targetManager.allTargetsSuspended()) { 593 if (WebInspector.targetManager.allTargetsSuspended()) {
594 this._agent.disable(); 594 this._agent.disable();
595 this._isEnabled = false; 595 this._isEnabled = false;
596 } else { 596 } else {
597 this._resetStyleSheets(); 597 this._resetStyleSheets();
598 this._agent.enable().then(this._wasEnabled.bind(this)); 598 this._agent.enable().then(this._wasEnabled.bind(this));
599 } 599 }
600 }, 600 },
601 601
602 /**
603 * @param {!CSSAgent.StyleSheetId} id
604 * @param {!CSSAgent.SourceRange} range
605 */
606 _layoutEditorChange: function(id, range)
607 {
608 this.dispatchEventToListeners(WebInspector.CSSStyleModel.Events.LayoutEd itorChange, {id: id, range: range});
609 },
610
602 __proto__: WebInspector.SDKModel.prototype 611 __proto__: WebInspector.SDKModel.prototype
603 } 612 }
604 613
605 /** 614 /**
606 * @constructor 615 * @constructor
607 * @extends {WebInspector.SDKObject} 616 * @extends {WebInspector.SDKObject}
608 * @param {!WebInspector.CSSStyleModel} cssModel 617 * @param {!WebInspector.CSSStyleModel} cssModel
609 * @param {!CSSAgent.StyleSheetId} styleSheetId 618 * @param {!CSSAgent.StyleSheetId} styleSheetId
610 * @param {string} url 619 * @param {string} url
611 * @param {number} lineNumber 620 * @param {number} lineNumber
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 }, 1858 },
1850 1859
1851 /** 1860 /**
1852 * @override 1861 * @override
1853 * @param {!CSSAgent.StyleSheetId} id 1862 * @param {!CSSAgent.StyleSheetId} id
1854 */ 1863 */
1855 styleSheetRemoved: function(id) 1864 styleSheetRemoved: function(id)
1856 { 1865 {
1857 this._cssModel._styleSheetRemoved(id); 1866 this._cssModel._styleSheetRemoved(id);
1858 }, 1867 },
1868
1869 /**
1870 * @override
1871 * @param {!CSSAgent.StyleSheetId} id
1872 * @param {!CSSAgent.SourceRange} range
1873 */
1874 layoutEditorChange: function(id, range)
1875 {
1876 this._cssModel._layoutEditorChange(id, range);
1877 },
1859 } 1878 }
1860 1879
1861 /** 1880 /**
1862 * @constructor 1881 * @constructor
1863 * @param {!WebInspector.CSSStyleModel} cssModel 1882 * @param {!WebInspector.CSSStyleModel} cssModel
1864 */ 1883 */
1865 WebInspector.CSSStyleModel.ComputedStyleLoader = function(cssModel) 1884 WebInspector.CSSStyleModel.ComputedStyleLoader = function(cssModel)
1866 { 1885 {
1867 this._cssModel = cssModel; 1886 this._cssModel = cssModel;
1868 /** @type {!Map.<!DOMAgent.NodeId, !Promise.<?WebInspector.CSSStyleDeclarati on>>} */ 1887 /** @type {!Map.<!DOMAgent.NodeId, !Promise.<?WebInspector.CSSStyleDeclarati on>>} */
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 * @constructor 1983 * @constructor
1965 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle 1984 * @param {?WebInspector.CSSStyleDeclaration} inlineStyle
1966 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle 1985 * @param {?WebInspector.CSSStyleDeclaration} attributesStyle
1967 */ 1986 */
1968 WebInspector.CSSStyleModel.InlineStyleResult = function(inlineStyle, attributesS tyle) 1987 WebInspector.CSSStyleModel.InlineStyleResult = function(inlineStyle, attributesS tyle)
1969 { 1988 {
1970 this.inlineStyle = inlineStyle; 1989 this.inlineStyle = inlineStyle;
1971 this.attributesStyle = attributesStyle; 1990 this.attributesStyle = attributesStyle;
1972 } 1991 }
1973 1992
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/module.json ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698