Changeset 90089 in webkit


Ignore:
Timestamp:
Jun 29, 2011 11:30:23 PM (13 years ago)
Author:
tkent@chromium.org
Message:

2011-06-29 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

Avoid custom layout code of RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=61415

Update tests including <input type=search> or <input type=number>. Their
internal structures are changed.
Slight position changes for search result buttons and search cancel
buttons are expected.

  • fast/css/text-input-with-webkit-border-radius-expected.txt:
  • platform/chromium/test_expectations.txt:
  • platform/mac/fast/css/input-search-padding-expected.png:
  • platform/mac/fast/css/input-search-padding-expected.txt:
  • platform/mac/fast/css/pseudo-cache-stale-expected.txt:
  • platform/mac/fast/forms/box-shadow-override-expected.txt:
  • platform/mac/fast/forms/control-restrict-line-height-expected.txt:
  • platform/mac/fast/forms/input-appearance-height-expected.txt:
  • platform/mac/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt:
  • platform/mac/fast/forms/input-appearance-spinbutton-expected.txt:
  • platform/mac/fast/forms/input-appearance-spinbutton-layer-expected.txt:
  • platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
  • platform/mac/fast/forms/input-appearance-spinbutton-visibility-expected.txt:
  • platform/mac/fast/forms/placeholder-position-expected.txt:
  • platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
  • platform/mac/fast/forms/placeholder-set-value-expected.txt:
  • 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-placeholder-value-changed-expected.txt:
  • 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/searchfield-heights-expected.txt:
  • platform/mac/fast/repaint/search-field-cancel-expected.png:
  • platform/mac/fast/repaint/search-field-cancel-expected.txt:
  • platform/mac/fast/replaced/width100percent-searchfield-expected.txt:
  • platform/mac/fast/table/colspanMinWidth-vertical-expected.png:
  • platform/mac/fast/table/colspanMinWidth-vertical-expected.txt:

2011-06-29 Kent Tamura <tkent@chromium.org>

Reviewed by Dimitri Glazkov.

Avoid custom layout code of RenderTextControlSingleLine
https://bugs.webkit.org/show_bug.cgi?id=61415

If a text field has a search results button, a search cancel
button, a speech button, or a spin button, the editable inner text
element and the buttons are wrapped by a flexible box container,
and the editable inner text element has flexibility. As the result
of applying the flexible box, we don't need any horizontal layout
code in RenderTextControlSingleLine except the inner spin button.

Also, we remove custom hit-testing code in nodeAtPoint(). If a
user clicks on a position left of the inner editable text but not
on the search results button, the search results button doesn't
work though it worked.

  • css/html.css: (input::-webkit-textfield-decoration-container): New style definition for the "container" element. (input[type="search"]::-webkit-search-cancel-button): It should be a block element because it's a child of the flexible box. Also, this doesn't have flexibility. (input[type="search"]::-webkit-search-decoration): ditto. (input[type="search"]::-webkit-search-results-decoration): ditto. (input[type="search"]::-webkit-search-results-button): ditto. (input::-webkit-inner-spin-button): ditto. (input::-webkit-input-speech-button): ditto.
  • html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::containerElement): Add an accessor of the flexible box container. It just calls InputType::containerElement().
  • html/HTMLInputElement.h: Declare it.
  • html/InputType.h: (WebCore::InputType::containerElement): New accessor for a shadow element.
  • html/SearchInputType.cpp: (WebCore::SearchInputType::SearchInputType): m_innerBlock is moved to TextFieldInputType. (WebCore::SearchInputType::needsContainer): A search field always needs the flexible box container because of the results button and the cancel button. (WebCore::SearchInputType::createShadowSubtree): Use TextFieldInputType::createShadowSubtree(), then modify the tree. (WebCore::SearchInputType::destroyShadowSubtree): m_innerBlock is moved to TextFieldInputType.
  • html/SearchInputType.h:
  • html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::TextFieldInputType): Initialize the new members. (WebCore::TextFieldInputType::needsContainer): Returns true if x-webkit-speech. We check a spin button separately. (WebCore::TextFieldInputType::createShadowSubtree): Wrap everything with the flexible box container if needsContainer() or we need a spin button. (WebCore::TextFieldInputType::containerElement): Added an accessor. (WebCore::TextFieldInputType::innerBlockElement): ditto. (WebCore::TextFieldInputType::innerTextElement): ditto. (WebCore::TextFieldInputType::innerSpinButtonElement): ditto. (WebCore::TextFieldInputType::speechButtonElement): ditto. (WebCore::TextFieldInputType::destroyShadowSubtree): Clear references to new shadow nodes.
  • html/TextFieldInputType.h:
  • rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor. (WebCore::RenderTextControlSingleLine::innerTextElement): (WebCore::RenderTextControlSingleLine::layout):
    • Correct heights check Comparing with height(), not contentHeigth(), was incorrect.
    • Adjust the container height like the editable inner text.
    • Remove width adjustment
    • Remove the speech button layout code The flexible box layout is enough.

(WebCore::RenderTextControlSingleLine::nodeAtPoint):

Remove custom code for results/cancel/speech buttons, and
Simplify comments.

(WebCore::RenderTextControlSingleLine::forwardEvent):

Remove custom forwarding code for results/cancel buttons.

(WebCore::RenderTextControlSingleLine::styleDidChange):

Clear the style of the container because we update it in layout().

(WebCore::RenderTextControlSingleLine::hasControlClip):

Decoration buttons should be clipped by the container.

(WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):

We don't need to use display:inline-block any more.

(WebCore::RenderTextControlSingleLine::createInnerBlockStyle):

The text wrapper element should have flexibility.

(WebCore::RenderTextControlSingleLine::textBlockInsetTop):

Updated for the tree structure change.

  • rendering/RenderTextControlSingleLine.h:
