OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) IBM Corp. 2009 All rights reserved. | 2 * Copyright (C) IBM Corp. 2009 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 }, | 333 }, |
334 | 334 |
335 /** | 335 /** |
336 * @param {?WebInspector.RemoteObject} result | 336 * @param {?WebInspector.RemoteObject} result |
337 * @param {boolean} wasThrown | 337 * @param {boolean} wasThrown |
338 */ | 338 */ |
339 _createWatchExpression: function(result, wasThrown) | 339 _createWatchExpression: function(result, wasThrown) |
340 { | 340 { |
341 this._result = result; | 341 this._result = result; |
342 | 342 |
343 var headerElement= createElementWithClass("div", "watch-expression-heade
r"); | 343 var headerElement = createElementWithClass("div", "watch-expression-head
er"); |
344 var deleteButton = headerElement.createChild("button", "watch-expression
-delete-button"); | 344 var deleteButton = headerElement.createChild("button", "watch-expression
-delete-button"); |
345 deleteButton.title = WebInspector.UIString("Delete watch expression"); | 345 deleteButton.title = WebInspector.UIString("Delete watch expression"); |
346 deleteButton.addEventListener("click", this._deleteWatchExpression.bind(
this), false); | 346 deleteButton.addEventListener("click", this._deleteWatchExpression.bind(
this), false); |
347 | 347 |
348 var titleElement = headerElement.createChild("div", "watch-expression-ti
tle"); | 348 var titleElement = headerElement.createChild("div", "watch-expression-ti
tle"); |
349 this._nameElement = WebInspector.ObjectPropertiesSection.createNameEleme
nt(this._expression); | 349 this._nameElement = WebInspector.ObjectPropertiesSection.createNameEleme
nt(this._expression); |
350 if (wasThrown || !result) { | 350 if (wasThrown || !result) { |
351 this._valueElement = createElementWithClass("span", "error-message v
alue"); | 351 this._valueElement = createElementWithClass("span", "error-message v
alue"); |
352 titleElement.classList.add("dimmed"); | 352 titleElement.classList.add("dimmed"); |
353 this._valueElement.textContent = WebInspector.UIString("<not availab
le>"); | 353 this._valueElement.textContent = WebInspector.UIString("<not availab
le>"); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 contextMenu.appendApplicableItems(this._result); | 431 contextMenu.appendApplicableItems(this._result); |
432 }, | 432 }, |
433 | 433 |
434 _copyValueButtonClicked: function() | 434 _copyValueButtonClicked: function() |
435 { | 435 { |
436 InspectorFrontendHost.copyText(this._valueElement.textContent); | 436 InspectorFrontendHost.copyText(this._valueElement.textContent); |
437 }, | 437 }, |
438 | 438 |
439 __proto__: WebInspector.Object.prototype | 439 __proto__: WebInspector.Object.prototype |
440 } | 440 } |
OLD | NEW |