if-else cascade cleanup

VERIFIED FIXED in mozilla0.9.4

Status

()

Core
Layout: Text
P1
normal
VERIFIED FIXED
17 years ago
10 years ago

People

(Reporter: Ulrich Drepper, Assigned: dbaron)

Tracking

Trunk
mozilla0.9.4
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
I came across this while reading the code.  The nsTextFrame::Paint function
currently contains a mess of if-else cases to decide whether PaintUnicodeText or
PaintAsciiText has to be used.  This mess cannot be cleaned up automatically by
the compiler (at least gcc cannot do it).  I'll attach a patch now which cleans
this code up and makes it IMO much more readable.  It saves 76 bytes on x86 :-).
(Reporter)

Comment 1

17 years ago
Created attachment 41561 [details] [diff] [review]
if-else cascade cleanup
(Reporter)

Updated

17 years ago
Keywords: patch
I guess I'll try to get this in.
Assignee: karnaze → dbaron
Component: Layout → BiDi Hebrew & Arabic
Priority: -- → P1
Target Milestone: --- → mozilla0.9.3
Am I missing something amid the convoluted logic here or did you remove the test
of |(hints & NS_RENDERING_HINT_FAST_8BIT_TEXT)|?
Status: NEW → ASSIGNED
Created attachment 42827 [details] [diff] [review]
better patch?  (still respects hint from RC)

Comment 5

17 years ago
r/sr=waterson

Comment 6

17 years ago
Yep, that's what I ended up with after merging the if clauses.

r=jag
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Fix checked in 2001-07-31 20:10 PDT.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 8

17 years ago
Since I 'm not exactly sure how to test this, I'm marking verified based on the
last comments.

Status: RESOLVED → VERIFIED

Updated

10 years ago
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: chrispetersen → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.