Closed Bug 180721 Opened 22 years ago Closed 22 years ago

[xft] floating point error when visiting web page

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: blizzard, Assigned: blizzard)

References

()

Details

Attachments

(1 file)

If you visit the url above you will get an FP error.
Attached patch patchSplinter Review
I love wallpaper.  Love it love it love it.  The style system is passing me a
bogus size of '0'.
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Some layout folks might want to have a look at this bug.  It's trying to create
a font with a pixel size of zero which sounds completely wrong to me.  It was
passed back from the style system during a reflow.
Well, the stylesheet for the site contains:

#upperbox
{
        position: absolute;
        top: 0;
        left: 0;
        font-size: 0;
        width: 7px;
        height: 7px;
        border-bottom: 1px solid black;
        border-right: 1px solid black;
        cursor: move;
        z-index: 4;
}

#upperbox2
{
        position: absolute;
        top: 0;
        left: 0;
        font-size: 0;
        width: 7px;
        height: 7px;
        border-bottom: 1px solid black;
        border-right: 1px solid black;
        cursor: move;
        z-index: 4;
}

I think other browsers probably do better with 'font-size: 0' than we do.  It
should probably make the text not show up, although that might then end up being
considered a security hole because people could copy it to the clipboard without
knowing.
Then again, doing 1px is probably OK as far as the spec is concerned, since it's
just a limit on actual value.
Well... a 1-twip font should certainly be allowed (since on some devices this
may even make sense).  Then we still have the problem that NSTwipsToIntPoints()
will return zero for all sorts of sizes up to 10 twips.

In other words, this should probably be solved in the device context (which
actually knows that it can't usefully render a font 1/20 of an inch high) than
in the style system.
Er, that's 1/20 of a pt high.
I set a lower bound of 1 point in the xft font code now.
*** Bug 183433 has been marked as a duplicate of this bug. ***
*** Bug 189686 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: