Changeset 155014 in webkit


Ignore:
Timestamp:
Sep 3, 2013 6:13:08 PM (11 years ago)
Author:
enrica@apple.com
Message:

Can't select Katakana word by double-clicking.
<rdar://problem/14654926>

Reviewed by Alexey Proskuryakov and Ryosuke Niwa.

Source/WebCore:

For some languages, like Japanese we need
to use more context for word breaking.

New test: editing/selection/doubleclick-japanese-text.html

  • platform/text/TextBoundaries.h:

(WebCore::requiresContextForWordBoundary):

Source/WTF:

For some languages, like Japanese we need
to use more context for word breaking.
I've renamed the function to better reflect its use
and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.

  • wtf/unicode/icu/UnicodeIcu.h:

(WTF::Unicode::requiresComplexContextForWordBreaking):

LayoutTests:

Added new test for this scenario.

  • editing/selection/doubleclick-japanese-text-expected.txt: Added.
  • editing/selection/doubleclick-japanese-text.html: Added.
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155012 r155014  
     12013-09-03  Enrica Casucci  <enrica@apple.com>
     2
     3        Can't select Katakana word by double-clicking.
     4        <rdar://problem/14654926>
     5
     6        Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
     7
     8        Added new test for this scenario.
     9
     10        * editing/selection/doubleclick-japanese-text-expected.txt: Added.
     11        * editing/selection/doubleclick-japanese-text.html: Added.
     12
    1132013-09-03  Benjamin Poulain  <benjamin@webkit.org>
    214
  • trunk/Source/WTF/ChangeLog

    r154997 r155014  
     12013-09-03  Enrica Casucci  <enrica@apple.com>
     2
     3        Can't select Katakana word by double-clicking.
     4        <rdar://problem/14654926>
     5
     6        Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
     7
     8        For some languages, like Japanese we need
     9        to use more context for word breaking.
     10        I've renamed the function to better reflect its use
     11        and remove the unused hasLineBreakingPropertyComplexContextOrIdeographic.
     12
     13        * wtf/unicode/icu/UnicodeIcu.h:
     14        (WTF::Unicode::requiresComplexContextForWordBreaking):
     15
    1162013-09-03  Andreas Kling  <akling@apple.com>
    217
  • trunk/Source/WTF/wtf/unicode/icu/UnicodeIcu.h

    r154294 r155014  
    189189}
    190190
    191 inline bool hasLineBreakingPropertyComplexContext(UChar32 c)
    192 {
    193     return u_getIntPropertyValue(c, UCHAR_LINE_BREAK) == U_LB_COMPLEX_CONTEXT;
    194 }
    195 
    196 inline bool hasLineBreakingPropertyComplexContextOrIdeographic(UChar32 c)
     191#define WK_LB_CONDITIONAL_JAPANESE_STARTER 37
     192
     193inline bool requiresComplexContextForWordBreaking(UChar32 c)
    197194{
    198195    int32_t prop = u_getIntPropertyValue(c, UCHAR_LINE_BREAK);
    199     return prop == U_LB_COMPLEX_CONTEXT || prop == U_LB_IDEOGRAPHIC;
     196    return prop == U_LB_COMPLEX_CONTEXT || prop == WK_LB_CONDITIONAL_JAPANESE_STARTER || prop == U_LB_IDEOGRAPHIC;
    200197}
    201198
  • trunk/Source/WebCore/ChangeLog

    r155013 r155014  
     12013-09-03  Enrica Casucci  <enrica@apple.com>
     2
     3        Can't select Katakana word by double-clicking.
     4        <rdar://problem/14654926>
     5
     6        Reviewed by Alexey Proskuryakov and Ryosuke Niwa.
     7
     8        For some languages, like Japanese we need
     9        to use more context for word breaking.
     10
     11        New test: editing/selection/doubleclick-japanese-text.html
     12
     13        * platform/text/TextBoundaries.h:
     14        (WebCore::requiresContextForWordBoundary):
     15
    1162013-09-03  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/WebCore/platform/text/TextBoundaries.h

    r72887 r155014  
    3131namespace WebCore {
    3232
     33    // FIXME: this function won't be needed together with the function
     34    // it calls when https://bugs.webkit.org/show_bug.cgi?id=120656
     35    // will be fixed.
    3336    inline bool requiresContextForWordBoundary(UChar32 ch)
    3437    {
    35         return WTF::Unicode::hasLineBreakingPropertyComplexContext(ch);
     38        return WTF::Unicode::requiresComplexContextForWordBreaking(ch);
    3639    }
    3740
Note: See TracChangeset for help on using the changeset viewer.