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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 doLayout: function() | 343 doLayout: function() |
344 { | 344 { |
345 if (!this.isShowing()) | 345 if (!this.isShowing()) |
346 return; | 346 return; |
347 this._notify(this.onLayout); | 347 this._notify(this.onLayout); |
348 this.doResize(); | 348 this.doResize(); |
349 }, | 349 }, |
350 | 350 |
351 registerRequiredCSS: function(cssFile) | 351 registerRequiredCSS: function(cssFile) |
352 { | 352 { |
353 if (window.flattenImports) | |
354 cssFile = cssFile.split("/").reverse()[0]; | |
355 this._cssFiles.push(cssFile); | 353 this._cssFiles.push(cssFile); |
356 }, | 354 }, |
357 | 355 |
358 _loadCSSIfNeeded: function() | 356 _loadCSSIfNeeded: function() |
359 { | 357 { |
360 for (var i = 0; i < this._cssFiles.length; ++i) { | 358 for (var i = 0; i < this._cssFiles.length; ++i) { |
361 var cssFile = this._cssFiles[i]; | 359 var cssFile = this._cssFiles[i]; |
362 | 360 |
363 var viewsWithCSSFile = WebInspector.View._cssFileToVisibleViewCount[
cssFile]; | 361 var viewsWithCSSFile = WebInspector.View._cssFileToVisibleViewCount[
cssFile]; |
364 WebInspector.View._cssFileToVisibleViewCount[cssFile] = (viewsWithCS
SFile || 0) + 1; | 362 WebInspector.View._cssFileToVisibleViewCount[cssFile] = (viewsWithCS
SFile || 0) + 1; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 { | 679 { |
682 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to
remove element containing view via regular DOM operation"); | 680 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to
remove element containing view via regular DOM operation"); |
683 return WebInspector.View._originalRemoveChild.call(this, child); | 681 return WebInspector.View._originalRemoveChild.call(this, child); |
684 } | 682 } |
685 | 683 |
686 Element.prototype.removeChildren = function() | 684 Element.prototype.removeChildren = function() |
687 { | 685 { |
688 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co
ntaining view via regular DOM operation"); | 686 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element co
ntaining view via regular DOM operation"); |
689 WebInspector.View._originalRemoveChildren.call(this); | 687 WebInspector.View._originalRemoveChildren.call(this); |
690 } | 688 } |
OLD | NEW |