Commit 8e414e3c authored by Scott J. Miles's avatar Scott J. Miles

Restrict Safari margin hack to nodes that are not position: absolute, allowing...

Restrict Safari margin hack to nodes that are not position: absolute, allowing more tests to pass, refs #3515.
Correct getMarginBox adjustment for Opera offsetLeft/Top, refs #3565.

git-svn-id: http://svn.dojotoolkit.org/src/dojo/trunk@9365 560b804f-0ae3-0310-86f3-f6aa0a117693
parent 319a0b49
......@@ -363,8 +363,9 @@ if(dojo.isIE && (dojo.isIE<7)){ // || dojo.isOpera){
px=dojo._toPixelValue,
l=px(n, s.marginLeft),
t=px(n, s.marginTop),
r=px(n, s.marginRight);
if (dojo.isSafari){
r=px(n, s.marginRight),
b=px(n, s.marginBottom);
if (dojo.isSafari && (s.position != "absolute")){
// FIXME: Safari's version of the computed right margin
// is the space between our right edge and the right edge
// of our offsetParent.
......@@ -377,7 +378,7 @@ if(dojo.isIE && (dojo.isIE<7)){ // || dojo.isOpera){
l: l,
t: t,
w: l+r,
h: t+px(n, s.marginBottom)
h: t+b
};
}
......@@ -426,7 +427,7 @@ if(dojo.isIE && (dojo.isIE<7)){ // || dojo.isOpera){
var p = node.parentNode;
if(p){
var be = dojo._getBorderExtents(p);
l += be.l, t += be.t;
l -= be.l, t -= be.t;
}
}
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment