Bug 34865 - REGRESSION (r50301): Problem selecting text in a Devanagari website
Summary: REGRESSION (r50301): Problem selecting text in a Devanagari website
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P1 Normal
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2010-02-11 17:33 PST by mitz
Modified: 2010-02-15 14:57 PST (History)
2 users (show)

See Also:


Attachments
Account for non-monotonic character-to-glyph mapping (10.59 KB, patch)
2010-02-11 17:36 PST, mitz
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.