Changeset 157443 in webkit


Ignore:
Timestamp:
Oct 14, 2013 10:55:40 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebCore: in safari,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-14
Reviewed by Ryosuke Niwa.

When input type=search is styled with css background property then
it does not change the background-color of field. Its happening becasue
search field is not counted as styled control. Thus theme ignores the
css background property. With this patch search field is also counted as
styled control so background property reflects on search field.

Test: fast/forms/search/search-field-background-color.html

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::isControlStyled):Now search field is also
a styled control.

LayoutTests: in safari ,the background-color of input[type="search"] can't work
https://bugs.webkit.org/show_bug.cgi?id=119967

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-10-14
Reviewed by Ryosuke Niwa.

Added testcase to verify the background color of search field when
search field is styled with css background property.

  • fast/forms/search/search-field-background-color-expected.txt: Added.
  • fast/forms/search/search-field-background-color.html: Added.
  • platform/mac/fast/forms/search-styled-expected.txt: Rebaselined.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r157442 r157443  
     12013-10-14  Santosh Mahto  <santosh.ma@samsung.com>
     2
     3        in safari ,the background-color of input[type="search"] can't work
     4        https://bugs.webkit.org/show_bug.cgi?id=119967
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Added testcase to verify the background color of search field when
     9        search field is styled with css background property.
     10
     11        * fast/forms/search/search-field-background-color-expected.txt: Added.
     12        * fast/forms/search/search-field-background-color.html: Added.
     13        * platform/mac/fast/forms/search-styled-expected.txt: Rebaselined.
     14
    1152013-10-14  Zoltan Horvath  <zoltan@webkit.org>
    216
  • trunk/LayoutTests/platform/mac/fast/forms/search-styled-expected.txt

    r153647 r157443  
    11layer at (0,0) size 800x600
    22  RenderView at (0,0) size 800x600
    3 layer at (0,0) size 800x39
    4   RenderBlock {HTML} at (0,0) size 800x39
    5     RenderBody {BODY} at (8,8) size 784x23
    6       RenderTextControl {INPUT} at (2,2) size 158x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
    7         RenderFlexibleBox {DIV} at (3,3) size 152x13
     3layer at (0,0) size 800x41
     4  RenderBlock {HTML} at (0,0) size 800x41
     5    RenderBody {BODY} at (8,8) size 784x25
     6      RenderTextControl {INPUT} at (2,2) size 220x21 [bgcolor=#FFFFFF] [border: (1px solid #BDC7D8)]
     7        RenderFlexibleBox {DIV} at (18,4) size 198x13
    88          RenderBlock {DIV} at (0,1) size 22x11
    9           RenderBlock {DIV} at (22,0) size 117x13
    10           RenderBlock {DIV} at (139,1) size 13x11
     9          RenderBlock {DIV} at (22,0) size 163x13
     10          RenderBlock {DIV} at (185,1) size 13x11
    1111      RenderText {#text} at (0,0) size 0x0
    12 layer at (35,13) size 117x13
    13   RenderBlock {DIV} at (25,3) size 117x13 [color=#A9A9A9]
     12layer at (50,14) size 163x13
     13  RenderBlock {DIV} at (40,4) size 163x13 [color=#A9A9A9]
    1414    RenderText {#text} at (0,0) size 92x13
    1515      text run at (0,0) width 92: "Search for Events"
    16 layer at (35,13) size 117x13
    17   RenderBlock {DIV} at (0,0) size 117x13
     16layer at (50,14) size 163x13
     17  RenderBlock {DIV} at (0,0) size 163x13
  • trunk/Source/WebCore/ChangeLog

    r157441 r157443  
     12013-10-14  Santosh Mahto  <santosh.ma@samsung.com>
     2
     3        in safari,the background-color of input[type="search"] can't work
     4        https://bugs.webkit.org/show_bug.cgi?id=119967
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        When input type=search is styled with css background property then
     9        it does not change the background-color of field. Its happening becasue
     10        search field is not counted as styled control. Thus theme ignores the
     11        css background property. With this patch search field is also counted as
     12        styled control so background property reflects on search field.
     13
     14        Test: fast/forms/search/search-field-background-color.html
     15
     16        * rendering/RenderTheme.cpp:
     17        (WebCore::RenderTheme::isControlStyled):Now search field is also
     18        a styled control.
     19
    1202013-10-14  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebCore/rendering/RenderTheme.cpp

    r155460 r157443  
    669669    case DiscreteCapacityLevelIndicatorPart:
    670670    case RatingLevelIndicatorPart:
    671     // FIXME: Uncomment this when making search fields style-able.
    672     // case SearchFieldPart:
     671    case SearchFieldPart:
    673672    case TextFieldPart:
    674673    case TextAreaPart:
Note: See TracChangeset for help on using the changeset viewer.