Chromium Code Reviews| 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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1740 /** | 1740 /** |
| 1741 * @param {!PageAgent.FrameId} frameId | 1741 * @param {!PageAgent.FrameId} frameId |
| 1742 */ | 1742 */ |
| 1743 highlightFrame: function(frameId) | 1743 highlightFrame: function(frameId) |
| 1744 { | 1744 { |
| 1745 this._highlighter.highlightFrame(frameId); | 1745 this._highlighter.highlightFrame(frameId); |
| 1746 }, | 1746 }, |
| 1747 | 1747 |
| 1748 /** | 1748 /** |
| 1749 * @param {boolean} enabled | 1749 * @param {boolean} enabled |
| 1750 * @param {boolean} inspectUAShadowDOM | 1750 * @param {?string} mode |
| 1751 * @param {function(?Protocol.Error)=} callback | 1751 * @param {function(?Protocol.Error)=} callback |
| 1752 */ | 1752 */ |
| 1753 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, callback) | 1753 setInspectModeEnabled: function(enabled, mode, callback) |
| 1754 { | 1754 { |
| 1755 /** | 1755 /** |
| 1756 * @this {WebInspector.DOMModel} | 1756 * @this {WebInspector.DOMModel} |
| 1757 */ | 1757 */ |
| 1758 function onDocumentAvailable() | 1758 function onDocumentAvailable() |
| 1759 { | 1759 { |
| 1760 this.dispatchEventToListeners(WebInspector.DOMModel.Events.InspectMo deWillBeToggled, enabled); | 1760 this.dispatchEventToListeners(WebInspector.DOMModel.Events.InspectMo deWillBeToggled, enabled); |
| 1761 this._highlighter.setInspectModeEnabled(enabled, inspectUAShadowDOM, this._buildHighlightConfig(), callback); | 1761 this._highlighter.setInspectModeEnabled(enabled, mode, this._buildHi ghlightConfig(), callback); |
| 1762 } | 1762 } |
| 1763 this.requestDocument(onDocumentAvailable.bind(this)); | 1763 this.requestDocument(onDocumentAvailable.bind(this)); |
| 1764 }, | 1764 }, |
| 1765 | 1765 |
| 1766 /** | 1766 /** |
| 1767 * @param {boolean} showRulers | 1767 * @param {boolean} showRulers |
| 1768 * @param {boolean} showExtensionLines | 1768 * @param {boolean} showExtensionLines |
| 1769 */ | 1769 */ |
| 1770 setHighlightSettings: function(showRulers, showExtensionLines) | 1770 setHighlightSettings: function(showRulers, showExtensionLines) |
| 1771 { | 1771 { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2095 /** | 2095 /** |
| 2096 * @param {?WebInspector.DOMNode} node | 2096 * @param {?WebInspector.DOMNode} node |
| 2097 * @param {!DOMAgent.HighlightConfig} config | 2097 * @param {!DOMAgent.HighlightConfig} config |
| 2098 * @param {!DOMAgent.BackendNodeId=} backendNodeId | 2098 * @param {!DOMAgent.BackendNodeId=} backendNodeId |
| 2099 * @param {!RuntimeAgent.RemoteObjectId=} objectId | 2099 * @param {!RuntimeAgent.RemoteObjectId=} objectId |
| 2100 */ | 2100 */ |
| 2101 highlightDOMNode: function(node, config, backendNodeId, objectId) {}, | 2101 highlightDOMNode: function(node, config, backendNodeId, objectId) {}, |
| 2102 | 2102 |
| 2103 /** | 2103 /** |
| 2104 * @param {boolean} enabled | 2104 * @param {boolean} enabled |
| 2105 * @param {boolean} inspectUAShadowDOM | 2105 * @param {?string} mode |
| 2106 * @param {!DOMAgent.HighlightConfig} config | 2106 * @param {!DOMAgent.HighlightConfig} config |
| 2107 * @param {function(?Protocol.Error)=} callback | 2107 * @param {function(?Protocol.Error)=} callback |
| 2108 */ | 2108 */ |
| 2109 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac k) {}, | 2109 setInspectModeEnabled: function(enabled, mode, config, callback) {}, |
| 2110 | 2110 |
| 2111 /** | 2111 /** |
| 2112 * @param {!PageAgent.FrameId} frameId | 2112 * @param {!PageAgent.FrameId} frameId |
| 2113 */ | 2113 */ |
| 2114 highlightFrame: function(frameId) {} | 2114 highlightFrame: function(frameId) {} |
| 2115 } | 2115 } |
| 2116 | 2116 |
| 2117 /** | 2117 /** |
| 2118 * @constructor | 2118 * @constructor |
| 2119 * @implements {WebInspector.DOMNodeHighlighter} | 2119 * @implements {WebInspector.DOMNodeHighlighter} |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 2136 { | 2136 { |
| 2137 if (objectId || node || backendNodeId) | 2137 if (objectId || node || backendNodeId) |
| 2138 this._agent.highlightNode(config, (objectId || backendNodeId) ? unde fined : node.id, backendNodeId, objectId); | 2138 this._agent.highlightNode(config, (objectId || backendNodeId) ? unde fined : node.id, backendNodeId, objectId); |
| 2139 else | 2139 else |
| 2140 this._agent.hideHighlight(); | 2140 this._agent.hideHighlight(); |
| 2141 }, | 2141 }, |
| 2142 | 2142 |
| 2143 /** | 2143 /** |
| 2144 * @override | 2144 * @override |
| 2145 * @param {boolean} enabled | 2145 * @param {boolean} enabled |
| 2146 * @param {boolean} inspectUAShadowDOM | 2146 * @param {?string} mode |
|
dgozman
2015/08/28 23:44:11
string|undefined
sergeyv
2015/09/02 00:40:58
Not actual anymore
| |
| 2147 * @param {!DOMAgent.HighlightConfig} config | 2147 * @param {!DOMAgent.HighlightConfig} config |
| 2148 * @param {function(?Protocol.Error)=} callback | 2148 * @param {function(?Protocol.Error)=} callback |
| 2149 */ | 2149 */ |
| 2150 setInspectModeEnabled: function(enabled, inspectUAShadowDOM, config, callbac k) | 2150 setInspectModeEnabled: function(enabled, mode, config, callback) |
| 2151 { | 2151 { |
| 2152 this._agent.setInspectModeEnabled(enabled, inspectUAShadowDOM, config, c allback); | 2152 this._agent.setInspectModeEnabled(enabled, mode || undefined, config, ca llback); |
| 2153 }, | 2153 }, |
| 2154 | 2154 |
| 2155 /** | 2155 /** |
| 2156 * @override | 2156 * @override |
| 2157 * @param {!PageAgent.FrameId} frameId | 2157 * @param {!PageAgent.FrameId} frameId |
| 2158 */ | 2158 */ |
| 2159 highlightFrame: function(frameId) | 2159 highlightFrame: function(frameId) |
| 2160 { | 2160 { |
| 2161 this._agent.highlightFrame(frameId, WebInspector.Color.PageHighlight.Con tent.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtoco lRGBA()); | 2161 this._agent.highlightFrame(frameId, WebInspector.Color.PageHighlight.Con tent.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtoco lRGBA()); |
| 2162 } | 2162 } |
| 2163 } | 2163 } |
| 2164 | 2164 |
| 2165 /** | 2165 /** |
| 2166 * @param {!WebInspector.Target} target | 2166 * @param {!WebInspector.Target} target |
| 2167 * @return {?WebInspector.DOMModel} | 2167 * @return {?WebInspector.DOMModel} |
| 2168 */ | 2168 */ |
| 2169 WebInspector.DOMModel.fromTarget = function(target) | 2169 WebInspector.DOMModel.fromTarget = function(target) |
| 2170 { | 2170 { |
| 2171 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); | 2171 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); |
| 2172 } | 2172 } |
| OLD | NEW |