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 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1728 highlightConfig.showInfo = config.showInfo; | 1728 highlightConfig.showInfo = config.showInfo; |
| 1729 this._highlighter.highlightDOMNode(this.nodeForId(nodeId || 0), highligh tConfig, backendNodeId, objectId); | 1729 this._highlighter.highlightDOMNode(this.nodeForId(nodeId || 0), highligh tConfig, backendNodeId, objectId); |
| 1730 }, | 1730 }, |
| 1731 | 1731 |
| 1732 /** | 1732 /** |
| 1733 * @param {!DOMAgent.NodeId} nodeId | 1733 * @param {!DOMAgent.NodeId} nodeId |
| 1734 */ | 1734 */ |
| 1735 highlightDOMNodeForTwoSeconds: function(nodeId) | 1735 highlightDOMNodeForTwoSeconds: function(nodeId) |
| 1736 { | 1736 { |
| 1737 this.highlightDOMNode(nodeId); | 1737 this.highlightDOMNode(nodeId); |
| 1738 this._hideDOMNodeHighlightTimeout = setTimeout(WebInspector.DOMModel.hid eDOMNodeHighlight.bind(WebInspector.DOMModel), 2000); | 1738 |
| 1739 if (!Runtime.experiments.isEnabled("wysiwygLayoutEditor")) | |
|
dgozman
2015/06/23 17:13:56
wysiwyg
sergeyv
2015/06/23 17:21:13
Done.
| |
| 1740 this._hideDOMNodeHighlightTimeout = setTimeout(WebInspector.DOMModel .hideDOMNodeHighlight.bind(WebInspector.DOMModel), 2000); | |
| 1739 }, | 1741 }, |
| 1740 | 1742 |
| 1741 /** | 1743 /** |
| 1742 * @param {!PageAgent.FrameId} frameId | 1744 * @param {!PageAgent.FrameId} frameId |
| 1743 */ | 1745 */ |
| 1744 highlightFrame: function(frameId) | 1746 highlightFrame: function(frameId) |
| 1745 { | 1747 { |
| 1746 this._highlighter.highlightFrame(frameId); | 1748 this._highlighter.highlightFrame(frameId); |
| 1747 }, | 1749 }, |
| 1748 | 1750 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1791 if (mode === "all" || mode === "border") | 1793 if (mode === "all" || mode === "border") |
| 1792 highlightConfig.borderColor = WebInspector.Color.PageHighlight.Borde r.toProtocolRGBA(); | 1794 highlightConfig.borderColor = WebInspector.Color.PageHighlight.Borde r.toProtocolRGBA(); |
| 1793 | 1795 |
| 1794 if (mode === "all" || mode === "margin") | 1796 if (mode === "all" || mode === "margin") |
| 1795 highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margi n.toProtocolRGBA(); | 1797 highlightConfig.marginColor = WebInspector.Color.PageHighlight.Margi n.toProtocolRGBA(); |
| 1796 | 1798 |
| 1797 if (mode === "all") { | 1799 if (mode === "all") { |
| 1798 highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight. EventTarget.toProtocolRGBA(); | 1800 highlightConfig.eventTargetColor = WebInspector.Color.PageHighlight. EventTarget.toProtocolRGBA(); |
| 1799 highlightConfig.shapeColor = WebInspector.Color.PageHighlight.Shape. toProtocolRGBA(); | 1801 highlightConfig.shapeColor = WebInspector.Color.PageHighlight.Shape. toProtocolRGBA(); |
| 1800 highlightConfig.shapeMarginColor = WebInspector.Color.PageHighlight. ShapeMargin.toProtocolRGBA(); | 1802 highlightConfig.shapeMarginColor = WebInspector.Color.PageHighlight. ShapeMargin.toProtocolRGBA(); |
| 1803 highlightConfig.showLayoutEditor = Runtime.experiments.isEnabled("la youtEditor"); | |
| 1801 } | 1804 } |
| 1802 return highlightConfig; | 1805 return highlightConfig; |
| 1803 }, | 1806 }, |
| 1804 | 1807 |
| 1805 /** | 1808 /** |
| 1806 * @param {!WebInspector.DOMNode} node | 1809 * @param {!WebInspector.DOMNode} node |
| 1807 * @param {function(?Protocol.Error, ...)=} callback | 1810 * @param {function(?Protocol.Error, ...)=} callback |
| 1808 * @return {function(...)} | 1811 * @return {function(...)} |
| 1809 * @template T | 1812 * @template T |
| 1810 */ | 1813 */ |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2163 } | 2166 } |
| 2164 | 2167 |
| 2165 /** | 2168 /** |
| 2166 * @param {!WebInspector.Target} target | 2169 * @param {!WebInspector.Target} target |
| 2167 * @return {?WebInspector.DOMModel} | 2170 * @return {?WebInspector.DOMModel} |
| 2168 */ | 2171 */ |
| 2169 WebInspector.DOMModel.fromTarget = function(target) | 2172 WebInspector.DOMModel.fromTarget = function(target) |
| 2170 { | 2173 { |
| 2171 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); | 2174 return /** @type {?WebInspector.DOMModel} */ (target.model(WebInspector.DOMM odel)); |
| 2172 } | 2175 } |
| OLD | NEW |