Changes between Initial Version and Version 1 of Ticket #11515


Ignore:
Timestamp:
Jan 7, 2011, 12:18:02 PM (10 years ago)
Author:
bill
Comment:

I'm not sure what return value you are expecting/hoping for. A hidden image (or hidden anything) doesn't have a position and arguably doesn't have a size.

But anyway, I tried to test this on IE7 and it's working fine for me, in 1.3, 1.4, 1.5, and trunk. I'll attach my test case. If you have a test case that fails please attach it.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11515

    • Property Priority changed from high to normal
  • Ticket #11515 – Description

    initial v1  
    33I have opened this bug as "blocker" as it is preventing me from moving forward on IE7.
    44
    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{{{
     6var
     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);
     12if(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}
     21return {
     22        l: l,
     23        t: t,
     24        w: l+r,
     25        h: t+b
     26};
     27}}}