Changeset 151100 in webkit


Ignore:
Timestamp:
Jun 3, 2013 3:30:07 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL]<select> element's text is clipped when a height is specified along with CSS line-height.
https://bugs.webkit.org/show_bug.cgi?id=114862

Patch by Rashmi Kulakarni <rashmi.vijay@samsung.com> on 2013-06-03
Reviewed by Gyuyoung Kim.

Source/WebCore:

Fix <select> element getting clipped when element height becomes less than the line-height.
Set minimum height for <select> element.

No new tests, no behavior change.

  • platform/efl/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::adjustMenuListButtonStyle):

LayoutTests:

Rebaselined the test case fast/forms/001.html.

  • platform/efl/fast/forms/001-expected.png:
  • platform/efl/fast/forms/001-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151099 r151100  
     12013-06-03  Rashmi Kulakarni  <rashmi.vijay@samsung.com>
     2
     3        [EFL]<select> element's text is clipped when a height is specified along with CSS line-height.
     4        https://bugs.webkit.org/show_bug.cgi?id=114862
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Rebaselined the test case fast/forms/001.html.
     9
     10        * platform/efl/fast/forms/001-expected.png:
     11        * platform/efl/fast/forms/001-expected.txt:
     12
    1132013-06-03  Charles Wei  <chwei@blackberry.com>
    214
  • trunk/LayoutTests/platform/efl/fast/forms/001-expected.txt

    r140147 r151100  
    77        RenderText {#text} at (0,0) size 234x36
    88          text run at (0,0) width 234: "Min-Width Tests"
    9       RenderTable {TABLE} at (0,58) size 784x27 [border: (2px outset #808080)]
    10         RenderTableSection {TBODY} at (2,2) size 780x22
    11           RenderTableRow {TR} at (0,0) size 780x22
    12             RenderTableCell {TD} at (0,0) size 90x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    13               RenderMenuList {SELECT} at (3,1) size 84x20 [bgcolor=#FFFFFF]
     9      RenderTable {TABLE} at (0,58) size 784x45 [border: (2px outset #808080)]
     10        RenderTableSection {TBODY} at (2,2) size 780x40
     11          RenderTableRow {TR} at (0,0) size 780x40
     12            RenderTableCell {TD} at (0,0) size 90x40 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     13              RenderMenuList {SELECT} at (3,1) size 84x38 [bgcolor=#FFFFFF]
    1414                RenderBlock (anonymous) at (15,10) size 28x18
    1515                  RenderText at (0,0) size 28x17
    1616                    text run at (0,0) width 28: "Foo"
    17             RenderTableCell {TD} at (90,10) size 690x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    18       RenderBlock {P} at (0,100) size 784x25
     17            RenderTableCell {TD} at (90,19) size 690x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     18      RenderBlock {P} at (0,118) size 784x25
    1919        RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
    2020          RenderTableSection {TBODY} at (2,2) size 780x20
     
    2323                RenderBlock {INPUT} at (5,4) size 13x12
    2424              RenderTableCell {TD} at (23,9) size 757x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    25       RenderBlock {P} at (0,140) size 784x25
     25      RenderBlock {P} at (0,158) size 784x25
    2626        RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
    2727          RenderTableSection {TBODY} at (2,2) size 780x20
     
    3030                RenderBlock {INPUT} at (5,4) size 13x12
    3131              RenderTableCell {TD} at (23,9) size 757x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    32       RenderBlock {P} at (0,180) size 784x51
     32      RenderBlock {P} at (0,198) size 784x51
    3333        RenderTable {TABLE} at (0,0) size 784x50 [border: (2px outset #808080)]
    3434          RenderTableSection {TBODY} at (2,2) size 780x46
     
    4040                      text run at (0,0) width 28: "Foo"
    4141              RenderTableCell {TD} at (68,22) size 712x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    42       RenderBlock {P} at (0,246) size 784x268
     42      RenderBlock {P} at (0,264) size 784x268
    4343        RenderTable {TABLE} at (0,0) size 784x91 [border: (2px outset #808080)]
    4444          RenderTableSection {TBODY} at (2,2) size 780x87
  • trunk/Source/WebCore/ChangeLog

    r151099 r151100  
     12013-06-03  Rashmi Kulakarni  <rashmi.vijay@samsung.com>
     2
     3        [EFL]<select> element's text is clipped when a height is specified along with CSS line-height.
     4        https://bugs.webkit.org/show_bug.cgi?id=114862
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Fix <select> element getting clipped when element height becomes less than the line-height.
     9        Set minimum height for <select> element.
     10
     11        No new tests, no behavior change.
     12
     13        * platform/efl/RenderThemeEfl.cpp:
     14        (WebCore::RenderThemeEfl::adjustMenuListButtonStyle):
     15
    1162013-06-03  Charles Wei  <charles.wei@torchmobile.com.cn>
    217
  • trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp

    • Property svn:executable set to *
    r150716 r151100  
    867867void RenderThemeEfl::adjustMenuListButtonStyle(StyleResolver* styleResolver, RenderStyle* style, Element* element) const
    868868{
     869    // Height is locked to auto if height is not specified.
     870    style->setHeight(Length(Auto));
     871
     872    // The <select> box must be at least 12px high for the button to render the text inside the box without clipping.
     873    const int dropDownBoxMinHeight = 12;
     874
     875    // Calculate min-height of the <select> element.
     876    int minHeight = style->fontMetrics().height();
     877    minHeight = max(minHeight, dropDownBoxMinHeight);
     878    style->setMinHeight(Length(minHeight, Fixed));
     879
    869880    adjustMenuListStyle(styleResolver, style, element);
    870881}
Note: See TracChangeset for help on using the changeset viewer.