Closed Bug 389464 Opened 18 years ago Closed 18 years ago

<font size="-1"> is not respected within <pre> blocks

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ispiked, Assigned: dbaron)

References

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Attached file testcase
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007072405 Minefield/3.0a7pre Steps to reproduce: 1. Load testcase. Actual results: The text inside the <pre><font></font></pre> block is larger sized. Expected results: All the text is the same size. I first noticed this on the bonsai diffs page: http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/embedding/components/find/src&command=DIFF_FRAMESET&file=nsFind.cpp&rev1=1.46&rev2=1.47&root=/cvsroot. Regressed between 20070723_2058 and 20070723_2058, making this a regression from bug 383979.
Err, obvious copy/paste error above should read: "regressed between 20070723_2058 and 20070723_2117".
Yeah, I'm not surprised that generic font change broke something. Maybe it's time to stop fixing this mess and just fix bug 380915.
Attached patch possible patch (obsolete) — Splinter Review
This compiles, but I haven't tested it yet.
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
So I think this should work correctly. It sets mFlags during computation and only overwrites it when we should be overwriting it. But we do need to overwrite it each cycle during SetGenericFont (which matches the old behavior, since then mFlags wasn't set at all during the loop). Then it uses the newly-correct mFlags to get the right base font size. I removed the aDefaultFont parameter since the only other use was if (!aIsGeneric), in which case it was guaranteed to be defaultVariableFont.
Attachment #273716 - Attachment is obsolete: true
Attachment #273789 - Flags: superreview?(bzbarsky)
Attachment #273789 - Flags: review?(bzbarsky)
Comment on attachment 273789 [details] [diff] [review] patch Looks reasonable.
Attachment #273789 - Flags: superreview?(bzbarsky)
Attachment #273789 - Flags: superreview+
Attachment #273789 - Flags: review?(bzbarsky)
Attachment #273789 - Flags: review+
Checked in to trunk (with the additional SetFont call in SetGenericFont modified the same way, since the patch above was in my queue above bug 216456).
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This fixed bug 385699, but bugzilla won't let me add the dependency.
Hrm... this didn't fix the issue on the Bonsai diff. pages for some reason.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: