Closed
Bug 139380
Opened 23 years ago
Closed 23 years ago
duplicate code in nsFontMetricsXlib.cpp/nsFontMetricsGTK.cpp
Categories
(SeaMonkey :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.0
People
(Reporter: mike, Assigned: roland.mainz)
Details
(Keywords: fonts, regression)
Attachments
(1 file, 1 obsolete file)
2.51 KB,
patch
|
roland.mainz
:
review+
attinasi
:
superreview+
jesup
:
approval+
|
Details | Diff | Splinter Review |
from LXR
4473 encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
4474 encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
I have commented out the second line, rebuilt, and have been running fine
without new errors.
Comment 1•23 years ago
|
||
-> Gisburn
This is from bug 80224...
CC timecop@network.email.ne.jp
Assignee: Matti → Roland.Mainz
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Assignee | ||
Comment 2•23 years ago
|
||
nsFontMetricsGTK.cpp has the same "flaw" ...
Summary: duplicate code in nsFontMetricsXlib.cpp → duplicate code in nsFontMetricsXlib.cpp/nsFontMetricsGTK.cpp
Assignee | ||
Comment 3•23 years ago
|
||
Comment 5•23 years ago
|
||
r=bstell@ix.netcom.com
thanks for finding and fixing this
Updated•23 years ago
|
Attachment #80841 -
Flags: review+
Comment 6•23 years ago
|
||
Comment on attachment 80841 [details] [diff] [review]
Patch for 2002-04-21-08-trunk
sr=attinasi :)
Attachment #80841 -
Flags: superreview+
Assignee | ||
Comment 7•23 years ago
|
||
Patch checked in
(http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=MozillaTinderboxAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=peterv%25netscape.com&whotype=match&sortby=Date&hours=2&date=explicit&mindate=1019820540&maxdate=1019820960&cvsroot=%2Fcvsroot),
marking bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 8•23 years ago
|
||
Doesn't this change the logic?
PRInt32 encodingHyphen = aFFREName.FindChar('-');
encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
- encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
aFFREName.Truncate(encodingHyphen+1);
aFFREName.Append(aReplacementEncoding);
Looks to me that we now truncate after the 2nd hyphen instead of the 3rd.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 9•23 years ago
|
||
and saying it explicitly:
Isn't this function now broken?
Updated•23 years ago
|
Severity: minor → major
Priority: -- → P2
Comment 10•23 years ago
|
||
and of course my mistake in approving this.
Comment 11•23 years ago
|
||
Roland: when you fix this would you kindly add a comment explaining this and
also add comments to the other places where there is similar login; eg:
FFREToXLFDPattern?
Reporter | ||
Comment 12•23 years ago
|
||
maybe something like this would be better than?
PRInt32 charsetHyphen;
int x;
for(x=0;x<3;x++)
{
charsetHyphen = oPattern.FindChar('-', charsetHyphen + 1);
}
oPattern.Insert("-*-*-*-*-*-*-*-*-*-*", charsetHyphen);
Comment 13•23 years ago
|
||
A comment would do work.
A loop would work (just be sure to initialize charsetHyphen).
Comment 14•23 years ago
|
||
> A comment would do work.
By this I mean: put back the original code and add a comment so people in the
future do not make get confused and break the logic.
Either one is okay with me.
Comment 15•23 years ago
|
||
> from LXR
> 4473 encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
> 4474 encodingHyphen = aFFREName.FindChar('-', encodingHyphen + 1);
>
> I have commented out the second line, rebuilt, and have been running fine
> without new errors.
Part of the error occured here. Not seeing an error does not infer that things
are working correctly.
To make the font system tolerant to the vagaries of fonts on different systems
I spent months writing code to find alternate (fallback) fonts. Because the font
system has fallback depth a bustage like this did not cause a catastrophic
failure. The code just fell to the next fallback layer.
I guess this means that as people who do not understand the code make changes
it seems likely that they may well bust things.
did not
Assignee | ||
Updated•23 years ago
|
Attachment #80841 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Comment 17•23 years ago
|
||
Comment 19•23 years ago
|
||
Comment 20•23 years ago
|
||
Comment on attachment 83286 [details] [diff] [review]
Patch for 2002-05-08-08-trunk, revert to old code and add comments to avoid this "trap" in the future
rsr=attinasi
Attachment #83286 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Attachment #83286 -
Flags: review+
Comment 21•23 years ago
|
||
Comment on attachment 83286 [details] [diff] [review]
Patch for 2002-05-08-08-trunk, revert to old code and add comments to avoid this "trap" in the future
a=rjesup@wgate.com
Attachment #83286 -
Flags: approval+
Comment 22•23 years ago
|
||
Patch checked into branch for gisburn. Still needs to hit trunk.
Updated•23 years ago
|
Keywords: fixed1.0.0
Comment 23•23 years ago
|
||
Fix checked into trunk for gisburn
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•