Closed
Bug 310845
Opened 20 years ago
Closed 20 years ago
[BeOS]Cleanup StringWidth methods in nsRenderingContextBeOS
Categories
(Core Graveyard :: GFX: BeOS, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sergei_d, Assigned: sergei_d)
References
Details
(Keywords: fixed1.8.1)
Attachments
(2 files)
|
1.71 KB,
patch
|
thesuckiestemail
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
|
1.89 KB,
patch
|
thesuckiestemail
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•20 years ago
|
||
simple and obvious patch. Uses regular GetWidh() method everywhere around
nsRenderingContext.
review request
Assignee: beos → sergei_d
Status: NEW → ASSIGNED
Attachment #198347 -
Flags: review?(thesuckiestemail)
| Assignee | ||
Comment 2•20 years ago
|
||
Depends on first, and then enables even more fast string width measurment -
allowing summarize cached glyph widths to whole string width.
If first patch gets reviewed
review request
Attachment #198386 -
Flags: review?(thesuckiestemail)
Attachment #198347 -
Flags: review?(thesuckiestemail) → review+
Comment on attachment 198386 [details] [diff] [review]
additional patch
r=thesuckiestemail@yahoo.se
The charlen = line looks a bit magic, with magic numbers. Maybe it should be
documented.
Attachment #198386 -
Flags: review?(thesuckiestemail) → review+
| Assignee | ||
Comment 5•20 years ago
|
||
Landed in trunk:
nsFontMetricsBeOS.cpp
new revision: 1.44; previous revision: 1.43
nsRenderingContextBeOS.cpp
new revision: 1.56; previous revision: 1.55
P.S. About charlen magic. Even in Be Newsletter where i found this, they wrote
something alike as comment: "Ohh, don't ask us how - but it works!":)
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 6•20 years ago
|
||
as for bigger fix - this is for future, when Bug 297074 will be completed and
fix landed. I can easily implement method for getting glyphs width array, but it
has no sense at moment.
Comment 7•20 years ago
|
||
+ charlen = ((0xE5000000 >> ((*utf8str >> 3) & 0x1E)) & 3) + 1;
how about putting that into a "PRUint8 utf8_char_len(const char* uf8str)" function?
| Assignee | ||
Comment 8•20 years ago
|
||
Heh, biesi, there is such function 15 lines or so above. Even inlined.
But as at moment we use this trick in only place, i decided to avoid this time
such little overhead and put code directly in GetStringWidth
Comment 9•20 years ago
|
||
inline functions cause no overhead, and I think using that function would make
this more readable... but ok, it's your module.
Comment 10•20 years ago
|
||
Comment on attachment 198347 [details] [diff] [review]
patch
Requesting permission to land on the BUGZILLA_1_8_BRANCH.
This is a BeOS-only change and does not affect other platforms.
Note: sergei, apply this one after bug 310708.
Attachment #198347 -
Flags: approval1.8.1?
Updated•20 years ago
|
Attachment #198386 -
Flags: approval1.8.1?
Comment 11•20 years ago
|
||
Comment on attachment 198347 [details] [diff] [review]
patch
a=schrep for drivers for BeOS only change.
Attachment #198347 -
Flags: approval1.8.1? → approval1.8.1+
Comment 12•20 years ago
|
||
Comment on attachment 198386 [details] [diff] [review]
additional patch
a=schrep for drivers for BeOS only change.
Attachment #198386 -
Flags: approval1.8.1? → approval1.8.1+
| Assignee | ||
Comment 13•20 years ago
|
||
applied two patches at once:
Checking in mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp,v <-- nsRenderingContextBeOS.cpp
new revision: 1.51.12.5; previous revision: 1.51.12.4
done
Keywords: fixed1.8.1
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•