Closed
Bug 78526
Opened 24 years ago
Closed 24 years ago
[FIX]text in form controls has become too small under strict mode
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: jameslariviere, Assigned: rods)
References
()
Details
Attachments
(5 files)
98.21 KB,
image/png
|
Details | |
3.59 KB,
patch
|
Details | Diff | Splinter Review | |
2.39 KB,
patch
|
Details | Diff | Splinter Review | |
4.04 KB,
patch
|
Details | Diff | Splinter Review | |
3.55 KB,
patch
|
Details | Diff | Splinter Review |
Over the past week the default monospace font size used in JUST strict mode has
become smaller (too small in my opinion) for textarea, input[type="text"], etc.
for form controls. I need a magnifying glass to read damn text in forms.
I will post up a screenshot comparing last weeks nighly to current (5-1-04 win
build) on a site I work on (url field).
Reporter | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
I fixed Bug 64331 so the nsDeviceContextWin no longer added 2 point sizes to the
font when it got it's system properties. The logFontHieght
can come back negative in some instances and the rounding was incorrect.
I did a lot of testing, but forgot to test it in Strict mode.
In nsCSStyleRule.cpp (ages ago) Pierre added the platform specific ifdefs when
we are in quirks mode to use the appropriate font name and
font size.
Since I have now fixed a kludge in nsDeviceContextWin.cpp the font for a "Field"
is now 2 point sizes too small, but if we were to use the
default size, but NOT the name, for Strict mode it works again.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Updated•24 years ago
|
Summary: text in form controls has become too small under strict mode → [FIX?]text in form controls has become too small under strict mode
Target Milestone: --- → mozilla0.9.1
Reporter | ||
Comment 3•24 years ago
|
||
Then, this should be an easy fix. Good. :-)
THanks rod.
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Assignee | ||
Comment 4•24 years ago
|
||
Assignee | ||
Comment 5•24 years ago
|
||
Ignore this last patch....
Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
With the latest patch installed, I have a few questions.
For the eSystemAttr_Font_Field: in strict mode the font size is reduced 2 point
sizes, but for NavQuirks it isn't.
for both eSystemAttr_Font_Button, eSystemAttr_Font_List the font is size is
always reduced by 2 points regardless of whether its strict or NavQuirks?
Is this correct?. If it is please add a comment to the code to explain why the
size is reduced in at all and why it only needs to be reduced for
eSystemAttr_Font_Field.
switch (sysID) {
case eSystemAttr_Font_Field:
if (eCompatibility_NavQuirks == mode) {
font->mFont.name.AssignWithConversion("monospace");
font->mFont.size = defaultFixedFont.size;
} else {
font->mFont.size = PR_MAX(defaultFont.size -
NSIntPointsToTwips(2), 0);
}
break;
case eSystemAttr_Font_Button:
case eSystemAttr_Font_List:
if (eCompatibility_NavQuirks == mode) {
font->mFont.name.AssignWithConversion("sans-serif");
}
font->mFont.size = PR_MAX(defaultFont.size -
NSIntPointsToTwips(2), 0);
break;
}
Assignee | ||
Comment 8•24 years ago
|
||
For the text field the catch is that in NavQuirks we use a fixed font and
therefore we use the default size as defined by the browser, which happens to be
the correct point size.
In strict mode, we now want to use a proportional font and so we use a point
size as defined by the browser. Well, it wouldn't make any sense to use a
proportional font and the "fixed" font size to get the correct results. So it
means we need to use the "defaultFont" size which is a proportional font (and as
it turns out we are then doing what we need to do for buttons) Which is use the
default size - minus 2 points sizes because it is too large otherwise.
For button and selects we always use the default size minus 2 points because
when in NavQuirks or when using the system font it is always a proportional font
and since we want to use a size that is defined by the browser, we once again
use the defaultFont size and decrease it by 2 point sizes.
Also, note that for buttons and select the font difference between sans-serif
and the system default which is "MS Sans Serif" is very minor, but still very
important.
I will attach a new patch with a less verbose explanation.
Assignee | ||
Updated•24 years ago
|
Summary: [FIX?]text in form controls has become too small under strict mode → [FIX]text in form controls has become too small under strict mode
Assignee | ||
Comment 9•24 years ago
|
||
Reporter | ||
Comment 10•24 years ago
|
||
Rod, what does this need to get patched in?
Assignee | ||
Comment 11•24 years ago
|
||
It's now up for review
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
sr=attinasi
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
The patch is the same it has just moved files because og hyatt's rework of style
resolution.
a=dbaron for trunk checkin (on behalf of drivers)... although I'm a little
concerned that we have to be messing with system fonts at this level (I would
think what happens in gfx ought to work in all cases).
Sorry this one fell through the cracks for a bit.
Assignee | ||
Comment 17•24 years ago
|
||
I agree Pierre should have NEVER put the platform ifdefs in the code, I think I
may already have filed a bug about removing them.
Assignee | ||
Comment 18•24 years ago
|
||
fixed
Assignee | ||
Comment 19•24 years ago
|
||
fixed, really...
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 20•24 years ago
|
||
verf.
great now I can read form controls again without a microscope ;-).
win build 06-08-20
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•