5 | | var |
6 | | s = computedStyle||gcs(n), |
7 | | l = px(n, s.marginLeft), |
8 | | t = px(n, s.marginTop), |
9 | | r = px(n, s.marginRight), |
10 | | b = px(n, s.marginBottom); |
11 | | if(d.isWebKit && (s.position != "absolute")){ |
12 | | // FIXME: Safari's version of the computed right margin |
13 | | // is the space between our right edge and the right edge |
14 | | // of our offsetParent. |
15 | | // What we are looking for is the actual margin value as |
16 | | // determined by CSS. |
17 | | // Hack solution is to assume left/right margins are the same. |
18 | | r = l; |
19 | | } |
20 | | return { |
21 | | l: l, |
22 | | t: t, |
23 | | w: l+r, |
24 | | h: t+b |
25 | | }; |
26 | | } |
| 5 | {{{ |
| 6 | var |
| 7 | s = computedStyle||gcs(n), |
| 8 | l = px(n, s.marginLeft), |
| 9 | t = px(n, s.marginTop), |
| 10 | r = px(n, s.marginRight), |
| 11 | b = px(n, s.marginBottom); |
| 12 | if(d.isWebKit && (s.position != "absolute")){ |
| 13 | // FIXME: Safari's version of the computed right margin |
| 14 | // is the space between our right edge and the right edge |
| 15 | // of our offsetParent. |
| 16 | // What we are looking for is the actual margin value as |
| 17 | // determined by CSS. |
| 18 | // Hack solution is to assume left/right margins are the same. |
| 19 | r = l; |
| 20 | } |
| 21 | return { |
| 22 | l: l, |
| 23 | t: t, |
| 24 | w: l+r, |
| 25 | h: t+b |
| 26 | }; |
| 27 | }}} |