Lines Matching defs:View

31 WebInspector.View = function()
44 WebInspector.View._cssFileToVisibleViewCount = {};
45 WebInspector.View._cssFileToStyleElement = {};
46 WebInspector.View._cssUnloadTimeout = 2000;
48 WebInspector.View._buildSourceURL = function(cssFile)
57 WebInspector.View.createStyleElement = function(cssFile)
61 styleElement.textContent = loadResource(cssFile) + WebInspector.View._buildSourceURL(cssFile);
66 WebInspector.View.prototype = {
69 WebInspector.View.__assert(!this.element.parentElement, "Attempt to mark as root attached node");
74 * @return {?WebInspector.View}
82 * @return {!Array.<!WebInspector.View>}
118 * @param {function(this:WebInspector.View)} method
173 * @param {function(this:WebInspector.View)} notification
207 WebInspector.View.__assert(parentElement, "Attempt to attach view with no parent element");
223 WebInspector.View.__assert(this._isRoot, "Attempt to attach view to orphan node");
237 WebInspector.View._incrementViewCounter(parentElement, this.element);
239 WebInspector.View._originalInsertBefore.call(parentElement, this.element, insertBefore);
241 WebInspector.View._originalAppendChild.call(parentElement, this.element);
276 WebInspector.View._decrementViewCounter(parentElement, this.element);
277 WebInspector.View._originalRemoveChild.call(parentElement, this.element);
286 WebInspector.View.__assert(childIndex >= 0, "Attempt to remove non-child view");
293 WebInspector.View.__assert(this._isRoot, "Removing non-root view from DOM");
360 var viewsWithCSSFile = WebInspector.View._cssFileToVisibleViewCount[cssFile];
361 WebInspector.View._cssFileToVisibleViewCount[cssFile] = (viewsWithCSSFile || 0) + 1;
369 var styleElement = WebInspector.View._cssFileToStyleElement[cssFile];
374 styleElement = WebInspector.View.createStyleElement(cssFile);
375 WebInspector.View._cssFileToStyleElement[cssFile] = styleElement;
380 var scheduleUnload = !!WebInspector.View._cssUnloadTimer;
385 if (!--WebInspector.View._cssFileToVisibleViewCount[cssFile])
391 delete WebInspector.View._cssUnloadTimer;
393 for (cssFile in WebInspector.View._cssFileToVisibleViewCount) {
394 if (WebInspector.View._cssFileToVisibleViewCount.hasOwnProperty(cssFile) && !WebInspector.View._cssFileToVisibleViewCount[cssFile])
395 WebInspector.View._cssFileToStyleElement[cssFile].disabled = true;
399 if (scheduleUnload && !WebInspector.View._cssUnloadTimer)
400 WebInspector.View._cssUnloadTimer = setTimeout(doUnloadCSS, WebInspector.View._cssUnloadTimeout);
461 WebInspector.View._originalAppendChild.call(document.body, this.element);
465 WebInspector.View._originalRemoveChild.call(document.body, this.element);
535 WebInspector.View._originalAppendChild = Element.prototype.appendChild;
536 WebInspector.View._originalInsertBefore = Element.prototype.insertBefore;
537 WebInspector.View._originalRemoveChild = Element.prototype.removeChild;
538 WebInspector.View._originalRemoveChildren = Element.prototype.removeChildren;
540 WebInspector.View._incrementViewCounter = function(parentElement, childElement)
552 WebInspector.View._decrementViewCounter = function(parentElement, childElement)
564 WebInspector.View.__assert = function(condition, message)
574 * @extends {WebInspector.View}
578 WebInspector.View.call(this);
591 * @this {!WebInspector.View}
605 __proto__: WebInspector.View.prototype
610 * @extends {WebInspector.View}
614 WebInspector.View.call(this);
627 * @this {!WebInspector.View}
641 __proto__: WebInspector.View.prototype
671 WebInspector.View.__assert(!child.__view || child.parentElement === this, "Attempt to add view via regular DOM operation.");
672 return WebInspector.View._originalAppendChild.call(this, child);
683 WebInspector.View.__assert(!child.__view || child.parentElement === this, "Attempt to add view via regular DOM operation.");
684 return WebInspector.View._originalInsertBefore.call(this, child, anchor);
694 WebInspector.View.__assert(!child.__viewCounter && !child.__view, "Attempt to remove element containing view via regular DOM operation");
695 return WebInspector.View._originalRemoveChild.call(this, child);
700 WebInspector.View.__assert(!this.__viewCounter, "Attempt to remove element containing view via regular DOM operation");
701 WebInspector.View._originalRemoveChildren.call(this);