Bug 34865

Summary: REGRESSION (r50301): Problem selecting text in a Devanagari website
Product: WebKit Reporter: mitz
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, webkit.review.bot
Priority: P1 Keywords: InRadar, Regression
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Account for non-monotonic character-to-glyph mapping simon.fraser: review+

Description mitz 2010-02-11 17:33:30 PST
<rdar://problem/7609268>

Patch forthcoming.
Comment 1 mitz 2010-02-11 17:36:50 PST
Created attachment 48598 [details]
Account for non-monotonic character-to-glyph mapping
Comment 2 WebKit Review Bot 2010-02-11 17:40:51 PST
Attachment 48598 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/platform/graphics/mac/ComplexTextController.h:91:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Simon Fraser (smfr) 2010-02-12 07:58:10 PST
Comment on attachment 48598 [details]
Account for non-monotonic character-to-glyph mapping

> Index: WebCore/ChangeLog
> ===================================================================
> +        * platform/graphics/mac/ComplexTextController.cpp:
> +        (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_isMonotonic.
> +        (WebCore::ComplexTextController::ComplexTextRun::setIsMonotonic): Added. Sets m_isMonotonic,
> +        and if the run is not monotonic, populates m_lastInidices with the end offsets of each glyphâs

A typo and a garbled curly quote here (and one more lower down).

> Index: WebCore/platform/graphics/mac/ComplexTextController.cpp
> ===================================================================

> +void ComplexTextController::ComplexTextRun::setIsMonotonic(bool isMonotonic)
> +{
> +    m_isMonotonic = isMonotonic;
> +    if (isMonotonic)
> +        return;

Why doesn't this do the usual (if )isMonotonic == m_isMonotonic) return;?

Also, if changing from non-monotonic to monotonic, should you clear m_lastIndices?

> Index: WebCore/platform/graphics/mac/ComplexTextController.h
> ===================================================================

> +        Vector<CFIndex, 64> m_lastIndices;

The name of this member doesn't immediately communicate what it stores. Maybe m_glyphEndOffsets or something?

r=me
Comment 4 mitz 2010-02-12 11:21:14 PST
Fixed in <http://trac.webkit.org/changeset/54729>.
Comment 5 Brian Weinstein 2010-02-15 14:57:48 PST
This test fails on Windows, added to Skipped list in r54799.