WidgetBaseIE.js revision 10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85
61N/A/**
61N/A * IE specific support for the widget-base module.
61N/A *
61N/A * @module widget-base-ie
61N/A */
61N/Avar BOUNDING_BOX = "boundingBox",
61N/A CONTENT_BOX = "contentBox",
61N/A HEIGHT = "height",
61N/A OFFSET_HEIGHT = "offsetHeight",
61N/A EMPTY_STR = "",
61N/A IE = Y.UA.ie,
61N/A heightReallyMinHeight = IE < 7,
61N/A bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"),
61N/A contentExpanded = Y.Widget.getClassName("content", "expanded");
61N/A
61N/A// TODO: Ideally we want to re-use the base _uiSizeCB impl
61N/AY.Widget.prototype._uiSizeCB = function(expand) {
61N/A
61N/A var bb = this.get(BOUNDING_BOX),
61N/A cb = this.get(CONTENT_BOX),
5680N/A borderBoxSupported = this._bbs;
5680N/A
6606N/A if(borderBoxSupported === undefined) {
61N/A this._bbs = borderBoxSupported = !(IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat");
61N/A }
61N/A
61N/A if (borderBoxSupported) {
61N/A cb.toggleClass(contentExpanded, expand);
3817N/A } else {
61N/A if (expand) {
61N/A if (heightReallyMinHeight) {
61N/A bb.addClass(bbTempExpanding);
61N/A }
61N/A
61N/A cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT));
61N/A
61N/A if (heightReallyMinHeight) {
61N/A bb.removeClass(bbTempExpanding);
61N/A }
61N/A } else {
5329N/A cb.setStyle(HEIGHT, EMPTY_STR);
5329N/A }
5329N/A }
61N/A};
61N/A