Bug 6410

Summary: Performance regression in text relayout due to bad BidiContext equality testing
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Fix the BidiContext == darin: review+

mitz
Reported 2006-01-07 06:00:54 PST
The fix for bug 5172 added that for two line-ends to match (and thus for relayout to stop), they should also have the same bidi context. The bug is that the == operator for BidiContexts always returns false for contexts that don't have a parent, so in most cases, relayout will unnecessarily proceed through the last line. Fix coming up.
Attachments
Fix the BidiContext == (1.66 KB, patch)
2006-01-07 06:12 PST, mitz
darin: review+
mitz
Comment 1 2006-01-07 06:12:33 PST
Created attachment 5525 [details] Fix the BidiContext ==
Darin Adler
Comment 2 2006-01-07 08:45:15 PST
Comment on attachment 5525 [details] Fix the BidiContext == Good catch. r=me
Darin Adler
Comment 3 2006-01-07 08:46:45 PST
Comment on attachment 5525 [details] Fix the BidiContext == Another way to write this is: return c1.parent == c2.parent || (c1.parent && *c1.parent == *c2.parent); Not sure whether I like my version better or yours.
Darin Adler
Comment 4 2006-01-07 08:57:18 PST
Comment on attachment 5525 [details] Fix the BidiContext == Oops, my bad. The alternative version is: return c1.parent == c2.parent || (c1.parent && c2.parent && *c1.parent == *c2.parent); My previous suggestion was wrong and could lead to nil-deref.
mitz
Comment 5 2006-01-10 07:30:17 PST
Eric landed my asymmetric version :-)
Note You need to log in before you can comment on or make changes to this bug.