Skip to content

Commit

Permalink
Merge branch 'master' of yuisource.corp.yahoo.com:yui3
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrove committed Jan 12, 2012
2 parents 9b71de7 + af2a343 commit ed752af
Show file tree
Hide file tree
Showing 59 changed files with 1,082 additions and 325 deletions.
28 changes: 27 additions & 1 deletion build/dom-screen/dom-screen-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Y.mix(Y_DOM, {
}
}
return xy;
}
};
} else {
return function(node) { // manually calculate by crawling up offsetParents
//Calculate the Top and Left border sizes (assumes pixels)
Expand Down Expand Up @@ -253,6 +253,32 @@ Y.mix(Y_DOM, {
}
}(),// NOTE: Executing for loadtime branching

/**
Gets the width of vertical scrollbars on overflowed containers in the body
content.
@method getScrollbarWidth
@return {Number} Pixel width of a scrollbar in the current browser
**/
getScrollbarWidth: Y.cached(function () {
var doc = Y.config.doc,
testNode = doc.createElement('div'),
body = doc.getElementsByTagName('body')[0],
// 0.1 because cached doesn't support falsy refetch values
width = 0.1;

if (body) {
testNode.style.cssText = "position:absolute;visibility:hidden;overflow:scroll;width:20px;";
testNode.appendChild(doc.createElement('p')).style.height = '1px';
body.insertBefore(testNode, body.firstChild);
width = testNode.offsetWidth - testNode.clientWidth;

body.removeChild(testNode);
}

return width;
}, null, 0.1),

/**
* Gets the current X position of an element based on page coordinates.
* Element must be part of the DOM tree to have page coordinates
Expand Down
2 changes: 1 addition & 1 deletion build/dom-screen/dom-screen-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion build/dom-screen/dom-screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Y.mix(Y_DOM, {
}
}
return xy;
}
};
} else {
return function(node) { // manually calculate by crawling up offsetParents
//Calculate the Top and Left border sizes (assumes pixels)
Expand Down Expand Up @@ -249,6 +249,32 @@ Y.mix(Y_DOM, {
}
}(),// NOTE: Executing for loadtime branching

/**
Gets the width of vertical scrollbars on overflowed containers in the body
content.
@method getScrollbarWidth
@return {Number} Pixel width of a scrollbar in the current browser
**/
getScrollbarWidth: Y.cached(function () {
var doc = Y.config.doc,
testNode = doc.createElement('div'),
body = doc.getElementsByTagName('body')[0],
// 0.1 because cached doesn't support falsy refetch values
width = 0.1;

if (body) {
testNode.style.cssText = "position:absolute;visibility:hidden;overflow:scroll;width:20px;";
testNode.appendChild(doc.createElement('p')).style.height = '1px';
body.insertBefore(testNode, body.firstChild);
width = testNode.offsetWidth - testNode.clientWidth;

body.removeChild(testNode);
}

return width;
}, null, 0.1),

/**
* Gets the current X position of an element based on page coordinates.
* Element must be part of the DOM tree to have page coordinates
Expand Down
2 changes: 1 addition & 1 deletion build/frame/frame-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ YUI.add('frame', function(Y) {
* @method getDocType
* @description Parses document.doctype and generates a DocType to match the parent page, if supported.
* For IE8, it grabs document.all[0].nodeValue and uses that. For IE < 8, it falls back to Frame.DOC_TYPE.
* @returns {String} The normalized DocType to apply to the iframe
* @return {String} The normalized DocType to apply to the iframe
*/
getDocType: function() {
var dt = Y.config.doc.doctype,
Expand Down
2 changes: 1 addition & 1 deletion build/frame/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ YUI.add('frame', function(Y) {
* @method getDocType
* @description Parses document.doctype and generates a DocType to match the parent page, if supported.
* For IE8, it grabs document.all[0].nodeValue and uses that. For IE < 8, it falls back to Frame.DOC_TYPE.
* @returns {String} The normalized DocType to apply to the iframe
* @return {String} The normalized DocType to apply to the iframe
*/
getDocType: function() {
var dt = Y.config.doc.doctype,
Expand Down
13 changes: 2 additions & 11 deletions build/loader-base/loader-base-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
GALLERY_VERSION = 'gallery-2012.01.04-22-09',
GALLERY_VERSION = 'gallery-2012.01.11-21-03',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
Expand Down Expand Up @@ -2078,15 +2078,6 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +

this.sorted = s;
},
/**
* (Unimplemented)
* @method partial
* @unimplemented
*/
partial: function(partial, o, type) {
this.sorted = partial;
this.insert(o, type, true);
},

/**
* Handles the actual insertion of script/link tags
Expand Down Expand Up @@ -2309,7 +2300,7 @@ Y.log('Undefined module: ' + mname + ', matched a pattern: ' +
* @method _url
* @param {string} path the path fragment.
* @param {String} name The name of the module
* @pamra {String} [base=self.base] The base url to use
* @param {String} [base=self.base] The base url to use
* @return {string} the full url.
* @private
*/
Expand Down
Loading

0 comments on commit ed752af

Please sign in to comment.