Closed Bug 371043 Opened 18 years ago Closed 14 years ago

[FIX]Computed style doesn't handle eStyleUnit_Chars well

Categories

(Core :: DOM: CSS Object Model, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha4

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

See bug 365932 comment 3.

Right now we do:

2745     case eStyleUnit_Chars:
2746       // XXX we need a frame and a rendering context to calculate this, bug 281972, bug 282126.
2747       aValue->SetAppUnits(0);
2748       break;

David points out that all we really need is an nsStyleFont (which computed style knows how to get) and a rendering context; we should be able to get a rendering context from the presshell, right?
Attached patch Proposed patchSplinter Review
Assignee: general → bzbarsky
Status: NEW → ASSIGNED
Attachment #261224 - Flags: superreview?(dbaron)
Attachment #261224 - Flags: review?(dbaron)
That diff depends on the fix for bug 371041.
Depends on: 371041
Priority: -- → P3
Target Milestone: --- → mozilla1.9alpha4
Summary: Computed style doesn't handle eStyleUnit_Chars well → [FIX]Computed style doesn't handle eStyleUnit_Chars well
Comment on attachment 261224 [details] [diff] [review]
Proposed patch

In the reftest, I'd recommend giving the span a few pixels of horizontal padding in case the M's overflow.

r+sr=dbaron (although it would be nice to have a nicer way to make a rendering context)
Attachment #261224 - Flags: superreview?(dbaron)
Attachment #261224 - Flags: superreview+
Attachment #261224 - Flags: review?(dbaron)
Attachment #261224 - Flags: review+
Checked in, with the padding.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
This reftest is failing for Fedora unit tests (see bug 560882).
I have machines available to help fixing it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Please don't reopen bugs for that sort of thing.  File new ones.
Status: REOPENED → RESOLVED
Closed: 17 years ago14 years ago
Resolution: --- → FIXED
Blocks: 564252
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: