Lines Matching defs:View

31 WebInspector.View = function()
45 WebInspector.View._cssFileToVisibleViewCount = {};
46 WebInspector.View._cssFileToStyleElement = {};
47 WebInspector.View._cssUnloadTimeout = 2000;
49 WebInspector.View._buildSourceURL = function(cssFile)
58 WebInspector.View.createStyleElement = function(cssFile)
62 styleElement.textContent = loadResource(cssFile) + WebInspector.View._buildSourceURL(cssFile);
67 WebInspector.View.prototype = {
70 WebInspector.View._assert(!this.element.parentElement, "Attempt to mark as root attached node");
75 * @return {?WebInspector.View}
83 * @return {!Array.<!WebInspector.View>}
119 * @param {function(this:WebInspector.View)} method
174 * @param {function(this:WebInspector.View)} notification
208 WebInspector.View._assert(parentElement, "Attempt to attach view with no parent element");
224 WebInspector.View._assert(this._isRoot, "Attempt to attach view to orphan node");
238 WebInspector.View._incrementViewCounter(parentElement, this.element);
240 WebInspector.View._originalInsertBefore.call(parentElement, this.element, insertBefore);
242 WebInspector.View._originalAppendChild.call(parentElement, this.element);
277 WebInspector.View._decrementViewCounter(parentElement, this.element);
278 WebInspector.View._originalRemoveChild.call(parentElement, this.element);
287 WebInspector.View._assert(childIndex >= 0, "Attempt to remove non-child view");
294 WebInspector.View._assert(this._isRoot, "Removing non-root view from DOM");
361 var viewsWithCSSFile = WebInspector.View._cssFileToVisibleViewCount[cssFile];
362 WebInspector.View._cssFileToVisibleViewCount[cssFile] = (viewsWithCSSFile || 0) + 1;
370 var styleElement = WebInspector.View._cssFileToStyleElement[cssFile];
375 styleElement = WebInspector.View.createStyleElement(cssFile);
376 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement;
381 var scheduleUnload = !!WebInspector.View._cssUnloadTimer;
386 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile])
392 delete WebInspector.View._cssUnloadTimer;
394 for (cssFile in WebInspector.View._cssFileToVisibleViewCount) {
395 if (WebInspector.View._cssFileToVisibleViewCount.hasOwnProperty(cssFile) && !WebInspector.View._cssFileToVisibleViewCount[cssFile])
396 WebInspector.View._cssFileToStyleElement[cssFile].disabled = true;
400 if (scheduleUnload && !WebInspector.View._cssUnloadTimer)
401 WebInspector.View._cssUnloadTimer = setTimeout(doUnloadCSS, WebInspector.View._cssUnloadTimeout);
462 WebInspector.View._originalAppendChild.call(document.body, this.element);
466 WebInspector.View._originalRemoveChild.call(document.body, this.element);
536 WebInspector.View._originalAppendChild = Element.prototype.appendChild;
537 WebInspector.View._originalInsertBefore = Element.prototype.insertBefore;
538 WebInspector.View._originalRemoveChild = Element.prototype.removeChild;
539 WebInspector.View._originalRemoveChildren = Element.prototype.removeChildren;
541 WebInspector.View._incrementViewCounter = function(parentElement, childElement)
553 WebInspector.View._decrementViewCounter = function(parentElement, childElement)
565 WebInspector.View._assert = function(condition, message)
575 * @extends {WebInspector.View}
579 WebInspector.View.call(this);
592 * @this {!WebInspector.View}
606 __proto__: WebInspector.View.prototype
611 * @extends {WebInspector.View}
615 WebInspector.View.call(this);
628 * @this {!WebInspector.View}
642 __proto__: WebInspector.View.prototype
672 WebInspector.View._assert(!child.__view || child.parentElement === this, "Attempt to add view via regular DOM operation.");
673 return WebInspector.View._originalAppendChild.call(this, child);
684 WebInspector.View._assert(!child.__view || child.parentElement === this, "Attempt to add view via regular DOM operation.");
685 return WebInspector.View._originalInsertBefore.call(this, child, anchor);
695 WebInspector.View._assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation");
696 return WebInspector.View._originalRemoveChild.call(this, child);
701 WebInspector.View._assert(!this.__viewCounter, "Attempt to remove element containing view via regular DOM operation");
702 WebInspector.View._originalRemoveChildren.call(this);