add: elementAttributesScrollbar = new AppleVerticalScrollbar(document.getElementById("elementAttributesScrollbar")); elementAttributesScrollArea = new AppleScrollArea(document.getElementById("elementAttributesScrollview"), elementAttributesScrollbar);  elementAttributesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18); elementAttributesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png"); elementAttributesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18); elementAttributesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9); elementAttributesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png"); elementAttributesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);  
context: function loaded(){    treeScrollbar = new AppleVerticalScrollbar(document.getElementById("treeScrollbar"));    treeScrollbar.setTrackStart("Images/scrollTrackTop.png", 18);    treeScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png");    treeScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18);    treeScrollbar.setThumbStart("Images/scrollThumbTop.png", 9);    treeScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png");    treeScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);    nodeContentsScrollbar = new AppleVerticalScrollbar(document.getElementById("nodeContentsScrollbar"));    nodeContentsScrollArea = new AppleScrollArea(document.getElementById("nodeContentsScrollview"), nodeContentsScrollbar);    nodeContentsScrollbar.setTrackStart("Images/scrollTrackTop.png", 18);    nodeContentsScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png");    nodeContentsScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18);    nodeContentsScrollbar.setThumbStart("Images/scrollThumbTop.png", 9);    nodeContentsScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png");    nodeContentsScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);    styleRulesScrollbar = new AppleVerticalScrollbar(document.getElementById("styleRulesScrollbar"));    styleRulesScrollArea = new AppleScrollArea(document.getElementById("styleRulesScrollview"), styleRulesScrollbar);    styleRulesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18);    styleRulesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png");    styleRulesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18);    styleRulesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9);    styleRulesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png");    styleRulesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);    stylePropertiesScrollbar = new AppleVerticalScrollbar(document.getElementById("stylePropertiesScrollbar"));    stylePropertiesScrollArea = new AppleScrollArea(document.getElementById("stylePropertiesScrollview"), stylePropertiesScrollbar);    stylePropertiesScrollbar.setTrackStart("Images/scrollTrackTop.png", 18);    stylePropertiesScrollbar.setTrackMiddle("Images/scrollTrackMiddle.png");    stylePropertiesScrollbar.setTrackEnd("Images/scrollTrackBottom.png", 18);    stylePropertiesScrollbar.setThumbStart("Images/scrollThumbTop.png", 9);    stylePropertiesScrollbar.setThumbMiddle("Images/scrollThumbMiddle.png");    stylePropertiesScrollbar.setThumbEnd("Images/scrollThumbBottom.png", 9);    treeScrollbar._getViewToContentRatio = function() {        var contentHeight = Inspector.treeViewScrollHeight();        var height = document.getElementById("treeScrollArea").offsetHeight;        if (contentHeight > height)            return height / contentHeight;        return 1.0;    }    treeScrollbar._computeTrackOffset = function() { return Inspector.treeViewOffsetTop(); }    treeScrollbar._getContentLength = function() { return Inspector.treeViewScrollHeight(); }    treeScrollbar._getViewLength = function() { return document.getElementById("treeScrollArea").offsetHeight; }    treeScrollbar._canScroll = function() { return true; }    treeScrollbar.scrollTo = function(pos) {        Inspector.treeViewScrollTo(pos);        this.verticalHasScrolled();    }    treeScrollbar.verticalHasScrolled = function() {        var new_thumb_pos = this._thumbPositionForContentPosition(Inspector.treeViewOffsetTop());        this._thumbStart = new_thumb_pos;        this._thumb.style.top = new_thumb_pos + "px";    }    // much better AppleScrollArea reveal    AppleScrollArea.prototype.reveal = function(node) {        var offsetY = 0;        var obj = node;        do {            offsetY += obj.offsetTop;            obj = obj.offsetParent;        } while (obj && obj != this.content);        var offsetX = 0;        obj = node;        do {            offsetX += obj.offsetLeft;            obj = obj.offsetParent;        } while (obj && obj != this.content);        var top = this.content.scrollTop;        var height = this.viewHeight;        if ((top + height) < (offsetY + node.clientHeight))             this.verticalScrollTo(offsetY - height + node.clientHeight);        else if (top > offsetY)            this.verticalScrollTo(offsetY);        var left = this.content.scrollLeft;        var width = this.viewWidth;        if ((left + width) < (offsetX + node.clientWidth))             this.horizontalScrollTo(offsetX - width + node.clientWidth);        else if (left > offsetX)            this.horizontalScrollTo(offsetX);    };    window.addEventListener("resize", refreshScrollbars, false);}
meta: 10664	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10664/5ec59fdcd1b307b7c960fa55c6890908836dbd49/inspector.js/buggy/third_party/WebKit/WebKit/WebInspector.subproj/webInspector/inspector.js