OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) IBM Corp. 2009 All rights reserved. | 3 * Copyright (C) IBM Corp. 2009 All rights reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 else | 395 else |
396 statusCodeImage.classList.add("red-ball"); | 396 statusCodeImage.classList.add("red-ball"); |
397 | 397 |
398 requestMethodElement.title = this._formatHeader(WebInspector.UIStrin
g("Request Method"), this._request.requestMethod); | 398 requestMethodElement.title = this._formatHeader(WebInspector.UIStrin
g("Request Method"), this._request.requestMethod); |
399 | 399 |
400 var statusTextElement = statusCodeFragment.createChild("div", "heade
r-value source-code"); | 400 var statusTextElement = statusCodeFragment.createChild("div", "heade
r-value source-code"); |
401 var statusText = this._request.statusCode + " " + this._request.stat
usText; | 401 var statusText = this._request.statusCode + " " + this._request.stat
usText; |
402 if (this._request.fetchedViaServiceWorker) { | 402 if (this._request.fetchedViaServiceWorker) { |
403 statusText += " " + WebInspector.UIString("(from ServiceWorker)"
); | 403 statusText += " " + WebInspector.UIString("(from ServiceWorker)"
); |
404 statusTextElement.classList.add("status-from-cache"); | 404 statusTextElement.classList.add("status-from-cache"); |
405 } else if (this._request.cached) { | 405 } else if (this._request.cached()) { |
406 statusText += " " + WebInspector.UIString("(from cache)"); | 406 statusText += " " + WebInspector.UIString("(from cache)"); |
407 statusTextElement.classList.add("status-from-cache"); | 407 statusTextElement.classList.add("status-from-cache"); |
408 } | 408 } |
409 statusTextElement.textContent = statusText; | 409 statusTextElement.textContent = statusText; |
410 | 410 |
411 statusCodeElement.title = statusCodeFragment; | 411 statusCodeElement.title = statusCodeFragment; |
412 } | 412 } |
413 }, | 413 }, |
414 | 414 |
415 /** | 415 /** |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 * @return {!Element} | 513 * @return {!Element} |
514 */ | 514 */ |
515 _createHeadersToggleButton: function(isHeadersTextShown) | 515 _createHeadersToggleButton: function(isHeadersTextShown) |
516 { | 516 { |
517 var toggleTitle = isHeadersTextShown ? WebInspector.UIString("view parse
d") : WebInspector.UIString("view source"); | 517 var toggleTitle = isHeadersTextShown ? WebInspector.UIString("view parse
d") : WebInspector.UIString("view source"); |
518 return this._createToggleButton(toggleTitle); | 518 return this._createToggleButton(toggleTitle); |
519 }, | 519 }, |
520 | 520 |
521 __proto__: WebInspector.VBox.prototype | 521 __proto__: WebInspector.VBox.prototype |
522 } | 522 } |
OLD | NEW |