Closed
Bug 386065
Opened 17 years ago
Closed 17 years ago
legend {font-size:0;} still shows the text (yahoo.com mainpage)
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9beta1
People
(Reporter: u88484, Assigned: cpearce)
References
()
Details
(Keywords: regression, testcase, top100)
Attachments
(4 files, 2 obsolete files)
2.76 KB,
image/png
|
Details | |
204 bytes,
text/html
|
Details | |
4.17 KB,
patch
|
cpearce
:
review+
cpearce
:
superreview+
|
Details | Diff | Splinter Review |
2.30 KB,
patch
|
Details | Diff | Splinter Review |
On www.yahoo.com there is a <legend> form control for the search box that is showing up even with css enabled (I understand the legend tag as not supposed to show if forms are rendered in a graphical manner). See next attachments for screenshot and reduced code. I probably did not title the bug correctly so forgive me. I'm using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/20070626 Minefield/3.0a6pre and started noticing this a few days ago. Will check to see if its regression and the range if so.
This regressed between 2007-06-20-04 and 2007-06-21-07, I'm guessing Bug 367177 – Turn on nsTextFrameThebes caused this. I suck at using the tinderbox to find regression windows so please forgive me for not narrowing it down even more.
Updated•17 years ago
|
Flags: blocking1.9?
Keywords: regression
I think the old text frame had specific checks for 0 font size. That said, I was never happy about them, since they encourage Web sites to use tricks that are broken by the minimum font size pref. (Then again, we could make the minimum font size pref work better and not change 0.)
Flags: blocking1.9? → blocking1.9+
Assignee | ||
Comment 4•17 years ago
|
||
What are we aiming for here? Should the behaviour match FF2, i.e. in the test case should there be a gap of white space in the top of the fieldset's border box? (This is the invisible size-0 legend text's padding/margin). Or should the textframe vanish, making the fieldset outline unbroken, as if there was no legend text? [Taking]
Status: NEW → ASSIGNED
I think we should still have the gap. This is not about changing the behaviour of fieldset, it's just about making size 0 text not display anything.
Assignee | ||
Comment 6•17 years ago
|
||
This patches MakeTextRun() in layout/generic/nsTextFrameThebes.cpp so that if it detects its encountering text which is font-size 0, it will make a text run which contains the characters which have been SetMissing(). This way text runs with font-size 0 are omitted from metric calculations and painting. I also needed to change gfxTextRun::FindFirstGlyphRunContaining() slightly to prevent an assertion firing, as the gfxTextRun would have an empty mGlyphRuns when all its glyphs as missing.
Assignee: nobody → chris
Attachment #284407 -
Flags: review?(roc)
Assignee | ||
Comment 7•17 years ago
|
||
This is similar to the previous, but has some refactorings based on suggestions by ROC: * Moved MakeMissingGlyphsTextRun() into gfxTextRunWordCache.cpp. * MakeMissingGlyphsTextRun() now adds a glyph run to the new text run. * Removed SetAllGlyphsMissing(); it was not needed.
Attachment #284407 -
Attachment is obsolete: true
Attachment #284412 -
Flags: review?(roc)
Attachment #284407 -
Flags: review?(roc)
Comment on attachment 284412 [details] [diff] [review] Patch v2 - Previous patch refactored This is fine, just a cuople of things could be better: -- MakeMissingGlyphsTextRun would be better named MakeBlankTextRun, just to be clear that we're not going to show the "hexbox" fallback we would normally show for missing glyphs -- You should probably document somewhere that we're short-circuiting for size 0 fonts because Windows and ATSUI, at least, can't handle a size 0 request properly.
Attachment #284412 -
Flags: superreview+
Attachment #284412 -
Flags: review?(roc)
Attachment #284412 -
Flags: review+
Assignee | ||
Comment 9•17 years ago
|
||
Carrying over review from previous patch, only minor style changes as per ROC's suggestions from Comment 8.
Attachment #284412 -
Attachment is obsolete: true
Attachment #284512 -
Flags: superreview+
Attachment #284512 -
Flags: review+
Keywords: checkin-needed
Comment 10•17 years ago
|
||
Checking in gfx/src/thebes/nsThebesFontMetrics.cpp; /cvsroot/mozilla/gfx/src/thebes/nsThebesFontMetrics.cpp,v <-- nsThebesFontMetrics.cpp new revision: 1.39; previous revision: 1.38 done Checking in gfx/thebes/src/gfxTextRunWordCache.cpp; /cvsroot/mozilla/gfx/thebes/src/gfxTextRunWordCache.cpp,v <-- gfxTextRunWordCache.cpp new revision: 1.11; previous revision: 1.10 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
Reporter | ||
Comment 11•17 years ago
|
||
Verified that the text no longer shows on yahoo.com.
Status: RESOLVED → VERIFIED
Comment 12•17 years ago
|
||
Updated•17 years ago
|
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•