Bug 51344

Summary: [RTL] WebKit hangs when moving caret in mixed Bidi text
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, enrica, mitz, xji
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
demo
none
patch w/ layout test mitz: review+

Description Ryosuke Niwa 2010-12-20 12:00:31 PST
Created attachment 77021 [details]
demo

This is a variant of the bug 49111.  Open the attachment and WebKit hangs inside VisiblePosition::rightVisuallyDistinctCandidate:

                box = nextBox;
                renderer = box->renderer();
                offset = box->caretLeftmostOffset();
                if (box->bidiLevel() > level) {
                    do {
                        nextBox = box->nextLeafChild();
                    } while (nextBox && nextBox->bidiLevel() > level);
                    // we get stuck in this while loop.

                    if (!nextBox || nextBox->bidiLevel() < level)
                        continue;
                }
Comment 1 Xiaomei Ji 2010-12-20 19:59:55 PST
Created attachment 77076 [details]
patch w/ layout test
Comment 2 Xiaomei Ji 2010-12-20 20:13:50 PST
Committed r74385: <http://trac.webkit.org/changeset/74385>