Closed
Bug 310680
Opened 19 years ago
Closed 19 years ago
[BeOS]EnumFonts uses obsolete lossy conversion method
Categories
(Core Graveyard :: GFX: BeOS, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sergei_d, Assigned: sergei_d)
References
Details
(Keywords: fixed1.8)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
thesuckiestemail
:
review+
mscott
:
approval1.8b5+
|
Details | Diff | Splinter Review |
Somewhat folloup for Bug 200589.
http://lxr.mozilla.org/seamonkey/source/gfx/src/beos/nsFontMetricsBeOS.cpp#568
AssignWithConversion don't look as best method for totally UTF-8 system.
Also we allocate there array for all existing in BeOS fonts, but actual array
may consist even from single font family matching language and type criteria
Assignee | ||
Comment 1•19 years ago
|
||
Uses NS_ConvertUTF8toUTF16(),
reallocs fontname array to real size,
also implements nsFontEnumeratorBeOS::HaveFontFor() as it uses similar code to
EnumFonts().
P.S. It seems last one is used only for automated fontpackage download, but I
never saw this method in action.
IMHO I think the code would be much nicer by using
for()
{
if(wrong case)
continue;
do_right thing();
}
(The nested if's in the first block looks a bit ugly as well)
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 198132 [details] [diff] [review]
patch
taking timeless notuce about null-pointer check after Realloc
Attachment #198132 -
Attachment is obsolete: true
Assignee | ||
Comment 4•19 years ago
|
||
adding NS_ENSURE_TRUE(array, NS_ERROR_OUT_OF_MEMORY) after realloc
Attachment #198136 -
Flags: review?(thesuckiestemail)
Assignee | ||
Updated•19 years ago
|
Assignee: beos → sergei_d
Assignee | ||
Comment 5•19 years ago
|
||
Comment on attachment 198136 [details] [diff] [review]
patch
take tqh notice about breaking loop in HaveFontFor()
Attachment #198136 -
Attachment is obsolete: true
Assignee | ||
Comment 6•19 years ago
|
||
same as before, but loop in HaveFontFor() breaks at first matched font.
Attachment #198144 -
Flags: review?(thesuckiestemail)
Comment on attachment 198144 [details] [diff] [review]
patch
r=thesuckiestemail@yahoo.se
Looks ok to me.
Attachment #198144 -
Flags: review?(thesuckiestemail) → review+
Assignee | ||
Comment 8•19 years ago
|
||
landed:
new revision: 1.42; previous revision: 1.41
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 9•19 years ago
|
||
Comment on attachment 198144 [details] [diff] [review]
patch
BeOS-only fix. Won't affect other platforms. Requesting approval for
MOZILLA_1_8_BRANCH
Attachment #198144 -
Flags: approval1.8b5?
Comment 10•19 years ago
|
||
Comment on attachment 198132 [details] [diff] [review]
patch
+ if (!(array[j] = ToNewUnicode(NS_ConvertUTF8toUTF16((const
char*)family))))
maybe: UTF8ToNewUnicode(nsDependentCString(family)) ?
Comment 11•19 years ago
|
||
Comment on attachment 198144 [details] [diff] [review]
patch
appproving this beos only change. Please land ASAP.
Attachment #198144 -
Flags: approval1.8b5? → approval1.8b5+
Comment 12•19 years ago
|
||
Checking in gfx/src/beos/nsFontMetricsBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp,v <-- nsFontMetricsBeOS.cpp
new revision: 1.40.12.2; previous revision: 1.40.12.1
done
Comment 13•18 years ago
|
||
Comment on attachment 198136 [details] [diff] [review]
patch
removing old review req.
Attachment #198136 -
Flags: review?(thesuckiestemail)
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
•