Location:
trunk
Files:
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r90084 r90089  
     12011-06-29  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Avoid custom layout code of RenderTextControlSingleLine
     6        https://bugs.webkit.org/show_bug.cgi?id=61415
     7
     8        Update tests including <input type=search> or <input type=number>. Their
     9        internal structures are changed.
     10        Slight position changes for search result buttons and search cancel
     11        buttons are expected.
     12
     13        * fast/css/text-input-with-webkit-border-radius-expected.txt:
     14        * platform/chromium/test_expectations.txt:
     15        * platform/mac/fast/css/input-search-padding-expected.png:
     16        * platform/mac/fast/css/input-search-padding-expected.txt:
     17        * platform/mac/fast/css/pseudo-cache-stale-expected.txt:
     18        * platform/mac/fast/forms/box-shadow-override-expected.txt:
     19        * platform/mac/fast/forms/control-restrict-line-height-expected.txt:
     20        * platform/mac/fast/forms/input-appearance-height-expected.txt:
     21        * platform/mac/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt:
     22        * platform/mac/fast/forms/input-appearance-spinbutton-expected.txt:
     23        * platform/mac/fast/forms/input-appearance-spinbutton-layer-expected.txt:
     24        * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
     25        * platform/mac/fast/forms/input-appearance-spinbutton-visibility-expected.txt:
     26        * platform/mac/fast/forms/placeholder-position-expected.txt:
     27        * platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
     28        * platform/mac/fast/forms/placeholder-set-value-expected.txt:
     29        * platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt:
     30        * platform/mac/fast/forms/search-display-none-cancel-button-expected.txt:
     31        * platform/mac/fast/forms/search-placeholder-value-changed-expected.txt:
     32        * platform/mac/fast/forms/search-rtl-expected.txt:
     33        * platform/mac/fast/forms/search-styled-expected.txt:
     34        * platform/mac/fast/forms/search-vertical-alignment-expected.png:
     35        * platform/mac/fast/forms/search-vertical-alignment-expected.txt:
     36        * platform/mac/fast/forms/searchfield-heights-expected.txt:
     37        * platform/mac/fast/repaint/search-field-cancel-expected.png:
     38        * platform/mac/fast/repaint/search-field-cancel-expected.txt:
     39        * platform/mac/fast/replaced/width100percent-searchfield-expected.txt:
     40        * platform/mac/fast/table/colspanMinWidth-vertical-expected.png:
     41        * platform/mac/fast/table/colspanMinWidth-vertical-expected.txt:
     42
    1432011-06-29  Simon Fraser  <simon.fraser@apple.com>
    244
  • trunk/LayoutTests/fast/css/text-input-with-webkit-border-radius-expected.txt

    r89460 r90089  
    1717      RenderBlock {DIV} at (0,68) size 163x45 [bgcolor=#888888]
    1818        RenderTextControl {INPUT} at (11,9) size 133x19 [bgcolor=#00FF00] [border: (2px inset #000000)]
    19           RenderBlock {DIV} at (3,3) size 127x13
    20             RenderBlock {DIV} at (0,0) size 8x11
    21             RenderBlock {DIV} at (114,0) size 13x11
     19          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 127x13
     20            RenderBlock {DIV} at (0,1) size 8x11
     21            RenderBlock {DIV} at (8,0) size 106x13
     22            RenderBlock {DIV} at (114,1) size 13x11
    2223        RenderText {#text} at (0,0) size 0x0
    2324layer at (30,96) size 106x13
    24   RenderBlock {DIV} at (8,0) size 106x13
     25  RenderBlock {DIV} at (0,0) size 106x13
    2526    RenderText {#text} at (1,0) size 62x13
    2627      text run at (1,0) width 62: "default text"
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r90067 r90089  
    12971297BUGCR23488 MAC : fast/canvas/canvas-incremental-repaint-2.html = IMAGE
    12981298BUGCR23488 LEOPARD : fast/css/shadow-multiple.html = IMAGE
    1299 BUGCR23488 MAC : fast/forms/search-vertical-alignment.html = IMAGE
    13001299BUGCR23488 LEOPARD : fast/frames/content-opacity-1.html = IMAGE
    13011300BUGCR23488 LEOPARD : fast/frames/content-opacity-2.html = IMAGE
     
    13941393BUGCR23473 MAC : fast/repaint/rel-positioned-inline-with-overflow.html = IMAGE
    13951394BUGCR23473 MAC : fast/repaint/repaint-resized-overflow.html = IMAGE
    1396 BUGCR23473 MAC : fast/repaint/search-field-cancel.html = IMAGE
     1395//BUGCR23473 MAC : fast/repaint/search-field-cancel.html = IMAGE
    13971396BUGCR23473 MAC : fast/repaint/selected-replaced.html = IMAGE
    13981397BUGCR23473 MAC : fast/repaint/selection-after-delete.html = IMAGE
     
    14881487// Mac flaky failures.
    14891488BUGCR10472 MAC DEBUG : svg/css/glyph-orientation-rounding-test.xhtml = FAIL PASS
    1490 
    1491 // <input type="search">; various failures, some tests may simply need new
    1492 // baselines, others have more problems.
    1493 BUGCR10473 LINUX : fast/forms/placeholder-set-value.html = FAIL
    1494 BUGCR10473 LINUX : fast/forms/search-display-none-cancel-button.html = FAIL
    1495 BUGCR10473 LINUX : fast/replaced/width100percent-searchfield.html = FAIL
    14961489
    14971490// This test isn't just slow -- sometimes it times out indefinitely.
     
    19651958BUGCR42875 WONTFIX SKIP : sputnik = TEXT
    19661959
    1967 // WebKit roll 58626:58719
    1968 BUGCR43963 WIN : fast/forms/searchfield-heights.html = IMAGE
    1969 BUGCR43963 LINUX : fast/forms/searchfield-heights.html = IMAGE+TEXT TEXT
    1970 
    19711960BUGWK38705 : http/tests/security/sandbox-inherit-to-initial-document-2.html = TEXT
    19721961
     
    26012590BUGCR62433 MAC LINUX : fast/backgrounds/animated-gif-as-background.html = IMAGE
    26022591BUGCR62433 MAC LINUX : fast/images/gif-loop-count.html = IMAGE
    2603 
    2604 // Similar to the above, input-search related failures
    2605 BUG_DRT MAC : fast/css/input-search-padding.html = IMAGE
    26062592
    26072593// Background color is wrong.
     
    29592945BUGWK54322 SNOWLEOPARD : fast/forms/input-file-re-render.html = IMAGE
    29602946BUGWK54322 SNOWLEOPARD : fast/forms/preserveFormDuringResidualStyle.html = IMAGE
    2961 BUGWK54322 SNOWLEOPARD : fast/forms/search-transformed.html = IMAGE
    29622947BUGWK54322 SNOWLEOPARD : fast/images/favicon-as-image.html = IMAGE+TEXT
    29632948//BUGWK54322 SNOWLEOPARD : fast/inline/inline-box-background-long-image.html = IMAGE
     
    32323217// new baselines.
    32333218BUGWK58193 WIN7 : fast/css/first-letter-first-line-hover.html = IMAGE+TEXT
    3234 BUGWK58193 WIN7 : fast/forms/search-styled.html = IMAGE+TEXT
    32353219BUGWK58193 WIN7 : fast/text/backslash-to-yen-sign-euc.html = IMAGE+TEXT
    32363220BUGWK58193 WIN7 : fast/text/backslash-to-yen-sign.html = IMAGE+TEXT
     
    33143298BUGWK58193 WIN7 : http/tests/local/fileapi/send-sliced-dragged-file.html = TIMEOUT PASS TEXT
    33153299
    3316 BUGWK58193 VISTA : fast/forms/search-styled.html = IMAGE+TEXT
    33173300BUGWK58193 VISTA : fast/text/backslash-to-yen-sign-euc.html = IMAGE+TEXT
    33183301BUGWK58193 VISTA : fast/text/international/khmer-selection.html = IMAGE+TEXT
     
    37673750BUGWK60931 DEBUG :  http/tests/security/javascriptURL/xss-ALLOWED-to-javascript-url-window-open.html = CRASH
    37683751
     3752// Needs rebaseline.
     3753BUGWK61415 : fast/css/input-search-padding.html = FAIL
     3754BUGWK61415 : fast/css/pseudo-cache-stale.html = FAIL
     3755BUGWK61415 : fast/css/text-input-with-webkit-border-radius.html = FAIL
     3756BUGWK61415 : fast/forms/box-shadow-override.html = FAIL
     3757BUGWK61415 : fast/forms/control-restrict-line-height.html = FAIL
     3758BUGWK61415 : fast/forms/input-appearance-height.html = FAIL
     3759BUGWK61415 : fast/forms/input-appearance-spinbutton-disabled-readonly.html = FAIL
     3760BUGWK61415 : fast/forms/input-appearance-spinbutton-layer.html = FAIL
     3761BUGWK61415 : fast/forms/input-appearance-spinbutton-visibility.html = FAIL
     3762BUGWK61415 : fast/forms/placeholder-position.html = FAIL
     3763BUGWK61415 : fast/forms/placeholder-pseudo-style.html = FAIL
     3764BUGWK61415 : fast/forms/placeholder-set-value.html = FAIL
     3765BUGWK61415 : fast/forms/search-cancel-button-style-sharing.html = FAIL
     3766BUGWK61415 : fast/forms/search-display-none-cancel-button.html = FAIL
     3767BUGWK61415 : fast/forms/search-placeholder-value-changed.html = FAIL
     3768BUGWK61415 : fast/forms/search-rtl.html = FAIL
     3769BUGWK61415 : fast/forms/search-styled.html = FAIL
     3770BUGWK61415 : fast/forms/search-transformed.html = FAIL
     3771BUGWK61415 : fast/forms/search-vertical-alignment.html = FAIL
     3772BUGWK61415 : fast/forms/search-zoomed.html = FAIL
     3773BUGWK61415 : fast/forms/searchfield-heights.html = FAIL
     3774// Do not update an image for search-field-cancel.html.
     3775BUGWK61415 : fast/repaint/search-field-cancel.html = FAIL
     3776BUGWK61415 : fast/replaced/width100percent-searchfield.html = FAIL
     3777BUGWK61415 WIN MAC : fast/speech/input-appearance-numberandspeech.html = FAIL
     3778BUGWK61415 WIN MAC : fast/speech/input-appearance-speechbutton.html = FAIL
     3779BUGWK61415 : fast/table/colspanMinWidth-vertical.html = FAIL
     3780BUGWK61415 : platform/mac/fast/forms/input-appearance-spinbutton-up.html = FAIL
     3781BUGWK61415 : platform/mac/fast/forms/input-appearance-spinbutton.html = FAIL
     3782
    37693783// Flaky since added by r86478
    37703784BUGCR82881 : http/tests/appcache/interrupted-update.html = PASS TEXT
  • trunk/LayoutTests/platform/mac/fast/css/input-search-padding-expected.txt

    r89460 r90089  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderTextControl {INPUT} at (2,2) size 429x82 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderBlock {DIV} at (3,17) size 423x47
    8           RenderBlock {DIV} at (0,26) size 10x13
    9           RenderBlock {DIV} at (407,26) size 16x13
    10       RenderBR {BR} at (433,86) size 0x0
     7        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 423x47
     8          RenderBlock {DIV} at (0,17) size 10x13
     9          RenderBlock {DIV} at (10,0) size 397x47
     10          RenderBlock {DIV} at (407,17) size 16x13
     11      RenderBR {BR} at (433,44) size 0x0
    1112      RenderTextControl {INPUT} at (2,88) size 429x82 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    12       RenderBR {BR} at (433,172) size 0x0
     13      RenderBR {BR} at (433,130) size 0x0
    1314      RenderTextControl {INPUT} at (2,172) size 224x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14         RenderBlock {DIV} at (6,1) size 212x23
    15           RenderBlock {DIV} at (0,6) size 10x13
    16           RenderBlock {DIV} at (196,6) size 16x13
    17 layer at (23,27) size 397x47 scrollWidth 410
    18   RenderBlock {DIV} at (10,0) size 397x47
     15        RenderDeprecatedFlexibleBox {DIV} at (6,1) size 212x23
     16          RenderBlock {DIV} at (0,5) size 10x13
     17          RenderBlock {DIV} at (10,0) size 186x23
     18          RenderBlock {DIV} at (196,5) size 16x13
     19layer at (23,13) size 397x47 scrollWidth 410
     20  RenderBlock {DIV} at (0,0) size 397x47
    1921    RenderText {#text} at (1,0) size 408x47
    2022      text run at (1,0) width 408: "value jgq not clipped"
    21 layer at (13,113) size 423x47
    22   RenderBlock {DIV} at (3,17) size 423x47
     23layer at (13,99) size 423x47
     24  RenderBlock {DIV} at (3,3) size 423x47
    2325    RenderText {#text} at (1,0) size 408x47
    2426      text run at (1,0) width 408: "value jgq not clipped"
    2527layer at (26,181) size 186x23
    26   RenderBlock {DIV} at (10,0) size 186x23
     28  RenderBlock {DIV} at (0,0) size 186x23
    2729    RenderText {#text} at (1,0) size 127x23
    2830      text run at (1,0) width 127: "Sample Input"
  • trunk/LayoutTests/platform/mac/fast/css/pseudo-cache-stale-expected.txt

    r89460 r90089  
    1515      RenderBlock (anonymous) at (0,74) size 784x23
    1616        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17           RenderBlock {DIV} at (3,3) size 119x13
    18             RenderBlock {DIV} at (0,0) size 8x11
    19             RenderBlock {DIV} at (106,0) size 13x11
     17          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     18            RenderBlock {DIV} at (0,1) size 8x11
     19            RenderBlock {DIV} at (8,0) size 98x13
     20            RenderBlock {DIV} at (106,1) size 13x11
    2021        RenderText {#text} at (0,0) size 0x0
    2122        RenderText {#text} at (0,0) size 0x0
    2223layer at (21,87) size 98x13
    23   RenderBlock {DIV} at (8,0) size 98x13
     24  RenderBlock {DIV} at (0,0) size 98x13
  • trunk/LayoutTests/platform/mac/fast/forms/box-shadow-override-expected.txt

    r89460 r90089  
    1212      RenderBlock {DIV} at (0,68) size 784x23
    1313        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14           RenderBlock {DIV} at (3,3) size 119x13
    15             RenderBlock {DIV} at (0,0) size 8x11
    16             RenderBlock {DIV} at (106,0) size 13x11
     14          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     15            RenderBlock {DIV} at (0,1) size 8x11
     16            RenderBlock {DIV} at (8,0) size 98x13
     17            RenderBlock {DIV} at (106,1) size 13x11
    1718        RenderText {#text} at (0,0) size 0x0
    1819      RenderBlock {DIV} at (0,91) size 784x23
    1920        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    20           RenderBlock {DIV} at (3,3) size 119x13
    21             RenderBlock {DIV} at (0,0) size 17x11
    22             RenderBlock {DIV} at (106,0) size 13x11
     21          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     22            RenderBlock {DIV} at (0,1) size 17x11
     23            RenderBlock {DIV} at (17,0) size 89x13
     24            RenderBlock {DIV} at (106,1) size 13x11
    2325        RenderText {#text} at (0,0) size 0x0
    2426      RenderBlock {DIV} at (0,114) size 784x23
    2527        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    26           RenderBlock {DIV} at (3,3) size 119x13
    27             RenderBlock {DIV} at (0,0) size 22x11
    28             RenderBlock {DIV} at (106,0) size 13x11
     28          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     29            RenderBlock {DIV} at (0,1) size 22x11
     30            RenderBlock {DIV} at (22,0) size 84x13
     31            RenderBlock {DIV} at (106,1) size 13x11
    2932        RenderText {#text} at (0,0) size 0x0
    3033      RenderBlock (anonymous) at (0,137) size 784x32
     
    7275        RenderText {#text} at (0,0) size 0x0
    7376layer at (21,81) size 98x13
    74   RenderBlock {DIV} at (8,0) size 98x13
     77  RenderBlock {DIV} at (0,0) size 98x13
    7578    RenderText {#text} at (1,0) size 36x13
    7679      text run at (1,0) width 36: "Search"
    7780layer at (30,104) size 89x13
    78   RenderBlock {DIV} at (17,0) size 89x13
     81  RenderBlock {DIV} at (0,0) size 89x13
    7982layer at (35,127) size 84x13
    80   RenderBlock {DIV} at (22,0) size 84x13
     83  RenderBlock {DIV} at (0,0) size 84x13
    8184layer at (107,153) size 15x15
    8285  RenderBlock (relative positioned) {DIV} at (0,0) size 15x15
  • trunk/LayoutTests/platform/mac/fast/forms/control-restrict-line-height-expected.txt

    r89460 r90089  
    2222      RenderBR {BR} at (0,0) size 0x0
    2323      RenderTextControl {INPUT} at (2,64) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24         RenderBlock {DIV} at (3,3) size 119x13
    25           RenderBlock {DIV} at (0,0) size 8x11
    26           RenderBlock {DIV} at (106,0) size 13x11
     24        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     25          RenderBlock {DIV} at (0,1) size 8x11
     26          RenderBlock {DIV} at (8,0) size 98x13
     27          RenderBlock {DIV} at (106,1) size 13x11
    2728      RenderText {#text} at (0,0) size 0x0
    2829layer at (21,75) size 98x13 scrollWidth 280
    29   RenderBlock {DIV} at (8,0) size 98x13
     30  RenderBlock {DIV} at (0,0) size 98x13
    3031    RenderText {#text} at (1,0) size 278x13
    3132      text run at (1,0) width 278: "This text should be centered vertically in the button"
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.txt

    r89460 r90089  
    9090          text run at (0,237) width 44: "search "
    9191        RenderTextControl {INPUT} at (46,237) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    92           RenderBlock {DIV} at (3,3) size 119x13
    93             RenderBlock {DIV} at (0,0) size 8x11
    94             RenderBlock {DIV} at (106,0) size 13x11
     92          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     93            RenderBlock {DIV} at (0,1) size 8x11
     94            RenderBlock {DIV} at (8,0) size 98x13
     95            RenderBlock {DIV} at (106,1) size 13x11
    9596        RenderText {#text} at (0,0) size 0x0
    9697layer at (49,31) size 119x13
     
    103104  RenderBlock {DIV} at (3,3) size 119x13
    104105layer at (65,266) size 98x13
    105   RenderBlock {DIV} at (8,0) size 98x13
     106  RenderBlock {DIV} at (0,0) size 98x13
    106107layer at (106,152) size 15x15
    107108  RenderBlock (relative positioned) {DIV} at (0,0) size 15x15
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt

    r89460 r90089  
    1010        RenderInline {LABEL} at (0,0) size 306x18
    1111          RenderTextControl {INPUT} at (2,2) size 218x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     12            RenderDeprecatedFlexibleBox {DIV} at (3,3) size 212x23
     13              RenderBlock {DIV} at (0,0) size 193x23
    1214          RenderText {#text} at (222,10) size 84x18
    1315            text run at (222,10) width 84: " Normal state"
     
    1517        RenderInline {LABEL} at (0,0) size 314x18
    1618          RenderTextControl {INPUT} at (2,2) size 218x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     19            RenderDeprecatedFlexibleBox {DIV} at (3,3) size 212x23
     20              RenderBlock {DIV} at (0,0) size 193x23
    1721          RenderText {#text} at (222,10) size 92x18
    1822            text run at (222,10) width 92: " Disabled state"
     
    2024        RenderInline {LABEL} at (0,0) size 324x18
    2125          RenderTextControl {INPUT} at (2,2) size 218x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     26            RenderDeprecatedFlexibleBox {DIV} at (3,3) size 212x23
     27              RenderBlock {DIV} at (0,0) size 193x23
    2228          RenderText {#text} at (222,10) size 102x18
    2329            text run at (222,10) width 102: " Read-only state"
    2430layer at (13,47) size 193x23
    25   RenderBlock {DIV} at (3,3) size 193x23
     31  RenderBlock {DIV} at (0,0) size 193x23
    2632    RenderText {#text} at (1,0) size 13x23
    2733      text run at (1,0) width 13: "0"
    2834layer at (13,80) size 193x23
    29   RenderBlock {DIV} at (3,3) size 193x23 [color=#545454]
     35  RenderBlock {DIV} at (0,0) size 193x23 [color=#545454]
    3036    RenderText {#text} at (1,0) size 13x23
    3137      text run at (1,0) width 13: "0"
    3238layer at (13,113) size 193x23
    33   RenderBlock {DIV} at (3,3) size 193x23
     39  RenderBlock {DIV} at (0,0) size 193x23
    3440    RenderText {#text} at (1,0) size 13x23
    3541      text run at (1,0) width 13: "0"
    3642layer at (207,46) size 19x25
    37   RenderBlock (relative positioned) {DIV} at (197,2) size 19x25
     43  RenderBlock (relative positioned) {DIV} at (194,-1) size 19x25
    3844layer at (207,79) size 19x25
    39   RenderBlock (relative positioned) {DIV} at (197,2) size 19x25
     45  RenderBlock (relative positioned) {DIV} at (194,-1) size 19x25
    4046layer at (207,112) size 19x25
    41   RenderBlock (relative positioned) {DIV} at (197,2) size 19x25
     47  RenderBlock (relative positioned) {DIV} at (194,-1) size 19x25
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-expected.txt

    r89460 r90089  
    1919                  RenderBR {BR} at (104,14) size 0x0
    2020                  RenderTextControl {INPUT} at (0,19) size 100x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     21                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 94x10
     22                      RenderBlock {DIV} at (0,0) size 81x10
    2123                RenderBlock {DIV} at (1,36) size 178x36
    2224                  RenderTextControl {INPUT} at (0,2) size 102x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    2527                  RenderBR {BR} at (106,14) size 0x0
    2628                  RenderTextControl {INPUT} at (0,19) size 102x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     29                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 96x11
     30                      RenderBlock {DIV} at (0,0) size 83x11
    2731                RenderBlock {DIV} at (1,72) size 178x37
    2832                  RenderTextControl {INPUT} at (0,1) size 104x18 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    3135                  RenderBR {BR} at (108,14) size 0x0
    3236                  RenderTextControl {INPUT} at (0,19) size 104x18 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     37                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 98x12
     38                      RenderBlock {DIV} at (0,0) size 85x12
    3339                RenderBlock {DIV} at (1,109) size 178x46
    3440                  RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    3743                  RenderBR {BR} at (133,16) size 0x0
    3844                  RenderTextControl {INPUT} at (2,25) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     45                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     46                      RenderBlock {DIV} at (0,0) size 106x13
    3947                RenderBlock {DIV} at (1,155) size 178x50
    4048                  RenderTextControl {INPUT} at (2,2) size 127x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    4351                  RenderBR {BR} at (135,17) size 0x0
    4452                  RenderTextControl {INPUT} at (2,27) size 127x21 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     53                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 121x15
     54                      RenderBlock {DIV} at (0,0) size 108x15
    4555                RenderBlock {DIV} at (1,205) size 178x52
    4656                  RenderTextControl {INPUT} at (2,2) size 148x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    4959                  RenderBR {BR} at (156,18) size 0x0
    5060                  RenderTextControl {INPUT} at (2,28) size 148x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     61                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 142x16
     62                      RenderBlock {DIV} at (0,0) size 127x16
    5163                RenderBlock {DIV} at (1,257) size 178x54
    5264                  RenderTextControl {INPUT} at (2,2) size 150x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    5567                  RenderBR {BR} at (158,19) size 0x0
    5668                  RenderTextControl {INPUT} at (2,29) size 150x23 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     69                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 144x17
     70                      RenderBlock {DIV} at (0,0) size 129x17
    5771                RenderBlock {DIV} at (1,311) size 178x56
    5872                  RenderTextControl {INPUT} at (2,2) size 170x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    6175                  RenderBR {BR} at (178,20) size 0x0
    6276                  RenderTextControl {INPUT} at (2,30) size 170x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     77                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 164x18
     78                      RenderBlock {DIV} at (0,0) size 149x18
    6379              RenderTableCell {TD} at (184,2) size 253x524 [r=0 c=1 rs=1 cs=1]
    6480                RenderBlock {DIV} at (1,1) size 251x56
     
    6884                  RenderBR {BR} at (180,20) size 0x0
    6985                  RenderTextControl {INPUT} at (2,30) size 172x24 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     86                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 166x18
     87                      RenderBlock {DIV} at (0,0) size 151x18
    7088                RenderBlock {DIV} at (1,57) size 251x60
    7189                  RenderTextControl {INPUT} at (2,2) size 174x26 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    7492                  RenderBR {BR} at (182,21) size 0x0
    7593                  RenderTextControl {INPUT} at (2,32) size 174x26 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     94                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 168x20
     95                      RenderBlock {DIV} at (0,0) size 153x20
    7696                RenderBlock {DIV} at (1,117) size 251x62
    7797                  RenderTextControl {INPUT} at (2,2) size 195x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    80100                  RenderBR {BR} at (203,22) size 0x0
    81101                  RenderTextControl {INPUT} at (2,33) size 195x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     102                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 189x21
     103                      RenderBlock {DIV} at (0,0) size 170x21
    82104                RenderBlock {DIV} at (1,179) size 251x64
    83105                  RenderTextControl {INPUT} at (2,2) size 197x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    86108                  RenderBR {BR} at (205,23) size 0x0
    87109                  RenderTextControl {INPUT} at (2,34) size 197x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     110                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 191x22
     111                      RenderBlock {DIV} at (0,0) size 172x22
    88112                RenderBlock {DIV} at (1,243) size 251x66
    89113                  RenderTextControl {INPUT} at (2,2) size 218x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    92116                  RenderBR {BR} at (226,24) size 0x0
    93117                  RenderTextControl {INPUT} at (2,35) size 218x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     118                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 212x23
     119                      RenderBlock {DIV} at (0,0) size 193x23
    94120                RenderBlock {DIV} at (1,309) size 251x68
    95121                  RenderTextControl {INPUT} at (2,2) size 220x30 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    98124                  RenderBR {BR} at (228,25) size 0x0
    99125                  RenderTextControl {INPUT} at (2,36) size 220x30 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     126                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 214x24
     127                      RenderBlock {DIV} at (0,0) size 195x24
    100128                RenderBlock {DIV} at (1,377) size 251x72
    101129                  RenderTextControl {INPUT} at (2,2) size 241x32 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    104132                  RenderBR {BR} at (249,26) size 0x0
    105133                  RenderTextControl {INPUT} at (2,38) size 241x32 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     134                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 235x26
     135                      RenderBlock {DIV} at (0,0) size 216x26
    106136                RenderBlock {DIV} at (1,449) size 251x74
    107137                  RenderTextControl {INPUT} at (2,2) size 243x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     
    110140                  RenderBR {BR} at (251,27) size 0x0
    111141                  RenderTextControl {INPUT} at (2,39) size 243x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     142                    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 237x27
     143                      RenderBlock {DIV} at (0,0) size 218x27
    112144layer at (14,129) size 94x10
    113145  RenderBlock {DIV} at (3,3) size 94x10
    114146layer at (14,145) size 81x10
    115   RenderBlock {DIV} at (3,3) size 81x10
     147  RenderBlock {DIV} at (0,0) size 81x10
    116148layer at (14,163) size 96x11
    117149  RenderBlock {DIV} at (3,3) size 96x11
    118150layer at (14,180) size 83x11
    119   RenderBlock {DIV} at (3,3) size 83x11
     151  RenderBlock {DIV} at (0,0) size 83x11
    120152layer at (14,198) size 98x12
    121153  RenderBlock {DIV} at (3,3) size 98x12
    122154layer at (14,216) size 85x12
    123   RenderBlock {DIV} at (3,3) size 85x12
     155  RenderBlock {DIV} at (0,0) size 85x12
    124156layer at (16,236) size 119x13
    125157  RenderBlock {DIV} at (3,3) size 119x13
    126158layer at (16,259) size 106x13
    127   RenderBlock {DIV} at (3,3) size 106x13
     159  RenderBlock {DIV} at (0,0) size 106x13
    128160layer at (16,282) size 121x15
    129161  RenderBlock {DIV} at (3,3) size 121x15
    130162layer at (16,307) size 108x15
    131   RenderBlock {DIV} at (3,3) size 108x15
     163  RenderBlock {DIV} at (0,0) size 108x15
    132164layer at (16,332) size 142x16
    133165  RenderBlock {DIV} at (3,3) size 142x16
    134166layer at (16,358) size 127x16
    135   RenderBlock {DIV} at (3,3) size 127x16
     167  RenderBlock {DIV} at (0,0) size 127x16
    136168layer at (16,384) size 144x17
    137169  RenderBlock {DIV} at (3,3) size 144x17
    138170layer at (16,411) size 129x17
    139   RenderBlock {DIV} at (3,3) size 129x17
     171  RenderBlock {DIV} at (0,0) size 129x17
    140172layer at (16,438) size 164x18
    141173  RenderBlock {DIV} at (3,3) size 164x18
    142174layer at (16,466) size 149x18
    143   RenderBlock {DIV} at (3,3) size 149x18
     175  RenderBlock {DIV} at (0,0) size 149x18
    144176layer at (198,50) size 166x18
    145177  RenderBlock {DIV} at (3,3) size 166x18
    146178layer at (198,78) size 151x18
    147   RenderBlock {DIV} at (3,3) size 151x18
     179  RenderBlock {DIV} at (0,0) size 151x18
    148180layer at (198,106) size 168x20
    149181  RenderBlock {DIV} at (3,3) size 168x20
    150182layer at (198,136) size 153x20
    151   RenderBlock {DIV} at (3,3) size 153x20
     183  RenderBlock {DIV} at (0,0) size 153x20
    152184layer at (198,166) size 189x21
    153185  RenderBlock {DIV} at (3,3) size 189x21
    154186layer at (198,197) size 170x21
    155   RenderBlock {DIV} at (3,3) size 170x21
     187  RenderBlock {DIV} at (0,0) size 170x21
    156188layer at (198,228) size 191x22
    157189  RenderBlock {DIV} at (3,3) size 191x22
    158190layer at (198,260) size 172x22
    159   RenderBlock {DIV} at (3,3) size 172x22
     191  RenderBlock {DIV} at (0,0) size 172x22
    160192layer at (198,292) size 212x23
    161193  RenderBlock {DIV} at (3,3) size 212x23
    162194layer at (198,325) size 193x23
    163   RenderBlock {DIV} at (3,3) size 193x23
     195  RenderBlock {DIV} at (0,0) size 193x23
    164196layer at (198,358) size 214x24
    165197  RenderBlock {DIV} at (3,3) size 214x24
    166198layer at (198,392) size 195x24
    167   RenderBlock {DIV} at (3,3) size 195x24
     199  RenderBlock {DIV} at (0,0) size 195x24
    168200layer at (198,426) size 235x26
    169201  RenderBlock {DIV} at (3,3) size 235x26
    170202layer at (198,462) size 216x26
    171   RenderBlock {DIV} at (3,3) size 216x26
     203  RenderBlock {DIV} at (0,0) size 216x26
    172204layer at (198,498) size 237x27
    173205  RenderBlock {DIV} at (3,3) size 237x27
    174206layer at (198,535) size 218x27
    175   RenderBlock {DIV} at (3,3) size 218x27
     207  RenderBlock {DIV} at (0,0) size 218x27
    176208layer at (96,144) size 13x12
    177   RenderBlock (relative positioned) {DIV} at (85,2) size 13x12
     209  RenderBlock (relative positioned) {DIV} at (82,-1) size 13x12
    178210layer at (98,179) size 13x13
    179   RenderBlock (relative positioned) {DIV} at (87,2) size 13x13
     211  RenderBlock (relative positioned) {DIV} at (84,-1) size 13x13
    180212layer at (100,215) size 13x14
    181   RenderBlock (relative positioned) {DIV} at (89,2) size 13x14
     213  RenderBlock (relative positioned) {DIV} at (86,-1) size 13x14
    182214layer at (123,258) size 13x15
    183   RenderBlock (relative positioned) {DIV} at (110,2) size 13x15
     215  RenderBlock (relative positioned) {DIV} at (107,-1) size 13x15
    184216layer at (125,306) size 13x17
    185   RenderBlock (relative positioned) {DIV} at (112,2) size 13x17
     217  RenderBlock (relative positioned) {DIV} at (109,-1) size 13x17
    186218layer at (144,357) size 15x18
    187   RenderBlock (relative positioned) {DIV} at (131,2) size 15x18
     219  RenderBlock (relative positioned) {DIV} at (128,-1) size 15x18
    188220layer at (146,410) size 15x19
    189   RenderBlock (relative positioned) {DIV} at (133,2) size 15x19
     221  RenderBlock (relative positioned) {DIV} at (130,-1) size 15x19
    190222layer at (166,465) size 15x20
    191   RenderBlock (relative positioned) {DIV} at (153,2) size 15x20
     223  RenderBlock (relative positioned) {DIV} at (150,-1) size 15x20
    192224layer at (350,77) size 15x20
    193   RenderBlock (relative positioned) {DIV} at (155,2) size 15x20
     225  RenderBlock (relative positioned) {DIV} at (152,-1) size 15x20
    194226layer at (352,135) size 15x22
    195   RenderBlock (relative positioned) {DIV} at (157,2) size 15x22
     227  RenderBlock (relative positioned) {DIV} at (154,-1) size 15x22
    196228layer at (369,196) size 19x23
    197   RenderBlock (relative positioned) {DIV} at (174,2) size 19x23
     229  RenderBlock (relative positioned) {DIV} at (171,-1) size 19x23
    198230layer at (371,259) size 19x24
    199   RenderBlock (relative positioned) {DIV} at (176,2) size 19x24
     231  RenderBlock (relative positioned) {DIV} at (173,-1) size 19x24
    200232layer at (392,324) size 19x25
    201   RenderBlock (relative positioned) {DIV} at (197,2) size 19x25
     233  RenderBlock (relative positioned) {DIV} at (194,-1) size 19x25
    202234layer at (394,391) size 19x26
    203   RenderBlock (relative positioned) {DIV} at (199,2) size 19x26
     235  RenderBlock (relative positioned) {DIV} at (196,-1) size 19x26
    204236layer at (415,461) size 19x28
    205   RenderBlock (relative positioned) {DIV} at (220,2) size 19x28
     237  RenderBlock (relative positioned) {DIV} at (217,-1) size 19x28
    206238layer at (417,534) size 19x29
    207   RenderBlock (relative positioned) {DIV} at (222,2) size 19x29
     239  RenderBlock (relative positioned) {DIV} at (219,-1) size 19x29
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-layer-expected.txt

    r89460 r90089  
    66      RenderBR {BR} at (129,2) size 0x18
    77      RenderTextControl {INPUT} at (2,25) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     8        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     9          RenderBlock {DIV} at (0,0) size 106x13
    810      RenderText {#text} at (0,0) size 0x0
    911layer at (13,36) size 106x13
    10   RenderBlock {DIV} at (3,3) size 106x13
     12  RenderBlock {DIV} at (0,0) size 106x13
    1113    RenderText {#text} at (1,0) size 14x13
    1214      text run at (1,0) width 14: "10"
    1315layer at (10,10) size 125x19
    1416  RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     17    RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     18      RenderBlock {DIV} at (0,0) size 106x13
    1519layer at (13,13) size 106x13
    16   RenderBlock {DIV} at (3,3) size 106x13
     20  RenderBlock {DIV} at (0,0) size 106x13
    1721    RenderText {#text} at (1,0) size 14x13
    1822      text run at (1,0) width 14: "10"
    1923layer at (120,12) size 13x15
    20   RenderBlock (relative positioned) {DIV} at (110,2) size 13x15
     24  RenderBlock (relative positioned) {DIV} at (107,-1) size 13x15
    2125layer at (120,35) size 13x15
    22   RenderBlock (relative positioned) {DIV} at (110,2) size 13x15
     26  RenderBlock (relative positioned) {DIV} at (107,-1) size 13x15
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt

    r89460 r90089  
    1010      RenderBlock (anonymous) at (0,34) size 784x31
    1111        RenderTextControl {INPUT} at (2,2) size 195x27 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     12          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 189x21
     13            RenderBlock {DIV} at (0,0) size 170x21
    1214        RenderText {#text} at (0,0) size 0x0
    1315        RenderText {#text} at (0,0) size 0x0
    1416layer at (13,47) size 170x21
    15   RenderBlock {DIV} at (3,3) size 170x21
     17  RenderBlock {DIV} at (0,0) size 170x21
    1618    RenderText {#text} at (1,0) size 12x21
    1719      text run at (1,0) width 12: "1"
    1820layer at (184,46) size 19x23
    19   RenderBlock (relative positioned) {DIV} at (174,2) size 19x23
    20 caret: position 1 of child 0 {#text} of child 0 {DIV} of {#shadow-root} of child 5 {INPUT} of body
     21  RenderBlock (relative positioned) {DIV} at (171,-1) size 19x23
     22caret: position 1 of child 0 {#text} of child 0 {DIV} of child 0 {DIV} of child 0 {DIV} of {#shadow-root} of child 5 {INPUT} of body
  • trunk/LayoutTests/platform/mac/fast/forms/input-appearance-spinbutton-visibility-expected.txt

    r89460 r90089  
    55    RenderBody {BODY} at (8,8) size 784x23
    66      RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     7        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     8          RenderBlock {DIV} at (0,0) size 106x13
    79      RenderText {#text} at (129,2) size 4x18
    810        text run at (129,2) width 4: " "
    911      RenderTextControl {INPUT} at (135,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     12        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     13          RenderBlock {DIV} at (0,0) size 106x13
    1014      RenderText {#text} at (0,0) size 0x0
    1115layer at (13,13) size 106x13
    12   RenderBlock {DIV} at (3,3) size 106x13
     16  RenderBlock {DIV} at (0,0) size 106x13
    1317layer at (146,13) size 106x13
    14   RenderBlock {DIV} at (3,3) size 106x13
     18  RenderBlock {DIV} at (0,0) size 106x13
    1519layer at (120,12) size 13x15
    16   RenderBlock (relative positioned) {DIV} at (110,2) size 13x15
     20  RenderBlock (relative positioned) {DIV} at (107,-1) size 13x15
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-position-expected.txt

    r89460 r90089  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderBlock {DIV} at (3,3) size 119x13
    8           RenderBlock {DIV} at (0,0) size 8x11
    9           RenderBlock {DIV} at (106,0) size 13x11
     7        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     8          RenderBlock {DIV} at (0,1) size 8x11
     9          RenderBlock {DIV} at (8,0) size 98x13
     10          RenderBlock {DIV} at (106,1) size 13x11
    1011      RenderBR {BR} at (129,16) size 0x0
    1112      RenderTextControl {INPUT} at (2,25) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    1213      RenderBR {BR} at (129,39) size 0x0
    1314      RenderTextControl {INPUT} at (2,48) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14         RenderBlock {DIV} at (3,3) size 119x13
    15           RenderBlock {DIV} at (0,0) size 8x11
    16           RenderBlock {DIV} at (106,0) size 13x11
     15        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     16          RenderBlock {DIV} at (0,1) size 8x11
     17          RenderBlock {DIV} at (8,0) size 98x13
     18          RenderBlock {DIV} at (106,1) size 13x11
    1719      RenderBR {BR} at (129,62) size 0x0
    1820      RenderTextControl {INPUT} at (2,71) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    19         RenderBlock {DIV} at (3,3) size 119x13
    20           RenderBlock {DIV} at (0,0) size 22x11
    21           RenderBlock {DIV} at (106,0) size 13x11
     21        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     22          RenderBlock {DIV} at (0,1) size 22x11
     23          RenderBlock {DIV} at (22,0) size 84x13
     24          RenderBlock {DIV} at (106,1) size 13x11
    2225      RenderBR {BR} at (129,85) size 0x0
    2326      RenderBR {BR} at (165,128) size 0x0
    2427      RenderTextControl {INPUT} at (2,130) size 125x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    25       RenderBR {BR} at (129,165) size 0x0
     28      RenderBR {BR} at (129,144) size 0x0
    2629      RenderBR {BR} at (165,214) size 0x0
    2730      RenderTextControl {INPUT} at (5,219) size 176x30 [bgcolor=#FFFFFF] [border: (5px solid #000000)]
    2831      RenderBR {BR} at (186,240) size 0x0
    29       RenderBR {BR} at (129,277) size 0x0
     32      RenderBR {BR} at (129,284) size 0x0
    3033layer at (21,13) size 98x13
    31   RenderBlock {DIV} at (8,0) size 98x13
     34  RenderBlock {DIV} at (0,0) size 98x13
    3235layer at (13,36) size 119x13
    3336  RenderBlock {DIV} at (3,3) size 119x13
    3437layer at (21,59) size 98x13
    35   RenderBlock {DIV} at (8,0) size 98x13
     38  RenderBlock {DIV} at (0,0) size 98x13
    3639layer at (35,82) size 84x13
    37   RenderBlock {DIV} at (22,0) size 84x13
     40  RenderBlock {DIV} at (0,0) size 84x13
    3841layer at (10,102) size 161x32 clip at (11,103) size 159x30
    3942  RenderTextControl {TEXTAREA} at (2,94) size 161x32 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
    4043    RenderBlock {DIV} at (3,3) size 155x13
    41 layer at (13,148) size 119x13
    42   RenderBlock {DIV} at (3,10) size 119x13
     44layer at (13,141) size 119x13
     45  RenderBlock {DIV} at (3,3) size 119x13
    4346layer at (10,175) size 161x45 clip at (11,176) size 159x43
    4447  RenderTextControl {TEXTAREA} at (2,167) size 161x45 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
     
    4851layer at (10,264) size 125x33
    4952  RenderTextControl {INPUT} at (2,256) size 125x33 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    50 layer at (13,274) size 119x13
    51   RenderBlock {DIV} at (3,10) size 119x13
     53layer at (13,281) size 119x13
     54  RenderBlock {DIV} at (3,17) size 119x13
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-pseudo-style-expected.txt

    r89460 r90089  
    1111        text run at (129,20) width 4: " "
    1212      RenderTextControl {INPUT} at (135,20) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    13         RenderBlock {DIV} at (3,3) size 119x13
    14           RenderBlock {DIV} at (0,0) size 8x11
    15           RenderBlock {DIV} at (106,0) size 13x11
     13        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     14          RenderBlock {DIV} at (0,1) size 8x11
     15          RenderBlock {DIV} at (8,0) size 98x13
     16          RenderBlock {DIV} at (106,1) size 13x11
    1617      RenderText {#text} at (262,20) size 4x18
    1718        text run at (262,20) width 4: " "
     
    3031  RenderBlock {DIV} at (3,3) size 119x13
    3132layer at (154,31) size 98x13
    32   RenderBlock {DIV} at (8,0) size 98x13
     33  RenderBlock {DIV} at (0,0) size 98x13
    3334layer at (279,31) size 119x13
    3435  RenderBlock {DIV} at (3,3) size 119x13
  • trunk/LayoutTests/platform/mac/fast/forms/placeholder-set-value-expected.txt

    r89460 r90089  
    1515      RenderBlock (anonymous) at (0,52) size 784x23
    1616        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17           RenderBlock {DIV} at (3,3) size 119x13
    18             RenderBlock {DIV} at (0,0) size 8x11
    19             RenderBlock {DIV} at (106,0) size 13x11
     17          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     18            RenderBlock {DIV} at (0,1) size 8x11
     19            RenderBlock {DIV} at (8,0) size 98x13
     20            RenderBlock {DIV} at (106,1) size 13x11
    2021        RenderText {#text} at (0,0) size 0x0
    2122layer at (21,65) size 98x13
    22   RenderBlock {DIV} at (8,0) size 98x13
     23  RenderBlock {DIV} at (0,0) size 98x13
    2324    RenderText {#text} at (1,0) size 48x13
    2425      text run at (1,0) width 48: "New text"
  • trunk/LayoutTests/platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt

    r89460 r90089  
    99      RenderBlock (anonymous) at (0,34) size 784x23
    1010        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    11           RenderBlock {DIV} at (3,3) size 119x13
    12             RenderBlock {DIV} at (0,0) size 8x11
    13             RenderBlock {DIV} at (106,0) size 13x11
     11          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     12            RenderBlock {DIV} at (0,1) size 8x11
     13            RenderBlock {DIV} at (8,0) size 98x13
     14            RenderBlock {DIV} at (106,1) size 13x11
    1415        RenderText {#text} at (129,2) size 4x18
    1516          text run at (129,2) width 4: " "
    1617        RenderTextControl {INPUT} at (135,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    17           RenderBlock {DIV} at (3,3) size 119x13
    18             RenderBlock {DIV} at (0,0) size 8x11
    19             RenderBlock {DIV} at (106,0) size 13x11
     18          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     19            RenderBlock {DIV} at (0,1) size 8x11
     20            RenderBlock {DIV} at (8,0) size 98x13
     21            RenderBlock {DIV} at (106,1) size 13x11
    2022        RenderText {#text} at (0,0) size 0x0
    2123layer at (21,47) size 98x13
    22   RenderBlock {DIV} at (8,0) size 98x13
     24  RenderBlock {DIV} at (0,0) size 98x13
    2325layer at (154,47) size 98x13
    24   RenderBlock {DIV} at (8,0) size 98x13
     26  RenderBlock {DIV} at (0,0) size 98x13
    2527    RenderText {#text} at (1,0) size 43x13
    2628      text run at (1,0) width 43: "this one"
  • trunk/LayoutTests/platform/mac/fast/forms/search-display-none-cancel-button-expected.txt

    r89460 r90089  
    88      RenderBR {BR} at (499,14) size 0x0
    99      RenderTextControl {INPUT} at (2,20) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    10         RenderBlock {DIV} at (3,3) size 119x13
    11           RenderBlock {DIV} at (0,0) size 8x11
     10        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     11          RenderBlock {DIV} at (0,1) size 8x11
     12          RenderBlock {DIV} at (8,0) size 111x13
    1213      RenderText {#text} at (0,0) size 0x0
    1314layer at (21,31) size 111x13
    14   RenderBlock {DIV} at (8,0) size 111x13
     15  RenderBlock {DIV} at (0,0) size 111x13
    1516    RenderText {#text} at (1,0) size 20x13
    1617      text run at (1,0) width 20: "test"
  • trunk/LayoutTests/platform/mac/fast/forms/search-placeholder-value-changed-expected.txt

    r89460 r90089  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderBlock {DIV} at (3,3) size 119x13
    8           RenderBlock {DIV} at (0,0) size 8x11
    9           RenderBlock {DIV} at (106,0) size 13x11
     7        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     8          RenderBlock {DIV} at (0,1) size 8x11
     9          RenderBlock {DIV} at (8,0) size 98x13
     10          RenderBlock {DIV} at (106,1) size 13x11
    1011      RenderText {#text} at (0,0) size 0x0
    1112      RenderText {#text} at (0,0) size 0x0
    1213layer at (21,13) size 98x13
    13   RenderBlock {DIV} at (8,0) size 98x13
     14  RenderBlock {DIV} at (0,0) size 98x13
  • trunk/LayoutTests/platform/mac/fast/forms/search-rtl-expected.txt

    r89460 r90089  
    1818      RenderBlock {P} at (0,34) size 784x69
    1919        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    20           RenderBlock {DIV} at (3,3) size 119x13
    21             RenderBlock {DIV} at (0,0) size 22x11
    22             RenderBlock {DIV} at (106,0) size 13x11
     20          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     21            RenderBlock {DIV} at (0,1) size 22x11
     22            RenderBlock {DIV} at (22,0) size 84x13
     23            RenderBlock {DIV} at (106,1) size 13x11
    2324        RenderText {#text} at (129,2) size 4x18
    2425          text run at (129,2) width 4: " "
    2526        RenderBR {BR} at (0,0) size 0x0
    2627        RenderTextControl {INPUT} at (2,25) size 175x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    27           RenderBlock {DIV} at (3,3) size 169x13
    28             RenderBlock {DIV} at (0,0) size 22x11
    29             RenderBlock {DIV} at (156,0) size 13x11
     28          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 169x13
     29            RenderBlock {DIV} at (0,1) size 22x11
     30            RenderBlock {DIV} at (22,0) size 134x13
     31            RenderBlock {DIV} at (156,1) size 13x11
    3032        RenderText {#text} at (179,25) size 4x18
    3133          text run at (179,25) width 4: " "
    3234        RenderBR {BR} at (0,0) size 0x0
    3335        RenderTextControl {INPUT} at (2,48) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    34           RenderBlock {DIV} at (3,3) size 119x13
    35             RenderBlock {DIV} at (0,0) size 22x11
    36             RenderBlock {DIV} at (106,0) size 13x11
     36          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     37            RenderBlock {DIV} at (0,1) size 22x11
     38            RenderBlock {DIV} at (22,0) size 84x13
     39            RenderBlock {DIV} at (106,1) size 13x11
    3740        RenderText {#text} at (0,0) size 0x0
    3841      RenderBlock {P} at (0,119) size 784x18
     
    4043          text run at (0,0) width 39: "PASS"
    4144layer at (35,47) size 84x13 scrollX 52 scrollWidth 136
    42   RenderBlock {DIV} at (22,0) size 84x13
     45  RenderBlock {DIV} at (0,0) size 84x13
    4346    RenderText {#text} at (-51,0) size 135x13
    4447      text run at (-51,0) width 22 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
     
    4851      text run at (46,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
    4952layer at (35,70) size 134x13 scrollX 2 scrollWidth 136
    50   RenderBlock {DIV} at (22,0) size 134x13
     53  RenderBlock {DIV} at (0,0) size 134x13
    5154    RenderText {#text} at (-1,0) size 135x13
    5255      text run at (-1,0) width 22 RTL: " \x{5D5}\x{5D6}\x{5D4}\x{5D5}"
     
    5659      text run at (96,0) width 37 RTL: "\x{5D4}\x{5D5}\x{5D0} \x{5D6}\x{5D4} "
    5760layer at (35,93) size 84x13
    58   RenderBlock {DIV} at (22,0) size 84x13
    59 caret: position 0 of child 1 {DIV} of child 0 {DIV} of {#shadow-root} of child 9 {INPUT} of child 3 {P} of body
     61  RenderBlock {DIV} at (0,0) size 84x13
     62caret: position 0 of child 0 {DIV} of child 1 {DIV} of child 0 {DIV} of {#shadow-root} of child 9 {INPUT} of child 3 {P} of body
  • trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt

    r89460 r90089  
    55    RenderBody {BODY} at (8,8) size 784x23
    66      RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderBlock {DIV} at (3,3) size 119x13
    8           RenderBlock {DIV} at (0,0) size 22x11
    9           RenderBlock {DIV} at (106,0) size 13x11
     7        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     8          RenderBlock {DIV} at (0,1) size 22x11
     9          RenderBlock {DIV} at (22,0) size 84x13
     10          RenderBlock {DIV} at (106,1) size 13x11
    1011      RenderText {#text} at (0,0) size 0x0
    1112layer at (35,13) size 84x13
    12   RenderBlock {DIV} at (22,0) size 84x13
     13  RenderBlock {DIV} at (0,0) size 84x13
  • trunk/LayoutTests/platform/mac/fast/forms/search-vertical-alignment-expected.txt

    r89460 r90089  
    1313      RenderBlock {P} at (0,52) size 784x45
    1414        RenderTextControl {INPUT} at (2,0) size 125x45 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    15           RenderBlock {DIV} at (3,16) size 119x13
    16             RenderBlock {DIV} at (0,0) size 17x11
    17             RenderBlock {DIV} at (106,0) size 13x11
     15          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x39
     16            RenderBlock {DIV} at (0,14) size 17x11
     17            RenderBlock {DIV} at (17,13) size 89x13
     18            RenderBlock {DIV} at (106,14) size 13x11
    1819        RenderText {#text} at (129,13) size 4x18
    1920          text run at (129,13) width 4: " "
     
    2223      RenderBlock {P} at (0,113) size 784x18
    2324        RenderTextControl {INPUT} at (2,2) size 125x16 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24           RenderBlock {DIV} at (3,1) size 119x13
    25             RenderBlock {DIV} at (0,0) size 17x11
    26             RenderBlock {DIV} at (106,0) size 13x11
     25          RenderDeprecatedFlexibleBox {DIV} at (3,1) size 119x13
     26            RenderBlock {DIV} at (0,1) size 17x11
     27            RenderBlock {DIV} at (17,0) size 89x13
     28            RenderBlock {DIV} at (106,1) size 13x11
    2729        RenderText {#text} at (129,0) size 4x18
    2830          text run at (129,0) width 4: " "
     
    3133      RenderBlock {P} at (0,147) size 784x18
    3234        RenderTextControl {INPUT} at (2,2) size 125x12 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    33           RenderBlock {DIV} at (3,3) size 119x6
     35          RenderDeprecatedFlexibleBox {DIV} at (3,0) size 119x12
    3436            RenderBlock {DIV} at (0,0) size 17x11
     37            RenderBlock {DIV} at (17,3) size 89x6
    3538            RenderBlock {DIV} at (106,0) size 13x11
    3639        RenderText {#text} at (129,0) size 4x18
     
    3942        RenderText {#text} at (0,0) size 0x0
    4043layer at (30,76) size 89x13
    41   RenderBlock {DIV} at (17,0) size 89x13
     44  RenderBlock {DIV} at (0,0) size 89x13
    4245    RenderText {#text} at (1,0) size 24x13
    4346      text run at (1,0) width 24: "Text"
     
    4750      text run at (1,0) width 24: "Text"
    4851layer at (30,124) size 89x13
    49   RenderBlock {DIV} at (17,0) size 89x13
     52  RenderBlock {DIV} at (0,0) size 89x13
    5053    RenderText {#text} at (1,0) size 24x13
    5154      text run at (1,0) width 24: "Text"
     
    5457    RenderText {#text} at (1,0) size 24x13
    5558      text run at (1,0) width 24: "Text"
    56 layer at (30,160) size 89x13
    57   RenderBlock {DIV} at (17,0) size 89x13
     59layer at (30,160) size 89x6 scrollHeight 13
     60  RenderBlock {DIV} at (0,0) size 89x6
    5861    RenderText {#text} at (1,0) size 24x13
    5962      text run at (1,0) width 24: "Text"
  • trunk/LayoutTests/platform/mac/fast/forms/searchfield-heights-expected.txt

    r89460 r90089  
    88      RenderBR {BR} at (368,14) size 0x0
    99      RenderTextControl {INPUT} at (0,22) size 102x17 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    10         RenderBlock {DIV} at (3,3) size 96x11
    11           RenderBlock {DIV} at (0,0) size 8x9
    12           RenderBlock {DIV} at (83,0) size 13x9
     10        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 96x11
     11          RenderBlock {DIV} at (0,1) size 8x9
     12          RenderBlock {DIV} at (8,0) size 75x11
     13          RenderBlock {DIV} at (83,1) size 13x9
    1314      RenderText {#text} at (102,20) size 4x18
    1415        text run at (102,20) width 4: " "
    1516      RenderTextControl {INPUT} at (108,20) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    16         RenderBlock {DIV} at (3,3) size 119x13
    17           RenderBlock {DIV} at (0,0) size 8x11
    18           RenderBlock {DIV} at (106,0) size 13x11
     17        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     18          RenderBlock {DIV} at (0,1) size 8x11
     19          RenderBlock {DIV} at (8,0) size 98x13
     20          RenderBlock {DIV} at (106,1) size 13x11
    1921      RenderText {#text} at (235,20) size 4x18
    2022        text run at (235,20) width 4: " "
    2123      RenderTextControl {INPUT} at (241,18) size 148x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    22         RenderBlock {DIV} at (3,3) size 142x16
    23           RenderBlock {DIV} at (0,0) size 10x13
    24           RenderBlock {DIV} at (126,0) size 16x13
     24        RenderDeprecatedFlexibleBox {DIV} at (3,3) size 142x16
     25          RenderBlock {DIV} at (0,1) size 10x13
     26          RenderBlock {DIV} at (10,0) size 116x16
     27          RenderBlock {DIV} at (126,1) size 16x13
    2528      RenderText {#text} at (0,0) size 0x0
    2629layer at (19,33) size 75x11
    27   RenderBlock {DIV} at (8,0) size 75x11
     30  RenderBlock {DIV} at (0,0) size 75x11
    2831    RenderText {#text} at (1,0) size 20x11
    2932      text run at (1,0) width 20: "mini"
    3033layer at (127,31) size 98x13
    31   RenderBlock {DIV} at (8,0) size 98x13
     34  RenderBlock {DIV} at (0,0) size 98x13
    3235    RenderText {#text} at (1,0) size 29x13
    3336      text run at (1,0) width 29: "small"
    3437layer at (262,29) size 116x16
    35   RenderBlock {DIV} at (10,0) size 116x16
     38  RenderBlock {DIV} at (0,0) size 116x16
    3639    RenderText {#text} at (1,0) size 45x16
    3740      text run at (1,0) width 45: "regular"
  • trunk/LayoutTests/platform/mac/fast/repaint/search-field-cancel-expected.txt

    r89460 r90089  
    1414      RenderBlock (anonymous) at (0,34) size 784x23
    1515        RenderTextControl {INPUT} at (2,2) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    16           RenderBlock {DIV} at (3,3) size 119x13
    17             RenderBlock {DIV} at (0,0) size 8x11
    18             RenderBlock {DIV} at (106,0) size 13x11
     16          RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     17            RenderBlock {DIV} at (0,1) size 8x11
     18            RenderBlock {DIV} at (8,0) size 98x13
     19            RenderBlock {DIV} at (106,1) size 13x11
    1920        RenderText {#text} at (0,0) size 0x0
    2021layer at (21,47) size 98x13
    21   RenderBlock {DIV} at (8,0) size 98x13
     22  RenderBlock {DIV} at (0,0) size 98x13
    2223    RenderText {#text} at (1,0) size 54x13
    2324      text run at (1,0) width 54: "some text"
  • trunk/LayoutTests/platform/mac/fast/replaced/width100percent-searchfield-expected.txt

    r89460 r90089  
    1212            RenderTableCell {TD} at (1,1) size 127x25 [r=0 c=0 rs=1 cs=1]
    1313              RenderTextControl {INPUT} at (1,3) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    14                 RenderBlock {DIV} at (3,3) size 119x13
    15                   RenderBlock {DIV} at (0,0) size 8x11
    16                   RenderBlock {DIV} at (106,0) size 13x11
     14                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 119x13
     15                  RenderBlock {DIV} at (0,1) size 8x11
     16                  RenderBlock {DIV} at (8,0) size 98x13
     17                  RenderBlock {DIV} at (106,1) size 13x11
    1718            RenderTableCell {TD} at (129,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    1819              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    19                 RenderBlock {DIV} at (3,3) size 0x35
    20                   RenderBlock {DIV} at (0,0) size 8x11
    21                   RenderBlock {DIV} at (0,24) size 13x11
     20                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 0x13
     21                  RenderBlock {DIV} at (0,1) size 8x11
     22                  RenderBlock {DIV} at (8,0) size 0x13
     23                  RenderBlock {DIV} at (8,1) size 13x11
    2224            RenderTableCell {TD} at (138,1) size 8x25 [r=0 c=2 rs=1 cs=1]
    2325              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    24                 RenderBlock {DIV} at (3,3) size 0x35
    25                   RenderBlock {DIV} at (0,0) size 8x11
    26                   RenderBlock {DIV} at (0,24) size 13x11
     26                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 0x13
     27                  RenderBlock {DIV} at (0,1) size 8x11
     28                  RenderBlock {DIV} at (8,0) size 0x13
     29                  RenderBlock {DIV} at (8,1) size 13x11
    2730            RenderTableCell {TD} at (147,3) size 636x20 [r=0 c=3 rs=1 cs=1]
    2831              RenderText {#text} at (1,1) size 4x18
     
    3639            RenderTableCell {TD} at (1,1) size 527x25 [r=0 c=0 rs=1 cs=1]
    3740              RenderTextControl {INPUT} at (1,3) size 525x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    38                 RenderBlock {DIV} at (3,3) size 519x13
    39                   RenderBlock {DIV} at (0,0) size 22x11
    40                   RenderBlock {DIV} at (506,0) size 13x11
     41                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 519x13
     42                  RenderBlock {DIV} at (0,1) size 22x11
     43                  RenderBlock {DIV} at (22,0) size 484x13
     44                  RenderBlock {DIV} at (506,1) size 13x11
    4145            RenderTableCell {TD} at (529,1) size 8x25 [r=0 c=1 rs=1 cs=1]
    4246              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    43                 RenderBlock {DIV} at (3,3) size 0x35
    44                   RenderBlock {DIV} at (0,0) size 22x11
    45                   RenderBlock {DIV} at (0,24) size 13x11
     47                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 0x13
     48                  RenderBlock {DIV} at (0,1) size 22x11
     49                  RenderBlock {DIV} at (22,0) size 0x13
     50                  RenderBlock {DIV} at (22,1) size 13x11
    4651            RenderTableCell {TD} at (538,1) size 8x25 [r=0 c=2 rs=1 cs=1]
    4752              RenderTextControl {INPUT} at (1,3) size 6x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    48                 RenderBlock {DIV} at (3,3) size 0x35
    49                   RenderBlock {DIV} at (0,0) size 22x11
    50                   RenderBlock {DIV} at (0,24) size 13x11
     53                RenderDeprecatedFlexibleBox {DIV} at (3,3) size 0x13
     54                  RenderBlock {DIV} at (0,1) size 22x11
     55                  RenderBlock {DIV} at (22,0) size 0x13
     56                  RenderBlock {DIV} at (22,1) size 13x11
    5157            RenderTableCell {TD} at (547,3) size 236x20 [r=0 c=3 rs=1 cs=1]
    5258              RenderText {#text} at (1,1) size 4x18
    5359                text run at (1,1) width 4: " "
    5460layer at (21,33) size 98x13
    55   RenderBlock {DIV} at (8,0) size 98x13
     61  RenderBlock {DIV} at (0,0) size 98x13
    5662    RenderText {#text} at (1,0) size 49x13
    5763      text run at (1,0) width 49: "New Mail"
    58 layer at (141,44) size 2x13 scrollWidth 31
    59   RenderBlock {DIV} at (0,11) size 2x13
     64layer at (149,33) size 31x13
     65  RenderBlock {DIV} at (0,0) size 31x13
    6066    RenderText {#text} at (1,0) size 29x13
    6167      text run at (1,0) width 29: "Reply"
    62 layer at (150,44) size 2x13 scrollWidth 49
    63   RenderBlock {DIV} at (0,11) size 2x13
     68layer at (158,33) size 49x13
     69  RenderBlock {DIV} at (0,0) size 49x13
    6470    RenderText {#text} at (1,0) size 47x13
    6571      text run at (1,0) width 47: "Reply All"
    6672layer at (35,96) size 484x13
    67   RenderBlock {DIV} at (22,0) size 484x13
     73  RenderBlock {DIV} at (0,0) size 484x13
    6874    RenderText {#text} at (1,0) size 49x13
    6975      text run at (1,0) width 49: "New Mail"
    70 layer at (541,107) size 2x13 scrollWidth 31
    71   RenderBlock {DIV} at (0,11) size 2x13
     76layer at (563,96) size 31x13
     77  RenderBlock {DIV} at (0,0) size 31x13
    7278    RenderText {#text} at (1,0) size 29x13
    7379      text run at (1,0) width 29: "Reply"
    74 layer at (550,107) size 2x13 scrollWidth 49
    75   RenderBlock {DIV} at (0,11) size 2x13
     80layer at (572,96) size 49x13
     81  RenderBlock {DIV} at (0,0) size 49x13
    7682    RenderText {#text} at (1,0) size 47x13
    7783      text run at (1,0) width 47: "Reply All"
  • trunk/LayoutTests/platform/mac/fast/table/colspanMinWidth-vertical-expected.txt

    r89460 r90089  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderTable {TABLE} at (0,0) size 32x149
    7         RenderTableSection {TBODY} at (0,0) size 32x149
     6      RenderTable {TABLE} at (0,0) size 45x149
     7        RenderTableSection {TBODY} at (0,0) size 45x149
    88          RenderTableRow {TR} at (0,2) size 2x149
    99            RenderTableCell {TD} at (2,2) size 2x3 [bgcolor=#0000FF] [r=0 c=0 rs=1 cs=1]
     
    1111            RenderTableCell {TD} at (6,2) size 2x141 [bgcolor=#008000] [r=1 c=0 rs=2 cs=2]
    1212          RenderTableRow {TR} at (0,8) size 0x149
    13             RenderTableCell {TD} at (8,155) size 22x-18 [bgcolor=#FF0000] [r=2 c=2 rs=2 cs=1]
    14           RenderTableRow {TR} at (0,10) size 20x149
    15             RenderTableCell {TD} at (10,2) size 20x141 [bgcolor=#00FFFF] [r=3 c=0 rs=1 cs=2]
    16               RenderTable {TABLE} at (1,1) size 18x139
    17                 RenderTableSection {TBODY} at (0,0) size 18x139
    18                   RenderTableRow {TR} at (0,2) size 14x139
    19                     RenderTableCell {TD} at (2,8) size 14x-10 [bgcolor=#FF00FF] [r=0 c=0 rs=1 cs=1]
    20                     RenderTableCell {TD} at (2,6) size 14x131 [bgcolor=#FFFF00] [r=0 c=1 rs=1 cs=1]
    21                       RenderTextControl {INPUT} at (3,3) size 8x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
     13            RenderTableCell {TD} at (8,161) size 35x-31 [bgcolor=#FF0000] [r=2 c=2 rs=2 cs=1]
     14          RenderTableRow {TR} at (0,10) size 33x149
     15            RenderTableCell {TD} at (10,2) size 33x141 [bgcolor=#00FFFF] [r=3 c=0 rs=1 cs=2]
     16              RenderTable {TABLE} at (1,1) size 31x139
     17                RenderTableSection {TBODY} at (0,0) size 31x139
     18                  RenderTableRow {TR} at (0,2) size 27x139
     19                    RenderTableCell {TD} at (2,14) size 27x-23 [bgcolor=#FF00FF] [r=0 c=0 rs=1 cs=1]
     20                    RenderTableCell {TD} at (2,6) size 27x131 [bgcolor=#FFFF00] [r=0 c=1 rs=1 cs=1]
     21                      RenderTextControl {INPUT} at (3,3) size 21x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    2222                      RenderText {#text} at (0,0) size 0x0
    23 layer at (19,23) size 2x119 scrollX 13 scrollWidth 15
    24   RenderBlock {DIV} at (3,3) size 2x119
     23layer at (19,-30) size 15x119 backgroundClip at (19,0) size 15x89 clip at (19,0) size 15x89 outlineClip at (0,0) size 800x600
     24  RenderBlock {DIV} at (3,-50) size 15x119
  • trunk/Source/WebCore/ChangeLog

    r90088 r90089  
     12011-06-29  Kent Tamura  <tkent@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Avoid custom layout code of RenderTextControlSingleLine
     6        https://bugs.webkit.org/show_bug.cgi?id=61415
     7
     8        If a text field has a search results button, a search cancel
     9        button, a speech button, or a spin button, the editable inner text
     10        element and the buttons are wrapped by a flexible box container,
     11        and the editable inner text element has flexibility. As the result
     12        of applying the flexible box, we don't need any horizontal layout
     13        code in RenderTextControlSingleLine except the inner spin button.
     14
     15        Also, we remove custom hit-testing code in nodeAtPoint(). If a
     16        user clicks on a position left of the inner editable text but not
     17        on the search results button, the search results button doesn't
     18        work though it worked.
     19
     20        * css/html.css:
     21        (input::-webkit-textfield-decoration-container):
     22          New style definition for the "container" element.
     23        (input[type="search"]::-webkit-search-cancel-button):
     24          It should be a block element because it's a child of the flexible box.
     25          Also, this doesn't have flexibility.
     26        (input[type="search"]::-webkit-search-decoration): ditto.
     27        (input[type="search"]::-webkit-search-results-decoration): ditto.
     28        (input[type="search"]::-webkit-search-results-button): ditto.
     29        (input::-webkit-inner-spin-button): ditto.
     30        (input::-webkit-input-speech-button): ditto.
     31        * html/HTMLInputElement.cpp:
     32        (WebCore::HTMLInputElement::containerElement):
     33          Add an accessor of the flexible box container.
     34          It just calls InputType::containerElement().
     35        * html/HTMLInputElement.h: Declare it.
     36        * html/InputType.h:
     37        (WebCore::InputType::containerElement): New accessor for a shadow element.
     38        * html/SearchInputType.cpp:
     39        (WebCore::SearchInputType::SearchInputType):
     40          m_innerBlock is moved to TextFieldInputType.
     41        (WebCore::SearchInputType::needsContainer):
     42          A search field always needs the flexible box container because
     43          of the results button and the cancel button.
     44        (WebCore::SearchInputType::createShadowSubtree):
     45          Use TextFieldInputType::createShadowSubtree(), then modify the tree.
     46        (WebCore::SearchInputType::destroyShadowSubtree):
     47          m_innerBlock is moved to TextFieldInputType.
     48        * html/SearchInputType.h:
     49        * html/TextFieldInputType.cpp:
     50        (WebCore::TextFieldInputType::TextFieldInputType):
     51          Initialize the new members.
     52        (WebCore::TextFieldInputType::needsContainer):
     53          Returns true if x-webkit-speech. We check a spin button separately.
     54        (WebCore::TextFieldInputType::createShadowSubtree):
     55          Wrap everything with the flexible box container if needsContainer() or we need a spin button.
     56        (WebCore::TextFieldInputType::containerElement): Added an accessor.
     57        (WebCore::TextFieldInputType::innerBlockElement): ditto.
     58        (WebCore::TextFieldInputType::innerTextElement): ditto.
     59        (WebCore::TextFieldInputType::innerSpinButtonElement): ditto.
     60        (WebCore::TextFieldInputType::speechButtonElement): ditto.
     61        (WebCore::TextFieldInputType::destroyShadowSubtree):
     62          Clear references to new shadow nodes.
     63        * html/TextFieldInputType.h:
     64        * rendering/RenderTextControlSingleLine.cpp:
     65        (WebCore::RenderTextControlSingleLine::containerElement): Added an accessor.
     66        (WebCore::RenderTextControlSingleLine::innerTextElement):
     67        (WebCore::RenderTextControlSingleLine::layout):
     68         - Correct heights check
     69          Comparing with height(), not contentHeigth(), was incorrect.
     70         - Adjust the container height like the editable inner text.
     71         - Remove width adjustment
     72         - Remove the speech button layout code
     73          The flexible box layout is enough.
     74        (WebCore::RenderTextControlSingleLine::nodeAtPoint):
     75          Remove custom code for results/cancel/speech buttons, and
     76          Simplify comments.
     77        (WebCore::RenderTextControlSingleLine::forwardEvent):
     78          Remove custom forwarding code for results/cancel buttons.
     79        (WebCore::RenderTextControlSingleLine::styleDidChange):
     80          Clear the style of the container because we update it in layout().
     81        (WebCore::RenderTextControlSingleLine::hasControlClip):
     82          Decoration buttons should be clipped by the container.
     83        (WebCore::RenderTextControlSingleLine::controlClipRect): ditto.
     84        (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
     85          We don't need to use display:inline-block any more.
     86        (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
     87          The text wrapper element should have flexibility.
     88        (WebCore::RenderTextControlSingleLine::textBlockInsetTop):
     89          Updated for the tree structure change.
     90        * rendering/RenderTextControlSingleLine.h:
     91
    1922011-06-29  Kent Tamura  <tkent@chromium.org>
    293
  • trunk/Source/WebCore/css/html.css

    r89460 r90089  
    420420}
    421421
     422input::-webkit-textfield-decoration-container {
     423    direction: ltr;
     424    display: -webkit-box;
     425    -webkit-box-align: center;
     426}
     427
    422428input[type="search"]::-webkit-search-cancel-button {
    423429    -webkit-appearance: searchfield-cancel-button;
    424     display: inline-block;
     430    display: block;
     431    -webkit-box-flex: 0;
    425432}
    426433
    427434input[type="search"]::-webkit-search-decoration {
    428435    -webkit-appearance: searchfield-decoration;
    429     display: inline-block;
     436    display: block;
     437    -webkit-box-flex: 0;
    430438}
    431439
    432440input[type="search"]::-webkit-search-results-decoration {
    433441    -webkit-appearance: searchfield-results-decoration;
    434     display: inline-block;
     442    display: block;
     443    -webkit-box-flex: 0;
    435444}
    436445
    437446input[type="search"]::-webkit-search-results-button {
    438447    -webkit-appearance: searchfield-results-button;
    439     display: inline-block;
     448    display: block;
     449    -webkit-box-flex: 0;
    440450}
    441451
     
    449459input::-webkit-inner-spin-button {
    450460    -webkit-appearance: inner-spin-button;
    451     display: inline-block;
     461    display: block;
    452462    position: relative;
    453463    cursor: default;
    454464    vertical-align: top;
     465    -webkit-box-flex: 0;
    455466    -webkit-user-select: none;
    456467}
     
    459470input::-webkit-input-speech-button {
    460471    -webkit-appearance: -webkit-input-speech-button;
    461     display: inline-block;
     472    display: block;
    462473    vertical-align: top;
     474    -webkit-box-flex: 0;
    463475}
    464476#endif
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r89991 r90089  
    128128{
    129129    return m_name.isNull() ? emptyAtom : m_name;
     130}
     131
     132HTMLElement* HTMLInputElement::containerElement() const
     133{
     134    return m_inputType->containerElement();
    130135}
    131136
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r89991 r90089  
    110110#endif
    111111
     112    HTMLElement* containerElement() const;
    112113    virtual HTMLElement* innerTextElement() const;
    113114    HTMLElement* innerBlockElement() const;
  • trunk/Source/WebCore/html/InputType.h

    r89535 r90089  
    190190    virtual void destroyShadowSubtree();
    191191
     192    virtual HTMLElement* containerElement() const { return 0; }
    192193    virtual HTMLElement* innerBlockElement() const { return 0; }
    193194    virtual HTMLElement* innerTextElement() const { return 0; }
  • trunk/Source/WebCore/html/SearchInputType.cpp

    r89910 r90089  
    6464}
    6565
     66bool SearchInputType::needsContainer() const
     67{
     68    return true;
     69}
     70
    6671void SearchInputType::createShadowSubtree()
    6772{
    68     ASSERT(!m_innerBlock);
    6973    ASSERT(!m_resultsButton);
    7074    ASSERT(!m_cancelButton);
    7175
     76    TextFieldInputType::createShadowSubtree();
     77    HTMLElement* container = containerElement();
     78    HTMLElement* textWrapper = innerBlockElement();
     79    ASSERT(container);
     80    ASSERT(textWrapper);
     81
    7282    ExceptionCode ec = 0;
    73     Document* document = element()->document();
    74     m_innerBlock = TextControlInnerElement::create(document);
    75     element()->ensureShadowRoot()->appendChild(m_innerBlock, ec);
    76 
    77 #if ENABLE(INPUT_SPEECH)
    78     if (element()->isSpeechEnabled()) {
    79         setSpeechButtonElement(InputFieldSpeechButtonElement::create(document));
    80         element()->ensureShadowRoot()->appendChild(speechButtonElement(), ec);
    81     }
    82 #endif
    83 
    84     m_resultsButton = SearchFieldResultsButtonElement::create(document);
    85     m_innerBlock->appendChild(m_resultsButton, ec);
    86 
    87     setInnerTextElement(TextControlInnerTextElement::create(document));
    88     m_innerBlock->appendChild(innerTextElement(), ec);
     83    m_resultsButton = SearchFieldResultsButtonElement::create(element()->document());
     84    container->insertBefore(m_resultsButton, textWrapper, ec);
    8985
    9086    m_cancelButton = SearchFieldCancelButtonElement::create(element()->document());
    91     m_innerBlock->appendChild(m_cancelButton, ec);
    92 }
    93 
    94 HTMLElement* SearchInputType::innerBlockElement() const
    95 {
    96     return m_innerBlock.get();
     87    container->insertBefore(m_cancelButton, textWrapper->nextSibling(), ec);
    9788}
    9889
     
    110101{
    111102    TextFieldInputType::destroyShadowSubtree();
    112     m_innerBlock.clear();
    113103    m_resultsButton.clear();
    114104    m_cancelButton.clear();
  • trunk/Source/WebCore/html/SearchInputType.h

    r89910 r90089  
    4343    static PassOwnPtr<InputType> create(HTMLInputElement*);
    4444
    45 protected:
    46     virtual void createShadowSubtree();
    47     virtual void destroyShadowSubtree();
    48 
    4945private:
    5046    SearchInputType(HTMLInputElement*);
     
    5248    virtual bool shouldRespectSpeechAttribute();
    5349    virtual bool isSearchField() const;
    54     virtual HTMLElement* innerBlockElement() const;
     50    virtual bool needsContainer() const;
     51    virtual void createShadowSubtree();
     52    virtual void destroyShadowSubtree();
    5553    virtual HTMLElement* resultsButtonElement() const;
    5654    virtual HTMLElement* cancelButtonElement() const;
    5755
    58     RefPtr<HTMLElement> m_innerBlock;
    5956    RefPtr<HTMLElement> m_resultsButton;
    6057    RefPtr<HTMLElement> m_cancelButton;
  • trunk/Source/WebCore/html/TextFieldInputType.cpp

    r89910 r90089  
    130130}
    131131
     132bool TextFieldInputType::needsContainer() const
     133{
     134#if ENABLE(INPUT_SPEECH)
     135    return element()->isSpeechEnabled();
     136#else
     137    return false;
     138#endif
     139}
     140
    132141void TextFieldInputType::createShadowSubtree()
    133142{
    134143    ASSERT(!m_innerText);
     144    ASSERT(!m_innerBlock);
    135145    ASSERT(!m_innerSpinButton);
    136146
     
    138148    RefPtr<RenderTheme> theme = document->page() ? document->page()->theme() : RenderTheme::defaultTheme();
    139149    bool shouldHaveSpinButton = theme->shouldHaveSpinButton(element());
    140     bool hasDecorations = shouldHaveSpinButton;
    141 #if ENABLE(INPUT_SPEECH)
    142     if (element()->isSpeechEnabled())
    143         hasDecorations = true;
    144 #endif
     150    bool createsContainer = shouldHaveSpinButton || needsContainer();
    145151
    146152    ExceptionCode ec = 0;
    147153    m_innerText = TextControlInnerTextElement::create(document);
    148     element()->ensureShadowRoot()->appendChild(m_innerText, ec);
    149     if (!hasDecorations)
    150         return;
     154    if (!createsContainer) {
     155        element()->ensureShadowRoot()->appendChild(m_innerText, ec);
     156        return;
     157    }
     158
     159    ShadowRoot* shadowRoot = element()->ensureShadowRoot();
     160    m_container = HTMLDivElement::create(document);
     161    m_container->setShadowPseudoId("-webkit-textfield-decoration-container", ec);
     162    shadowRoot->appendChild(m_container, ec);
     163
     164    m_innerBlock = TextControlInnerElement::create(document);
     165    m_innerBlock->appendChild(m_innerText, ec);
     166    m_container->appendChild(m_innerBlock, ec);
    151167
    152168#if ENABLE(INPUT_SPEECH)
     
    154170    if (element()->isSpeechEnabled()) {
    155171        m_speechButton = InputFieldSpeechButtonElement::create(document);
    156         element()->ensureShadowRoot()->appendChild(m_speechButton, ec);
     172        m_container->appendChild(m_speechButton, ec);
    157173    }
    158174#endif
     
    160176    if (shouldHaveSpinButton) {
    161177        m_innerSpinButton = SpinButtonElement::create(document);
    162         element()->ensureShadowRoot()->appendChild(m_innerSpinButton, ec);
    163     }
    164 }
    165 
    166 void TextFieldInputType::setInnerTextElement(PassRefPtr<HTMLElement> element)
    167 {
    168     m_innerText = element;
    169 }
    170 
    171 #if ENABLE(INPUT_SPEECH)
    172 void TextFieldInputType::setSpeechButtonElement(PassRefPtr<HTMLElement> element)
    173 {
    174     m_speechButton = element;
    175 }
    176 #endif
     178        m_container->appendChild(m_innerSpinButton, ec);
     179    }
     180}
     181
     182HTMLElement* TextFieldInputType::containerElement() const
     183{
     184    return m_container.get();
     185}
     186
     187HTMLElement* TextFieldInputType::innerBlockElement() const
     188{
     189    return m_innerBlock.get();
     190}
    177191
    178192HTMLElement* TextFieldInputType::innerTextElement() const
     
    198212    InputType::destroyShadowSubtree();
    199213    m_innerText.clear();
     214    m_innerBlock.clear();
    200215#if ENABLE(INPUT_SPEECH)
    201216    m_speechButton.clear();
    202217#endif
    203218    m_innerSpinButton.clear();
     219    m_container.clear();
    204220}
    205221
  • trunk/Source/WebCore/html/TextFieldInputType.h

    r89910 r90089  
    4747    void handleWheelEventForSpinButton(WheelEvent*);
    4848
     49    virtual HTMLElement* containerElement() const;
     50    virtual HTMLElement* innerBlockElement() const;
    4951    virtual HTMLElement* innerTextElement() const;
    5052    virtual HTMLElement* innerSpinButtonElement() const;
     
    5456
    5557protected:
     58    virtual bool needsContainer() const;
    5659    virtual void createShadowSubtree();
    5760    virtual void destroyShadowSubtree();
    58     void setInnerTextElement(PassRefPtr<HTMLElement>);
    59 #if ENABLE(INPUT_SPEECH)
    60     void setSpeechButtonElement(PassRefPtr<HTMLElement>);
    61 #endif
    6261
    6362private:
     
    7271    virtual bool shouldRespectListAttribute();
    7372
     73    RefPtr<HTMLElement> m_container;
     74    RefPtr<HTMLElement> m_innerBlock;
    7475    RefPtr<HTMLElement> m_innerText;
    7576    RefPtr<HTMLElement> m_innerSpinButton;
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r90059 r90089  
    8989}
    9090
    91 HTMLElement* RenderTextControlSingleLine::innerTextElement() const
     91inline HTMLElement* RenderTextControlSingleLine::containerElement() const
     92{
     93    return inputElement()->containerElement();
     94}
     95
     96inline HTMLElement* RenderTextControlSingleLine::innerTextElement() const
    9297{
    9398    return inputElement()->innerTextElement();
     
    254259void RenderTextControlSingleLine::layout()
    255260{
     261    // FIXME: We should remove the height-related hacks in layout() and
     262    // styleDidChange(). We need them because
     263    // - Center the inner elements vertically if the input height is taller than
     264    //   the intrinsic height of the inner elements.
     265    // - Shrink the inner elment heights if the input height is samller than the
     266    //   intrinsic heights of the inner elements.
     267
     268    // We don't honor paddings and borders for textfields without decorations
     269    // and type=search if the text height is taller than the contentHeight()
     270    // because of compability.
     271
    256272    int oldHeight = height();
    257273    computeLogicalHeight();
     
    263279
    264280    RenderBox* innerTextRenderer = innerTextElement()->renderBox();
    265     HTMLElement* innerBlock = innerBlockElement();
    266     RenderBox* innerBlockRenderer = innerBlock ? innerBlock->renderBox() : 0;
     281    ASSERT(innerTextRenderer);
     282    RenderBox* innerBlockRenderer = innerBlockElement() ? innerBlockElement()->renderBox() : 0;
     283    HTMLElement* container = containerElement();
     284    RenderBox* containerRenderer = container ? container->renderBox() : 0;
    267285
    268286    // Set the text block height
     
    270288    int currentHeight = innerTextRenderer->height();
    271289
    272     if (currentHeight > height()) {
     290    int heightLimit = (inputElement()->isSearchField() || !container) ? height() : contentHeight();
     291    if (currentHeight > heightLimit) {
    273292        if (desiredHeight != currentHeight)
    274293            relayoutChildren = true;
    275294        innerTextRenderer->style()->setHeight(Length(desiredHeight, Fixed));
    276         if (innerBlock)
     295        if (innerBlockRenderer)
    277296            innerBlockRenderer->style()->setHeight(Length(desiredHeight, Fixed));
    278297    }
    279 
    280     // Set the text block width
    281     int desiredWidth = textBlockWidth();
    282     if (desiredWidth != innerTextRenderer->width())
    283         relayoutChildren = true;
    284     innerTextRenderer->style()->setWidth(Length(desiredWidth, Fixed));
    285 
    286     if (innerBlock) {
    287         int innerBlockWidth = width() - borderAndPaddingWidth();
    288         if (innerBlockWidth != innerBlockRenderer->width())
     298    // The container might be taller because of decoration elements.
     299    if (containerRenderer) {
     300        containerRenderer->layoutIfNeeded();
     301        int containerHeight = containerRenderer->height();
     302        if (containerHeight > heightLimit) {
     303            containerRenderer->style()->setHeight(Length(heightLimit, Fixed));
    289304            relayoutChildren = true;
    290         innerBlockRenderer->style()->setWidth(Length(innerBlockWidth, Fixed));
     305        } else if (containerRenderer->height() < contentHeight()) {
     306            containerRenderer->style()->setHeight(Length(contentHeight(), Fixed));
     307            relayoutChildren = true;
     308        }
    291309    }
    292310
     
    294312
    295313    // Center the child block vertically
    296     RenderBox* childBlock = innerBlockRenderer ? innerBlockRenderer : innerTextRenderer;
    297     currentHeight = childBlock->height();
    298     if (currentHeight < height())
    299         childBlock->setY((height() - currentHeight) / 2);
     314    currentHeight = innerTextRenderer->height();
     315    if (!container && currentHeight != contentHeight()) {
     316        int heightDiff = currentHeight - contentHeight();
     317        innerTextRenderer->setY(innerTextRenderer->y() - (heightDiff / 2 + heightDiff % 2));
     318    } else if (inputElement()->isSearchField() && containerRenderer && containerRenderer->height() > contentHeight()) {
     319        // A quirk for find-in-page box on Safari Windows.
     320        // http://webkit.org/b/63157
     321        int heightDiff = containerRenderer->height() - contentHeight();
     322        containerRenderer->setY(containerRenderer->y() - (heightDiff / 2 + heightDiff % 2));
     323    }
    300324
    301325    // Ignores the paddings for the inner spin button.
    302     HTMLElement* innerSpinButton = innerSpinButtonElement();
    303     if (RenderBox* spinBox = innerSpinButton ? innerSpinButton->renderBox() : 0) {
    304         spinBox->setLocation(IntPoint(spinBox->x() + paddingRight(), borderTop()));
    305         spinBox->setHeight(height() - borderTop() - borderBottom());
    306     }
    307 
    308 #if ENABLE(INPUT_SPEECH)
    309     if (RenderBox* button = speechButtonElement() ? speechButtonElement()->renderBox() : 0) {
    310         if (innerBlock) {
    311             // This is mostly the case where this is a search field. The speech button is a sibling
    312             // of the inner block and laid out at the far right.
    313             int x = width() - borderAndPaddingWidth() - button->width() - button->borderAndPaddingWidth();
    314             int y = (height() - button->height()) / 2;
    315             button->setLocation(IntPoint(x, y));
    316         } else {
    317             int x = width() - borderRight() - paddingRight() - button->width();
    318             RenderBox* spinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0;
    319             if (style()->isLeftToRightDirection())
    320                 x -= spinBox ? spinBox->width() : 0;
    321             else
    322                 innerTextRenderer->setX(paddingLeft() + borderLeft() + (spinBox ? spinBox->width() : 0));
    323             int y = (height() - button->height()) / 2;
    324             button->setLocation(IntPoint(x, y));
    325         }
    326     }
    327 #endif
     326    if (RenderBox* innerSpinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0) {
     327        RenderBox* parentBox = innerSpinBox->parentBox();
     328        innerSpinBox->setLocation(IntPoint(parentBox->width() - innerSpinBox->width() + paddingRight(), -paddingTop()));
     329        innerSpinBox->setHeight(height() - borderTop() - borderBottom());
     330    }
    328331}
    329332
    330333bool RenderTextControlSingleLine::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction hitTestAction)
    331334{
    332     // If we're within the text control, we want to act as if we've hit the inner text block element, in case the point
    333     // was on the control but not on the inner element (see Radar 4617841).
    334 
    335     // In a search field, we want to act as if we've hit the results block if we're to the left of the inner text block,
    336     // and act as if we've hit the close block if we're to the right of the inner text block.
    337 
    338335    if (!RenderTextControl::nodeAtPoint(request, result, pointInContainer, accumulatedOffset, hitTestAction))
    339336        return false;
    340337
    341     // If we hit a node inside the inner text element, say that we hit that element,
    342     // and if we hit our node (e.g. we're over the border or padding), also say that we hit the
    343     // inner text element so that it gains focus.
    344     if (result.innerNode()->isDescendantOf(innerTextElement()) || result.innerNode() == node())
    345         hitInnerTextElement(result, pointInContainer, accumulatedOffset);
    346 
    347     // If we found a spin button, we're done.
    348     HTMLElement* innerSpinButton = innerSpinButtonElement();
    349     if (innerSpinButton && result.innerNode() == innerSpinButton)
    350         return true;
    351 #if ENABLE(INPUT_SPEECH)
    352     HTMLElement* speechButton = speechButtonElement();
    353     if (speechButton && result.innerNode() == speechButton)
    354         return true;
    355 #endif
    356     // If we're not a search field, or we already found the speech, results or cancel buttons, we're done.
    357     HTMLElement* innerBlock = innerBlockElement();
    358     HTMLElement* resultsButton = resultsButtonElement();
    359     HTMLElement* cancelButton = cancelButtonElement();
    360     if (!innerBlock || result.innerNode() == resultsButton || result.innerNode() == cancelButton)
    361         return true;
    362 
    363     Node* innerNode = 0;
    364     RenderBox* innerBlockRenderer = innerBlock->renderBox();
    365     RenderBox* innerTextRenderer = innerTextElement()->renderBox();
    366 
    367     IntPoint localPoint = result.localPoint();
    368     localPoint.move(-innerBlockRenderer->location());
    369 
    370     int textLeft = accumulatedOffset.x() + x() + innerBlockRenderer->x() + innerTextRenderer->x();
    371     if (resultsButton && resultsButton->renderer() && pointInContainer.x() < textLeft)
    372         innerNode = resultsButton;
    373 
    374 #if ENABLE(INPUT_SPEECH)
    375     if (!innerNode && speechButtonElement() && speechButtonElement()->renderer()) {
    376         int buttonLeft = accumulatedOffset.x() + x() + innerBlockRenderer->x() + innerBlockRenderer->width() - speechButtonElement()->renderBox()->width();
    377         if (pointInContainer.x() >= buttonLeft)
    378             innerNode = speechButtonElement();
    379     }
    380 #endif
    381 
    382     if (!innerNode) {
    383         int textRight = textLeft + innerTextRenderer->width();
    384         if (cancelButton && cancelButton->renderer() && pointInContainer.x() > textRight)
    385             innerNode = cancelButton;
    386     }
    387 
    388     if (innerNode) {
    389         result.setInnerNode(innerNode);
    390         localPoint.move(-innerNode->renderBox()->location());
    391     }
    392 
    393     result.setLocalPoint(localPoint);
     338    // Say that we hit the inner text element if
     339    //  - we hit a node inside the inner text element,
     340    //  - we hit the <input> element (e.g. we're over the border or padding), or
     341    //  - we hit regions not in any decoration buttons.
     342    HTMLElement* container = containerElement();
     343    if (result.innerNode()->isDescendantOf(innerTextElement()) || result.innerNode() == node() || (container && container == result.innerNode())) {
     344        IntPoint pointInParent = pointInContainer;
     345        if (container && innerBlockElement()) {
     346            if (innerBlockElement()->renderBox())
     347                pointInParent -= toSize(innerBlockElement()->renderBox()->location());
     348            if (container->renderBox())
     349                pointInParent -= toSize(container->renderBox()->location());
     350        }
     351        hitInnerTextElement(result, pointInParent, accumulatedOffset);
     352    }
    394353    return true;
    395354}
     
    409368        capsLockStateMayHaveChanged();
    410369
    411     if (!event->isMouseEvent()) {
    412         RenderTextControl::forwardEvent(event);
    413         return;
    414     }
    415 
    416 #if ENABLE(INPUT_SPEECH)
    417     if (RenderBox* speechBox = speechButtonElement() ? speechButtonElement()->renderBox() : 0) {
    418         RenderBox* parent = innerTextRenderer ? innerTextRenderer : this;
    419         FloatPoint pointInTextControlCoords = parent->absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true);
    420         if (speechBox->frameRect().contains(roundedIntPoint(pointInTextControlCoords))) {
    421             speechButtonElement()->defaultEventHandler(event);
    422             return;
    423         }
    424     }
    425 #endif
    426 
    427     FloatPoint localPoint = innerTextRenderer->absoluteToLocal(static_cast<MouseEvent*>(event)->absoluteLocation(), false, true);
    428     int textRight = innerTextRenderer->borderBoxRect().maxX();
    429 
    430     HTMLElement* resultsButton = resultsButtonElement();
    431     HTMLElement* cancelButton = cancelButtonElement();
    432     if (resultsButton && localPoint.x() < innerTextRenderer->borderBoxRect().x())
    433         resultsButton->defaultEventHandler(event);
    434     else if (cancelButton && localPoint.x() > textRight)
    435         cancelButton->defaultEventHandler(event);
    436     else
    437         RenderTextControl::forwardEvent(event);
     370    RenderTextControl::forwardEvent(event);
    438371}
    439372
     
    442375    RenderTextControl::styleDidChange(diff, oldStyle);
    443376
     377    // We may have set the width and the height in the old style in layout().
     378    // Reset them now to avoid getting a spurious layout hint.
    444379    HTMLElement* innerBlock = innerBlockElement();
    445380    if (RenderObject* innerBlockRenderer = innerBlock ? innerBlock->renderer() : 0) {
    446         // We may have set the width and the height in the old style in layout().
    447         // Reset them now to avoid getting a spurious layout hint.
    448381        innerBlockRenderer->style()->setHeight(Length());
    449382        innerBlockRenderer->style()->setWidth(Length());
    450         innerBlockRenderer->setStyle(createInnerBlockStyle(style()));
     383    }
     384    HTMLElement* container = containerElement();
     385    if (RenderObject* containerRenderer = container ? container->renderer() : 0) {
     386        containerRenderer->style()->setHeight(Length());
     387        containerRenderer->style()->setWidth(Length());
    451388    }
    452389    setHasOverflowClip(false);
     
    479416bool RenderTextControlSingleLine::hasControlClip() const
    480417{
    481     bool clip = cancelButtonElement();
    482     return clip;
     418    // Apply control clip for text fields with decorations.
     419    return !!containerElement();
    483420}
    484421
    485422IntRect RenderTextControlSingleLine::controlClipRect(const IntPoint& additionalOffset) const
    486423{
    487     // This should only get called for search & speech inputs.
    488424    ASSERT(hasControlClip());
    489 
    490     IntRect clipRect = IntRect(innerBlockElement()->renderBox()->frameRect());
     425    IntRect clipRect = IntRect(containerElement()->renderBox()->frameRect());
    491426    clipRect.moveBy(additionalOffset);
    492427    return clipRect;
    493 }
    494 
    495 int RenderTextControlSingleLine::textBlockWidth() const
    496 {
    497     int width = RenderTextControl::textBlockWidth();
    498 
    499     HTMLElement* resultsButton = resultsButtonElement();
    500     if (RenderBox* resultsRenderer = resultsButton ? resultsButton->renderBox() : 0) {
    501         resultsRenderer->computeLogicalWidth();
    502         width -= resultsRenderer->width() + resultsRenderer->marginLeft() + resultsRenderer->marginRight();
    503     }
    504 
    505     HTMLElement* cancelButton = cancelButtonElement();
    506     if (RenderBox* cancelRenderer = cancelButton ? cancelButton->renderBox() : 0) {
    507         cancelRenderer->computeLogicalWidth();
    508         width -= cancelRenderer->width() + cancelRenderer->marginLeft() + cancelRenderer->marginRight();
    509     }
    510 
    511     HTMLElement* innerSpinButton = innerSpinButtonElement();
    512     if (RenderBox* spinRenderer = innerSpinButton ? innerSpinButton->renderBox() : 0) {
    513         spinRenderer->computeLogicalWidth();
    514         width -= spinRenderer->width() + spinRenderer->marginLeft() + spinRenderer->marginRight();
    515     }
    516 
    517 #if ENABLE(INPUT_SPEECH)
    518     HTMLElement* speechButton = speechButtonElement();
    519     if (RenderBox* speechRenderer = speechButton ? speechButton->renderBox() : 0) {
    520         speechRenderer->computeLogicalWidth();
    521         width -= speechRenderer->width() + speechRenderer->marginLeft() + speechRenderer->marginRight();
    522     }
    523 #endif
    524 
    525     return width;
    526428}
    527429
     
    648550        textBlockStyle->setLineHeight(Length(-100.0f, Percent));
    649551
    650     WebCore::EDisplay display = (innerBlockElement() || theme()->shouldHaveSpinButton(inputElement()) ? INLINE_BLOCK : BLOCK);
    651 #if ENABLE(INPUT_SPEECH)
    652     if (inputElement()->isSpeechEnabled())
    653       display = INLINE_BLOCK;
    654 #endif
    655     textBlockStyle->setDisplay(display);
     552    textBlockStyle->setDisplay(BLOCK);
    656553
    657554    // We're adding one extra pixel of padding to match WinIE.
     
    667564    innerBlockStyle->inheritFrom(startStyle);
    668565
     566    innerBlockStyle->setBoxFlex(1);
    669567    innerBlockStyle->setDisplay(BLOCK);
    670568    innerBlockStyle->setDirection(LTR);
     
    977875int RenderTextControlSingleLine::textBlockInsetTop() const
    978876{
    979     RenderBox* innerRenderer = 0;
    980 
    981     if (HTMLElement* innerBlock = innerBlockElement())
    982         innerRenderer = innerBlock->renderBox();
    983     else if (HTMLElement* innerText = innerTextElement())
    984         innerRenderer = innerText->renderBox();
    985    
    986     return innerRenderer ? innerRenderer->y() : borderTop() + paddingTop();
     877    HTMLElement* innerText = innerTextElement();
     878    if (!innerText || !innerText->renderBox())
     879        return borderTop() + paddingTop();
     880    HTMLElement* container = containerElement();
     881    if (!container)
     882        return innerText->renderBox()->y();
     883    ASSERT(innerBlockElement());
     884    if (!container->renderBox() || !innerBlockElement()->renderBox())
     885        return innerText->renderBox()->y();
     886    return container->renderBox()->y() + innerBlockElement()->renderBox()->y();
    987887}   
    988888
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.h

    r90048 r90089  
    132132    virtual int textBlockInsetTop() const;
    133133
     134    HTMLElement* containerElement() const;
    134135    virtual HTMLElement* innerTextElement() const;
    135136    HTMLElement* innerBlockElement() const;
Note: See TracChangeset for help on using the changeset viewer.