Changeset 10206
- Timestamp:
- 08/15/07 21:48:05 (12 months ago)
- Files:
-
- 1 modified
-
dojo/trunk/_base/html.js (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/_base/html.js
r10186 r10206 243 243 // 244 244 // This is a faux declaration to take pity on the doc tool 245 246 dojo.getComputedStyle = function(/*DomNode*/node){ 245 246 /*===== 247 dojo.getComputedStyle = function(DomNodenode){ //DomNode 247 248 // summary: 248 249 // returns a "computed style" object which can be used to … … 261 262 return; // CSS2Properties 262 263 } 263 264 =====*/ 265 264 266 var gcs, dv = document.defaultView; 265 267 if(dojo.isSafari){ … … 282 284 } 283 285 dojo.getComputedStyle = gcs; 284 286 285 287 if(!dojo.isIE){ 286 288 dojo._toPixelValue = function(element, value){ 287 289 // style values can be floats, client code may want 288 290 // to round for integer pixels. 289 return (parseFloat(value) || 0);291 return parseFloat(value) || 0; 290 292 } 291 293 }else{ … … 412 414 return op ? dojo._setOpacity(n, value) : n.style[style] = value; /*Number*/ 413 415 } 414 if (args==2 && op){416 if(args==2 && op){ 415 417 return dojo._getOpacity(n); 416 418 } … … 594 596 // fallback to offsetWidth/Height for special cases (see #3378) 595 597 var s=computedStyle||gcs(node), pe=dojo._getPadExtents(node, s), be=dojo._getBorderExtents(node, s), w=node.clientWidth, h; 596 if (!w){598 if(!w){ 597 599 w=node.offsetWidth, h=node.offsetHeight; 598 } else{600 }else{ 599 601 h=node.clientHeight, be.w = be.h = 0; 600 602 } … … 697 699 pb=bb ? _nilExtents : dojo._getPadBorderExtents(node, s), 698 700 mb=dojo._getMarginExtents(node, s); 699 if(widthPx>=0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }701 if(widthPx>=0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); } 700 702 if(heightPx>=0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); } 701 703 dojo._setBox(node, leftPx, topPx, widthPx, heightPx); … … 889 891 ret.y += isNaN(m) ? 0 : m; 890 892 curnode = curnode.offsetParent; 891 }while((curnode != endNode)&& (curnode != null));893 }while((curnode != endNode)&&curnode); 892 894 }else if(node["x"]&&node["y"]){ 893 895 ret.x += isNaN(node.x) ? 0 : node.x;