Changeset 153647 in webkit


Ignore:
Timestamp:
Aug 2, 2013 7:58:09 AM (11 years ago)
Author:
Antoine Quint
Message:

<input type="search"> doesn't correctly handle the "size" attribute
https://bugs.webkit.org/show_bug.cgi?id=119174

Source/WebCore:

We weren't taking into account the decorations for search fields (results and close buttons)
when computing the preferred logical width for these fields based on the "size" attribute
and as a result we would not guarantee that we could show the number of characters set by
the "size" attribute.

To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
and have NumberInputType and SearchInputType return custom decoration widths.

Reviewed by Darin Adler.

Test: fast/forms/search/search-size-with-decorations.html

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::decorationWidth):

  • html/HTMLInputElement.h:
  • html/InputType.cpp:

(WebCore::InputType::decorationWidth):

  • html/InputType.h:

Expose a new method to get the width for the input's decoration through the InputType.

  • html/NumberInputType.cpp:

(WebCore::NumberInputType::decorationWidth):

  • html/NumberInputType.h:

Override InputType::decorationWidth() to return the decoration width for a number input
using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::sizeShouldIncludeDecoration):
Override InputType::sizeShouldIncludeDecoration() to return true since search fields
have custom decoration adding to the size of the field.

(WebCore::SearchInputType::decorationWidth):
Return the combined size of the results and cancel buttons, as available.

  • html/SearchInputType.h:
  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
return the extra decoration width for an input element should it have any.

LayoutTests:

New test fast/forms/search/search-size-with-decorations.html that checks the different
decorations for search fields and the resulting sizes.

Also rebaselining the following tests since the rendering of search fields changed:

fast/forms/search-cancel-button-style-sharing.html
fast/forms/search-display-none-cancel-button.html
fast/forms/searchfield-heights.html
fast/forms/control-restrict-line-height.html
fast/forms/placeholder-pseudo-style.html
fast/forms/search-rtl.html
fast/css/text-overflow-input.html
fast/forms/placeholder-position.html
fast/repaint/search-field-cancel.html
fast/forms/input-appearance-height.html
fast/forms/search-vertical-alignment.html
fast/forms/box-shadow-override.html
fast/forms/search/search-size-with-decorations.html
fast/css/input-search-padding.html
fast/forms/search-styled.html

Reviewed by Darin Adler.

  • fast/forms/placeholder-position-expected.txt:
  • fast/forms/search/search-size-with-decorations-expected.txt: Added.
  • fast/forms/search/search-size-with-decorations.html: Added.
  • fast/repaint/search-field-cancel-expected.txt:
  • platform/mac/fast/css/input-search-padding-expected.txt:
  • platform/mac/fast/css/text-overflow-input-expected.png:
  • platform/mac/fast/css/text-overflow-input-expected.txt:
  • platform/mac/fast/forms/box-shadow-override-expected.png:
  • platform/mac/fast/forms/box-shadow-override-expected.txt:
  • platform/mac/fast/forms/control-restrict-line-height-expected.png:
  • platform/mac/fast/forms/control-restrict-line-height-expected.txt:
  • platform/mac/fast/forms/input-appearance-height-expected.png:
  • platform/mac/fast/forms/input-appearance-height-expected.txt:
  • platform/mac/fast/forms/placeholder-position-expected.png:
  • platform/mac/fast/forms/placeholder-pseudo-style-expected.png:
  • platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/mac/fast/forms/search-cancel-button-style-sharing-expected.png:
  • platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt:
  • platform/mac/fast/forms/search-display-none-cancel-button-expected.txt:
  • platform/mac/fast/forms/search-rtl-expected.png:
  • platform/mac/fast/forms/search-rtl-expected.txt:
  • platform/mac/fast/forms/search-styled-expected.txt:
  • platform/mac/fast/forms/search-vertical-alignment-expected.png:
  • platform/mac/fast/forms/search-vertical-alignment-expected.txt:
  • platform/mac/fast/forms/search/search-size-with-decorations-expected.png: Added.
  • platform/mac/fast/forms/searchfield-heights-expected.png:
  • platform/mac/fast/forms/searchfield-heights-expected.txt:
  • platform/mac/fast/repaint/search-field-cancel-expected.png:
