Changeset 155324 in webkit


Ignore:
Timestamp:
Sep 8, 2013 11:55:18 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

defining line height affects height of text box
https://bugs.webkit.org/show_bug.cgi?id=17619

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-08
Reviewed by Darin Adler.

Source/WebCore:

Giving line height to input elements increase the height
of the element. To make it work similiar as Mozilla and IE
line-height :normal should be applied for input elements.

Test: fast/dom/HTMLInputElement/input-line-height.html

  • css/html.css:

(input):
Made the line-height: normal as !important so that it does not
consider any other line-height specified through internal or
external styles.

LayoutTests:

  • fast/dom/HTMLInputElement/input-line-height-expected.txt: Added.
  • fast/dom/HTMLInputElement/input-line-height.html: Added.

Added new test for verifying that giving line-height to input element
has no affect on its height.

  • fast/forms/placeholder-position-expected.txt:
  • platform/mac/fast/forms/placeholder-position-expected.png:

Rebaselining existing tests as per the new behavior. The position
of input elements have been modified since line-height is not being
considered.

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r155323 r155324  
     12013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
     2
     3        defining line height affects height of text box
     4        https://bugs.webkit.org/show_bug.cgi?id=17619
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/dom/HTMLInputElement/input-line-height-expected.txt: Added.
     9        * fast/dom/HTMLInputElement/input-line-height.html: Added.
     10
     11        Added new test for verifying that giving line-height to input element
     12        has no affect on its height.
     13
     14        * fast/forms/placeholder-position-expected.txt:
     15        * platform/mac/fast/forms/placeholder-position-expected.png:
     16
     17        Rebaselining existing tests as per the new behavior. The position
     18        of input elements have been modified since line-height is not being
     19        considered.
     20
    1212013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
    222
  • trunk/LayoutTests/fast/forms/placeholder-position-expected.txt

    r153647 r155324  
    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 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
     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
    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 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"
    102 layer 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"
    106 layer at (144,267) size 117x25
    107   RenderBlock {DIV} at (3,3) size 117x25
    108 layer at (13,302) size 117x13
     98layer 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"
     102layer 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"
     106layer at (144,267) size 117x13
     107  RenderBlock {DIV} at (3,3) size 117x13
     108layer at (13,290) 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,302) size 117x13
     112layer at (144,290) 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,302) size 117x13
     116layer at (144,290) size 117x13
    117117  RenderBlock {DIV} at (3,3) size 117x13
    118 layer at (275,302) size 117x13
     118layer at (275,290) 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,302) size 117x13
     122layer at (275,290) size 117x13
    123123  RenderBlock {DIV} at (3,3) size 117x13
    124 layer at (10,322) size 123x33
    125   RenderTextControl {INPUT} at (2,314) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    126 layer at (13,339) size 117x13
     124layer at (10,310) size 123x33
     125  RenderTextControl {INPUT} at (2,302) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     126layer at (13,327) 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,339) size 117x13
     130layer at (13,327) size 117x13
    131131  RenderBlock {DIV} at (3,17) size 117x13
  • trunk/Source/WebCore/ChangeLog

    r155323 r155324  
     12013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
     2
     3        defining line height affects height of text box
     4        https://bugs.webkit.org/show_bug.cgi?id=17619
     5
     6        Reviewed by Darin Adler.
     7
     8        Giving line height to input elements increase the height
     9        of the element. To make it work similiar as Mozilla and IE
     10        line-height :normal should be applied for input elements.
     11
     12        Test: fast/dom/HTMLInputElement/input-line-height.html
     13
     14        * css/html.css:
     15        (input):
     16        Made the line-height: normal as !important so that it does not
     17        consider any other line-height specified through internal or
     18        external styles.
     19
    1202013-09-08  Gurpreet Kaur  <k.gurpreet@samsung.com>
    221
  • trunk/Source/WebCore/css/html.css

    r154858 r155324  
    412412}
    413413
     414input {
     415    line-height: normal !important;
     416}
     417
    414418input[type="hidden"] {
    415419    display: none
Note: See TracChangeset for help on using the changeset viewer.