Closed
Bug 248837
Opened 20 years ago
Closed 20 years ago
Percentage font sizes of 1px result in 13px sized text
Categories
(Core Graveyard :: GFX: Mac, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Informity, Assigned: jhpedemonte)
Details
Attachments
(3 files, 1 obsolete file)
437 bytes,
text/html
|
Details | |
13.52 KB,
image/jpeg
|
Details | |
948 bytes,
patch
|
sfraser_bugs
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040517 Camino/0.8b Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040517 Camino/0.8 When you set the font-size attribute of an element through CSS to 1px, then inside that set the text to any percentage value (such as 90%), the text renders at 13px. This only appears on the macintosh, and is happening with Camino, Mozilla and Firefox. Reproducible: Always Steps to Reproduce: <span style="font-size: 1px; font-family: verdana"> <span style="font-size: 90%"> 90% of 1px </span> </span> <span style="font-size: 13px; font-family: verdana"> is apparently 13px? </span> Actual Results: All text was rendered at 13px Expected Results: Only second piece of text should be 13px - '90% of 1px' should be very small. I'm using Mac OS X version 10.3.4
Updated•20 years ago
|
Assignee: general → sfraser
Component: Browser-General → GFX: Mac
QA Contact: general
Comment 1•20 years ago
|
||
Testcase that doesn't show the issue for me. Do you have a min font size set in the prefs?
No minimum font size set. Your test case -- the 1px font renders at 1px, but the 90% of 1px still renders at 13px. Doesn't appear to be any kind of system-wide setting as other browsers (any not based on Gecko) render it fine.
Comment 4•20 years ago
|
||
Looks to me like bug 53995 and/or bug 187889.
Assignee | ||
Comment 5•20 years ago
|
||
I can confirm this bug with Simon's testcase. If I set the minimum font size in Firefox to it's lowest setting (6), then the testcase works as expected. So we're probably not handling a less than 1px case somewhere.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•20 years ago
|
||
Javier, do you have time to work on this? I don't, alas.
Assignee: sfraser → jhpedemonte
Assignee | ||
Comment 7•20 years ago
|
||
This one line was setting textSize to 0 in this case, and when ::TextSize is called with 0, it sets the font size to the system default (usually 12 points).
Assignee | ||
Updated•20 years ago
|
Attachment #152031 -
Flags: review?(sfraser)
Comment on attachment 152031 [details] [diff] [review] patch It might be a little cleaner not to put the division inside the PR_MAX macro. PR_MAX evaluates its arguments multiple times, and it's also probably simpler to do integer < rather than floating-point <.
Assignee | ||
Comment 9•20 years ago
|
||
New patch per dbaron's comments.
Attachment #152031 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #152040 -
Flags: superreview?(dbaron)
Attachment #152040 -
Flags: review?(sfraser)
Attachment #152040 -
Flags: superreview?(dbaron) → superreview+
Attachment #152031 -
Flags: review?(sfraser)
Assignee | ||
Comment 10•20 years ago
|
||
Simon, can you take a look at the patch, so we can close out this bug?
Updated•20 years ago
|
Attachment #152040 -
Flags: review?(sfraser) → review+
Assignee | ||
Comment 11•20 years ago
|
||
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•