Changeset 85066 in webkit


Ignore:
Timestamp:
Apr 27, 2011 11:21:38 AM (13 years ago)
Author:
Martin Robinson
Message:

2011-04-27 Martin Robinson <mrobinson@igalia.com>

Reviewed by Eric Seidel.

[GTK] Menulists do not follow text direction when rendering options with right-to-left text
https://bugs.webkit.org/show_bug.cgi?id=54038

  • platform/gtk/Skipped: Unskip passing test.
  • platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.checksum: Added.
  • platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png: Added.
  • platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt: Added.

2011-04-27 Martin Robinson <mrobinson@igalia.com>

Reviewed by Eric Seidel.

[GTK] Menulists do not follow text direction when rendering options with right-to-left text
https://bugs.webkit.org/show_bug.cgi?id=54038

Fix rendering of menulists that contain right-to-left text. Text direction
inside a menulist now follows the alignment of its contents.

  • WebCoreSupport/ChromeClientGtk.cpp: (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): Return false instead of true. (WebKit::ChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Return true instead of false.
Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r85064 r85066  
     12011-04-27  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] Menulists do not follow text direction when rendering options with right-to-left text
     6        https://bugs.webkit.org/show_bug.cgi?id=54038
     7
     8        * platform/gtk/Skipped: Unskip passing test.
     9        * platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.checksum: Added.
     10        * platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png: Added.
     11        * platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt: Added.
     12
    1132011-02-03  Martin Robinson  <mrobinson@igalia.com>
    214
  • trunk/LayoutTests/platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt

    r82033 r85066  
    2727          RenderBlock (anonymous) at (1,1) size 498x25
    2828            RenderText at (3,3) size 181x19
    29               text run at (3,3) width 35: "First "
    30               text run at (38,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    31               text run at (94,3) width 18: "03"
    32               text run at (112,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    33               text run at (155,3) width 29: " fifth"
     29              text run at (3,3) width 25: "fifth"
     30              text run at (28,3) width 60 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
     31              text run at (88,3) width 18: "03"
     32              text run at (106,3) width 47 RTL: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
     33              text run at (153,3) width 31: "First"
    3434        RenderBlock {DIV} at (0,95) size 470x35
    3535          RenderText {#text} at (10,10) size 155x15
     
    4242          RenderBlock (anonymous) at (1,1) size 498x25
    4343            RenderText at (3,3) size 181x19
    44               text run at (3,3) width 35: "First "
    45               text run at (38,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    46               text run at (94,3) width 18: "03"
    47               text run at (112,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    48               text run at (155,3) width 29: " fifth"
     44              text run at (3,3) width 181 LTR override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
    4945        RenderBlock {DIV} at (0,161) size 470x35
    5046          RenderText {#text} at (10,10) size 155x15
     
    5349          RenderBlock (anonymous) at (1,1) size 498x25
    5450            RenderText at (3,3) size 181x19
    55               text run at (3,3) width 35: "First "
    56               text run at (38,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    57               text run at (94,3) width 18: "03"
    58               text run at (112,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    59               text run at (155,3) width 29: " fifth"
     51              text run at (3,3) width 181 RTL override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
    6052        RenderBlock {DIV} at (0,227) size 470x35
    6153          RenderText {#text} at (10,10) size 155x15
     
    6456        RenderMenuList {SELECT} at (0,0) size 500x27 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    6557          RenderBlock (anonymous) at (1,1) size 498x25
    66             RenderText at (23,3) size 181x19
    67               text run at (23,3) width 35: "First "
    68               text run at (58,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    69               text run at (114,3) width 18: "03"
    70               text run at (132,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    71               text run at (175,3) width 29: " fifth"
     58            RenderText at (314,3) size 181x19
     59              text run at (314,3) width 35: "First "
     60              text run at (349,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
     61              text run at (405,3) width 18: "03"
     62              text run at (423,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
     63              text run at (466,3) width 29: " fifth"
    7264        RenderBlock {DIV} at (0,29) size 470x35
    7365          RenderText {#text} at (305,10) size 155x15
     
    7971        RenderMenuList {SELECT} at (0,66) size 500x27 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    8072          RenderBlock (anonymous) at (1,1) size 498x25
    81             RenderText at (23,3) size 181x19
    82               text run at (23,3) width 35: "First "
    83               text run at (58,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    84               text run at (114,3) width 18: "03"
    85               text run at (132,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    86               text run at (175,3) width 29: " fifth"
     73            RenderText at (314,3) size 181x19
     74              text run at (314,3) width 25: "fifth"
     75              text run at (339,3) width 60 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} "
     76              text run at (399,3) width 18: "03"
     77              text run at (417,3) width 47 RTL: " \x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
     78              text run at (464,3) width 31: "First"
    8779        RenderBlock {DIV} at (0,95) size 470x35
    8880          RenderText {#text} at (305,10) size 155x15
     
    9486        RenderMenuList {SELECT} at (0,132) size 500x27 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    9587          RenderBlock (anonymous) at (1,1) size 498x25
    96             RenderText at (23,3) size 181x19
    97               text run at (23,3) width 35: "First "
    98               text run at (58,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    99               text run at (114,3) width 18: "03"
    100               text run at (132,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    101               text run at (175,3) width 29: " fifth"
     88            RenderText at (314,3) size 181x19
     89              text run at (314,3) width 181 LTR override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
    10290        RenderBlock {DIV} at (0,161) size 470x35
    10391          RenderText {#text} at (305,10) size 155x15
     
    10593        RenderMenuList {SELECT} at (0,198) size 500x27 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    10694          RenderBlock (anonymous) at (1,1) size 498x25
    107             RenderText at (23,3) size 181x19
    108               text run at (23,3) width 35: "First "
    109               text run at (58,3) width 56 RTL: ") \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA}"
    110               text run at (114,3) width 18: "03"
    111               text run at (132,3) width 43 RTL: "\x{5E9}\x{5E0}\x{5D9}\x{5D4} ("
    112               text run at (175,3) width 29: " fifth"
     95            RenderText at (314,3) size 181x19
     96              text run at (314,3) width 181 RTL override: "First \x{5E9}\x{5E0}\x{5D9}\x{5D4} (03) \x{5E8}\x{5D1}\x{5D9}\x{5E2}\x{5D9}\x{5EA} fifth"
    11397        RenderBlock {DIV} at (0,227) size 470x35
    11498          RenderText {#text} at (305,10) size 155x15
  • trunk/Source/WebKit/gtk/ChangeLog

    r85061 r85066  
     12011-04-27  Martin Robinson  <mrobinson@igalia.com>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [GTK] Menulists do not follow text direction when rendering options with right-to-left text
     6        https://bugs.webkit.org/show_bug.cgi?id=54038
     7
     8        Fix rendering of menulists that contain right-to-left text. Text direction
     9        inside a menulist now follows the alignment of its contents.
     10
     11        * WebCoreSupport/ChromeClientGtk.cpp:
     12        (WebKit::ChromeClient::selectItemWritingDirectionIsNatural): Return false instead of true.
     13        (WebKit::ChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Return true instead of false.
     14
    1152011-04-27  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp

    r85061 r85066  
    687687bool ChromeClient::selectItemWritingDirectionIsNatural()
    688688{
     689    return false;
     690}
     691
     692bool ChromeClient::selectItemAlignmentFollowsMenuWritingDirection()
     693{
    689694    return true;
    690 }
    691 
    692 bool ChromeClient::selectItemAlignmentFollowsMenuWritingDirection()
    693 {
    694     return false;
    695695}
    696696
Note: See TracChangeset for help on using the changeset viewer.