⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 169780 in webkit


Ignore:
Timestamp:
Jun 10, 2014, 4:23:46 PM (12 years ago)
Author:
mmaxfield@apple.com
Message:

Japanese text in Google search is rendered too low and clipped
​https://bugs.webkit.org/show_bug.cgi?id=133595

Reviewed by Simon Fraser.

This is a revert of r155324.

Source/WebCore:
By forcing line-height to be normal, r155324 was forcing WebKit to inspect font metrics
to determine the height of a line. This means that if a fallback font was required to
draw a line of text, and the fallback font had a higher ascent than the primary font,
the entire line of text would be pushed down. If we don't force line-height to be normal,
then we use the line-height value instead, which short circuits this mechanism, thereby
not pushing text down.

No new tests (because this is simply a revert)

  • css/html.css:

(input): Deleted.

LayoutTests:

  • fast/dom/HTMLInputElement/input-line-height-expected.txt: Removed.
  • fast/dom/HTMLInputElement/input-line-height.html: Removed.
  • fast/forms/placeholder-position-expected.txt:
  • platform/mac/fast/forms/placeholder-position-expected.png:
  • platform/mac/fast/forms/placeholder-position-expected.txt:
  • platform/mac-mountainlion/fast/forms/placeholder-position-expected.txt:
