Bug 11004 - font-size: 0 is ignored
Summary: font-size: 0 is ignored
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL: http://mail.google.com/mail/
Keywords: GoogleBug, InRadar
: 49582 (view as bug list)
Depends on:
Blocks: 52765
  Show dependency treegraph
 
Reported: 2006-09-24 02:20 PDT by mitz
Modified: 2011-02-28 14:18 PST (History)
9 users (show)

See Also:


Attachments
Safari layout (33.77 KB, image/png)
2006-09-24 02:27 PDT, mitz
no flags Details
Safari layout, text selected (39.72 KB, image/png)
2006-09-24 02:28 PDT, mitz
no flags Details
Firefox layout (33.32 KB, image/png)
2006-09-24 02:28 PDT, mitz
no flags Details
Patch. (365 bytes, patch)
2006-09-24 15:38 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (151.65 KB, patch)
2010-11-16 14:58 PST, Dave Hyatt
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2006-09-24 02:20:51 PDT
Setting font-size to 0 or 0px should make the text not render at all (Firefox) or no bigger than 1px (WinIE). WebKit seems to ignore a font-size of 0.

Gmail uses font-size:0px for the message at the top meant for screen reader users. Since WebKit ignores it, the Google services box on the left wraps (see screenshots).
Comment 1 mitz 2006-09-24 02:27:31 PDT
Created attachment 10731 [details]
Safari layout
Comment 2 mitz 2006-09-24 02:28:21 PDT
Created attachment 10732 [details]
Safari layout, text selected
Comment 3 mitz 2006-09-24 02:28:44 PDT
Created attachment 10733 [details]
Firefox layout
Comment 4 Dave Hyatt 2006-09-24 14:04:34 PDT
What a lame hack.
Comment 5 Dave Hyatt 2006-09-24 15:38:37 PDT
Created attachment 10745 [details]
Patch.

Looks like we get a 1px rendering when specifying 0.  I think AppKit or someone is doing that.
Comment 6 Eric Seidel (no email) 2006-09-24 19:29:01 PDT
Comment on attachment 10745 [details]
Patch.

You need a test case and a ChangeLog, otherwise fine.
r=me
Comment 7 Timothy Hatcher 2006-09-25 22:46:55 PDT
Dave you should change the WebKitMinimumFontSizePreferenceKey default to 0, right now it is 1. Was this where the 1px render came from?
Comment 8 mitz 2006-09-30 01:38:36 PDT
Fixed in r16678 & r16679. No test landed.
Comment 9 Dave Hyatt 2006-09-30 01:43:56 PDT
There's still some debate going on, which is why i haven't marked fixed yet (or done the test).

I think I'm going to back out the pref change and just keep it at 1 (so we'll match WinIE).
Comment 10 mitz 2006-10-09 17:39:23 PDT
Comment on attachment 10745 [details]
Patch.

Clearing r+ to keep this from showing up in the commit queue. Leaving the bug open pending a layout test.
Comment 11 Robert Blaut 2008-02-05 03:38:39 PST
IMO bug 13891 is related to this bug.
Comment 12 Robert Blaut 2008-02-09 16:10:01 PST
The bug is related to bug 15086.
Comment 13 Alexey Proskuryakov 2010-05-15 14:49:01 PDT
*** Bug 39148 has been marked as a duplicate of this bug. ***
Comment 14 Alexey Proskuryakov 2010-05-15 14:50:51 PDT
What's the status of this bug? Per comment 8, it was fixed, but the behavior is still the same according to the above duplicate.
Comment 15 mitz 2010-06-21 15:28:37 PDT
<rdar://problem/7838374>
Comment 16 Dave Hyatt 2010-11-16 14:58:39 PST
Created attachment 74044 [details]
Patch
Comment 17 Dave Hyatt 2010-11-16 15:29:19 PST
Fixed in r72141.
Comment 18 Dave Hyatt 2010-11-16 15:30:10 PST
*** Bug 49582 has been marked as a duplicate of this bug. ***
Comment 19 WebKit Review Bot 2010-11-16 20:07:14 PST
http://trac.webkit.org/changeset/72141 might have broken Leopard Intel Debug (Tests)
Comment 20 Suresh Voruganti 2011-02-22 07:57:09 PST
Pls cherry pick the fix to Qtwebkit 2.1.x branch because this patch fixes  failure
 "First rectangle shows two colors when accessing a link on CSS 3 color public test suite." in QtTestBrowser in Symbian.
Comment 21 Ademar Reis 2011-02-28 14:17:36 PST
(In reply to comment #20)
> Pls cherry pick the fix to Qtwebkit 2.1.x branch because this patch fixes  failure
>  "First rectangle shows two colors when accessing a link on CSS 3 color public test suite." in QtTestBrowser in Symbian.

r72141 is too risky and complex to be added to qtwebkit-2.1.x. When it landed on trunk, it introduced several small regressions (see, for example, bug 49846, bug 49638, bug 52765 and bug 52265, plus other references in the git log).

A backport would be needed and substantial Q&A to minimize the risk of regressions. Since this is not part of the qtwebkit-2.1.x scope and is marked as "nice-to-have", I'm removing it from the meta-bug.