Bug 26367 - Remove the globals from bidi.cpp
Summary: Remove the globals from bidi.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-12 22:22 PDT by Dave Hyatt
Modified: 2009-06-12 23:04 PDT (History)
0 users

See Also:


Attachments
Patch (31.08 KB, patch)
2009-06-12 22:22 PDT, Dave Hyatt
no flags Details | Formatted Diff | Diff
Patch (29.48 KB, patch)
2009-06-12 22:45 PDT, Dave Hyatt
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2009-06-12 22:22:03 PDT
The global variables need to be removed from bidi.cpp.
Comment 1 Dave Hyatt 2009-06-12 22:22:35 PDT
Created attachment 31228 [details]
Patch
Comment 2 Dave Hyatt 2009-06-12 22:45:24 PDT
Created attachment 31229 [details]
Patch
Comment 3 mitz 2009-06-12 22:58:43 PDT
Comment on attachment 31229 [details]
Patch

> +    if (lBreak.obj && lineMidpointState.m_numMidpoints && lineMidpointState.m_numMidpoints % 2 == 0) {

The style guidelines say you should avoid == 0 and use !(lineMidpointState.m_numMidpoints % 2).

> +        if (lineMidpointState.m_numMidpoints % 2 == 1) {

Here you can just omit the == 1.

> -            chopMidpointsAt(lBreak.obj, lBreak.pos-2);
> +            chopMidpointsAt(lineMidpointState, lBreak.obj, lBreak.pos-2);

Please add spaces around the -.

r=me assuming layout tests pass. This code is kinda hot so it would be good to verify that any changes do not cause a perf regression.
Comment 4 Dave Hyatt 2009-06-12 23:04:51 PDT
Fixed in r44649.