| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 /** @type {?WebInspector.DOMDocument} */ | 942 /** @type {?WebInspector.DOMDocument} */ |
| 943 this._document = null; | 943 this._document = null; |
| 944 /** @type {!Object.<number, boolean>} */ | 944 /** @type {!Object.<number, boolean>} */ |
| 945 this._attributeLoadNodeIds = {}; | 945 this._attributeLoadNodeIds = {}; |
| 946 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); | 946 target.registerDOMDispatcher(new WebInspector.DOMDispatcher(this)); |
| 947 | 947 |
| 948 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._
agent); | 948 this._defaultHighlighter = new WebInspector.DefaultDOMNodeHighlighter(this._
agent); |
| 949 this._highlighter = this._defaultHighlighter; | 949 this._highlighter = this._defaultHighlighter; |
| 950 | 950 |
| 951 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled()) | 951 if (WebInspector.experimentsSettings.disableAgentsWhenProfile.isEnabled()) |
| 952 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChan
ged, this._profilingStateChanged, this); | 952 WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.Sta
teChanged, this._profilingStateChanged, this); |
| 953 | 953 |
| 954 this._agent.enable(); | 954 this._agent.enable(); |
| 955 } | 955 } |
| 956 | 956 |
| 957 WebInspector.DOMModel.Events = { | 957 WebInspector.DOMModel.Events = { |
| 958 AttrModified: "AttrModified", | 958 AttrModified: "AttrModified", |
| 959 AttrRemoved: "AttrRemoved", | 959 AttrRemoved: "AttrRemoved", |
| 960 CharacterDataModified: "CharacterDataModified", | 960 CharacterDataModified: "CharacterDataModified", |
| 961 NodeInserted: "NodeInserted", | 961 NodeInserted: "NodeInserted", |
| 962 NodeInspected: "NodeInspected", | 962 NodeInspected: "NodeInspected", |
| 963 NodeRemoved: "NodeRemoved", | 963 NodeRemoved: "NodeRemoved", |
| 964 DocumentUpdated: "DocumentUpdated", | 964 DocumentUpdated: "DocumentUpdated", |
| 965 ChildNodeCountUpdated: "ChildNodeCountUpdated", | 965 ChildNodeCountUpdated: "ChildNodeCountUpdated", |
| 966 UndoRedoRequested: "UndoRedoRequested", | 966 UndoRedoRequested: "UndoRedoRequested", |
| 967 UndoRedoCompleted: "UndoRedoCompleted", | 967 UndoRedoCompleted: "UndoRedoCompleted", |
| 968 } | 968 } |
| 969 | 969 |
| 970 WebInspector.DOMModel.prototype = { | 970 WebInspector.DOMModel.prototype = { |
| 971 _profilingStateChanged: function() | 971 _profilingStateChanged: function() |
| 972 { | 972 { |
| 973 if (this.target().profilingLock.isAcquired()) | 973 if (WebInspector.profilingLock.isAcquired()) |
| 974 this._agent.disable(); | 974 this._agent.disable(); |
| 975 else | 975 else |
| 976 this._agent.enable(); | 976 this._agent.enable(); |
| 977 }, | 977 }, |
| 978 | 978 |
| 979 /** | 979 /** |
| 980 * @param {function(!WebInspector.DOMDocument)=} callback | 980 * @param {function(!WebInspector.DOMDocument)=} callback |
| 981 */ | 981 */ |
| 982 requestDocument: function(callback) | 982 requestDocument: function(callback) |
| 983 { | 983 { |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1959 * @param {boolean} inspectUAShadowDOM | 1959 * @param {boolean} inspectUAShadowDOM |
| 1960 * @param {!DOMAgent.HighlightConfig} config | 1960 * @param {!DOMAgent.HighlightConfig} config |
| 1961 * @param {function(?Protocol.Error)=} callback | 1961 * @param {function(?Protocol.Error)=} callback |
| 1962 */ | 1962 */ |
| 1963 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) | 1963 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac
k) |
| 1964 { | 1964 { |
| 1965 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); | 1965 WebInspector.overridesSupport.setTouchEmulationSuspended(enabled); |
| 1966 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); | 1966 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c
allback); |
| 1967 } | 1967 } |
| 1968 } | 1968 } |
| OLD | NEW |