Location:
trunk
Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r169779 r169780  
     12014-06-10  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Japanese text in Google search is rendered too low and clipped
     4        https://bugs.webkit.org/show_bug.cgi?id=133595
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is a revert of r155324.
     9
     10        * fast/dom/HTMLInputElement/input-line-height-expected.txt: Removed.
     11        * fast/dom/HTMLInputElement/input-line-height.html: Removed.
     12        * fast/forms/placeholder-position-expected.txt:
     13        * platform/mac/fast/forms/placeholder-position-expected.png:
     14        * platform/mac/fast/forms/placeholder-position-expected.txt:
     15        * platform/mac-mountainlion/fast/forms/placeholder-position-expected.txt:
     16
    1172014-06-10  Zalan Bujtas  <zalan@apple.com>
    218
  • trunk/LayoutTests/fast/forms/placeholder-position-expected.txt

    r155408 r169780  
    3030      RenderTextControl {INPUT} at (5,219) size 174x30 [bgcolor=#FFFFFF] [border: (5px solid #000000)]
    3131      RenderBR {BR} at (184,240) size 0x0
    32       RenderTextControl {INPUT} at (2,256) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    33       RenderText {#text} at (127,256) size 4x18
    34         text run at (127,256) width 4: " "
    35       RenderTextControl {INPUT} at (133,256) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    36       RenderText {#text} at (258,256) size 4x18
    37         text run at (258,256) width 4: " "
    38       RenderBR {BR} at (262,270) size 0x0
    39       RenderTextControl {INPUT} at (2,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    40       RenderText {#text} at (127,279) size 4x18
    41         text run at (127,279) width 4: " "
    42       RenderTextControl {INPUT} at (133,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    43       RenderText {#text} at (258,279) size 4x18
    44         text run at (258,279) width 4: " "
    45       RenderTextControl {INPUT} at (264,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    46       RenderText {#text} at (389,279) size 4x18
    47         text run at (389,279) width 4: " "
    48       RenderBR {BR} at (393,293) size 0x0
    49       RenderBR {BR} at (127,330) size 0x0
     32      RenderTextControl {INPUT} at (2,256) size 123x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     33      RenderText {#text} at (127,262) size 4x18
     34        text run at (127,262) width 4: " "
     35      RenderTextControl {INPUT} at (133,256) size 123x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     36      RenderText {#text} at (258,262) size 4x18
     37        text run at (258,262) width 4: " "
     38      RenderBR {BR} at (262,276) size 0x0
     39      RenderTextControl {INPUT} at (2,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     40      RenderText {#text} at (127,291) size 4x18
     41        text run at (127,291) width 4: " "
     42      RenderTextControl {INPUT} at (133,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     43      RenderText {#text} at (258,291) size 4x18
     44        text run at (258,291) width 4: " "
     45      RenderTextControl {INPUT} at (264,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     46      RenderText {#text} at (389,291) size 4x18
     47        text run at (389,291) width 4: " "
     48      RenderBR {BR} at (393,305) size 0x0
     49      RenderBR {BR} at (127,342) size 0x0
    5050layer at (21,13) size 117x13
    5151  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
    … …  
    9696layer at (19,233) size 162x18
    9797  RenderBlock {DIV} at (6,6) size 162x18
    98 layer at (13,267) size 117x13
    99   RenderBlock {DIV} at (3,3) size 117x13
    100     RenderText {#text} at (0,0) size 30x13
    101       text run at (0,0) width 30: "Value"
    102 layer at (144,267) size 117x13
    103   RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    104     RenderText {#text} at (0,0) size 63x13
    105       text run at (0,0) width 63: "placeholder"
    106 layer at (144,267) size 117x13
    107   RenderBlock {DIV} at (3,3) size 117x13
    108 layer at (13,290) size 117x13
     98layer at (13,267) size 117x25
     99  RenderBlock {DIV} at (3,3) size 117x25
     100    RenderText {#text} at (0,6) size 30x13
     101      text run at (0,6) width 30: "Value"
     102layer at (144,267) size 117x25
     103  RenderBlock {DIV} at (3,3) size 117x25 [color=#A9A9A9]
     104    RenderText {#text} at (0,6) size 63x13
     105      text run at (0,6) width 63: "placeholder"
     106layer at (144,267) size 117x25
     107  RenderBlock {DIV} at (3,3) size 117x25
     108layer at (13,302) size 117x13
    109109  RenderBlock {DIV} at (3,3) size 117x13
    110110    RenderText {#text} at (43,0) size 31x13
    111111      text run at (43,0) width 31: "Value"
    112 layer at (144,290) size 117x13
     112layer at (144,302) size 117x13
    113113  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    114114    RenderText {#text} at (27,0) size 63x13
    115115      text run at (27,0) width 63: "placeholder"
    116 layer at (144,290) size 117x13
     116layer at (144,302) size 117x13
    117117  RenderBlock {DIV} at (3,3) size 117x13
    118 layer at (275,290) size 117x13
     118layer at (275,302) size 117x13
    119119  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    120120    RenderText {#text} at (27,0) size 63x13
    121121      text run at (27,0) width 63: "placeholder"
    122 layer at (275,290) size 117x13
     122layer at (275,302) size 117x13
    123123  RenderBlock {DIV} at (3,3) size 117x13
    124 layer at (10,310) size 123x33
    125   RenderTextControl {INPUT} at (2,302) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    126 layer at (13,327) size 117x13
     124layer at (10,322) size 123x33
     125  RenderTextControl {INPUT} at (2,314) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     126layer at (13,339) size 117x13
    127127  RenderBlock {DIV} at (3,17) size 117x13 [color=#A9A9A9]
    128128    RenderText {#text} at (0,0) size 63x13
    129129      text run at (0,0) width 63: "placeholder"
    130 layer at (13,327) size 117x13
     130layer at (13,339) size 117x13
    131131  RenderBlock {DIV} at (3,17) size 117x13
  • trunk/LayoutTests/platform/mac-mountainlion/fast/forms/placeholder-position-expected.txt

    r157961 r169780  
    3030      RenderTextControl {INPUT} at (5,219) size 174x30 [bgcolor=#FFFFFF] [border: (5px solid #000000)]
    3131      RenderBR {BR} at (184,240) size 0x0
    32       RenderTextControl {INPUT} at (2,256) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    33       RenderText {#text} at (127,256) size 4x18
    34         text run at (127,256) width 4: " "
    35       RenderTextControl {INPUT} at (133,256) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    36       RenderText {#text} at (258,256) size 4x18
    37         text run at (258,256) width 4: " "
    38       RenderBR {BR} at (262,270) size 0x0
    39       RenderTextControl {INPUT} at (2,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    40       RenderText {#text} at (127,279) size 4x18
    41         text run at (127,279) width 4: " "
    42       RenderTextControl {INPUT} at (133,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    43       RenderText {#text} at (258,279) size 4x18
    44         text run at (258,279) width 4: " "
    45       RenderTextControl {INPUT} at (264,279) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    46       RenderText {#text} at (389,279) size 4x18
    47         text run at (389,279) width 4: " "
    48       RenderBR {BR} at (393,293) size 0x0
    49       RenderBR {BR} at (127,330) size 0x0
     32      RenderTextControl {INPUT} at (2,256) size 123x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     33      RenderText {#text} at (127,262) size 4x18
     34        text run at (127,262) width 4: " "
     35      RenderTextControl {INPUT} at (133,256) size 123x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     36      RenderText {#text} at (258,262) size 4x18
     37        text run at (258,262) width 4: " "
     38      RenderBR {BR} at (262,276) size 0x0
     39      RenderTextControl {INPUT} at (2,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     40      RenderText {#text} at (127,291) size 4x18
     41        text run at (127,291) width 4: " "
     42      RenderTextControl {INPUT} at (133,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     43      RenderText {#text} at (258,291) size 4x18
     44        text run at (258,291) width 4: " "
     45      RenderTextControl {INPUT} at (264,291) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     46      RenderText {#text} at (389,291) size 4x18
     47        text run at (389,291) width 4: " "
     48      RenderBR {BR} at (393,305) size 0x0
     49      RenderBR {BR} at (127,342) size 0x0
    5050layer at (21,13) size 117x13
    5151  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
    … …  
    9696layer at (19,233) size 162x18
    9797  RenderBlock {DIV} at (6,6) size 162x18
    98 layer at (13,267) size 117x13
    99   RenderBlock {DIV} at (3,3) size 117x13
    100     RenderText {#text} at (0,0) size 30x13
    101       text run at (0,0) width 30: "Value"
    102 layer at (144,267) size 117x13
    103   RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    104     RenderText {#text} at (0,0) size 63x13
    105       text run at (0,0) width 63: "placeholder"
    106 layer at (144,267) size 117x13
    107   RenderBlock {DIV} at (3,3) size 117x13
    108 layer at (13,290) size 117x13
     98layer at (13,267) size 117x25
     99  RenderBlock {DIV} at (3,3) size 117x25
     100    RenderText {#text} at (0,6) size 30x13
     101      text run at (0,6) width 30: "Value"
     102layer at (144,267) size 117x25
     103  RenderBlock {DIV} at (3,3) size 117x25 [color=#A9A9A9]
     104    RenderText {#text} at (0,6) size 63x13
     105      text run at (0,6) width 63: "placeholder"
     106layer at (144,267) size 117x25
     107  RenderBlock {DIV} at (3,3) size 117x25
     108layer at (13,302) size 117x13
    109109  RenderBlock {DIV} at (3,3) size 117x13
    110110    RenderText {#text} at (43,0) size 31x13
    111111      text run at (43,0) width 31: "Value"
    112 layer at (144,290) size 117x13
     112layer at (144,302) size 117x13
    113113  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    114114    RenderText {#text} at (27,0) size 63x13
    115115      text run at (27,0) width 63: "placeholder"
    116 layer at (144,290) size 117x13
     116layer at (144,302) size 117x13
    117117  RenderBlock {DIV} at (3,3) size 117x13
    118 layer at (275,290) size 117x13
     118layer at (275,302) size 117x13
    119119  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    120120    RenderText {#text} at (27,0) size 63x13
    121121      text run at (27,0) width 63: "placeholder"
    122 layer at (275,290) size 117x13
     122layer at (275,302) size 117x13
    123123  RenderBlock {DIV} at (3,3) size 117x13
    124 layer at (10,310) size 123x33
    125   RenderTextControl {INPUT} at (2,302) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    126 layer at (13,327) size 117x13
     124layer at (10,322) size 123x33
     125  RenderTextControl {INPUT} at (2,314) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     126layer at (13,339) size 117x13
    127127  RenderBlock {DIV} at (3,17) size 117x13 [color=#A9A9A9]
    128128    RenderText {#text} at (0,0) size 63x13
    129129      text run at (0,0) width 63: "placeholder"
    130 layer at (13,327) size 117x13
     130layer at (13,339) size 117x13
    131131  RenderBlock {DIV} at (3,17) size 117x13
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt

    r169048 r169780  
    3030      RenderTextControl {INPUT} at (5,219) size 202x30 [bgcolor=#FFFFFF] [border: (5px solid #000000)]
    3131      RenderBR {BR} at (211,240) size 1x0
    32       RenderTextControl {INPUT} at (2,256) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    33       RenderText {#text} at (149,256) size 5x18
    34         text run at (149,256) width 5: " "
    35       RenderTextControl {INPUT} at (155,256) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    36       RenderText {#text} at (302,256) size 5x18
    37         text run at (302,256) width 5: " "
    38       RenderBR {BR} at (306,270) size 1x0
    39       RenderTextControl {INPUT} at (2,279) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    40       RenderText {#text} at (149,279) size 5x18
    41         text run at (149,279) width 5: " "
    42       RenderTextControl {INPUT} at (155,279) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    43       RenderText {#text} at (302,279) size 5x18
    44         text run at (302,279) width 5: " "
    45       RenderTextControl {INPUT} at (308,279) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    46       RenderText {#text} at (455,279) size 5x18
    47         text run at (455,279) width 5: " "
    48       RenderBR {BR} at (459,293) size 1x0
    49       RenderBR {BR} at (149,330) size 1x0
     32      RenderTextControl {INPUT} at (2,256) size 146x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     33      RenderText {#text} at (149,262) size 5x18
     34        text run at (149,262) width 5: " "
     35      RenderTextControl {INPUT} at (155,256) size 146x31 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     36      RenderText {#text} at (302,262) size 5x18
     37        text run at (302,262) width 5: " "
     38      RenderBR {BR} at (306,276) size 1x0
     39      RenderTextControl {INPUT} at (2,291) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     40      RenderText {#text} at (149,291) size 5x18
     41        text run at (149,291) width 5: " "
     42      RenderTextControl {INPUT} at (155,291) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     43      RenderText {#text} at (302,291) size 5x18
     44        text run at (302,291) width 5: " "
     45      RenderTextControl {INPUT} at (308,291) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     46      RenderText {#text} at (455,291) size 5x18
     47        text run at (455,291) width 5: " "
     48      RenderBR {BR} at (459,305) size 1x0
     49      RenderBR {BR} at (149,342) size 1x0
    5050layer at (21,13) size 139x13
    5151  RenderBlock {DIV} at (11,3) size 140x13 [color=#A9A9A9]
    … …  
    9696layer at (19,233) size 190x18
    9797  RenderBlock {DIV} at (6,6) size 190x18
    98 layer at (13,267) size 139x13
    99   RenderBlock {DIV} at (3,3) size 140x13
    100     RenderText {#text} at (0,0) size 30x13
    101       text run at (0,0) width 30: "Value"
    102 layer at (166,267) size 139x13
    103   RenderBlock {DIV} at (3,3) size 140x13 [color=#A9A9A9]
    104     RenderText {#text} at (0,0) size 63x13
    105       text run at (0,0) width 63: "placeholder"
    106 layer at (166,267) size 139x13
    107   RenderBlock {DIV} at (3,3) size 140x13
    108 layer at (13,290) size 139x13
     98layer at (13,267) size 139x25
     99  RenderBlock {DIV} at (3,3) size 140x25
     100    RenderText {#text} at (0,6) size 30x13
     101      text run at (0,6) width 30: "Value"
     102layer at (166,267) size 139x25
     103  RenderBlock {DIV} at (3,3) size 140x25 [color=#A9A9A9]
     104    RenderText {#text} at (0,6) size 63x13
     105      text run at (0,6) width 63: "placeholder"
     106layer at (166,267) size 139x25
     107  RenderBlock {DIV} at (3,3) size 140x25
     108layer at (13,302) size 139x13
    109109  RenderBlock {DIV} at (3,3) size 140x13
    110110    RenderText {#text} at (54,0) size 31x13
    111111      text run at (54,0) width 31: "Value"
    112 layer at (166,290) size 139x13
     112layer at (166,302) size 139x13
    113113  RenderBlock {DIV} at (3,3) size 140x13 [color=#A9A9A9]
    114114    RenderText {#text} at (38,0) size 63x13
    115115      text run at (38,0) width 63: "placeholder"
    116 layer at (166,290) size 139x13
     116layer at (166,302) size 139x13
    117117  RenderBlock {DIV} at (3,3) size 140x13
    118 layer at (319,290) size 139x13
     118layer at (319,302) size 139x13
    119119  RenderBlock {DIV} at (3,3) size 140x13 [color=#A9A9A9]
    120120    RenderText {#text} at (38,0) size 63x13
    121121      text run at (38,0) width 63: "placeholder"
    122 layer at (319,290) size 139x13
     122layer at (319,302) size 139x13
    123123  RenderBlock {DIV} at (3,3) size 140x13
    124 layer at (10,310) size 145x33
    125   RenderTextControl {INPUT} at (2,302) size 146x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    126 layer at (13,327) size 139x13
     124layer at (10,322) size 145x33
     125  RenderTextControl {INPUT} at (2,314) size 146x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     126layer at (13,339) size 139x13
    127127  RenderBlock {DIV} at (3,17) size 140x13 [color=#A9A9A9]
    128128    RenderText {#text} at (0,0) size 63x13
    129129      text run at (0,0) width 63: "placeholder"
    130 layer at (13,327) size 139x13
     130layer at (13,339) size 139x13
    131131  RenderBlock {DIV} at (3,17) size 140x13
  • trunk/Source/WebCore/ChangeLog

    r169779 r169780  
     12014-06-10  Myles C. Maxfield  <mmaxfield@apple.com>
     2
     3        Japanese text in Google search is rendered too low and clipped
     4        https://bugs.webkit.org/show_bug.cgi?id=133595
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is a revert of r155324.
     9
     10        By forcing line-height to be normal, r155324 was forcing WebKit to inspect font metrics
     11        to determine the height of a line. This means that if a fallback font was required to
     12        draw a line of text, and the fallback font had a higher ascent than the primary font,
     13        the entire line of text would be pushed down. If we don't force line-height to be normal,
     14        then we use the line-height value instead, which short circuits this mechanism, thereby
     15        not pushing text down.
     16
     17        No new tests (because this is simply a revert)
     18
     19        * css/html.css:
     20        (input): Deleted.
     21
    1222014-06-10  Zalan Bujtas  <zalan@apple.com>
    223
  • trunk/Source/WebCore/css/html.css

    r168601 r169780  
    408408}
    409409
    410 input {
    411     line-height: normal !important;
    412 }
    413 
    414410input[type="hidden"] {
    415411    display: none
Note: See TracChangeset for help on using the changeset viewer.