Changeset 217418 in webkit


Ignore:
Timestamp:
May 25, 2017 7:56:27 AM (7 years ago)
Author:
hyatt@apple.com
Message:

Baseline of number inputs not right.
https://bugs.webkit.org/show_bug.cgi?id=172237

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/forms/baseline-of-number-inputs.html

  • css/html.css:

(input::-webkit-inner-spin-button):

  • rendering/RenderSearchField.cpp:

(WebCore::RenderSearchField::computeLogicalHeightLimit): Deleted.
(WebCore::RenderSearchField::centerContainerIfNeeded): Deleted.

  • rendering/RenderSearchField.h:
  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::centerRenderer):
(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit): Deleted.

  • rendering/RenderTextControlSingleLine.h:

(WebCore::RenderTextControlSingleLine::centerContainerIfNeeded): Deleted.

LayoutTests:

  • fast/forms/baseline-of-number-inputs-expected.html: Added.
  • fast/forms/baseline-of-number-inputs.html: Added.
Location:
trunk
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r217417 r217418  
     12017-05-25  Dave Hyatt  <hyatt@apple.com>
     2
     3        Baseline of number inputs not right.
     4        https://bugs.webkit.org/show_bug.cgi?id=172237
     5
     6        Reviewed by Dean Jackson.
     7
     8        * fast/forms/baseline-of-number-inputs-expected.html: Added.
     9        * fast/forms/baseline-of-number-inputs.html: Added.
     10
    1112017-05-25  Per Arne Vollan  <pvollan@apple.com>
    212
  • trunk/LayoutTests/fast/forms/number/number-large-padding.html

    r155268 r217418  
    1717
    1818    // Move the cursor on the upper button.
    19     eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 10, numberInput.offsetTop + numberInput.offsetHeight / 4);
     19    eventSender.mouseMoveTo(numberInput.offsetLeft + numberInput.offsetWidth - 40, numberInput.offsetTop + numberInput.offsetHeight / 4);
    2020    eventSender.mouseDown();
    2121    eventSender.mouseUp();
  • trunk/LayoutTests/fast/forms/number/number-spinbutton-in-multi-column.html

    r123302 r217418  
    6060
    6161    const clickX = pageX(column) + colWidth * colIndex + ofsX;
    62     const clickY = pageY(column) + Math.floor(spin.offsetHeight / 3);
     62    const clickY = pageY(column) + Math.floor(spin.offsetHeight / 3) + 2;
    6363
    6464    eventSender.mouseMoveTo(clickX, clickY);
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r217247 r217418  
    88
    99http/tests/preload/viewport [ Pass ]
     10
     11fast/forms/input-text-word-wrap.html [ Skip ]
     12fast/forms/search-rtl.html [ Skip ]
     13fast/forms/search-vertical-alignment.html [ Skip ]
     14fast/forms/searchfield-heights.html [ Skip ]
     15fast/forms/visual-hebrew-text-field.html [ Skip ]
     16
  • trunk/LayoutTests/platform/mac/fast/block/float/032-expected.txt

    r162791 r217418  
    4747        RenderText {#text} at (0,0) size 0x0
    4848layer at (216,572) size 100x13
    49   RenderBlock {DIV} at (3,47) size 100x13
     49  RenderBlock {DIV} at (3,46) size 100x14
    5050layer at (316,700) size 100x13
    51   RenderBlock {DIV} at (3,47) size 100x13
     51  RenderBlock {DIV} at (3,46) size 100x14
    5252layer at (66,828) size 100x13
    53   RenderBlock {DIV} at (3,47) size 100x13
     53  RenderBlock {DIV} at (3,46) size 100x14
    5454layer at (66,956) size 100x13
    55   RenderBlock {DIV} at (3,47) size 100x13
     55  RenderBlock {DIV} at (3,46) size 100x14
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-expected.txt

    r202826 r217418  
    1919                  RenderBR {BR} at (114,14) size 1x0
    2020                  RenderTextControl {INPUT} at (0,19) size 111x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    21                     RenderFlexibleBox {DIV} at (3,3) size 105x10
    22                       RenderBlock {DIV} at (0,0) size 92x10
     21                    RenderFlexibleBox {DIV} at (3,0) size 105x16
     22                      RenderBlock {DIV} at (0,2) size 92x11
    2323                RenderBlock {DIV} at (1,36) size 199x36
    2424                  RenderTextControl {INPUT} at (0,2) size 123x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    2727                  RenderBR {BR} at (126,14) size 1x0
    2828                  RenderTextControl {INPUT} at (0,19) size 123x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    29                     RenderFlexibleBox {DIV} at (3,3) size 117x11
    30                       RenderBlock {DIV} at (0,0) size 104x11
     29                    RenderFlexibleBox {DIV} at (3,1) size 117x15
     30                      RenderBlock {DIV} at (0,2) size 104x11
    3131                RenderBlock {DIV} at (1,72) size 199x37
    3232                  RenderTextControl {INPUT} at (0,1) size 135x18 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    3535                  RenderBR {BR} at (138,14) size 1x0
    3636                  RenderTextControl {INPUT} at (0,19) size 135x18 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    37                     RenderFlexibleBox {DIV} at (3,3) size 129x12
    38                       RenderBlock {DIV} at (0,0) size 116x12
     37                    RenderFlexibleBox {DIV} at (3,1) size 129x16
     38                      RenderBlock {DIV} at (0,1) size 116x13
    3939                RenderBlock {DIV} at (1,109) size 199x46
    4040                  RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    4343                  RenderBR {BR} at (153,16) size 1x0
    4444                  RenderTextControl {INPUT} at (2,25) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    45                     RenderFlexibleBox {DIV} at (3,3) size 140x13
    46                       RenderBlock {DIV} at (0,0) size 127x13
     45                    RenderFlexibleBox {DIV} at (3,1) size 140x17
     46                      RenderBlock {DIV} at (0,1) size 127x14
    4747                RenderBlock {DIV} at (1,155) size 199x50
    4848                  RenderTextControl {INPUT} at (2,2) size 158x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    5151                  RenderBR {BR} at (165,17) size 1x0
    5252                  RenderTextControl {INPUT} at (2,27) size 158x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    53                     RenderFlexibleBox {DIV} at (3,3) size 152x15
    54                       RenderBlock {DIV} at (0,0) size 139x15
     53                    RenderFlexibleBox {DIV} at (3,1) size 152x19
     54                      RenderBlock {DIV} at (0,1) size 139x16
    5555                RenderBlock {DIV} at (1,205) size 199x52
    5656                  RenderTextControl {INPUT} at (2,2) size 169x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    5959                  RenderBR {BR} at (176,18) size 1x0
    6060                  RenderTextControl {INPUT} at (2,28) size 169x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    61                     RenderFlexibleBox {DIV} at (3,3) size 163x16
    62                       RenderBlock {DIV} at (0,0) size 148x16
     61                    RenderFlexibleBox {DIV} at (3,1) size 163x20
     62                      RenderBlock {DIV} at (0,1) size 148x17
    6363                RenderBlock {DIV} at (1,257) size 199x54
    6464                  RenderTextControl {INPUT} at (2,2) size 180x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    6767                  RenderBR {BR} at (187,19) size 1x0
    6868                  RenderTextControl {INPUT} at (2,29) size 180x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    69                     RenderFlexibleBox {DIV} at (3,3) size 174x17
    70                       RenderBlock {DIV} at (0,0) size 159x17
     69                    RenderFlexibleBox {DIV} at (3,1) size 174x21
     70                      RenderBlock {DIV} at (0,2) size 159x17
    7171                RenderBlock {DIV} at (1,311) size 199x56
    7272                  RenderTextControl {INPUT} at (2,2) size 191x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    7575                  RenderBR {BR} at (198,20) size 1x0
    7676                  RenderTextControl {INPUT} at (2,30) size 191x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    77                     RenderFlexibleBox {DIV} at (3,3) size 185x18
    78                       RenderBlock {DIV} at (0,0) size 170x18
     77                    RenderFlexibleBox {DIV} at (3,0) size 185x24
     78                      RenderBlock {DIV} at (0,2) size 170x19
    7979              RenderTableCell {TD} at (204,2) size 303x524 [r=0 c=1 rs=1 cs=1]
    8080                RenderBlock {DIV} at (1,1) size 300x56
     
    8484                  RenderBR {BR} at (209,20) size 1x0
    8585                  RenderTextControl {INPUT} at (2,30) size 202x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    86                     RenderFlexibleBox {DIV} at (3,3) size 196x18
    87                       RenderBlock {DIV} at (0,0) size 181x18
     86                    RenderFlexibleBox {DIV} at (3,0) size 196x24
     87                      RenderBlock {DIV} at (0,3) size 181x18
    8888                RenderBlock {DIV} at (1,57) size 300x60
    8989                  RenderTextControl {INPUT} at (2,2) size 213x26 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    9292                  RenderBR {BR} at (220,21) size 1x0
    9393                  RenderTextControl {INPUT} at (2,32) size 213x26 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    94                     RenderFlexibleBox {DIV} at (3,3) size 207x20
    95                       RenderBlock {DIV} at (0,0) size 192x20
     94                    RenderFlexibleBox {DIV} at (3,0) size 207x26
     95                      RenderBlock {DIV} at (0,2) size 192x21
    9696                RenderBlock {DIV} at (1,117) size 300x62
    9797                  RenderTextControl {INPUT} at (2,2) size 225x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    100100                  RenderBR {BR} at (232,22) size 1x0
    101101                  RenderTextControl {INPUT} at (2,33) size 225x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    102                     RenderFlexibleBox {DIV} at (3,3) size 219x21
    103                       RenderBlock {DIV} at (0,0) size 200x21
     102                    RenderFlexibleBox {DIV} at (3,0) size 219x27
     103                      RenderBlock {DIV} at (0,3) size 200x21
    104104                RenderBlock {DIV} at (1,179) size 300x64
    105105                  RenderTextControl {INPUT} at (2,2) size 236x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    108108                  RenderBR {BR} at (243,23) size 1x0
    109109                  RenderTextControl {INPUT} at (2,34) size 236x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    110                     RenderFlexibleBox {DIV} at (3,3) size 230x22
    111                       RenderBlock {DIV} at (0,0) size 211x22
     110                    RenderFlexibleBox {DIV} at (3,0) size 230x28
     111                      RenderBlock {DIV} at (0,3) size 211x22
    112112                RenderBlock {DIV} at (1,243) size 300x66
    113113                  RenderTextControl {INPUT} at (2,2) size 256x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    116116                  RenderBR {BR} at (263,24) size 1x0
    117117                  RenderTextControl {INPUT} at (2,35) size 256x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    118                     RenderFlexibleBox {DIV} at (3,3) size 250x23
    119                       RenderBlock {DIV} at (0,0) size 231x23
     118                    RenderFlexibleBox {DIV} at (3,0) size 250x29
     119                      RenderBlock {DIV} at (0,3) size 231x23
    120120                RenderBlock {DIV} at (1,309) size 300x68
    121121                  RenderTextControl {INPUT} at (2,2) size 268x30 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    124124                  RenderBR {BR} at (275,25) size 1x0
    125125                  RenderTextControl {INPUT} at (2,36) size 268x30 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    126                     RenderFlexibleBox {DIV} at (3,3) size 262x24
    127                       RenderBlock {DIV} at (0,0) size 243x24
     126                    RenderFlexibleBox {DIV} at (3,0) size 262x30
     127                      RenderBlock {DIV} at (0,3) size 243x24
    128128                RenderBlock {DIV} at (1,377) size 300x72
    129129                  RenderTextControl {INPUT} at (2,2) size 280x32 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    132132                  RenderBR {BR} at (287,26) size 1x0
    133133                  RenderTextControl {INPUT} at (2,38) size 280x32 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    134                     RenderFlexibleBox {DIV} at (3,3) size 274x26
    135                       RenderBlock {DIV} at (0,0) size 255x26
     134                    RenderFlexibleBox {DIV} at (3,0) size 274x32
     135                      RenderBlock {DIV} at (0,3) size 255x26
    136136                RenderBlock {DIV} at (1,449) size 300x74
    137137                  RenderTextControl {INPUT} at (2,2) size 292x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    140140                  RenderBR {BR} at (299,27) size 1x0
    141141                  RenderTextControl {INPUT} at (2,39) size 292x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    142                     RenderFlexibleBox {DIV} at (3,3) size 286x27
    143                       RenderBlock {DIV} at (0,0) size 267x27
     142                    RenderFlexibleBox {DIV} at (3,0) size 286x33
     143                      RenderBlock {DIV} at (0,3) size 267x27
    144144layer at (14,129) size 105x10
    145145  RenderBlock {DIV} at (3,3) size 105x10
     
    206206layer at (218,535) size 267x27
    207207  RenderBlock {DIV} at (0,0) size 267x27
    208 layer at (107,144) size 13x12
    209   RenderBlock (relative positioned) {DIV} at (92,-1) size 14x12
    210 layer at (119,179) size 13x13
    211   RenderBlock (relative positioned) {DIV} at (104,-1) size 14x13
    212 layer at (130,215) size 13x14
    213   RenderBlock (relative positioned) {DIV} at (116,-1) size 14x14
    214 layer at (144,258) size 13x15
    215   RenderBlock (relative positioned) {DIV} at (127,-1) size 14x15
    216 layer at (155,306) size 13x17
    217   RenderBlock (relative positioned) {DIV} at (139,-1) size 14x17
    218 layer at (164,357) size 15x18
    219   RenderBlock (relative positioned) {DIV} at (148,-1) size 16x18
    220 layer at (175,410) size 15x19
    221   RenderBlock (relative positioned) {DIV} at (159,-1) size 16x19
    222 layer at (186,465) size 15x20
    223   RenderBlock (relative positioned) {DIV} at (170,-1) size 16x20
    224 layer at (400,77) size 15x20
    225   RenderBlock (relative positioned) {DIV} at (181,-1) size 16x20
    226 layer at (411,135) size 15x22
    227   RenderBlock (relative positioned) {DIV} at (192,-1) size 16x22
    228 layer at (418,196) size 19x23
    229   RenderBlock (relative positioned) {DIV} at (200,-1) size 20x23
    230 layer at (430,259) size 19x24
    231   RenderBlock (relative positioned) {DIV} at (211,-1) size 20x24
    232 layer at (450,324) size 19x25
    233   RenderBlock (relative positioned) {DIV} at (231,-1) size 20x25
    234 layer at (462,391) size 19x26
    235   RenderBlock (relative positioned) {DIV} at (243,-1) size 20x26
    236 layer at (474,461) size 19x28
    237   RenderBlock (relative positioned) {DIV} at (255,-1) size 20x28
    238 layer at (486,534) size 19x29
    239   RenderBlock (relative positioned) {DIV} at (267,-1) size 20x29
     208layer at (106,143) size 13x15
     209  RenderBlock (relative positioned) {DIV} at (91,0) size 14x15
     210layer at (118,178) size 13x15
     211  RenderBlock (relative positioned) {DIV} at (103,0) size 14x15
     212layer at (129,215) size 13x15
     213  RenderBlock (relative positioned) {DIV} at (115,0) size 14x15
     214layer at (143,257) size 13x17
     215  RenderBlock (relative positioned) {DIV} at (126,0) size 14x17
     216layer at (154,306) size 13x18
     217  RenderBlock (relative positioned) {DIV} at (138,0) size 14x18
     218layer at (163,356) size 15x20
     219  RenderBlock (relative positioned) {DIV} at (147,0) size 16x20
     220layer at (174,409) size 15x21
     221  RenderBlock (relative positioned) {DIV} at (158,0) size 16x21
     222layer at (185,464) size 15x23
     223  RenderBlock (relative positioned) {DIV} at (169,0) size 16x23
     224layer at (399,75) size 15x24
     225  RenderBlock (relative positioned) {DIV} at (180,0) size 16x24
     226layer at (410,133) size 15x26
     227  RenderBlock (relative positioned) {DIV} at (191,0) size 16x26
     228layer at (417,194) size 19x27
     229  RenderBlock (relative positioned) {DIV} at (199,0) size 20x27
     230layer at (429,257) size 19x28
     231  RenderBlock (relative positioned) {DIV} at (210,-1) size 20x30
     232layer at (449,322) size 19x30
     233  RenderBlock (relative positioned) {DIV} at (230,-1) size 20x31
     234layer at (461,388) size 19x32
     235  RenderBlock (relative positioned) {DIV} at (242,-1) size 20x32
     236layer at (473,459) size 19x33
     237  RenderBlock (relative positioned) {DIV} at (254,-1) size 20x34
     238layer at (485,531) size 19x35
     239  RenderBlock (relative positioned) {DIV} at (266,-1) size 20x35
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt

    r202826 r217418  
    1010      RenderBlock (anonymous) at (0,34) size 784x31
    1111        RenderTextControl {INPUT} at (2,2) size 225x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    12           RenderFlexibleBox {DIV} at (3,3) size 219x21
    13             RenderBlock {DIV} at (0,0) size 200x21
     12          RenderFlexibleBox {DIV} at (3,0) size 219x27
     13            RenderBlock {DIV} at (0,3) size 200x21
    1414        RenderText {#text} at (0,0) size 0x0
    1515        RenderText {#text} at (0,0) size 0x0
     
    1818    RenderText {#text} at (0,0) size 8x21
    1919      text run at (0,0) width 8: "1"
    20 layer at (213,46) size 19x23
    21   RenderBlock (relative positioned) {DIV} at (200,-1) size 20x23
     20layer at (212,44) size 19x27
     21  RenderBlock (relative positioned) {DIV} at (199,0) size 20x27
    2222caret: position 1 of child 0 {#text} of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 5 {INPUT} of body
  • trunk/LayoutTests/platform/mac/fast/forms/number/number-appearance-rtl-expected.txt

    r202826 r217418  
    66      RenderBlock {P} at (0,0) size 784x23
    77        RenderTextControl {INPUT} at (636,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    8           RenderFlexibleBox {DIV} at (3,3) size 140x13
    9             RenderBlock {DIV} at (13,0) size 127x13
     8          RenderFlexibleBox {DIV} at (3,1) size 140x17
     9            RenderBlock {DIV} at (13,1) size 127x14
    1010        RenderText {#text} at (0,0) size 0x0
    1111      RenderBlock {P} at (0,39) size 784x23
    1212        RenderTextControl {INPUT} at (636,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    13           RenderFlexibleBox {DIV} at (3,3) size 140x13
    14             RenderBlock {DIV} at (13,0) size 127x13
     13          RenderFlexibleBox {DIV} at (3,1) size 140x17
     14            RenderBlock {DIV} at (13,1) size 127x14
    1515        RenderText {#text} at (0,0) size 0x0
    1616      RenderBlock {P} at (0,78) size 784x23
    1717        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    18           RenderFlexibleBox {DIV} at (3,3) size 140x13
    19             RenderBlock {DIV} at (13,0) size 127x13
     18          RenderFlexibleBox {DIV} at (3,1) size 140x17
     19            RenderBlock {DIV} at (13,1) size 127x14
    2020        RenderText {#text} at (0,0) size 0x0
    2121      RenderBlock {P} at (0,117) size 784x23
    2222        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    23           RenderFlexibleBox {DIV} at (3,3) size 140x13
    24             RenderBlock {DIV} at (13,0) size 127x13
     23          RenderFlexibleBox {DIV} at (3,1) size 140x17
     24            RenderBlock {DIV} at (13,1) size 127x14
    2525        RenderText {#text} at (0,0) size 0x0
    2626        RenderText {#text} at (0,0) size 0x0
    2727      RenderBlock {P} at (0,156) size 784x23
    2828        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    29           RenderFlexibleBox {DIV} at (3,3) size 140x13
    30             RenderBlock {DIV} at (0,0) size 127x13
     29          RenderFlexibleBox {DIV} at (3,1) size 140x17
     30            RenderBlock {DIV} at (0,1) size 127x14
    3131        RenderText {#text} at (0,0) size 0x0
    3232      RenderBlock {P} at (0,195) size 784x23
    3333        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    34           RenderFlexibleBox {DIV} at (3,3) size 140x13
    35             RenderBlock {DIV} at (0,0) size 127x13
     34          RenderFlexibleBox {DIV} at (3,1) size 140x17
     35            RenderBlock {DIV} at (0,1) size 127x14
    3636        RenderText {#text} at (0,0) size 0x0
    3737        RenderText {#text} at (0,0) size 0x0
    3838      RenderBlock {P} at (0,234) size 784x23
    3939        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    40           RenderFlexibleBox {DIV} at (3,3) size 140x13
    41             RenderBlock {DIV} at (13,0) size 127x13
     40          RenderFlexibleBox {DIV} at (3,1) size 140x17
     41            RenderBlock {DIV} at (13,1) size 127x14
    4242        RenderText {#text} at (0,0) size 0x0
    4343      RenderBlock {P} at (0,273) size 784x23
    4444        RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    45           RenderFlexibleBox {DIV} at (3,3) size 140x13
    46             RenderBlock {DIV} at (13,0) size 127x13
     45          RenderFlexibleBox {DIV} at (3,1) size 140x17
     46            RenderBlock {DIV} at (13,1) size 127x14
    4747        RenderText {#text} at (0,0) size 0x0
    4848        RenderText {#text} at (0,0) size 0x0
     
    7979    RenderText {#text} at (119,0) size 8x13
    8080      text run at (119,0) width 8: "8"
    81 layer at (646,20) size 13x15
    82   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
    83 layer at (646,59) size 13x15
    84   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
    85 layer at (12,98) size 13x15
    86   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
    87 layer at (12,137) size 13x15
    88   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
    89 layer at (141,176) size 13x15
    90   RenderBlock (relative positioned) {DIV} at (127,-1) size 14x15
    91 layer at (141,215) size 13x15
    92   RenderBlock (relative positioned) {DIV} at (127,-1) size 14x15
    93 layer at (12,254) size 13x15
    94   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
    95 layer at (12,293) size 13x15
    96   RenderBlock (relative positioned) {DIV} at (-1,-1) size 13x15
     81layer at (647,19) size 13x17
     82  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
     83layer at (647,58) size 13x17
     84  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
     85layer at (13,97) size 13x17
     86  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
     87layer at (13,136) size 13x17
     88  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
     89layer at (140,175) size 13x17
     90  RenderBlock (relative positioned) {DIV} at (126,0) size 14x17
     91layer at (140,214) size 13x17
     92  RenderBlock (relative positioned) {DIV} at (126,0) size 14x17
     93layer at (13,253) size 13x17
     94  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
     95layer at (13,292) size 13x17
     96  RenderBlock (relative positioned) {DIV} at (0,0) size 13x17
    9797caret: position 4 of child 0 {#text} of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#document-fragment} of child 0 {INPUT} of child 6 {P} of body
  • trunk/LayoutTests/platform/mac/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt

    r202826 r217418  
    1111        RenderInline {LABEL} at (0,0) size 347x18
    1212          RenderTextControl {INPUT} at (2,2) size 256x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    13             RenderFlexibleBox {DIV} at (3,3) size 250x23
    14               RenderBlock {DIV} at (0,0) size 231x23
     13            RenderFlexibleBox {DIV} at (3,0) size 250x29
     14              RenderBlock {DIV} at (0,3) size 231x23
    1515          RenderText {#text} at (259,10) size 88x18
    1616            text run at (259,10) width 88: " Normal state"
     
    1818        RenderInline {LABEL} at (0,0) size 355x18
    1919          RenderTextControl {INPUT} at (2,2) size 256x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    20             RenderFlexibleBox {DIV} at (3,3) size 250x23
    21               RenderBlock {DIV} at (0,0) size 231x23
     20            RenderFlexibleBox {DIV} at (3,0) size 250x29
     21              RenderBlock {DIV} at (0,3) size 231x23
    2222          RenderText {#text} at (259,10) size 96x18
    2323            text run at (259,10) width 96: " Disabled state"
     
    2525        RenderInline {LABEL} at (0,0) size 364x18
    2626          RenderTextControl {INPUT} at (2,2) size 256x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    27             RenderFlexibleBox {DIV} at (3,3) size 250x23
    28               RenderBlock {DIV} at (0,0) size 231x23
     27            RenderFlexibleBox {DIV} at (3,0) size 250x29
     28              RenderBlock {DIV} at (0,3) size 231x23
    2929          RenderText {#text} at (259,10) size 105x18
    3030            text run at (259,10) width 105: " Read-only state"
     
    4141    RenderText {#text} at (0,0) size 13x23
    4242      text run at (0,0) width 13: "0"
    43 layer at (245,64) size 19x25
    44   RenderBlock (relative positioned) {DIV} at (231,-1) size 20x25
    45 layer at (245,97) size 19x25
    46   RenderBlock (relative positioned) {DIV} at (231,-1) size 20x25
    47 layer at (245,130) size 19x25
    48   RenderBlock (relative positioned) {DIV} at (231,-1) size 20x25
     43layer at (244,62) size 19x30
     44  RenderBlock (relative positioned) {DIV} at (230,-1) size 20x31
     45layer at (244,95) size 19x30
     46  RenderBlock (relative positioned) {DIV} at (230,-1) size 20x31
     47layer at (244,128) size 19x30
     48  RenderBlock (relative positioned) {DIV} at (230,-1) size 20x31
  • trunk/LayoutTests/platform/mac/fast/forms/number/number-appearance-spinbutton-layer-expected.txt

    r202826 r217418  
    44  RenderBlock {HTML} at (0,0) size 800x62
    55    RenderBody {BODY} at (8,8) size 784x46
    6       RenderBR {BR} at (149,2) size 1x18
     6      RenderBR {BR} at (149,1) size 1x18
    77      RenderTextControl {INPUT} at (2,25) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    8         RenderFlexibleBox {DIV} at (3,3) size 140x13
    9           RenderBlock {DIV} at (0,0) size 127x13
     8        RenderFlexibleBox {DIV} at (3,1) size 140x17
     9          RenderBlock {DIV} at (0,1) size 127x14
    1010      RenderText {#text} at (0,0) size 0x0
    1111layer at (13,36) size 127x13
     
    1515layer at (10,10) size 146x19
    1616  RenderTextControl {INPUT} at (2,2) size 146x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17     RenderFlexibleBox {DIV} at (3,3) size 140x13
    18       RenderBlock {DIV} at (0,0) size 127x13
     17    RenderFlexibleBox {DIV} at (3,1) size 140x17
     18      RenderBlock {DIV} at (0,1) size 127x14
    1919layer at (13,13) size 127x13
    2020  RenderBlock {DIV} at (0,0) size 127x13
    2121    RenderText {#text} at (0,0) size 13x13
    2222      text run at (0,0) width 13: "10"
    23 layer at (141,12) size 13x15
    24   RenderBlock (relative positioned) {DIV} at (127,-1) size 14x15
    25 layer at (141,35) size 13x15
    26   RenderBlock (relative positioned) {DIV} at (127,-1) size 14x15
     23layer at (140,11) size 13x17
     24  RenderBlock (relative positioned) {DIV} at (126,0) size 14x17
     25layer at (140,34) size 13x17
     26  RenderBlock (relative positioned) {DIV} at (126,0) size 14x17
  • trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt

    r202826 r217418  
    5353    RenderText {#text} at (0,0) size 23x13
    5454      text run at (0,0) width 23: "Text"
    55 layer at (203,124) size 140x13
    56   RenderBlock {DIV} at (3,1) size 140x13
     55layer at (203,125) size 140x13
     56  RenderBlock {DIV} at (3,1) size 140x14
    5757    RenderText {#text} at (0,0) size 23x13
    5858      text run at (0,0) width 23: "Text"
  • trunk/Source/WebCore/ChangeLog

    r217411 r217418  
     12017-05-25  Dave Hyatt  <hyatt@apple.com>
     2
     3        Baseline of number inputs not right.
     4        https://bugs.webkit.org/show_bug.cgi?id=172237
     5
     6        Reviewed by Dean Jackson.
     7
     8        Added fast/forms/baseline-of-number-inputs.html
     9
     10        * css/html.css:
     11        (input::-webkit-inner-spin-button):
     12        * rendering/RenderSearchField.cpp:
     13        (WebCore::RenderSearchField::computeLogicalHeightLimit): Deleted.
     14        (WebCore::RenderSearchField::centerContainerIfNeeded): Deleted.
     15        * rendering/RenderSearchField.h:
     16        * rendering/RenderTextControlSingleLine.cpp:
     17        (WebCore::RenderTextControlSingleLine::centerRenderer):
     18        (WebCore::RenderTextControlSingleLine::layout):
     19        (WebCore::RenderTextControlSingleLine::computeLogicalHeightLimit): Deleted.
     20        * rendering/RenderTextControlSingleLine.h:
     21        (WebCore::RenderTextControlSingleLine::centerContainerIfNeeded): Deleted.
     22
    1232017-05-25  Manuel Rego Casasnovas  <rego@igalia.com>
    224
  • trunk/Source/WebCore/css/html.css

    r216418 r217418  
    539539     * button in layout(). */
    540540    height: 1.5em;
    541     vertical-align: top;
    542541    flex: none;
    543542    -webkit-user-select: none;
  • trunk/Source/WebCore/rendering/RenderSearchField.cpp

    r215830 r217418  
    363363}
    364364
    365 LayoutUnit RenderSearchField::computeLogicalHeightLimit() const
    366 {
    367     return logicalHeight();
    368 }
    369 
    370 void RenderSearchField::centerContainerIfNeeded(RenderBox* containerRenderer) const
    371 {
    372     if (!containerRenderer)
    373         return;
    374 
    375     if (containerRenderer->logicalHeight() <= contentLogicalHeight())
    376         return;
    377 
    378     // A quirk for find-in-page box on Safari Windows.
    379     // http://webkit.org/b/63157
    380     centerRenderer(*containerRenderer);
    381 }
    382 
    383 }
     365}
  • trunk/Source/WebCore/rendering/RenderSearchField.h

    r216131 r217418  
    4949
    5050    void willBeDestroyed() override;
    51     void centerContainerIfNeeded(RenderBox*) const override;
    5251    LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override;
    53     LayoutUnit computeLogicalHeightLimit() const override;
    5452    void updateFromElement() override;
    5553    EVisibility visibilityForCancelButton() const;
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r210828 r217418  
    6464}
    6565
    66 LayoutUnit RenderTextControlSingleLine::computeLogicalHeightLimit() const
    67 {
    68     return containerElement() ? contentLogicalHeight() : logicalHeight();
    69 }
    70 
    7166void RenderTextControlSingleLine::centerRenderer(RenderBox& renderer) const
    7267{
    7368    LayoutUnit logicalHeightDiff = renderer.logicalHeight() - contentLogicalHeight();
    74     float center = logicalHeightDiff / 2;
    75     renderer.setLogicalTop(renderer.logicalTop() - LayoutUnit(round(center)));
     69    renderer.setLogicalTop(renderer.logicalTop() - logicalHeightDiff / 2);
    7670}
    7771
     
    120114    // Set the text block height
    121115    LayoutUnit desiredLogicalHeight = textBlockLogicalHeight();
    122     LayoutUnit logicalHeightLimit = computeLogicalHeightLimit();
     116    LayoutUnit logicalHeightLimit = logicalHeight();
    123117    if (innerTextRenderer && innerTextRenderer->logicalHeight() > logicalHeightLimit) {
    124118        if (desiredLogicalHeight != innerTextRenderer->logicalHeight())
     
    153147    if (!container && innerTextRenderer && innerTextRenderer->height() != contentLogicalHeight())
    154148        centerRenderer(*innerTextRenderer);
    155     else
    156         centerContainerIfNeeded(containerRenderer);
    157 
    158     // Ignores the paddings for the inner spin button.
    159     if (RenderBox* innerSpinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0) {
    160         RenderBox* parentBox = innerSpinBox->parentBox();
    161         if (containerRenderer && !containerRenderer->style().isLeftToRightDirection())
    162             innerSpinBox->setLogicalLocation(LayoutPoint(-paddingLogicalLeft(), -paddingBefore()));
    163         else
    164             innerSpinBox->setLogicalLocation(LayoutPoint(parentBox->logicalWidth() - innerSpinBox->logicalWidth() + paddingLogicalRight(), -paddingBefore()));
    165         innerSpinBox->setLogicalHeight(logicalHeight() - borderBefore() - borderAfter());
    166     }
     149    else if (container && containerRenderer && containerRenderer->height() != contentLogicalHeight())
     150        centerRenderer(*containerRenderer);
    167151
    168152    HTMLElement* placeholderElement = inputElement().placeholderElement();
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r208668 r217418  
    3434
    3535protected:
    36     virtual void centerContainerIfNeeded(RenderBox*) const { }
    37     virtual LayoutUnit computeLogicalHeightLimit() const;
    3836    void centerRenderer(RenderBox& renderer) const;
    3937    HTMLElement* containerElement() const;
Note: See TracChangeset for help on using the changeset viewer.