Closed Bug 401046 Opened 12 years ago Closed 12 years ago

minimum font-size preference should not affect font-size:0 (zero)


(Core :: CSS Parsing and Computation, defect)

Not set





(Reporter: dbaron, Assigned: dbaron)



(1 file, 1 obsolete file)

The minimum font-size preference currently increases font sizes specified as 0 to the minimum.  However, the purpose of this preference is to make text that's too small to be readable for the user readable.  However, designers (and, probably more often, testcase authors) sometimes use font-size:0 as a trick to hide things.  Since, in this case, the text is intended not to be readable, I think the pref should not change font sizes that are zero.

Steps to reproduce:
  1. set minimum font size preference in Preferences/Options -> Content -> Fonts & Colors -> Advanced -> Western
  2. load

Expected results: all colored boxes have the same top and bottom
Actual results: some colored boxes displaced vertically
Attached patch patch (obsolete) — Splinter Review
Here's the trivial patch.  I should write tests for this pref sometime, including this fix.

And the steps to reproduce above aren't accurate -- this alone doesn't fix that test for me.  (Not sure how it's passing on tinderbox, then.)
I'd also say that the minimum font-size pref shouldn't kick in until there's actual text to render. font-size: 0 is useful as a way to guarantee the placement of a baseline, even in the absence of text (e.g. for placing inline-block boxes, as in Acid3).
Attached patch patchSplinter Review
Here's the same trivial patch, with test.

I really need to file a bug on making the language-sensitivity of our font prefs use something better than the charset...
Assignee: nobody → dbaron
Attachment #286100 - Attachment is obsolete: true
Attachment #302171 - Flags: superreview?(bzbarsky)
Attachment #302171 - Flags: review?(bzbarsky)
Comment on attachment 302171 [details] [diff] [review]

Document that the setTimeout(setTimeout,...) thing is being used to handle the async pref changes, and r+sr=bzbarsky
Attachment #302171 - Flags: superreview?(bzbarsky)
Attachment #302171 - Flags: superreview+
Attachment #302171 - Flags: review?(bzbarsky)
Attachment #302171 - Flags: review+
Comment on attachment 302171 [details] [diff] [review]

Trivial fix that makes it easier to use a bunch of Hixie's tests (and some others), and improves things for authors/users as well.
Attachment #302171 - Flags: approval1.9?
Attachment #302171 - Flags: approval1.9? → approval1.9+
Checked in to trunk, 2008-02-09 11:15 -0800.
Closed: 12 years ago
Resolution: --- → FIXED
...and filed bug 416581 on better font preference language handling.
You need to log in before you can comment on or make changes to this bug.