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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 this.element.__view = this; | 43 this.element.__view = this; |
44 this._visible = true; | 44 this._visible = true; |
45 this._isRoot = false; | 45 this._isRoot = false; |
46 this._isShowing = false; | 46 this._isShowing = false; |
47 this._children = []; | 47 this._children = []; |
48 this._hideOnDetach = false; | 48 this._hideOnDetach = false; |
49 this._cssFiles = []; | 49 this._cssFiles = []; |
50 this._notificationDepth = 0; | 50 this._notificationDepth = 0; |
51 } | 51 } |
52 | 52 |
53 WebInspector.View._buildSourceURL = function(cssFile) | |
54 { | |
55 return "\n/*# sourceURL=" + WebInspector.ParsedURL.completeURL(window.locati
on.href, cssFile) + " */"; | |
56 } | |
57 | |
58 /** | 53 /** |
59 * @param {string} cssFile | 54 * @param {string} cssFile |
60 * @return {!Element} | 55 * @return {!Element} |
61 */ | 56 */ |
62 WebInspector.View.createStyleElement = function(cssFile) | 57 WebInspector.View.createStyleElement = function(cssFile) |
63 { | 58 { |
64 var content = Runtime.cachedResources[cssFile] || ""; | 59 var content = Runtime.cachedResources[cssFile] || ""; |
65 if (!content) | 60 if (!content) |
66 console.error(cssFile + " not preloaded. Check module.json"); | 61 console.error(cssFile + " not preloaded. Check module.json"); |
67 var styleElement = createElement("style"); | 62 var styleElement = createElement("style"); |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 { | 661 { |
667 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); | 662 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt t
o remove element containing view via regular DOM operation"); |
668 return WebInspector.View._originalRemoveChild.call(this, child); | 663 return WebInspector.View._originalRemoveChild.call(this, child); |
669 } | 664 } |
670 | 665 |
671 Element.prototype.removeChildren = function() | 666 Element.prototype.removeChildren = function() |
672 { | 667 { |
673 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); | 668 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element c
ontaining view via regular DOM operation"); |
674 WebInspector.View._originalRemoveChildren.call(this); | 669 WebInspector.View._originalRemoveChildren.call(this); |
675 } | 670 } |
OLD | NEW |