~ubuntu-branches/ubuntu/precise/maas/precise-updates

« back to all changes in this revision

Viewing changes to debian/extras/jslibs/yui/widget-base-ie/widget-base-ie.js

Tags: 1.2+bzr1373+dfsg-0ubuntu1~12.04.4
* SECURITY UPDATE: failure to authenticate downloaded content (LP: #1039513)
  - debian/patches/CVE-2013-1058.patch: Authenticate downloaded files with
    GnuPG and MD5SUM files. Thanks to Julian Edwards.
  - CVE-2013-1058
* SECURITY UPDATE: configuration options may be loaded from current working
  directory (LP: #1158425)
  - debian/patches/CVE-2013-1057-1-2.patch: Do not load configuration
    options from the current working directory. Thanks to Julian Edwards.
  - CVE-2013-1057

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
YUI 3.5.1 (build 22)
 
3
Copyright 2012 Yahoo! Inc. All rights reserved.
 
4
Licensed under the BSD License.
 
5
http://yuilibrary.com/license/
 
6
*/
 
7
YUI.add('widget-base-ie', function(Y) {
 
8
 
 
9
/**
 
10
 * IE specific support for the widget-base module.
 
11
 *
 
12
 * @module widget-base-ie
 
13
 */
 
14
var BOUNDING_BOX = "boundingBox",
 
15
    CONTENT_BOX = "contentBox",
 
16
    HEIGHT = "height",
 
17
    OFFSET_HEIGHT = "offsetHeight",
 
18
    EMPTY_STR = "",
 
19
    IE = Y.UA.ie,
 
20
    heightReallyMinHeight = IE < 7,
 
21
    bbTempExpanding = Y.Widget.getClassName("tmp", "forcesize"),
 
22
    contentExpanded = Y.Widget.getClassName("content", "expanded");
 
23
 
 
24
// TODO: Ideally we want to re-use the base _uiSizeCB impl
 
25
Y.Widget.prototype._uiSizeCB = function(expand) {
 
26
 
 
27
    var bb = this.get(BOUNDING_BOX),
 
28
        cb = this.get(CONTENT_BOX),
 
29
        borderBoxSupported = this._bbs;
 
30
 
 
31
    if (borderBoxSupported === undefined) {
 
32
        this._bbs = borderBoxSupported = !(IE && IE < 8 && bb.get("ownerDocument").get("compatMode") != "BackCompat"); 
 
33
    }
 
34
 
 
35
    if (borderBoxSupported) {
 
36
        cb.toggleClass(contentExpanded, expand);
 
37
    } else {
 
38
        if (expand) {
 
39
            if (heightReallyMinHeight) {
 
40
                bb.addClass(bbTempExpanding);
 
41
            }
 
42
 
 
43
            cb.set(OFFSET_HEIGHT, bb.get(OFFSET_HEIGHT));
 
44
 
 
45
            if (heightReallyMinHeight) {
 
46
                bb.removeClass(bbTempExpanding);
 
47
            }
 
48
        } else {
 
49
            cb.setStyle(HEIGHT, EMPTY_STR);
 
50
        }
 
51
    }
 
52
};
 
53
 
 
54
 
 
55
}, '3.5.1' ,{requires:['widget-base']});