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 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 /** | 2086 /** |
2087 * @constructor | 2087 * @constructor |
2088 * @extends {WebInspector.SDKObject} | 2088 * @extends {WebInspector.SDKObject} |
2089 * @param {!WebInspector.Target} target | 2089 * @param {!WebInspector.Target} target |
2090 * @param {!DOMAgent.EventListener} payload | 2090 * @param {!DOMAgent.EventListener} payload |
2091 */ | 2091 */ |
2092 WebInspector.DOMModel.EventListener = function(target, payload) | 2092 WebInspector.DOMModel.EventListener = function(target, payload) |
2093 { | 2093 { |
2094 WebInspector.SDKObject.call(this, target); | 2094 WebInspector.SDKObject.call(this, target); |
2095 this._payload = payload; | 2095 this._payload = payload; |
2096 var sourceName = this._payload.sourceName; | 2096 var script = target.debuggerModel.scriptForId(payload.location.scriptId); |
2097 if (!sourceName) { | 2097 var sourceName = script ? script.contentURL() : ""; |
2098 var script = target.debuggerModel.scriptForId(payload.location.scriptId)
; | |
2099 sourceName = script ? script.contentURL() : ""; | |
2100 } | |
2101 this._sourceName = sourceName; | 2098 this._sourceName = sourceName; |
2102 } | 2099 } |
2103 | 2100 |
2104 WebInspector.DOMModel.EventListener.prototype = { | 2101 WebInspector.DOMModel.EventListener.prototype = { |
2105 /** | 2102 /** |
2106 * @return {!DOMAgent.EventListener} | 2103 * @return {!DOMAgent.EventListener} |
2107 */ | 2104 */ |
2108 payload: function() | 2105 payload: function() |
2109 { | 2106 { |
2110 return this._payload; | 2107 return this._payload; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 | 2210 |
2214 /** | 2211 /** |
2215 * @override | 2212 * @override |
2216 * @param {!PageAgent.FrameId} frameId | 2213 * @param {!PageAgent.FrameId} frameId |
2217 */ | 2214 */ |
2218 highlightFrame: function(frameId) | 2215 highlightFrame: function(frameId) |
2219 { | 2216 { |
2220 this._agent.highlightFrame(frameId, WebInspector.Color.PageHighlight.Con
tent.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtoco
lRGBA()); | 2217 this._agent.highlightFrame(frameId, WebInspector.Color.PageHighlight.Con
tent.toProtocolRGBA(), WebInspector.Color.PageHighlight.ContentOutline.toProtoco
lRGBA()); |
2221 } | 2218 } |
2222 } | 2219 } |
OLD | NEW |