Location:
trunk
Files:
4 added
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r153640 r153647  
     12013-08-02  Antoine Quint  <graouts@apple.com>
     2
     3        <input type="search"> doesn't correctly handle the "size" attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=119174
     5
     6        New test fast/forms/search/search-size-with-decorations.html that checks the different
     7        decorations for search fields and the resulting sizes.
     8
     9        Also rebaselining the following tests since the rendering of search fields changed:
     10
     11        fast/forms/search-cancel-button-style-sharing.html
     12        fast/forms/search-display-none-cancel-button.html
     13        fast/forms/searchfield-heights.html
     14        fast/forms/control-restrict-line-height.html
     15        fast/forms/placeholder-pseudo-style.html
     16        fast/forms/search-rtl.html
     17        fast/css/text-overflow-input.html
     18        fast/forms/placeholder-position.html
     19        fast/repaint/search-field-cancel.html
     20        fast/forms/input-appearance-height.html
     21        fast/forms/search-vertical-alignment.html
     22        fast/forms/box-shadow-override.html
     23        fast/forms/search/search-size-with-decorations.html
     24        fast/css/input-search-padding.html
     25        fast/forms/search-styled.html
     26
     27        Reviewed by Darin Adler.
     28
     29        * fast/forms/placeholder-position-expected.txt:
     30        * fast/forms/search/search-size-with-decorations-expected.txt: Added.
     31        * fast/forms/search/search-size-with-decorations.html: Added.
     32        * fast/repaint/search-field-cancel-expected.txt:
     33        * platform/mac/fast/css/input-search-padding-expected.txt:
     34        * platform/mac/fast/css/text-overflow-input-expected.png:
     35        * platform/mac/fast/css/text-overflow-input-expected.txt:
     36        * platform/mac/fast/forms/box-shadow-override-expected.png:
     37        * platform/mac/fast/forms/box-shadow-override-expected.txt:
     38        * platform/mac/fast/forms/control-restrict-line-height-expected.png:
     39        * platform/mac/fast/forms/control-restrict-line-height-expected.txt:
     40        * platform/mac/fast/forms/input-appearance-height-expected.png:
     41        * platform/mac/fast/forms/input-appearance-height-expected.txt:
     42        * platform/mac/fast/forms/placeholder-position-expected.png:
     43        * platform/mac/fast/forms/placeholder-pseudo-style-expected.png:
     44        * platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
     45        * platform/mac/fast/forms/search-cancel-button-style-sharing-expected.png:
     46        * platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt:
     47        * platform/mac/fast/forms/search-display-none-cancel-button-expected.txt:
     48        * platform/mac/fast/forms/search-rtl-expected.png:
     49        * platform/mac/fast/forms/search-rtl-expected.txt:
     50        * platform/mac/fast/forms/search-styled-expected.txt:
     51        * platform/mac/fast/forms/search-vertical-alignment-expected.png:
     52        * platform/mac/fast/forms/search-vertical-alignment-expected.txt:
     53        * platform/mac/fast/forms/search/search-size-with-decorations-expected.png: Added.
     54        * platform/mac/fast/forms/searchfield-heights-expected.png:
     55        * platform/mac/fast/forms/searchfield-heights-expected.txt:
     56        * platform/mac/fast/repaint/search-field-cancel-expected.png:
     57
    1582013-08-02  Zalan Bujtas  <zalan@apple.com>
    259
  • trunk/LayoutTests/fast/forms/placeholder-position-expected.txt

    r145977 r153647  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderFlexibleBox {DIV} at (3,3) size 117x13
     6      RenderTextControl {INPUT} at (2,2) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     7        RenderFlexibleBox {DIV} at (3,3) size 138x13
    88          RenderBlock {DIV} at (0,1) size 8x11
    9           RenderBlock {DIV} at (8,0) size 96x13
    10           RenderBlock {DIV} at (104,1) size 13x11
    11       RenderBR {BR} at (127,16) size 0x0
     9          RenderBlock {DIV} at (8,0) size 117x13
     10          RenderBlock {DIV} at (125,1) size 13x11
     11      RenderBR {BR} at (148,16) size 0x0
    1212      RenderTextControl {INPUT} at (2,25) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    1313      RenderBR {BR} at (127,39) size 0x0
    14       RenderTextControl {INPUT} at (2,48) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    15         RenderFlexibleBox {DIV} at (3,3) size 117x13
     14      RenderTextControl {INPUT} at (2,48) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     15        RenderFlexibleBox {DIV} at (3,3) size 138x13
    1616          RenderBlock {DIV} at (0,1) size 8x11
    17           RenderBlock {DIV} at (8,0) size 96x13
    18           RenderBlock {DIV} at (104,1) size 13x11
    19       RenderBR {BR} at (127,62) size 0x0
    20       RenderTextControl {INPUT} at (2,71) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    21         RenderFlexibleBox {DIV} at (3,3) size 117x13
     17          RenderBlock {DIV} at (8,0) size 117x13
     18          RenderBlock {DIV} at (125,1) size 13x11
     19      RenderBR {BR} at (148,62) size 0x0
     20      RenderTextControl {INPUT} at (2,71) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     21        RenderFlexibleBox {DIV} at (3,3) size 152x13
    2222          RenderBlock {DIV} at (0,1) size 22x11
    23           RenderBlock {DIV} at (22,0) size 82x13
    24           RenderBlock {DIV} at (104,1) size 13x11
    25       RenderBR {BR} at (127,85) size 0x0
     23          RenderBlock {DIV} at (22,0) size 117x13
     24          RenderBlock {DIV} at (139,1) size 13x11
     25      RenderBR {BR} at (162,85) size 0x0
    2626      RenderBR {BR} at (165,128) size 0x0
    2727      RenderTextControl {INPUT} at (2,130) size 123x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    4848      RenderBR {BR} at (393,305) size 0x0
    4949      RenderBR {BR} at (127,342) size 0x0
    50 layer at (21,13) size 96x13
    51   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
     50layer at (21,13) size 117x13
     51  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
    5252    RenderText {#text} at (0,0) size 63x13
    5353      text run at (0,0) width 63: "placeholder"
    54 layer at (21,13) size 96x13
    55   RenderBlock {DIV} at (0,0) size 96x13
     54layer at (21,13) size 117x13
     55  RenderBlock {DIV} at (0,0) size 117x13
    5656layer at (13,36) size 117x13
    5757  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
     
    6060layer at (13,36) size 117x13
    6161  RenderBlock {DIV} at (3,3) size 117x13
    62 layer at (21,59) size 96x13
    63   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
    64     RenderText {#text} at (33,0) size 63x13
    65       text run at (33,0) width 63: "placeholder"
    66 layer at (21,59) size 96x13
    67   RenderBlock {DIV} at (0,0) size 96x13
    68 layer at (35,82) size 82x13
    69   RenderBlock {DIV} at (25,3) size 82x13 [color=#A9A9A9]
     62layer at (21,59) size 117x13
     63  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
     64    RenderText {#text} at (54,0) size 63x13
     65      text run at (54,0) width 63: "placeholder"
     66layer at (21,59) size 117x13
     67  RenderBlock {DIV} at (0,0) size 117x13
     68layer at (35,82) size 117x13
     69  RenderBlock {DIV} at (25,3) size 117x13 [color=#A9A9A9]
    7070    RenderText {#text} at (0,0) size 63x13
    7171      text run at (0,0) width 63: "placeholder"
    72 layer at (35,82) size 82x13
    73   RenderBlock {DIV} at (0,0) size 82x13
     72layer at (35,82) size 117x13
     73  RenderBlock {DIV} at (0,0) size 117x13
    7474layer at (10,102) size 161x32 clip at (11,103) size 159x30
    7575  RenderTextControl {TEXTAREA} at (2,94) size 161x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
  • trunk/LayoutTests/fast/repaint/search-field-cancel-expected.txt

    r146695 r153647  
    1313          text run at (358,0) width 322: ". The cancel button in a search field fails to redraw."
    1414      RenderBlock (anonymous) at (0,34) size 784x23
    15         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    16           RenderFlexibleBox {DIV} at (3,3) size 117x13
     15        RenderTextControl {INPUT} at (2,2) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     16          RenderFlexibleBox {DIV} at (3,3) size 138x13
    1717            RenderBlock {DIV} at (0,1) size 8x11
    18             RenderBlock {DIV} at (8,0) size 96x13
    19             RenderBlock {DIV} at (104,1) size 13x11
     18            RenderBlock {DIV} at (8,0) size 117x13
     19            RenderBlock {DIV} at (125,1) size 13x11
    2020        RenderText {#text} at (0,0) size 0x0
    21 layer at (21,47) size 96x13
    22   RenderBlock {DIV} at (0,0) size 96x13
     21layer at (21,47) size 117x13
     22  RenderBlock {DIV} at (0,0) size 117x13
    2323    RenderText {#text} at (0,0) size 54x13
    2424      text run at (0,0) width 54: "some text"
  • trunk/LayoutTests/platform/mac/fast/css/input-search-padding-expected.txt

    r145977 r153647  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTextControl {INPUT} at (2,2) size 427x82 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderFlexibleBox {DIV} at (3,3) size 421x47
     6      RenderTextControl {INPUT} at (2,2) size 453x82 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     7        RenderFlexibleBox {DIV} at (3,3) size 447x47
    88          RenderBlock {DIV} at (0,17) size 10x13
    9           RenderBlock {DIV} at (10,0) size 395x47
    10           RenderBlock {DIV} at (405,17) size 16x13
    11       RenderBR {BR} at (431,44) size 0x0
     9          RenderBlock {DIV} at (10,0) size 421x47
     10          RenderBlock {DIV} at (431,17) size 16x13
     11      RenderBR {BR} at (457,44) size 0x0
    1212      RenderTextControl {INPUT} at (2,88) size 427x82 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    1313      RenderBR {BR} at (431,130) size 0x0
    14       RenderTextControl {INPUT} at (2,172) size 222x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    15         RenderFlexibleBox {DIV} at (6,1) size 210x23
     14      RenderTextControl {INPUT} at (2,172) size 248x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     15        RenderFlexibleBox {DIV} at (6,1) size 236x23
    1616          RenderBlock {DIV} at (0,5) size 10x13
    17           RenderBlock {DIV} at (10,0) size 184x23
    18           RenderBlock {DIV} at (194,5) size 16x13
    19 layer at (23,13) size 395x47 scrollWidth 409
    20   RenderBlock {DIV} at (0,0) size 395x47
     17          RenderBlock {DIV} at (10,0) size 210x23
     18          RenderBlock {DIV} at (220,5) size 16x13
     19layer at (23,13) size 421x47
     20  RenderBlock {DIV} at (0,0) size 421x47
    2121    RenderText {#text} at (0,0) size 408x47
    2222      text run at (0,0) width 408: "value jgq not clipped"
     
    2525    RenderText {#text} at (0,0) size 408x47
    2626      text run at (0,0) width 408: "value jgq not clipped"
    27 layer at (26,181) size 184x23
    28   RenderBlock {DIV} at (0,0) size 184x23
     27layer at (26,181) size 210x23
     28  RenderBlock {DIV} at (0,0) size 210x23
    2929    RenderText {#text} at (0,0) size 127x23
    3030      text run at (0,0) width 127: "Sample Input"
  • trunk/LayoutTests/platform/mac/fast/css/text-overflow-input-expected.txt

    r149210 r153647  
    1414        RenderText {#text} at (127,20) size 4x18
    1515          text run at (127,20) width 4: " "
    16         RenderTextControl {INPUT} at (133,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17           RenderFlexibleBox {DIV} at (3,3) size 117x13
    18             RenderBlock {DIV} at (0,1) size 8x11
    19             RenderBlock {DIV} at (8,0) size 96x13
    20             RenderBlock {DIV} at (104,1) size 13x11
    21         RenderText {#text} at (258,20) size 4x18
    22           text run at (258,20) width 4: " "
    23         RenderTextControl {INPUT} at (264,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24         RenderText {#text} at (389,20) size 4x18
    25           text run at (389,20) width 4: " "
    26         RenderTextControl {INPUT} at (395,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    27           RenderFlexibleBox {DIV} at (3,3) size 117x13
    28             RenderBlock {DIV} at (0,1) size 8x11
    29             RenderBlock {DIV} at (8,0) size 96x13
    30             RenderBlock {DIV} at (104,1) size 13x11
    31         RenderText {#text} at (520,20) size 4x18
    32           text run at (520,20) width 4: " "
    33         RenderTextControl {INPUT} at (526,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    34         RenderBR {BR} at (651,20) size 0x18
     16        RenderTextControl {INPUT} at (133,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     17          RenderFlexibleBox {DIV} at (3,3) size 138x13
     18            RenderBlock {DIV} at (0,1) size 8x11
     19            RenderBlock {DIV} at (8,0) size 117x13
     20            RenderBlock {DIV} at (125,1) size 13x11
     21        RenderText {#text} at (279,20) size 4x18
     22          text run at (279,20) width 4: " "
     23        RenderTextControl {INPUT} at (285,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     24        RenderText {#text} at (410,20) size 4x18
     25          text run at (410,20) width 4: " "
     26        RenderTextControl {INPUT} at (416,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     27          RenderFlexibleBox {DIV} at (3,3) size 138x13
     28            RenderBlock {DIV} at (0,1) size 8x11
     29            RenderBlock {DIV} at (8,0) size 117x13
     30            RenderBlock {DIV} at (125,1) size 13x11
     31        RenderText {#text} at (562,20) size 4x18
     32          text run at (562,20) width 4: " "
     33        RenderTextControl {INPUT} at (568,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     34        RenderBR {BR} at (693,20) size 0x18
    3535        RenderTextControl {INPUT} at (2,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    3636        RenderText {#text} at (127,43) size 4x18
    3737          text run at (127,43) width 4: " "
    38         RenderTextControl {INPUT} at (133,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    39           RenderFlexibleBox {DIV} at (3,3) size 117x13
    40             RenderBlock {DIV} at (0,1) size 8x11
    41             RenderBlock {DIV} at (8,0) size 96x13
    42             RenderBlock {DIV} at (104,1) size 13x11
    43         RenderText {#text} at (258,43) size 4x18
    44           text run at (258,43) width 4: " "
    45         RenderTextControl {INPUT} at (264,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    46         RenderText {#text} at (389,43) size 4x18
    47           text run at (389,43) width 4: " "
    48         RenderTextControl {INPUT} at (395,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    49           RenderFlexibleBox {DIV} at (3,3) size 117x13
    50             RenderBlock {DIV} at (0,1) size 8x11
    51             RenderBlock {DIV} at (8,0) size 96x13
    52             RenderBlock {DIV} at (104,1) size 13x11
    53         RenderText {#text} at (520,43) size 4x18
    54           text run at (520,43) width 4: " "
    55         RenderTextControl {INPUT} at (526,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     38        RenderTextControl {INPUT} at (133,43) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     39          RenderFlexibleBox {DIV} at (3,3) size 138x13
     40            RenderBlock {DIV} at (0,1) size 8x11
     41            RenderBlock {DIV} at (8,0) size 117x13
     42            RenderBlock {DIV} at (125,1) size 13x11
     43        RenderText {#text} at (279,43) size 4x18
     44          text run at (279,43) width 4: " "
     45        RenderTextControl {INPUT} at (285,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     46        RenderText {#text} at (410,43) size 4x18
     47          text run at (410,43) width 4: " "
     48        RenderTextControl {INPUT} at (416,43) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     49          RenderFlexibleBox {DIV} at (3,3) size 138x13
     50            RenderBlock {DIV} at (0,1) size 8x11
     51            RenderBlock {DIV} at (8,0) size 117x13
     52            RenderBlock {DIV} at (125,1) size 13x11
     53        RenderText {#text} at (562,43) size 4x18
     54          text run at (562,43) width 4: " "
     55        RenderTextControl {INPUT} at (568,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    5656        RenderText {#text} at (0,0) size 0x0
    5757      RenderBlock {P} at (0,114) size 784x64
     
    6262        RenderText {#text} at (127,20) size 4x18
    6363          text run at (127,20) width 4: " "
    64         RenderTextControl {INPUT} at (133,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    65           RenderFlexibleBox {DIV} at (3,3) size 117x13
    66             RenderBlock {DIV} at (0,1) size 8x11
    67             RenderBlock {DIV} at (8,0) size 96x13
    68             RenderBlock {DIV} at (104,1) size 13x11
    69         RenderText {#text} at (258,20) size 4x18
    70           text run at (258,20) width 4: " "
    71         RenderTextControl {INPUT} at (264,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    72         RenderText {#text} at (389,20) size 4x18
    73           text run at (389,20) width 4: " "
    74         RenderTextControl {INPUT} at (395,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    75           RenderFlexibleBox {DIV} at (3,3) size 117x13
    76             RenderBlock {DIV} at (0,1) size 8x11
    77             RenderBlock {DIV} at (8,0) size 96x13
    78             RenderBlock {DIV} at (104,1) size 13x11
    79         RenderText {#text} at (520,20) size 4x18
    80           text run at (520,20) width 4: " "
    81         RenderTextControl {INPUT} at (526,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    82         RenderBR {BR} at (651,20) size 0x18
     64        RenderTextControl {INPUT} at (133,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     65          RenderFlexibleBox {DIV} at (3,3) size 138x13
     66            RenderBlock {DIV} at (0,1) size 8x11
     67            RenderBlock {DIV} at (8,0) size 117x13
     68            RenderBlock {DIV} at (125,1) size 13x11
     69        RenderText {#text} at (279,20) size 4x18
     70          text run at (279,20) width 4: " "
     71        RenderTextControl {INPUT} at (285,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     72        RenderText {#text} at (410,20) size 4x18
     73          text run at (410,20) width 4: " "
     74        RenderTextControl {INPUT} at (416,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     75          RenderFlexibleBox {DIV} at (3,3) size 138x13
     76            RenderBlock {DIV} at (0,1) size 8x11
     77            RenderBlock {DIV} at (8,0) size 117x13
     78            RenderBlock {DIV} at (125,1) size 13x11
     79        RenderText {#text} at (562,20) size 4x18
     80          text run at (562,20) width 4: " "
     81        RenderTextControl {INPUT} at (568,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     82        RenderBR {BR} at (693,20) size 0x18
    8383        RenderTextControl {INPUT} at (2,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    8484        RenderText {#text} at (127,43) size 4x18
    8585          text run at (127,43) width 4: " "
    86         RenderTextControl {INPUT} at (133,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    87           RenderFlexibleBox {DIV} at (3,3) size 117x13
    88             RenderBlock {DIV} at (0,1) size 8x11
    89             RenderBlock {DIV} at (8,0) size 96x13
    90             RenderBlock {DIV} at (104,1) size 13x11
    91         RenderText {#text} at (258,43) size 4x18
    92           text run at (258,43) width 4: " "
    93         RenderTextControl {INPUT} at (264,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    94         RenderText {#text} at (389,43) size 4x18
    95           text run at (389,43) width 4: " "
    96         RenderTextControl {INPUT} at (395,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    97           RenderFlexibleBox {DIV} at (3,3) size 117x13
    98             RenderBlock {DIV} at (0,1) size 8x11
    99             RenderBlock {DIV} at (8,0) size 96x13
    100             RenderBlock {DIV} at (104,1) size 13x11
    101         RenderText {#text} at (520,43) size 4x18
    102           text run at (520,43) width 4: " "
    103         RenderTextControl {INPUT} at (526,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     86        RenderTextControl {INPUT} at (133,43) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     87          RenderFlexibleBox {DIV} at (3,3) size 138x13
     88            RenderBlock {DIV} at (0,1) size 8x11
     89            RenderBlock {DIV} at (8,0) size 117x13
     90            RenderBlock {DIV} at (125,1) size 13x11
     91        RenderText {#text} at (279,43) size 4x18
     92          text run at (279,43) width 4: " "
     93        RenderTextControl {INPUT} at (285,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     94        RenderText {#text} at (410,43) size 4x18
     95          text run at (410,43) width 4: " "
     96        RenderTextControl {INPUT} at (416,43) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     97          RenderFlexibleBox {DIV} at (3,3) size 138x13
     98            RenderBlock {DIV} at (0,1) size 8x11
     99            RenderBlock {DIV} at (8,0) size 117x13
     100            RenderBlock {DIV} at (125,1) size 13x11
     101        RenderText {#text} at (562,43) size 4x18
     102          text run at (562,43) width 4: " "
     103        RenderTextControl {INPUT} at (568,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    104104        RenderText {#text} at (0,0) size 0x0
    105105      RenderBlock {P} at (0,194) size 784x64
     
    131131layer at (13,73) size 117x13
    132132  RenderBlock {DIV} at (3,3) size 117x13
    133 layer at (152,73) size 96x13 scrollWidth 296
    134   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
    135     RenderText {#text} at (0,0) size 296x13
    136       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    137 layer at (152,73) size 96x13
    138   RenderBlock {DIV} at (0,0) size 96x13
    139 layer at (275,73) size 117x13 scrollWidth 297
    140   RenderBlock {DIV} at (3,3) size 117x13
    141     RenderText {#text} at (0,0) size 296x13
    142       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    143 layer at (414,73) size 96x13 scrollWidth 297
    144   RenderBlock {DIV} at (0,0) size 96x13
    145     RenderText {#text} at (0,0) size 296x13
    146       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    147 layer at (537,73) size 117x13 scrollWidth 341
     133layer at (152,73) size 117x13 scrollWidth 296
     134  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
     135    RenderText {#text} at (0,0) size 296x13
     136      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     137layer at (152,73) size 117x13
     138  RenderBlock {DIV} at (0,0) size 117x13
     139layer at (296,73) size 117x13 scrollWidth 297
     140  RenderBlock {DIV} at (3,3) size 117x13
     141    RenderText {#text} at (0,0) size 296x13
     142      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     143layer at (435,73) size 117x13 scrollWidth 297
     144  RenderBlock {DIV} at (0,0) size 117x13
     145    RenderText {#text} at (0,0) size 296x13
     146      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     147layer at (579,73) size 117x13 scrollWidth 341
    148148  RenderBlock {DIV} at (3,3) size 117x13
    149149    RenderText {#text} at (0,0) size 340x13
     
    155155layer at (13,96) size 117x13
    156156  RenderBlock {DIV} at (3,3) size 117x13
    157 layer at (152,96) size 96x13 scrollX 200 scrollWidth 296
    158   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
    159     RenderText {#text} at (-199,0) size 296x13
    160       text run at (-199,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    161 layer at (152,96) size 96x13
    162   RenderBlock {DIV} at (0,0) size 96x13
    163 layer at (275,96) size 117x13 scrollX 179 scrollWidth 296
    164   RenderBlock {DIV} at (3,3) size 117x13
    165     RenderText {#text} at (-178,0) size 296x13
    166       text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    167 layer at (414,96) size 96x13 scrollX 200 scrollWidth 296
    168   RenderBlock {DIV} at (0,0) size 96x13
    169     RenderText {#text} at (-199,0) size 296x13
    170       text run at (-199,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    171 layer at (537,96) size 117x13 scrollX 223 scrollWidth 340
     157layer at (152,96) size 117x13 scrollX 179 scrollWidth 296
     158  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
     159    RenderText {#text} at (-178,0) size 296x13
     160      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     161layer at (152,96) size 117x13
     162  RenderBlock {DIV} at (0,0) size 117x13
     163layer at (296,96) size 117x13 scrollX 179 scrollWidth 296
     164  RenderBlock {DIV} at (3,3) size 117x13
     165    RenderText {#text} at (-178,0) size 296x13
     166      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     167layer at (435,96) size 117x13 scrollX 179 scrollWidth 296
     168  RenderBlock {DIV} at (0,0) size 117x13
     169    RenderText {#text} at (-178,0) size 296x13
     170      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     171layer at (579,96) size 117x13 scrollX 223 scrollWidth 340
    172172  RenderBlock {DIV} at (3,3) size 117x13
    173173    RenderText {#text} at (-222,0) size 340x13
     
    179179layer at (13,153) size 117x13
    180180  RenderBlock {DIV} at (3,3) size 117x13
    181 layer at (152,153) size 96x13 scrollWidth 296
    182   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
    183     RenderText {#text} at (0,0) size 296x13
    184       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    185 layer at (152,153) size 96x13
    186   RenderBlock {DIV} at (0,0) size 96x13
    187 layer at (275,153) size 117x13 scrollWidth 297
    188   RenderBlock {DIV} at (3,3) size 117x13
    189     RenderText {#text} at (0,0) size 296x13
    190       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    191 layer at (414,153) size 96x13 scrollWidth 297
    192   RenderBlock {DIV} at (0,0) size 96x13
    193     RenderText {#text} at (0,0) size 296x13
    194       text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    195 layer at (537,153) size 117x13 scrollWidth 341
     181layer at (152,153) size 117x13 scrollWidth 296
     182  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
     183    RenderText {#text} at (0,0) size 296x13
     184      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     185layer at (152,153) size 117x13
     186  RenderBlock {DIV} at (0,0) size 117x13
     187layer at (296,153) size 117x13 scrollWidth 297
     188  RenderBlock {DIV} at (3,3) size 117x13
     189    RenderText {#text} at (0,0) size 296x13
     190      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     191layer at (435,153) size 117x13 scrollWidth 297
     192  RenderBlock {DIV} at (0,0) size 117x13
     193    RenderText {#text} at (0,0) size 296x13
     194      text run at (0,0) width 296: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     195layer at (579,153) size 117x13 scrollWidth 341
    196196  RenderBlock {DIV} at (3,3) size 117x13
    197197    RenderText {#text} at (0,0) size 340x13
     
    203203layer at (13,176) size 117x13
    204204  RenderBlock {DIV} at (3,3) size 117x13
    205 layer at (152,176) size 96x13 scrollX 200 scrollWidth 296
    206   RenderBlock {DIV} at (11,3) size 96x13 [color=#A9A9A9]
    207     RenderText {#text} at (-199,0) size 296x13
    208       text run at (-199,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    209 layer at (152,176) size 96x13
    210   RenderBlock {DIV} at (0,0) size 96x13
    211 layer at (275,176) size 117x13 scrollX 179 scrollWidth 296
    212   RenderBlock {DIV} at (3,3) size 117x13
    213     RenderText {#text} at (-178,0) size 296x13
    214       text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    215 layer at (414,176) size 96x13 scrollX 200 scrollWidth 296
    216   RenderBlock {DIV} at (0,0) size 96x13
    217     RenderText {#text} at (-199,0) size 296x13
    218       text run at (-199,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
    219 layer at (537,176) size 117x13 scrollX 223 scrollWidth 340
     205layer at (152,176) size 117x13 scrollX 179 scrollWidth 296
     206  RenderBlock {DIV} at (11,3) size 117x13 [color=#A9A9A9]
     207    RenderText {#text} at (-178,0) size 296x13
     208      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     209layer at (152,176) size 117x13
     210  RenderBlock {DIV} at (0,0) size 117x13
     211layer at (296,176) size 117x13 scrollX 179 scrollWidth 296
     212  RenderBlock {DIV} at (3,3) size 117x13
     213    RenderText {#text} at (-178,0) size 296x13
     214      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     215layer at (435,176) size 117x13 scrollX 179 scrollWidth 296
     216  RenderBlock {DIV} at (0,0) size 117x13
     217    RenderText {#text} at (-178,0) size 296x13
     218      text run at (-178,0) width 295: "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
     219layer at (579,176) size 117x13 scrollX 223 scrollWidth 340
    220220  RenderBlock {DIV} at (3,3) size 117x13
    221221    RenderText {#text} at (-222,0) size 340x13
  • trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt

    r149210 r153647  
    1111          text run at (0,0) width 257: "You should not see any red on this page."
    1212      RenderBlock {DIV} at (0,68) size 784x23
    13         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14           RenderFlexibleBox {DIV} at (3,3) size 117x13
     13        RenderTextControl {INPUT} at (2,2) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     14          RenderFlexibleBox {DIV} at (3,3) size 138x13
    1515            RenderBlock {DIV} at (0,1) size 8x11
    16             RenderBlock {DIV} at (8,0) size 96x13
    17             RenderBlock {DIV} at (104,1) size 13x11
     16            RenderBlock {DIV} at (8,0) size 117x13
     17            RenderBlock {DIV} at (125,1) size 13x11
    1818        RenderText {#text} at (0,0) size 0x0
    1919      RenderBlock {DIV} at (0,91) size 784x23
    20         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    21           RenderFlexibleBox {DIV} at (3,3) size 117x13
     20        RenderTextControl {INPUT} at (2,2) size 153x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     21          RenderFlexibleBox {DIV} at (3,3) size 147x13
    2222            RenderBlock {DIV} at (0,1) size 17x11
    23             RenderBlock {DIV} at (17,0) size 87x13
    24             RenderBlock {DIV} at (104,1) size 13x11
     23            RenderBlock {DIV} at (17,0) size 117x13
     24            RenderBlock {DIV} at (134,1) size 13x11
    2525        RenderText {#text} at (0,0) size 0x0
    2626      RenderBlock {DIV} at (0,114) size 784x23
    27         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    28           RenderFlexibleBox {DIV} at (3,3) size 117x13
     27        RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     28          RenderFlexibleBox {DIV} at (3,3) size 152x13
    2929            RenderBlock {DIV} at (0,1) size 22x11
    30             RenderBlock {DIV} at (22,0) size 82x13
    31             RenderBlock {DIV} at (104,1) size 13x11
     30            RenderBlock {DIV} at (22,0) size 117x13
     31            RenderBlock {DIV} at (139,1) size 13x11
    3232        RenderText {#text} at (0,0) size 0x0
    3333      RenderBlock (anonymous) at (0,137) size 784x32
     
    7474              text run at (0,0) width 64: "Button"
    7575        RenderText {#text} at (0,0) size 0x0
    76 layer at (21,81) size 96x13
    77   RenderBlock {DIV} at (0,0) size 96x13
     76layer at (21,81) size 117x13
     77  RenderBlock {DIV} at (0,0) size 117x13
    7878    RenderText {#text} at (0,0) size 36x13
    7979      text run at (0,0) width 36: "Search"
    80 layer at (30,104) size 87x13
    81   RenderBlock {DIV} at (0,0) size 87x13
    82 layer at (35,127) size 82x13
    83   RenderBlock {DIV} at (0,0) size 82x13
     80layer at (30,104) size 117x13
     81  RenderBlock {DIV} at (0,0) size 117x13
     82layer at (35,127) size 117x13
     83  RenderBlock {DIV} at (0,0) size 117x13
  • trunk/LayoutTests/platform/mac/fast/forms/control-restrict-line-height-expected.txt

    r149210 r153647  
    2121        text run at (298,41) width 4: " "
    2222      RenderBR {BR} at (0,0) size 0x0
    23       RenderTextControl {INPUT} at (2,64) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24         RenderFlexibleBox {DIV} at (3,3) size 117x13
     23      RenderTextControl {INPUT} at (2,64) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     24        RenderFlexibleBox {DIV} at (3,3) size 138x13
    2525          RenderBlock {DIV} at (0,1) size 8x11
    26           RenderBlock {DIV} at (8,0) size 96x13
    27           RenderBlock {DIV} at (104,1) size 13x11
     26          RenderBlock {DIV} at (8,0) size 117x13
     27          RenderBlock {DIV} at (125,1) size 13x11
    2828      RenderText {#text} at (0,0) size 0x0
    29 layer at (21,75) size 96x13 scrollWidth 279
    30   RenderBlock {DIV} at (0,0) size 96x13
     29layer at (21,75) size 117x13 scrollWidth 279
     30  RenderBlock {DIV} at (0,0) size 117x13
    3131    RenderText {#text} at (0,0) size 278x13
    3232      text run at (0,0) width 278: "This text should be centered vertically in the button"
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt

    r149210 r153647  
    8989        RenderText {#text} at (0,237) size 44x18
    9090          text run at (0,237) width 44: "search "
    91         RenderTextControl {INPUT} at (46,237) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    92           RenderFlexibleBox {DIV} at (3,3) size 117x13
     91        RenderTextControl {INPUT} at (46,237) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     92          RenderFlexibleBox {DIV} at (3,3) size 138x13
    9393            RenderBlock {DIV} at (0,1) size 8x11
    94             RenderBlock {DIV} at (8,0) size 96x13
    95             RenderBlock {DIV} at (104,1) size 13x11
     94            RenderBlock {DIV} at (8,0) size 117x13
     95            RenderBlock {DIV} at (125,1) size 13x11
    9696        RenderText {#text} at (0,0) size 0x0
    9797layer at (49,31) size 117x13
     
    103103layer at (77,243) size 117x13
    104104  RenderBlock {DIV} at (3,3) size 117x13
    105 layer at (65,266) size 96x13
    106   RenderBlock {DIV} at (0,0) size 96x13
     105layer at (65,266) size 117x13
     106  RenderBlock {DIV} at (0,0) size 117x13
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-pseudo-style-expected.txt

    r145977 r153647  
    1010      RenderText {#text} at (127,20) size 4x18
    1111        text run at (127,20) width 4: " "
    12       RenderTextControl {INPUT} at (133,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    13         RenderFlexibleBox {DIV} at (3,3) size 117x13
     12      RenderTextControl {INPUT} at (133,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     13        RenderFlexibleBox {DIV} at (3,3) size 138x13
    1414          RenderBlock {DIV} at (0,1) size 8x11
    15           RenderBlock {DIV} at (8,0) size 96x13
    16           RenderBlock {DIV} at (104,1) size 13x11
    17       RenderText {#text} at (258,20) size 4x18
    18         text run at (258,20) width 4: " "
    19       RenderTextControl {INPUT} at (264,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    20       RenderText {#text} at (389,20) size 4x18
    21         text run at (389,20) width 4: " "
    22       RenderTextControl {INPUT} at (395,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    23       RenderText {#text} at (520,20) size 4x18
    24         text run at (520,20) width 4: " "
    25       RenderTextControl {INPUT} at (526,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    26       RenderText {#text} at (651,20) size 4x18
    27         text run at (651,20) width 4: " "
    28       RenderTextControl {INPUT} at (657,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     15          RenderBlock {DIV} at (8,0) size 117x13
     16          RenderBlock {DIV} at (125,1) size 13x11
     17      RenderText {#text} at (279,20) size 4x18
     18        text run at (279,20) width 4: " "
     19      RenderTextControl {INPUT} at (285,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     20      RenderText {#text} at (410,20) size 4x18
     21        text run at (410,20) width 4: " "
     22      RenderTextControl {INPUT} at (416,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     23      RenderText {#text} at (541,20) size 4x18
     24        text run at (541,20) width 4: " "
     25      RenderTextControl {INPUT} at (547,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     26      RenderText {#text} at (672,20) size 4x18
     27        text run at (672,20) width 4: " "
     28      RenderTextControl {INPUT} at (2,43) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2929      RenderText {#text} at (0,0) size 0x0
    3030layer at (13,31) size 117x13
     
    3434layer at (13,31) size 117x13
    3535  RenderBlock {DIV} at (3,3) size 117x13
    36 layer at (152,31) size 96x13
    37   RenderBlock {DIV} at (11,3) size 96x13 [color=#640000]
     36layer at (152,31) size 117x13
     37  RenderBlock {DIV} at (11,3) size 117x13 [color=#640000]
    3838    RenderText {#text} at (0,0) size 35x13
    3939      text run at (0,0) width 35: "search"
    40 layer at (152,31) size 96x13
    41   RenderBlock {DIV} at (0,0) size 96x13
    42 layer at (275,31) size 117x13
     40layer at (152,31) size 117x13
     41  RenderBlock {DIV} at (0,0) size 117x13
     42layer at (296,31) size 117x13
    4343  RenderBlock {DIV} at (3,3) size 117x13 [color=#640000]
    4444    RenderText {#text} at (0,0) size 51x13
    4545      text run at (0,0) width 51: "password"
    46 layer at (275,31) size 117x13
     46layer at (296,31) size 117x13
    4747  RenderBlock {DIV} at (3,3) size 117x13
    48 layer at (406,31) size 117x13
     48layer at (427,31) size 117x13
    4949  RenderBlock {DIV} at (3,3) size 117x13 [color=#640000]
    5050    RenderText {#text} at (0,0) size 70x13
    5151      text run at (0,0) width 70: "disabled text"
    52 layer at (406,31) size 117x13
     52layer at (427,31) size 117x13
    5353  RenderBlock {DIV} at (3,3) size 117x13 [color=#545454]
    54 layer at (537,31) size 117x13
     54layer at (558,31) size 117x13
    5555  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    5656    RenderText {#text} at (0,0) size 38x13
    5757      text run at (0,0) width 38: "default"
    58 layer at (537,31) size 117x13
     58layer at (558,31) size 117x13
    5959  RenderBlock {DIV} at (3,3) size 117x13
    60 layer at (668,31) size 117x13
     60layer at (13,54) size 117x13
    6161  RenderBlock {DIV} at (3,3) size 117x13 [color=#A9A9A9]
    6262    RenderText {#text} at (0,0) size 86x13
    6363      text run at (0,0) width 86: "default disabled"
    64 layer at (668,31) size 117x13
     64layer at (13,54) size 117x13
    6565  RenderBlock {DIV} at (3,3) size 117x13
  • trunk/LayoutTests/platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt

    r145977 r153647  
    88          text run at (0,0) width 385: "Only the second search field should have a cancel button (\x{D7})."
    99      RenderBlock (anonymous) at (0,34) size 784x23
    10         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    11           RenderFlexibleBox {DIV} at (3,3) size 117x13
     10        RenderTextControl {INPUT} at (2,2) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     11          RenderFlexibleBox {DIV} at (3,3) size 138x13
    1212            RenderBlock {DIV} at (0,1) size 8x11
    13             RenderBlock {DIV} at (8,0) size 96x13
    14             RenderBlock {DIV} at (104,1) size 13x11
    15         RenderText {#text} at (127,2) size 4x18
    16           text run at (127,2) width 4: " "
    17         RenderTextControl {INPUT} at (133,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    18           RenderFlexibleBox {DIV} at (3,3) size 117x13
     13            RenderBlock {DIV} at (8,0) size 117x13
     14            RenderBlock {DIV} at (125,1) size 13x11
     15        RenderText {#text} at (148,2) size 4x18
     16          text run at (148,2) width 4: " "
     17        RenderTextControl {INPUT} at (154,2) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     18          RenderFlexibleBox {DIV} at (3,3) size 138x13
    1919            RenderBlock {DIV} at (0,1) size 8x11
    20             RenderBlock {DIV} at (8,0) size 96x13
    21             RenderBlock {DIV} at (104,1) size 13x11
     20            RenderBlock {DIV} at (8,0) size 117x13
     21            RenderBlock {DIV} at (125,1) size 13x11
    2222        RenderText {#text} at (0,0) size 0x0
    23 layer at (21,47) size 96x13
    24   RenderBlock {DIV} at (0,0) size 96x13
    25 layer at (152,47) size 96x13
    26   RenderBlock {DIV} at (0,0) size 96x13
     23layer at (21,47) size 117x13
     24  RenderBlock {DIV} at (0,0) size 117x13
     25layer at (173,47) size 117x13
     26  RenderBlock {DIV} at (0,0) size 117x13
    2727    RenderText {#text} at (0,0) size 43x13
    2828      text run at (0,0) width 43: "this one"
  • trunk/LayoutTests/platform/mac/fast/forms/search-display-none-cancel-button-expected.txt

    r145977 r153647  
    77        text run at (0,0) width 499: "This tests that the display:none style will work on a search field's cancel button."
    88      RenderBR {BR} at (499,14) size 0x0
    9       RenderTextControl {INPUT} at (2,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    10         RenderFlexibleBox {DIV} at (3,3) size 117x13
     9      RenderTextControl {INPUT} at (2,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     10        RenderFlexibleBox {DIV} at (3,3) size 138x13
    1111          RenderBlock {DIV} at (0,1) size 8x11
    12           RenderBlock {DIV} at (8,0) size 109x13
     12          RenderBlock {DIV} at (8,0) size 130x13
    1313      RenderText {#text} at (0,0) size 0x0
    14 layer at (21,31) size 109x13
    15   RenderBlock {DIV} at (0,0) size 109x13
     14layer at (21,31) size 130x13
     15  RenderBlock {DIV} at (0,0) size 130x13
    1616    RenderText {#text} at (0,0) size 20x13
    1717      text run at (0,0) width 20: "test"
  • trunk/LayoutTests/platform/mac/fast/forms/search-rtl-expected.txt

    r149210 r153647  
    1717          text run at (752,0) width 4: "."
    1818      RenderBlock {P} at (0,34) size 784x69
    19         RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    20           RenderFlexibleBox {DIV} at (3,3) size 117x13
     19        RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     20          RenderFlexibleBox {DIV} at (3,3) size 152x13
    2121            RenderBlock {DIV} at (0,1) size 22x11
    22             RenderBlock {DIV} at (22,0) size 82x13
    23             RenderBlock {DIV} at (104,1) size 13x11
    24         RenderText {#text} at (127,2) size 4x18
    25           text run at (127,2) width 4: " "
     22            RenderBlock {DIV} at (22,0) size 117x13
     23            RenderBlock {DIV} at (139,1) size 13x11
     24        RenderText {#text} at (162,2) size 4x18
     25          text run at (162,2) width 4: " "
    2626        RenderBR {BR} at (0,0) size 0x0
    27         RenderTextControl {INPUT} at (2,25) size 173x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    28           RenderFlexibleBox {DIV} at (3,3) size 167x13
     27        RenderTextControl {INPUT} at (2,25) size 208x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     28          RenderFlexibleBox {DIV} at (3,3) size 202x13
    2929            RenderBlock {DIV} at (0,1) size 22x11
    30             RenderBlock {DIV} at (22,0) size 132x13
    31             RenderBlock {DIV} at (154,1) size 13x11
    32         RenderText {#text} at (177,25) size 4x18
    33           text run at (177,25) width 4: " "
     30            RenderBlock {DIV} at (22,0) size 167x13
     31            RenderBlock {DIV} at (189,1) size 13x11
     32        RenderText {#text} at (212,25) size 4x18
     33          text run at (212,25) width 4: " "
    3434        RenderBR {BR} at (0,0) size 0x0
    35         RenderTextControl {INPUT} at (2,48) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    36           RenderFlexibleBox {DIV} at (3,3) size 117x13
     35        RenderTextControl {INPUT} at (2,48) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     36          RenderFlexibleBox {DIV} at (3,3) size 152x13
    3737            RenderBlock {DIV} at (0,1) size 22x11
    38             RenderBlock {DIV} at (22,0) size 82x13
    39             RenderBlock {DIV} at (104,1) size 13x11
     38            RenderBlock {DIV} at (22,0) size 117x13
     39            RenderBlock {DIV} at (139,1) size 13x11
    4040        RenderText {#text} at (0,0) size 0x0
    4141      RenderBlock {P} at (0,119) size 784x18
    4242        RenderText {#text} at (0,0) size 39x18
    4343          text run at (0,0) width 39: "PASS"
    44 layer at (35,47) size 82x13 scrollX 53 scrollWidth 135
    45   RenderBlock {DIV} at (0,0) size 82x13
    46     RenderText {#text} at (-52,0) size 135x13
    47       text run at (-52,0) width 22 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
    48       text run at (-30,0) width 19: "she"
    49       text run at (-11,0) width 44 RTL: " \x{5D5}\x{5D4}\x{5D9}\x{5D0} \x{5D6}\x{5D4} "
    50       text run at (32,0) width 14: "he"
    51       text run at (45,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
    52 layer at (35,70) size 132x13 scrollX 3 scrollWidth 135
    53   RenderBlock {DIV} at (0,0) size 132x13
    54     RenderText {#text} at (-2,0) size 135x13
    55       text run at (-2,0) width 22 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
    56       text run at (19,0) width 20: "she"
    57       text run at (38,0) width 45 RTL: " \x{5D5}\x{5D4}\x{5D9}\x{5D0} \x{5D6}\x{5D4} "
    58       text run at (82,0) width 14: "he"
    59       text run at (95,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
    60 layer at (35,93) size 82x13
    61   RenderBlock {DIV} at (0,0) size 82x13
     44layer at (35,47) size 117x13 scrollX 18 scrollWidth 135
     45  RenderBlock {DIV} at (0,0) size 117x13
     46    RenderText {#text} at (-17,0) size 135x13
     47      text run at (-17,0) width 22 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
     48      text run at (4,0) width 20: "she"
     49      text run at (23,0) width 45 RTL: " \x{5D5}\x{5D4}\x{5D9}\x{5D0} \x{5D6}\x{5D4} "
     50      text run at (67,0) width 14: "he"
     51      text run at (80,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
     52layer at (35,70) size 167x13
     53  RenderBlock {DIV} at (0,0) size 167x13
     54    RenderText {#text} at (32,0) size 135x13
     55      text run at (32,0) width 23 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
     56      text run at (54,0) width 20: "she"
     57      text run at (73,0) width 45 RTL: " \x{5D5}\x{5D4}\x{5D9}\x{5D0} \x{5D6}\x{5D4} "
     58      text run at (117,0) width 14: "he"
     59      text run at (130,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
     60layer at (35,93) size 117x13
     61  RenderBlock {DIV} at (0,0) size 117x13
    6262caret: position 0 of child 0 {DIV} of child 1 {DIV} of child 0 {DIV} of {#document-fragment} of child 9 {INPUT} of child 3 {P} of body
  • trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt

    r145977 r153647  
    44  RenderBlock {HTML} at (0,0) size 800x39
    55    RenderBody {BODY} at (8,8) size 784x23
    6       RenderTextControl {INPUT} at (2,2) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderFlexibleBox {DIV} at (3,3) size 117x13
     6      RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     7        RenderFlexibleBox {DIV} at (3,3) size 152x13
    88          RenderBlock {DIV} at (0,1) size 22x11
    9           RenderBlock {DIV} at (22,0) size 82x13
    10           RenderBlock {DIV} at (104,1) size 13x11
     9          RenderBlock {DIV} at (22,0) size 117x13
     10          RenderBlock {DIV} at (139,1) size 13x11
    1111      RenderText {#text} at (0,0) size 0x0
    12 layer at (35,13) size 82x13 scrollWidth 92
    13   RenderBlock {DIV} at (25,3) size 82x13 [color=#A9A9A9]
     12layer at (35,13) size 117x13
     13  RenderBlock {DIV} at (25,3) size 117x13 [color=#A9A9A9]
    1414    RenderText {#text} at (0,0) size 92x13
    1515      text run at (0,0) width 92: "Search for Events"
    16 layer at (35,13) size 82x13
    17   RenderBlock {DIV} at (0,0) size 82x13
     16layer at (35,13) size 117x13
     17  RenderBlock {DIV} at (0,0) size 117x13
  • trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt

    r149210 r153647  
    1212          text run at (459,18) width 122: "same in both fields."
    1313      RenderBlock {P} at (0,52) size 784x45
    14         RenderTextControl {INPUT} at (2,0) size 123x45 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    15           RenderFlexibleBox {DIV} at (3,3) size 117x39
     14        RenderTextControl {INPUT} at (2,0) size 153x45 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     15          RenderFlexibleBox {DIV} at (3,3) size 147x39
    1616            RenderBlock {DIV} at (0,14) size 17x11
    17             RenderBlock {DIV} at (17,13) size 87x13
    18             RenderBlock {DIV} at (104,14) size 13x11
    19         RenderText {#text} at (127,13) size 4x18
    20           text run at (127,13) width 4: " "
    21         RenderTextControl {INPUT} at (133,0) size 123x45 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     17            RenderBlock {DIV} at (17,13) size 117x13
     18            RenderBlock {DIV} at (134,14) size 13x11
     19        RenderText {#text} at (157,13) size 4x18
     20          text run at (157,13) width 4: " "
     21        RenderTextControl {INPUT} at (163,0) size 123x45 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2222        RenderText {#text} at (0,0) size 0x0
    2323      RenderBlock {P} at (0,113) size 784x18
    24         RenderTextControl {INPUT} at (2,2) size 123x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    25           RenderFlexibleBox {DIV} at (3,1) size 117x13
     24        RenderTextControl {INPUT} at (2,2) size 153x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     25          RenderFlexibleBox {DIV} at (3,1) size 147x13
    2626            RenderBlock {DIV} at (0,1) size 17x11
    27             RenderBlock {DIV} at (17,0) size 87x13
    28             RenderBlock {DIV} at (104,1) size 13x11
    29         RenderText {#text} at (127,0) size 4x18
    30           text run at (127,0) width 4: " "
    31         RenderTextControl {INPUT} at (133,2) size 123x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     27            RenderBlock {DIV} at (17,0) size 117x13
     28            RenderBlock {DIV} at (134,1) size 13x11
     29        RenderText {#text} at (157,0) size 4x18
     30          text run at (157,0) width 4: " "
     31        RenderTextControl {INPUT} at (163,2) size 123x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    3232        RenderText {#text} at (0,0) size 0x0
    3333      RenderBlock {P} at (0,147) size 784x18
    34         RenderTextControl {INPUT} at (2,2) size 123x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    35           RenderFlexibleBox {DIV} at (3,0) size 117x12
     34        RenderTextControl {INPUT} at (2,2) size 153x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     35          RenderFlexibleBox {DIV} at (3,0) size 147x12
    3636            RenderBlock {DIV} at (0,0) size 17x11
    37             RenderBlock {DIV} at (17,3) size 87x6
    38             RenderBlock {DIV} at (104,0) size 13x11
    39         RenderText {#text} at (127,0) size 4x18
    40           text run at (127,0) width 4: " "
    41         RenderTextControl {INPUT} at (133,2) size 123x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     37            RenderBlock {DIV} at (17,3) size 117x6
     38            RenderBlock {DIV} at (134,0) size 13x11
     39        RenderText {#text} at (157,0) size 4x18
     40          text run at (157,0) width 4: " "
     41        RenderTextControl {INPUT} at (163,2) size 123x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    4242        RenderText {#text} at (0,0) size 0x0
    43 layer at (30,76) size 87x13
    44   RenderBlock {DIV} at (0,0) size 87x13
     43layer at (30,76) size 117x13
     44  RenderBlock {DIV} at (0,0) size 117x13
    4545    RenderText {#text} at (0,0) size 24x13
    4646      text run at (0,0) width 24: "Text"
    47 layer at (144,76) size 117x13
     47layer at (174,76) size 117x13
    4848  RenderBlock {DIV} at (3,16) size 117x13
    4949    RenderText {#text} at (0,0) size 24x13
    5050      text run at (0,0) width 24: "Text"
    51 layer at (30,124) size 87x13
    52   RenderBlock {DIV} at (0,0) size 87x13
     51layer at (30,124) size 117x13
     52  RenderBlock {DIV} at (0,0) size 117x13
    5353    RenderText {#text} at (0,0) size 24x13
    5454      text run at (0,0) width 24: "Text"
    55 layer at (144,124) size 117x13
     55layer at (174,124) size 117x13
    5656  RenderBlock {DIV} at (3,1) size 117x13
    5757    RenderText {#text} at (0,0) size 24x13
    5858      text run at (0,0) width 24: "Text"
    59 layer at (30,160) size 87x6 scrollHeight 13
    60   RenderBlock {DIV} at (0,0) size 87x6
     59layer at (30,160) size 117x6 scrollHeight 13
     60  RenderBlock {DIV} at (0,0) size 117x6
    6161    RenderText {#text} at (0,0) size 24x13
    6262      text run at (0,0) width 24: "Text"
    63 layer at (144,160) size 117x6 scrollHeight 13
     63layer at (174,160) size 117x6 scrollHeight 13
    6464  RenderBlock {DIV} at (3,3) size 117x6
    6565    RenderText {#text} at (0,0) size 24x13
  • trunk/LayoutTests/platform/mac/fast/forms/searchfield-heights-expected.txt

    r149210 r153647  
    77        text run at (0,0) width 368: "This tests that aqua-style search fields do not honor height."
    88      RenderBR {BR} at (368,14) size 0x0
    9       RenderTextControl {INPUT} at (0,22) size 100x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    10         RenderFlexibleBox {DIV} at (3,3) size 94x11
     9      RenderTextControl {INPUT} at (0,22) size 121x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     10        RenderFlexibleBox {DIV} at (3,3) size 115x11
    1111          RenderBlock {DIV} at (0,1) size 8x9
    12           RenderBlock {DIV} at (8,0) size 73x11
    13           RenderBlock {DIV} at (81,1) size 13x9
    14       RenderText {#text} at (100,20) size 4x18
    15         text run at (100,20) width 4: " "
    16       RenderTextControl {INPUT} at (106,20) size 123x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17         RenderFlexibleBox {DIV} at (3,3) size 117x13
     12          RenderBlock {DIV} at (8,0) size 94x11
     13          RenderBlock {DIV} at (102,1) size 13x9
     14      RenderText {#text} at (121,20) size 4x18
     15        text run at (121,20) width 4: " "
     16      RenderTextControl {INPUT} at (127,20) size 144x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     17        RenderFlexibleBox {DIV} at (3,3) size 138x13
    1818          RenderBlock {DIV} at (0,1) size 8x11
    19           RenderBlock {DIV} at (8,0) size 96x13
    20           RenderBlock {DIV} at (104,1) size 13x11
    21       RenderText {#text} at (231,20) size 4x18
    22         text run at (231,20) width 4: " "
    23       RenderTextControl {INPUT} at (237,18) size 146x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24         RenderFlexibleBox {DIV} at (3,3) size 140x16
     19          RenderBlock {DIV} at (8,0) size 117x13
     20          RenderBlock {DIV} at (125,1) size 13x11
     21      RenderText {#text} at (273,20) size 4x18
     22        text run at (273,20) width 4: " "
     23      RenderTextControl {INPUT} at (279,18) size 172x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     24        RenderFlexibleBox {DIV} at (3,3) size 166x16
    2525          RenderBlock {DIV} at (0,1) size 10x13
    26           RenderBlock {DIV} at (10,0) size 114x16
    27           RenderBlock {DIV} at (124,1) size 16x13
     26          RenderBlock {DIV} at (10,0) size 140x16
     27          RenderBlock {DIV} at (150,1) size 16x13
    2828      RenderText {#text} at (0,0) size 0x0
    29 layer at (19,33) size 73x11
    30   RenderBlock {DIV} at (0,0) size 73x11
     29layer at (19,33) size 94x11
     30  RenderBlock {DIV} at (0,0) size 94x11
    3131    RenderText {#text} at (0,0) size 20x11
    3232      text run at (0,0) width 20: "mini"
    33 layer at (125,31) size 96x13
    34   RenderBlock {DIV} at (0,0) size 96x13
     33layer at (146,31) size 117x13
     34  RenderBlock {DIV} at (0,0) size 117x13
    3535    RenderText {#text} at (0,0) size 29x13
    3636      text run at (0,0) width 29: "small"
    37 layer at (258,29) size 114x16
    38   RenderBlock {DIV} at (0,0) size 114x16
     37layer at (300,29) size 140x16
     38  RenderBlock {DIV} at (0,0) size 140x16
    3939    RenderText {#text} at (0,0) size 45x16
    4040      text run at (0,0) width 45: "regular"
  • trunk/Source/WebCore/ChangeLog

    r153645 r153647  
     12013-08-02  Antoine Quint  <graouts@apple.com>
     2
     3        <input type="search"> doesn't correctly handle the "size" attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=119174
     5
     6        We weren't taking into account the decorations for search fields (results and close buttons)
     7        when computing the preferred logical width for these fields based on the "size" attribute
     8        and as a result we would not guarantee that we could show the number of characters set by
     9        the "size" attribute.
     10
     11        To make the process of reporting extra width due to decorations cleaner, we add a new decorationWidth()
     12        method for InputType subclasses to override and called through HTMLInputElement::decorationWidth()
     13        and have NumberInputType and SearchInputType return custom decoration widths.
     14
     15        Reviewed by Darin Adler.
     16
     17        Test: fast/forms/search/search-size-with-decorations.html
     18
     19        * html/HTMLInputElement.cpp:
     20        (WebCore::HTMLInputElement::decorationWidth):
     21        * html/HTMLInputElement.h:
     22        * html/InputType.cpp:
     23        (WebCore::InputType::decorationWidth):
     24        * html/InputType.h:
     25        Expose a new method to get the width for the input's decoration through the InputType.
     26
     27        * html/NumberInputType.cpp:
     28        (WebCore::NumberInputType::decorationWidth):
     29        * html/NumberInputType.h:
     30        Override InputType::decorationWidth() to return the decoration width for a number input
     31        using the same code previously used in RenderTextControlSingleLine::preferredContentLogicalWidth().
     32
     33        * html/SearchInputType.cpp:
     34        (WebCore::SearchInputType::sizeShouldIncludeDecoration):
     35        Override InputType::sizeShouldIncludeDecoration() to return true since search fields
     36        have custom decoration adding to the size of the field.
     37
     38        (WebCore::SearchInputType::decorationWidth):
     39        Return the combined size of the results and cancel buttons, as available.
     40        * html/SearchInputType.h:
     41
     42        * rendering/RenderTextControlSingleLine.cpp:
     43        (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
     44        Remove the code specific to NumberInputType (which was moved to InputType::decorationWidth())
     45        and replace it with a call to HTMLInputElement::decorationWidth() since this method will now
     46        return the extra decoration width for an input element should it have any.
     47
    1482013-08-02  Patrick Gansterer  <paroga@webkit.org>
    249
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r153541 r153647  
    936936}
    937937
     938float HTMLInputElement::decorationWidth() const
     939{
     940    return m_inputType->decorationWidth();
     941}
     942
    938943void HTMLInputElement::copyNonAttributePropertiesFromElement(const Element& source)
    939944{
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r153541 r153647  
    151151    int size() const;
    152152    bool sizeShouldIncludeDecoration(int& preferredSize) const;
     153    float decorationWidth() const;
    153154
    154155    void setType(const String&);
  • trunk/Source/WebCore/html/InputType.cpp

    r150876 r153647  
    315315}
    316316
     317float InputType::decorationWidth() const
     318{
     319    return 0;
     320}
     321
    317322bool InputType::isInRange(const String& value) const
    318323{
  • trunk/Source/WebCore/html/InputType.h

    r151947 r153647  
    167167    double maximum() const;
    168168    virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize) const;
     169    virtual float decorationWidth() const;
    169170    bool stepMismatch(const String&) const;
    170171    virtual bool getAllowedValueStep(Decimal*) const;
  • trunk/Source/WebCore/html/NumberInputType.cpp

    r151947 r153647  
    203203}
    204204
     205float NumberInputType::decorationWidth() const
     206{
     207    float width = 0;
     208    HTMLElement* spinButton = element()->innerSpinButtonElement();
     209    if (RenderBox* spinRenderer = spinButton ? spinButton->renderBox() : 0) {
     210        width += spinRenderer->borderAndPaddingLogicalWidth();
     211        // Since the width of spinRenderer is not calculated yet, spinRenderer->logicalWidth() returns 0.
     212        // So computedStyle()->logicalWidth() is used instead.
     213        width += spinButton->computedStyle()->logicalWidth().value();
     214    }
     215    return width;
     216}
     217
    205218bool NumberInputType::isSteppable() const
    206219{
  • trunk/Source/WebCore/html/NumberInputType.h

    r141086 r153647  
    5151    virtual bool typeMismatch() const OVERRIDE;
    5252    virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize) const OVERRIDE;
     53    virtual float decorationWidth() const OVERRIDE;
    5354    virtual bool isSteppable() const OVERRIDE;
    5455    virtual StepRange createStepRange(AnyStepHandling) const OVERRIDE;
  • trunk/Source/WebCore/html/SearchInputType.cpp

    r142375 r153647  
    193193}
    194194
     195bool SearchInputType::sizeShouldIncludeDecoration(int, int& preferredSize) const
     196{
     197    preferredSize = element()->size();
     198    return true;
     199}
     200
     201float SearchInputType::decorationWidth() const
     202{
     203    float width = 0;
     204    if (m_resultsButton)
     205        width += m_resultsButton->computedStyle()->logicalWidth().value();
     206    if (m_cancelButton)
     207        width += m_cancelButton->computedStyle()->logicalWidth().value();
     208    return width;
     209}
     210
    195211} // namespace WebCore
  • trunk/Source/WebCore/html/SearchInputType.h

    r141086 r153647  
    6161    virtual void handleKeydownEvent(KeyboardEvent*) OVERRIDE;
    6262    virtual void didSetValueByUserEdit(ValueChangeState) OVERRIDE;
     63    virtual bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize) const OVERRIDE;
     64    virtual float decorationWidth() const OVERRIDE;
    6365
    6466    void searchEventTimerFired(Timer<SearchInputType>*);
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r151695 r153647  
    338338        result += maxCharWidth - charWidth;
    339339
    340     if (includesDecoration) {
    341         HTMLElement* spinButton = innerSpinButtonElement();
    342         if (RenderBox* spinRenderer = spinButton ? spinButton->renderBox() : 0) {
    343             result += spinRenderer->borderAndPaddingLogicalWidth();
    344             // Since the width of spinRenderer is not calculated yet, spinRenderer->logicalWidth() returns 0.
    345             // So computedStyle()->logicalWidth() is used instead.
    346             result += spinButton->computedStyle()->logicalWidth().value();
    347         }
    348     }
     340    if (includesDecoration)
     341        result += inputElement()->decorationWidth();
    349342
    350343    return result;
Note: See TracChangeset for help on using the changeset viewer.