| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2011 Google Inc. All Rights Reserved. |
| 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 | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 styleElement.type = "text/css"; | 351 styleElement.type = "text/css"; |
| 352 styleElement.textContent = xhr.responseText + this._buildSourceURL(c
ssFile); | 352 styleElement.textContent = xhr.responseText + this._buildSourceURL(c
ssFile); |
| 353 } | 353 } |
| 354 document.head.insertBefore(styleElement, document.head.firstChild); | 354 document.head.insertBefore(styleElement, document.head.firstChild); |
| 355 | 355 |
| 356 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement; | 356 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement; |
| 357 }, | 357 }, |
| 358 | 358 |
| 359 _buildSourceURL: function(cssFile) | 359 _buildSourceURL: function(cssFile) |
| 360 { | 360 { |
| 361 return "\n/*@ sourceURL=" + WebInspector.ParsedURL.completeURL(window.lo
cation.href, cssFile) + " */"; | 361 return "\n/*# sourceURL=" + WebInspector.ParsedURL.completeURL(window.lo
cation.href, cssFile) + " */"; |
| 362 }, | 362 }, |
| 363 | 363 |
| 364 _disableCSSIfNeeded: function() | 364 _disableCSSIfNeeded: function() |
| 365 { | 365 { |
| 366 var scheduleUnload = !!WebInspector.View._cssUnloadTimer; | 366 var scheduleUnload = !!WebInspector.View._cssUnloadTimer; |
| 367 | 367 |
| 368 for (var i = 0; i < this._cssFiles.length; ++i) { | 368 for (var i = 0; i < this._cssFiles.length; ++i) { |
| 369 var cssFile = this._cssFiles[i]; | 369 var cssFile = this._cssFiles[i]; |
| 370 | 370 |
| 371 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile]) | 371 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile]) |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 { | 506 { |
| 507 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to
remove element containing view via regular DOM operation"); | 507 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to
remove element containing view via regular DOM operation"); |
| 508 return WebInspector.View._originalRemoveChild.call(this, child); | 508 return WebInspector.View._originalRemoveChild.call(this, child); |
| 509 } | 509 } |
| 510 | 510 |
| 511 Element.prototype.removeChildren = function() | 511 Element.prototype.removeChildren = function() |
| 512 { | 512 { |
| 513 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co
ntaining view via regular DOM operation"); | 513 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co
ntaining view via regular DOM operation"); |
| 514 WebInspector.View._originalRemoveChildren.call(this); | 514 WebInspector.View._originalRemoveChildren.call(this); |
| 515 } | 515 } |
| OLD | NEW |