Changeset 16044 in webkit


Ignore:
Timestamp:
Aug 25, 2006 4:44:05 PM (18 years ago)
Author:
adele
Message:

LayoutTests:

Reviewed by Hyatt.

New tests and updated tests for styled selects.

  • fast/borders/borderRadiusInvalidColor-expected.checksum: Added.
  • fast/borders/borderRadiusInvalidColor-expected.png: Added.
  • fast/borders/borderRadiusInvalidColor-expected.txt: Added.
  • fast/borders/borderRadiusInvalidColor.html: Added.
  • fast/forms/select-baseline-expected.checksum: Added.
  • fast/forms/select-baseline-expected.png: Added.
  • fast/forms/select-baseline-expected.txt: Added.
  • fast/forms/select-baseline.html: Added.
  • editing/pasteboard/4641033-expected.txt:
  • editing/selection/replaced-boundaries-3-expected.txt:
  • editing/selection/select-box-expected.txt:
  • fast/block/margin-collapse/103-expected.txt:
  • fast/forms/001-expected.checksum:
  • fast/forms/001-expected.png:
  • fast/forms/001-expected.txt:
  • fast/forms/003-expected.txt:
  • fast/forms/004-expected.txt:
  • fast/forms/HTMLOptionElement_label01-expected.txt:
  • fast/forms/HTMLOptionElement_label02-expected.txt:
  • fast/forms/HTMLOptionElement_label03-expected.txt:
  • fast/forms/HTMLOptionElement_label04-expected.txt:
  • fast/forms/HTMLOptionElement_label06-expected.txt:
  • fast/forms/HTMLOptionElement_label07-expected.txt:
  • fast/forms/form-element-geometry-expected.checksum:
  • fast/forms/form-element-geometry-expected.png:
  • fast/forms/form-element-geometry-expected.txt:
  • fast/forms/option-script-expected.txt:
  • fast/forms/option-text-clip-expected.txt:
  • fast/forms/select-change-listbox-to-popup-expected.txt:
  • fast/forms/select-selected-expected.txt:
  • fast/forms/select-style-expected.txt:
  • fast/forms/select-visual-hebrew-expected.txt:
  • fast/invalid/014-expected.txt:
  • fast/parser/document-write-option-expected.txt:
  • fast/replaced/width100percent-expected.txt:
  • http/tests/navigation/anchor-basic-expected.txt:
  • http/tests/navigation/anchor-frames-expected.txt:
  • http/tests/navigation/anchor-goback-expected.txt:
  • http/tests/navigation/anchor-subframeload-expected.txt:
  • http/tests/navigation/javascriptlink-basic-expected.txt:
  • http/tests/navigation/javascriptlink-frames-expected.txt:
  • http/tests/navigation/javascriptlink-goback-expected.txt:
  • http/tests/navigation/javascriptlink-subframeload-expected.txt:
  • http/tests/navigation/metaredirect-basic-expected.txt:
  • http/tests/navigation/metaredirect-frames-expected.txt:
  • http/tests/navigation/metaredirect-goback-expected.txt:
  • http/tests/navigation/metaredirect-subframeload-expected.txt:
  • http/tests/navigation/post-goback2-expected.txt:
  • http/tests/navigation/postredirect-goback2-expected.txt:
  • http/tests/navigation/redirect302-basic-expected.txt:
  • http/tests/navigation/redirect302-frames-expected.txt:
  • http/tests/navigation/redirect302-goback-expected.txt:
  • http/tests/navigation/redirect302-subframeload-expected.txt:
  • http/tests/navigation/relativeanchor-basic-expected.txt:
  • http/tests/navigation/relativeanchor-frames-expected.txt:
  • http/tests/navigation/relativeanchor-goback-expected.txt:
  • http/tests/navigation/slowmetaredirect-basic-expected.txt:
  • http/tests/navigation/slowtimerredirect-basic-expected.txt:
  • http/tests/navigation/success200-basic-expected.txt:
  • http/tests/navigation/success200-frames-expected.txt:
  • http/tests/navigation/success200-frames-loadsame-expected.txt:
  • http/tests/navigation/success200-goback-expected.txt:
  • http/tests/navigation/success200-loadsame-expected.txt:
  • http/tests/navigation/success200-reload-expected.txt:
  • http/tests/navigation/success200-subframeload-expected.txt:
  • http/tests/navigation/timerredirect-basic-expected.txt:
  • http/tests/navigation/timerredirect-frames-expected.txt:
  • http/tests/navigation/timerredirect-goback-expected.txt:
  • http/tests/navigation/timerredirect-subframeload-expected.txt:
  • tables/mozilla/bugs/bug1188-expected.txt:
  • tables/mozilla/bugs/bug18359-expected.txt:
  • tables/mozilla/bugs/bug2479-3-expected.txt:
  • tables/mozilla/bugs/bug2479-4-expected.txt:
  • tables/mozilla/bugs/bug29326-expected.txt:
  • tables/mozilla/bugs/bug33855-expected.txt:
  • tables/mozilla/bugs/bug4382-expected.txt:
  • tables/mozilla/bugs/bug96334-expected.txt:
  • tables/mozilla/core/margins-expected.txt:
  • tables/mozilla/dom/tableDom-expected.txt:
  • tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:

WebCore:

Reviewed by Hyatt.

Enable styling for popup menus. Also fixed baseline calculation for buttons and selects.

Tests: fast/forms/select-baseline.html

fast/borders/borderRadiusInvalidColor.html

updated: fast/forms/select-style-expected.txt and more...

  • css/html4.css: Added style rules for styled select elements.
  • platform/GraphicsContext.h: Added argument for antialiasing.
  • platform/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
  • platform/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
  • rendering/RenderObject.cpp: (WebCore::RenderObject::drawBorderArc): Added textColor argument so this can be used when the border color is invalid. (WebCore::RenderObject::drawBorder): Removed invalidisInvert since its dead code (any callers that set this to true were already ensuring that their color was valid). Updated drawConvexPolygon call to use FloatPoints instead of IntPoints. (WebCore::RenderObject::paintBorder): Updated to remove invalidisInvert argument from drawBorder call. (WebCore::RenderObject::paintOutline): ditto.
  • rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintOutlineForLine): ditto.
  • rendering/RenderObject.h: Updated arguments for drawBorder and drawBorderArc.
  • rendering/RenderBlock.cpp: (WebCore::RenderBlock::getBaselineOfLastLineBox): Changed isRootLineBox argument to true when setting line height. Added case for when there's no children to check for hasLineIfEmpty.
  • rendering/RenderBlock.h:
  • rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Changed isRootLineBox argument to true when setting line height.
  • rendering/RenderButton.h: (WebCore::RenderButton::hasLineIfEmpty): Added so buttons always get a line height.
  • rendering/RenderMenuList.h: (WebCore::RenderMenuList::hasLineIfEmpty): ditto.
  • rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBox): Added code to check hasLineIfEmpty to give flex boxes line height. (WebCore::RenderFlexibleBox::layoutVerticalBox): ditto.
  • css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): Moved the appearance adjustment code into adjust style.
  • rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Lets the theme paint "decorations", like the arrow control and gradients immediately after painting the background.
  • rendering/RenderTheme.cpp: (WebCore::RenderTheme::adjustStyle): This now checks whether the control is styled, and adjusts the appearance property appropriately. For styled selects, instead of setting the appearance to none, which is what we do for other styled controls, we set the appearance to MenulistButtonAppearance, which indicates that we will draw the arrow controls and button appearance in the engine. (WebCore::RenderTheme::paintDecorations): Added. Paints MenulistButtonAppearance in a different function, so the arrow control will draw at the right time (after the background). (WebCore::RenderTheme::paint): Added case for MenulistButtonAppearance. (WebCore::RenderTheme::paintBorderOnly): ditto. (WebCore::RenderTheme::isControlContainer): Removed cases for MenuListAppearance and MenulistButtonAppearance since the baseline is no longer provided by the theme. (WebCore::RenderTheme::adjustMenuListButtonStyle): Added.
  • rendering/RenderTheme.h: (WebCore::RenderTheme::paintMenuListButton): Added.
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::isControlStyled): Removed code that made selects unstyle-able. (WebCore::RenderThemeMac::baselinePosition): Removed cases for MenuListAppearance and MenulistButtonAppearance. (WebCore::RenderThemeMac::popupButtonPadding): Added top and bottom padding so empty popups have the right baseline. (WebCore::TopGradientInterpolate): Added. (WebCore::BottomGradientInterpolate): Added. (WebCore::MainGradientInterpolate): Added. (WebCore::RenderThemeMac::paintMenuListButtonGradients): Added. Draws gradients for styled popup menu button appearance. (WebCore::RenderThemeMac::paintMenuListButton): Calls paintMenuListButtonGradients, and draws arrow control. (WebCore::RenderThemeMac::adjustMenuListButtonStyle): Added to set padding and border radius to account for the arrow control size and font size.
Location:
trunk
Files:
8 added
94 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r16026 r16044  
     12006-08-25  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Hyatt.
     4
     5        New tests and updated tests for styled selects.
     6
     7        * fast/borders/borderRadiusInvalidColor-expected.checksum: Added.
     8        * fast/borders/borderRadiusInvalidColor-expected.png: Added.
     9        * fast/borders/borderRadiusInvalidColor-expected.txt: Added.
     10        * fast/borders/borderRadiusInvalidColor.html: Added.
     11
     12        * fast/forms/select-baseline-expected.checksum: Added.
     13        * fast/forms/select-baseline-expected.png: Added.
     14        * fast/forms/select-baseline-expected.txt: Added.
     15        * fast/forms/select-baseline.html: Added.
     16
     17        * editing/pasteboard/4641033-expected.txt:
     18        * editing/selection/replaced-boundaries-3-expected.txt:
     19        * editing/selection/select-box-expected.txt:
     20        * fast/block/margin-collapse/103-expected.txt:
     21        * fast/forms/001-expected.checksum:
     22        * fast/forms/001-expected.png:
     23        * fast/forms/001-expected.txt:
     24        * fast/forms/003-expected.txt:
     25        * fast/forms/004-expected.txt:
     26        * fast/forms/HTMLOptionElement_label01-expected.txt:
     27        * fast/forms/HTMLOptionElement_label02-expected.txt:
     28        * fast/forms/HTMLOptionElement_label03-expected.txt:
     29        * fast/forms/HTMLOptionElement_label04-expected.txt:
     30        * fast/forms/HTMLOptionElement_label06-expected.txt:
     31        * fast/forms/HTMLOptionElement_label07-expected.txt:
     32        * fast/forms/form-element-geometry-expected.checksum:
     33        * fast/forms/form-element-geometry-expected.png:
     34        * fast/forms/form-element-geometry-expected.txt:
     35        * fast/forms/option-script-expected.txt:
     36        * fast/forms/option-text-clip-expected.txt:
     37        * fast/forms/select-change-listbox-to-popup-expected.txt:
     38        * fast/forms/select-selected-expected.txt:
     39        * fast/forms/select-style-expected.txt:
     40        * fast/forms/select-visual-hebrew-expected.txt:
     41        * fast/invalid/014-expected.txt:
     42        * fast/parser/document-write-option-expected.txt:
     43        * fast/replaced/width100percent-expected.txt:
     44        * http/tests/navigation/anchor-basic-expected.txt:
     45        * http/tests/navigation/anchor-frames-expected.txt:
     46        * http/tests/navigation/anchor-goback-expected.txt:
     47        * http/tests/navigation/anchor-subframeload-expected.txt:
     48        * http/tests/navigation/javascriptlink-basic-expected.txt:
     49        * http/tests/navigation/javascriptlink-frames-expected.txt:
     50        * http/tests/navigation/javascriptlink-goback-expected.txt:
     51        * http/tests/navigation/javascriptlink-subframeload-expected.txt:
     52        * http/tests/navigation/metaredirect-basic-expected.txt:
     53        * http/tests/navigation/metaredirect-frames-expected.txt:
     54        * http/tests/navigation/metaredirect-goback-expected.txt:
     55        * http/tests/navigation/metaredirect-subframeload-expected.txt:
     56        * http/tests/navigation/post-goback2-expected.txt:
     57        * http/tests/navigation/postredirect-goback2-expected.txt:
     58        * http/tests/navigation/redirect302-basic-expected.txt:
     59        * http/tests/navigation/redirect302-frames-expected.txt:
     60        * http/tests/navigation/redirect302-goback-expected.txt:
     61        * http/tests/navigation/redirect302-subframeload-expected.txt:
     62        * http/tests/navigation/relativeanchor-basic-expected.txt:
     63        * http/tests/navigation/relativeanchor-frames-expected.txt:
     64        * http/tests/navigation/relativeanchor-goback-expected.txt:
     65        * http/tests/navigation/slowmetaredirect-basic-expected.txt:
     66        * http/tests/navigation/slowtimerredirect-basic-expected.txt:
     67        * http/tests/navigation/success200-basic-expected.txt:
     68        * http/tests/navigation/success200-frames-expected.txt:
     69        * http/tests/navigation/success200-frames-loadsame-expected.txt:
     70        * http/tests/navigation/success200-goback-expected.txt:
     71        * http/tests/navigation/success200-loadsame-expected.txt:
     72        * http/tests/navigation/success200-reload-expected.txt:
     73        * http/tests/navigation/success200-subframeload-expected.txt:
     74        * http/tests/navigation/timerredirect-basic-expected.txt:
     75        * http/tests/navigation/timerredirect-frames-expected.txt:
     76        * http/tests/navigation/timerredirect-goback-expected.txt:
     77        * http/tests/navigation/timerredirect-subframeload-expected.txt:
     78        * tables/mozilla/bugs/bug1188-expected.txt:
     79        * tables/mozilla/bugs/bug18359-expected.txt:
     80        * tables/mozilla/bugs/bug2479-3-expected.txt:
     81        * tables/mozilla/bugs/bug2479-4-expected.txt:
     82        * tables/mozilla/bugs/bug29326-expected.txt:
     83        * tables/mozilla/bugs/bug33855-expected.txt:
     84        * tables/mozilla/bugs/bug4382-expected.txt:
     85        * tables/mozilla/bugs/bug96334-expected.txt:
     86        * tables/mozilla/core/margins-expected.txt:
     87        * tables/mozilla/dom/tableDom-expected.txt:
     88        * tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
     89
    1902006-08-24  Darin Adler  <darin@apple.com>
    291
  • trunk/LayoutTests/editing/pasteboard/4641033-expected.txt

    r15617 r16044  
    3232        RenderText {#text} at (76,89) size 4x18
    3333          text run at (76,89) width 4: " "
    34         RenderMenuList {SELECT} at (82,90) size 36x18
     34        RenderMenuList {SELECT} at (82,90) size 36x18 [bgcolor=#FFFFFF]
    3535      RenderBlock (anonymous) at (0,196) size 784x110
    3636        RenderImage {IMG} at (0,0) size 76x103
    3737        RenderText {#text} at (76,89) size 4x18
    3838          text run at (76,89) width 4: " "
    39         RenderMenuList {SELECT} at (82,90) size 52x18
     39        RenderMenuList {SELECT} at (82,90) size 52x18 [bgcolor=#FFFFFF]
    4040          RenderBlock (anonymous) at (8,2) size 21x13
    4141            RenderText at (0,0) size 19x13
  • trunk/LayoutTests/editing/selection/replaced-boundaries-3-expected.txt

    r15531 r16044  
    1919          text run at (0,0) width 22: "abc"
    2020        RenderBR {BR} at (22,14) size 0x0
    21         RenderMenuList {SELECT} at (2,20) size 226x18
     21        RenderMenuList {SELECT} at (2,20) size 226x18 [bgcolor=#FFFFFF]
    2222          RenderBlock (anonymous) at (8,2) size 195x13
    2323            RenderText at (0,0) size 195x13
  • trunk/LayoutTests/editing/selection/select-box-expected.txt

    r15531 r16044  
    6565          RenderText {#text} at (0,1) size 71x18
    6666            text run at (0,1) width 71: "select box: "
    67           RenderMenuList {SELECT} at (73,2) size 38x18
     67          RenderMenuList {SELECT} at (73,2) size 38x18 [bgcolor=#FFFFFF]
    6868            RenderBlock (anonymous) at (8,2) size 7x13
    6969              RenderText at (0,0) size 7x13
  • trunk/LayoutTests/fast/block/margin-collapse/103-expected.txt

    r15290 r16044  
    3838              RenderText {#text} at (0,2) size 128x15
    3939                text run at (0,2) width 128: "Your degree program*"
    40             RenderMenuList {SELECT} at (325,68) size 180x18
     40            RenderMenuList {SELECT} at (325,68) size 180x18 [bgcolor=#FFFFFF]
    4141              RenderBlock (anonymous) at (8,2) size 149x13
    4242                RenderText at (0,0) size 90x13
     
    4545              RenderText {#text} at (0,2) size 110x15
    4646                text run at (0,2) width 110: "Your year of study*"
    47             RenderMenuList {SELECT} at (325,88) size 180x18
     47            RenderMenuList {SELECT} at (325,88) size 180x18 [bgcolor=#FFFFFF]
    4848              RenderBlock (anonymous) at (8,2) size 149x13
    4949                RenderText at (0,0) size 124x13
     
    5252              RenderText {#text} at (0,2) size 152x15
    5353                text run at (0,2) width 152: "Shakespeare classes taken"
    54             RenderMenuList {SELECT} at (325,108) size 180x18
     54            RenderMenuList {SELECT} at (325,108) size 180x18 [bgcolor=#FFFFFF]
    5555              RenderBlock (anonymous) at (8,2) size 149x13
    5656                RenderText at (0,0) size 76x13
     
    6565              RenderText {#text} at (0,2) size 321x15
    6666                text run at (0,2) width 321: "What percentage of your research time is spent online?"
    67             RenderMenuList {SELECT} at (325,210) size 180x18
     67            RenderMenuList {SELECT} at (325,210) size 180x18 [bgcolor=#FFFFFF]
    6868              RenderBlock (anonymous) at (8,2) size 149x13
    6969                RenderText at (0,0) size 106x13
     
    7373                text run at (0,2) width 300: "What is holding you back from doing more research"
    7474                text run at (0,22) width 41: "online?"
    75             RenderMenuList {SELECT} at (325,230) size 180x18
     75            RenderMenuList {SELECT} at (325,230) size 180x18 [bgcolor=#FFFFFF]
    7676              RenderBlock (anonymous) at (8,2) size 149x13
    7777                RenderText at (0,0) size 44x13
     
    113113              RenderText {#text} at (0,2) size 274x15
    114114                text run at (0,2) width 274: "Which area of the ISE did you find most useful?"
    115             RenderMenuList {SELECT} at (325,427) size 180x18
     115            RenderMenuList {SELECT} at (325,427) size 180x18 [bgcolor=#FFFFFF]
    116116              RenderBlock (anonymous) at (8,2) size 149x13
    117117                RenderText at (0,0) size 99x13
     
    120120              RenderText {#text} at (0,2) size 252x15
    121121                text run at (0,2) width 252: "How did you find the navigation of the ISE?"
    122             RenderMenuList {SELECT} at (325,447) size 180x18
     122            RenderMenuList {SELECT} at (325,447) size 180x18 [bgcolor=#FFFFFF]
    123123              RenderBlock (anonymous) at (8,2) size 149x13
    124124                RenderText at (0,0) size 91x13
  • trunk/LayoutTests/fast/forms/001-expected.checksum

    r15339 r16044  
    1 64b27f49c223c43307733f846fac6fd3
     130c93784fba4675931e35b46fcefe87d
  • trunk/LayoutTests/fast/forms/001-expected.txt

    r15339 r16044  
    77        RenderText {#text} at (0,0) size 234x37
    88          text run at (0,0) width 234: "Min-Width Tests"
    9       RenderTable {TABLE} at (0,58) size 784x24 [border: (2px outset #808080)]
    10         RenderTableSection {TBODY} at (2,2) size 780x20
    11           RenderTableRow {TR} at (0,0) size 780x20
    12             RenderTableCell {TD} at (0,0) size 57x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    13               RenderMenuList {SELECT} at (3,1) size 51x18
    14                 RenderBlock (anonymous) at (8,2) size 20x13
     9      RenderTable {TABLE} at (0,58) size 784x89 [border: (2px outset #808080)]
     10        RenderTableSection {TBODY} at (2,2) size 780x85
     11          RenderTableRow {TR} at (0,0) size 780x85
     12            RenderTableCell {TD} at (0,0) size 135x85 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
     13              RenderMenuList {SELECT} at (3,1) size 129x83 [bgcolor=#FFFFFF] [border: (40px solid #FF0000)]
     14                RenderBlock (anonymous) at (48,41) size 20x13
    1515                  RenderText at (0,0) size 20x13
    1616                    text run at (0,0) width 20: "Foo"
    17             RenderTableCell {TD} at (57,9) size 723x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    18       RenderBlock {P} at (0,98) size 784x24
     17            RenderTableCell {TD} at (135,41) size 645x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
     18      RenderBlock {P} at (0,163) size 784x24
    1919        RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
    2020          RenderTableSection {TBODY} at (2,2) size 780x20
     
    2323                RenderBlock {INPUT} at (4,4) size 12x12
    2424              RenderTableCell {TD} at (20,9) size 760x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    25       RenderBlock {P} at (0,138) size 784x24
     25      RenderBlock {P} at (0,203) size 784x24
    2626        RenderTable {TABLE} at (0,0) size 784x24 [border: (2px outset #808080)]
    2727          RenderTableSection {TBODY} at (2,2) size 780x20
     
    3030                RenderBlock {INPUT} at (4,4) size 12x12
    3131              RenderTableCell {TD} at (20,9) size 760x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    32       RenderBlock {P} at (0,178) size 784x28
     32      RenderBlock {P} at (0,243) size 784x28
    3333        RenderTable {TABLE} at (0,0) size 784x28 [border: (2px outset #808080)]
    3434          RenderTableSection {TBODY} at (2,2) size 780x24
     
    4040                      text run at (0,0) width 20: "Foo"
    4141              RenderTableCell {TD} at (42,11) size 738x2 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
    42       RenderBlock {P} at (0,222) size 784x267
     42      RenderBlock {P} at (0,287) size 784x267
    4343        RenderTable {TABLE} at (0,0) size 784x91 [border: (2px outset #808080)]
    4444          RenderTableSection {TBODY} at (2,2) size 780x87
  • trunk/LayoutTests/fast/forms/003-expected.txt

    r15290 r16044  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderMenuList {SELECT} at (2,0) size 59x18
     6      RenderMenuList {SELECT} at (2,0) size 59x18 [bgcolor=#FFFFFF]
    77        RenderBlock (anonymous) at (8,2) size 28x13
    88          RenderText at (0,0) size 28x13
  • trunk/LayoutTests/fast/forms/004-expected.txt

    r15290 r16044  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderMenuList {SELECT} at (2,2) size 59x18
     6      RenderMenuList {SELECT} at (2,2) size 59x18 [bgcolor=#FFFFFF]
    77        RenderBlock (anonymous) at (8,2) size 28x13
    88          RenderText at (0,0) size 28x13
     
    1010      RenderText {#text} at (63,1) size 4x18
    1111        text run at (63,1) width 4: " "
    12       RenderMenuList {SELECT} at (69,2) size 79x18
     12      RenderMenuList {SELECT} at (69,2) size 79x18 [bgcolor=#FFFFFF]
    1313        RenderBlock (anonymous) at (8,2) size 48x13
    1414          RenderText at (0,0) size 48x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label01-expected.txt

    r15290 r16044  
    77        text run at (0,0) width 673: "In the selection list below, the text 'The label for this element is \"1\"' should appear, and not the character '1'"
    88      RenderBR {BR} at (673,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 197x18
     9      RenderMenuList {SELECT} at (2,20) size 197x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 166x13
    1111          RenderText at (0,0) size 166x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label02-expected.txt

    r15290 r16044  
    77        text run at (0,0) width 300: "With the label empty, the enclosing text is used."
    88      RenderBR {BR} at (300,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 309x18
     9      RenderMenuList {SELECT} at (2,20) size 309x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 278x13
    1111          RenderText at (0,0) size 279x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label03-expected.txt

    r15290 r16044  
    77        text run at (0,0) width 436: "When the label contains only white space, the containing text is used."
    88      RenderBR {BR} at (436,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 338x18
     9      RenderMenuList {SELECT} at (2,20) size 338x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 307x13
    1111          RenderText at (0,0) size 308x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label04-expected.txt

    r15290 r16044  
    77        text run at (0,0) width 595: "The label attribute appears, but is missing the equals value piece, so the containing text is used."
    88      RenderBR {BR} at (595,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 464x18
     9      RenderMenuList {SELECT} at (2,20) size 464x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 433x13
    1111          RenderText at (0,0) size 433x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label06-expected.txt

    r15290 r16044  
    77        text run at (0,0) width 718: "The select item below has a label specified, and no enclosed text. There should be no text shown in the select box."
    88      RenderBR {BR} at (718,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 53x18
     9      RenderMenuList {SELECT} at (2,20) size 53x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 22x13
    1111          RenderText at (0,0) size 22x13
  • trunk/LayoutTests/fast/forms/HTMLOptionElement_label07-expected.txt

    r15290 r16044  
    88        text run at (0,18) width 28: "box."
    99      RenderBR {BR} at (28,32) size 0x0
    10       RenderMenuList {SELECT} at (2,38) size 36x18
     10      RenderMenuList {SELECT} at (2,38) size 36x18 [bgcolor=#FFFFFF]
    1111      RenderText {#text} at (0,0) size 0x0
  • trunk/LayoutTests/fast/forms/form-element-geometry-expected.checksum

    r15309 r16044  
    1 eddcc7aa8111d729c3cb56d3fa81566c
     18a8f3798c469460bda12c28dc5b8e130
  • trunk/LayoutTests/fast/forms/form-element-geometry-expected.txt

    r15290 r16044  
    2626              RenderBlock {DIV} at (1,1) size 66x22 [border: (2px solid #0000FF)]
    2727                RenderInline {FONT} at (0,0) size 62x18
    28                   RenderMenuList {SELECT} at (2,2) size 62x18
     28                  RenderMenuList {SELECT} at (2,2) size 62x18 [bgcolor=#FFFFFF]
    2929                    RenderBlock (anonymous) at (8,2) size 31x13
    3030                      RenderText at (0,0) size 31x13
     
    5555            RenderTableCell {TD} at (62,2) size 68x24 [r=0 c=1 rs=1 cs=1]
    5656              RenderBlock {DIV} at (1,1) size 66x22 [border: (2px solid #0000FF)]
    57                 RenderMenuList {SELECT} at (2,2) size 62x18
     57                RenderMenuList {SELECT} at (2,2) size 62x18 [bgcolor=#FFFFFF]
    5858                  RenderBlock (anonymous) at (8,2) size 31x13
    5959                    RenderText at (0,0) size 31x13
     
    7878              RenderBlock {DIV} at (1,1) size 66x22 [border: (2px solid #0000FF)]
    7979                RenderInline {FONT} at (0,0) size 62x13
    80                   RenderMenuList {SELECT} at (2,2) size 62x18
     80                  RenderMenuList {SELECT} at (2,2) size 62x18 [bgcolor=#FFFFFF]
    8181                    RenderBlock (anonymous) at (8,2) size 31x13
    8282                      RenderText at (0,0) size 31x13
     
    118118          RenderText {#text} at (99,0) size 6x28
    119119            text run at (99,0) width 6: " "
    120           RenderMenuList {SELECT} at (107,9) size 62x18
     120          RenderMenuList {SELECT} at (107,9) size 62x18 [bgcolor=#FFFFFF]
    121121            RenderBlock (anonymous) at (8,2) size 31x13
    122122              RenderText at (0,0) size 31x13
     
    138138        RenderText {#text} at (83,1) size 4x18
    139139          text run at (83,1) width 4: " "
    140         RenderMenuList {SELECT} at (89,2) size 62x18
     140        RenderMenuList {SELECT} at (89,2) size 62x18 [bgcolor=#FFFFFF]
    141141          RenderBlock (anonymous) at (8,2) size 31x13
    142142            RenderText at (0,0) size 31x13
     
    159159          RenderText {#text} at (74,5) size 3x13
    160160            text run at (74,5) width 3: " "
    161           RenderMenuList {SELECT} at (79,2) size 62x18
     161          RenderMenuList {SELECT} at (79,2) size 62x18 [bgcolor=#FFFFFF]
    162162            RenderBlock (anonymous) at (8,2) size 31x13
    163163              RenderText at (0,0) size 31x13
     
    187187        RenderInline {FONT} at (0,0) size 181x28
    188188          RenderText {#text} at (0,0) size 0x0
    189           RenderMenuList {SELECT} at (2,9) size 36x18
     189          RenderMenuList {SELECT} at (2,9) size 36x18 [bgcolor=#FFFFFF]
    190190          RenderText {#text} at (40,0) size 6x28
    191191            text run at (40,0) width 6: " "
    192           RenderMenuList {SELECT} at (48,9) size 36x18
     192          RenderMenuList {SELECT} at (48,9) size 36x18 [bgcolor=#FFFFFF]
    193193            RenderBlock (anonymous) at (8,2) size 5x13
    194194              RenderText at (0,0) size 5x13
     
    196196          RenderText {#text} at (86,0) size 6x28
    197197            text run at (86,0) width 6: " "
    198           RenderMenuList {SELECT} at (94,9) size 85x18
     198          RenderMenuList {SELECT} at (94,9) size 85x18 [bgcolor=#FFFFFF]
    199199            RenderBlock (anonymous) at (8,2) size 54x13
    200200              RenderText at (0,0) size 54x13
     
    202202          RenderText {#text} at (0,0) size 0x0
    203203      RenderBlock {DIV} at (0,567) size 769x22
    204         RenderMenuList {SELECT} at (2,2) size 36x18
     204        RenderMenuList {SELECT} at (2,2) size 36x18 [bgcolor=#FFFFFF]
    205205        RenderText {#text} at (40,1) size 4x18
    206206          text run at (40,1) width 4: " "
    207         RenderMenuList {SELECT} at (46,2) size 36x18
     207        RenderMenuList {SELECT} at (46,2) size 36x18 [bgcolor=#FFFFFF]
    208208          RenderBlock (anonymous) at (8,2) size 5x13
    209209            RenderText at (0,0) size 5x13
     
    211211        RenderText {#text} at (84,1) size 4x18
    212212          text run at (84,1) width 4: " "
    213         RenderMenuList {SELECT} at (90,2) size 85x18
     213        RenderMenuList {SELECT} at (90,2) size 85x18 [bgcolor=#FFFFFF]
    214214          RenderBlock (anonymous) at (8,2) size 54x13
    215215            RenderText at (0,0) size 54x13
     
    219219        RenderInline {FONT} at (0,0) size 175x13
    220220          RenderText {#text} at (0,0) size 0x0
    221           RenderMenuList {SELECT} at (2,2) size 36x18
     221          RenderMenuList {SELECT} at (2,2) size 36x18 [bgcolor=#FFFFFF]
    222222          RenderText {#text} at (40,5) size 3x13
    223223            text run at (40,5) width 3: " "
    224           RenderMenuList {SELECT} at (45,2) size 36x18
     224          RenderMenuList {SELECT} at (45,2) size 36x18 [bgcolor=#FFFFFF]
    225225            RenderBlock (anonymous) at (8,2) size 5x13
    226226              RenderText at (0,0) size 5x13
     
    228228          RenderText {#text} at (83,5) size 3x13
    229229            text run at (83,5) width 3: " "
    230           RenderMenuList {SELECT} at (88,2) size 85x18
     230          RenderMenuList {SELECT} at (88,2) size 85x18 [bgcolor=#FFFFFF]
    231231            RenderBlock (anonymous) at (8,2) size 54x13
    232232              RenderText at (0,0) size 54x13
  • trunk/LayoutTests/fast/forms/option-script-expected.txt

    r15290 r16044  
    1212        text run at (109,18) width 316: "If the popup menu says \"document.write('Text')\". "
    1313      RenderBR {BR} at (425,32) size 0x0
    14       RenderMenuList {SELECT} at (2,38) size 55x18
     14      RenderMenuList {SELECT} at (2,38) size 55x18 [bgcolor=#FFFFFF]
    1515        RenderBlock (anonymous) at (8,2) size 24x13
    1616          RenderText at (0,0) size 24x13
  • trunk/LayoutTests/fast/forms/option-text-clip-expected.txt

    r15377 r16044  
    77        text run at (0,0) width 702: "This tests that the option text is clipped properly, and doesn't spill over into the arrow part of the popup control. "
    88      RenderBR {BR} at (702,14) size 0x0
    9       RenderMenuList {SELECT} at (0,20) size 150x18
     9      RenderMenuList {SELECT} at (0,20) size 150x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 119x13
    1111          RenderText at (0,0) size 130x13
  • trunk/LayoutTests/fast/forms/select-change-listbox-to-popup-expected.txt

    r15359 r16044  
    77        text run at (0,0) width 441: "This tests that you can dynamically change a list box to a popup menu"
    88      RenderBR {BR} at (441,14) size 0x0
    9       RenderMenuList {SELECT} at (2,20) size 225x18
     9      RenderMenuList {SELECT} at (2,20) size 225x18 [bgcolor=#FFFFFF]
    1010        RenderBlock (anonymous) at (8,2) size 194x13
    1111          RenderText at (0,0) size 195x13
  • trunk/LayoutTests/fast/forms/select-selected-expected.txt

    r15453 r16044  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderMenuList {SELECT} at (2,2) size 262x18
     6      RenderMenuList {SELECT} at (2,2) size 262x18 [bgcolor=#FFFFFF]
    77        RenderBlock (anonymous) at (8,2) size 231x13
    88          RenderText at (0,0) size 166x13
  • trunk/LayoutTests/fast/forms/select-style-expected.txt

    r15316 r16044  
    88        text run at (250,0) width 308: "(Aqua for now- later, we will honor the styling). "
    99      RenderBR {BR} at (0,0) size 0x0
    10       RenderMenuList {SELECT} at (2,20) size 51x18 [bgcolor=#FF0000]
    11         RenderBlock (anonymous) at (8,2) size 20x13
     10      RenderMenuList {SELECT} at (2,20) size 51x18 [bgcolor=#FF0000] [border: (1px solid #000000)]
     11        RenderBlock (anonymous) at (9,2) size 20x13
    1212          RenderText at (0,0) size 20x13
    1313            text run at (0,0) width 20: "test"
  • trunk/LayoutTests/fast/forms/select-visual-hebrew-expected.txt

    r15600 r16044  
    1313          text run at (348,0) width 43 LTR override: "\x{5E8}\x{5D5}\x{5EA}\x{5E4}\x{5DB}"
    1414      RenderBlock (anonymous) at (0,86) size 784x22
    15         RenderMenuList {SELECT} at (2,2) size 61x18
     15        RenderMenuList {SELECT} at (2,2) size 61x18 [bgcolor=#FFFFFF]
    1616          RenderBlock (anonymous) at (8,2) size 30x13
    1717            RenderText at (0,0) size 30x13
  • trunk/LayoutTests/fast/invalid/014-expected.txt

    r15290 r16044  
    1010        RenderText {#text} at (0,0) size 0x0
    1111      RenderBlock {FORM} at (0,18) size 784x22
    12         RenderMenuList {SELECT} at (2,2) size 39x18
     12        RenderMenuList {SELECT} at (2,2) size 39x18 [bgcolor=#FFFFFF]
    1313          RenderBlock (anonymous) at (8,2) size 8x13
    1414            RenderText at (0,0) size 8x13
     
    1919  RenderBlock (positioned) {H2} at (470,45) size 47x50 [border: (2px solid #008000)]
    2020    RenderBlock {FORM} at (2,2) size 43x22
    21       RenderMenuList {SELECT} at (2,2) size 39x18
     21      RenderMenuList {SELECT} at (2,2) size 39x18 [bgcolor=#FFFFFF]
    2222        RenderBlock (anonymous) at (8,2) size 8x13
    2323          RenderText at (0,0) size 8x13
  • trunk/LayoutTests/fast/parser/document-write-option-expected.txt

    r15290 r16044  
    44  RenderBlock {HTML} at (0,0) size 800x600
    55    RenderBody {BODY} at (8,8) size 784x584
    6       RenderMenuList {SELECT} at (2,2) size 324x18
     6      RenderMenuList {SELECT} at (2,2) size 324x18 [bgcolor=#FFFFFF]
    77        RenderBlock (anonymous) at (8,2) size 293x13
    88          RenderText at (0,0) size 294x13
  • trunk/LayoutTests/fast/replaced/width100percent-expected.txt

    r15290 r16044  
    168168          RenderTableRow {TR} at (0,1) size 769x24
    169169            RenderTableCell {TD} at (1,1) size 53x24 [r=0 c=0 rs=1 cs=1]
    170               RenderMenuList {SELECT} at (1,3) size 51x18
     170              RenderMenuList {SELECT} at (1,3) size 51x18 [bgcolor=#FFFFFF]
    171171                RenderBlock (anonymous) at (8,2) size 20x13
    172172                  RenderText at (0,0) size 20x13
    173173                    text run at (0,0) width 20: "one"
    174174            RenderTableCell {TD} at (55,1) size 33x24 [r=0 c=1 rs=1 cs=1]
    175               RenderMenuList {SELECT} at (1,3) size 31x18
     175              RenderMenuList {SELECT} at (1,3) size 31x18 [bgcolor=#FFFFFF]
    176176                RenderBlock (anonymous) at (8,2) size 0x13
    177177                  RenderText at (0,0) size 20x13
    178178                    text run at (0,0) width 20: "two"
    179179            RenderTableCell {TD} at (89,1) size 33x24 [r=0 c=2 rs=1 cs=1]
    180               RenderMenuList {SELECT} at (1,3) size 31x18
     180              RenderMenuList {SELECT} at (1,3) size 31x18 [bgcolor=#FFFFFF]
    181181                RenderBlock (anonymous) at (8,2) size 0x13
    182182                  RenderText at (0,0) size 28x13
  • trunk/LayoutTests/http/tests/navigation/anchor-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/anchor-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/anchor-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/anchor-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/javascriptlink-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/javascriptlink-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/javascriptlink-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/javascriptlink-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/metaredirect-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/metaredirect-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/metaredirect-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/metaredirect-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/post-goback2-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/postredirect-goback2-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/redirect302-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/redirect302-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/redirect302-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/redirect302-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/relativeanchor-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/relativeanchor-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/relativeanchor-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/slowmetaredirect-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/slowtimerredirect-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-frames-loadsame-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/success200-loadsame-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-reload-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/success200-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/timerredirect-basic-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/timerredirect-frames-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/http/tests/navigation/timerredirect-goback-expected.txt

    r15970 r16044  
    5151          text run at (18,229) width 130: " option #2"
    5252        RenderBR {BR} at (148,258) size 0x0
    53         RenderMenuList {SELECT} at (2,268) size 255x18
     53        RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    5454          RenderBlock (anonymous) at (8,2) size 224x13
    5555            RenderText at (0,0) size 225x13
  • trunk/LayoutTests/http/tests/navigation/timerredirect-subframeload-expected.txt

    r15970 r16044  
    5757                  text run at (18,229) width 130: " option #2"
    5858                RenderBR {BR} at (148,258) size 0x0
    59                 RenderMenuList {SELECT} at (2,268) size 255x18
     59                RenderMenuList {SELECT} at (2,268) size 255x18 [bgcolor=#FFFFFF]
    6060                  RenderBlock (anonymous) at (8,2) size 224x13
    6161                    RenderText at (0,0) size 63x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug1188-expected.txt

    r15290 r16044  
    2020                RenderText {#text} at (176,3) size 4x18
    2121                  text run at (176,3) width 4: " "
    22                 RenderMenuList {SELECT} at (182,4) size 80x18
     22                RenderMenuList {SELECT} at (182,4) size 80x18 [bgcolor=#FFFFFF]
    2323                  RenderBlock (anonymous) at (8,2) size 49x13
    2424                    RenderText at (0,0) size 49x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug18359-expected.txt

    r15290 r16044  
    2929                    text run at (1,1) width 105: "Run Test Case:"
    3030              RenderTableCell {TD} at (111,29) size 467x24 [r=1 c=1 rs=1 cs=1]
    31                 RenderMenuList {SELECT} at (3,3) size 262x18
     31                RenderMenuList {SELECT} at (3,3) size 262x18 [bgcolor=#FFFFFF]
    3232                  RenderBlock (anonymous) at (8,2) size 231x13
    3333                    RenderText at (0,0) size 73x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug2479-3-expected.txt

    r15290 r16044  
    6767          RenderText {#text} at (0,2) size 263x18
    6868            text run at (0,2) width 263: "How does your browser fare on this test? "
    69           RenderMenuList {SELECT} at (265,3) size 246x18
     69          RenderMenuList {SELECT} at (265,3) size 246x18 [bgcolor=#FFFFFF]
    7070            RenderBlock (anonymous) at (8,2) size 215x13
    7171              RenderText at (0,0) size 140x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug2479-4-expected.txt

    r15290 r16044  
    185185          RenderText {#text} at (0,1) size 263x18
    186186            text run at (0,1) width 263: "How does your browser fare on this test? "
    187           RenderMenuList {SELECT} at (265,2) size 473x18
     187          RenderMenuList {SELECT} at (265,2) size 473x18 [bgcolor=#FFFFFF]
    188188            RenderBlock (anonymous) at (8,2) size 442x13
    189189              RenderText at (0,0) size 442x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug29326-expected.txt

    r15290 r16044  
    99            RenderTableCell {TD} at (2,2) size 394x42 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1010              RenderBlock {FORM} at (2,2) size 390x22
    11                 RenderMenuList {SELECT} at (2,2) size 54x18
     11                RenderMenuList {SELECT} at (2,2) size 54x18 [bgcolor=#FFFFFF]
    1212                  RenderBlock (anonymous) at (8,2) size 23x13
    1313                    RenderText at (0,0) size 23x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug33855-expected.txt

    r15290 r16044  
    3232                      text run at (0,0) width 47: "Move to:"
    3333              RenderTableCell {TD} at (666,2) size 116x24 [r=0 c=5 rs=1 cs=1]
    34                 RenderMenuList {SELECT} at (3,3) size 110x18
     34                RenderMenuList {SELECT} at (3,3) size 110x18 [bgcolor=#FFFFFF]
    3535                  RenderBlock (anonymous) at (8,2) size 79x13
    3636                    RenderText at (0,0) size 78x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug4382-expected.txt

    r15290 r16044  
    1717        RenderText {#text} at (189,2) size 4x18
    1818          text run at (189,2) width 4: " "
    19         RenderMenuList {SELECT} at (195,3) size 77x18
     19        RenderMenuList {SELECT} at (195,3) size 77x18 [bgcolor=#FFFFFF]
    2020          RenderBlock (anonymous) at (8,2) size 46x13
    2121            RenderText at (0,0) size 32x13
     
    2828        RenderBR {BR} at (264,32) size 0x0
    2929      RenderBlock {FORM} at (0,93) size 784x22
    30         RenderMenuList {SELECT} at (2,2) size 230x18
     30        RenderMenuList {SELECT} at (2,2) size 230x18 [bgcolor=#FFFFFF]
    3131          RenderBlock (anonymous) at (8,2) size 199x13
    3232            RenderText at (0,0) size 57x13
  • trunk/LayoutTests/tables/mozilla/bugs/bug96334-expected.txt

    r15290 r16044  
    3232                          RenderTableRow {TR} at (0,2) size 187x26
    3333                            RenderTableCell {TD} at (2,2) size 183x26 [border: (1px solid #C0C0C0)] [r=0 c=0 rs=1 cs=1]
    34                               RenderMenuList {SELECT} at (4,4) size 175x18
     34                              RenderMenuList {SELECT} at (4,4) size 175x18 [bgcolor=#FFFFFF]
    3535                                RenderBlock (anonymous) at (8,2) size 144x13
    3636                                  RenderText at (0,0) size 144x13
  • trunk/LayoutTests/tables/mozilla/core/margins-expected.txt

    r15290 r16044  
    1212            RenderTableCell {TD} at (2,2) size 394x42 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
    1313              RenderBlock {FORM} at (2,2) size 390x22
    14                 RenderMenuList {SELECT} at (2,2) size 54x18
     14                RenderMenuList {SELECT} at (2,2) size 54x18 [bgcolor=#FFFFFF]
    1515                  RenderBlock (anonymous) at (8,2) size 23x13
    1616                    RenderText at (0,0) size 23x13
  • trunk/LayoutTests/tables/mozilla/dom/tableDom-expected.txt

    r15290 r16044  
    55    RenderBody {BODY} at (8,8) size 784x584
    66      RenderBlock {FORM} at (0,0) size 784x23
    7         RenderMenuList {SELECT} at (2,3) size 95x18
     7        RenderMenuList {SELECT} at (2,3) size 95x18 [bgcolor=#FFFFFF]
    88          RenderBlock (anonymous) at (8,2) size 64x13
    99            RenderText at (0,0) size 62x13
  • trunk/LayoutTests/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt

    r15301 r16044  
    135135                RenderText {#text} at (0,0) size 259x18
    136136                  text run at (0,0) width 259: "How does your browser fare on this test?"
    137                 RenderMenuList {SELECT} at (2,20) size 454x18 [color=#000000]
     137                RenderMenuList {SELECT} at (2,20) size 454x18 [color=#000000] [bgcolor=#FFFFFF]
    138138                  RenderBlock (anonymous) at (8,2) size 423x13
    139139                    RenderText at (0,0) size 214x13
  • trunk/WebCore/ChangeLog

    r16043 r16044  
     12006-08-25  Adele Peterson  <adele@apple.com>
     2
     3        Reviewed by Hyatt.
     4
     5        Enable styling for popup menus. Also fixed baseline calculation for buttons and selects.
     6
     7        Tests:   fast/forms/select-baseline.html
     8                 fast/borders/borderRadiusInvalidColor.html
     9        updated: fast/forms/select-style-expected.txt and more...
     10
     11        * css/html4.css: Added style rules for styled select elements.
     12
     13        * platform/GraphicsContext.h: Added argument for antialiasing.
     14        * platform/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
     15        * platform/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::drawConvexPolygon): ditto.
     16
     17        * rendering/RenderObject.cpp:
     18        (WebCore::RenderObject::drawBorderArc): Added textColor argument so this can be used when the border color is invalid.
     19        (WebCore::RenderObject::drawBorder): Removed invalidisInvert since its dead code
     20         (any callers that set this to true were already ensuring that their color was valid).
     21         Updated drawConvexPolygon call to use FloatPoints instead of IntPoints.
     22        (WebCore::RenderObject::paintBorder): Updated to remove invalidisInvert argument from drawBorder call.
     23        (WebCore::RenderObject::paintOutline): ditto.
     24        * rendering/RenderFlow.cpp: (WebCore::RenderFlow::paintOutlineForLine): ditto.
     25        * rendering/RenderObject.h: Updated arguments for drawBorder and drawBorderArc.
     26
     27        * rendering/RenderBlock.cpp: (WebCore::RenderBlock::getBaselineOfLastLineBox): Changed isRootLineBox argument to true when setting line height.
     28          Added case for when there's no children to check for hasLineIfEmpty.
     29        * rendering/RenderBlock.h:
     30        * rendering/bidi.cpp: (WebCore::RenderBlock::layoutInlineChildren): Changed isRootLineBox argument to true when setting line height.
     31        * rendering/RenderButton.h: (WebCore::RenderButton::hasLineIfEmpty): Added so buttons always get a line height.
     32        * rendering/RenderMenuList.h: (WebCore::RenderMenuList::hasLineIfEmpty): ditto.
     33        * rendering/RenderFlexibleBox.cpp:
     34        (WebCore::RenderFlexibleBox::layoutHorizontalBox): Added code to check hasLineIfEmpty to give flex boxes line height.
     35        (WebCore::RenderFlexibleBox::layoutVerticalBox): ditto.
     36
     37        * css/cssstyleselector.cpp: (WebCore::CSSStyleSelector::adjustRenderStyle): Moved the appearance adjustment code into adjust style.
     38        * rendering/RenderBox.cpp: (WebCore::RenderBox::paintBoxDecorations): Lets the theme paint "decorations", like the arrow control and gradients
     39         immediately after painting the background.
     40
     41        * rendering/RenderTheme.cpp:
     42        (WebCore::RenderTheme::adjustStyle): This now checks whether the control is styled, and adjusts the appearance property appropriately.
     43        For styled selects, instead of setting the appearance to none, which is what we do for other styled controls, we set the appearance
     44        to MenulistButtonAppearance, which indicates that we will draw the arrow controls and button appearance in the engine.
     45        (WebCore::RenderTheme::paintDecorations): Added. Paints MenulistButtonAppearance in a different function,
     46         so the arrow control will draw at the right time (after the background).
     47        (WebCore::RenderTheme::paint): Added case for MenulistButtonAppearance.
     48        (WebCore::RenderTheme::paintBorderOnly): ditto.
     49        (WebCore::RenderTheme::isControlContainer): Removed cases for MenuListAppearance and MenulistButtonAppearance since the baseline is no longer provided by the theme.
     50        (WebCore::RenderTheme::adjustMenuListButtonStyle): Added.
     51        * rendering/RenderTheme.h: (WebCore::RenderTheme::paintMenuListButton): Added.
     52
     53        * rendering/RenderThemeMac.h:
     54        * rendering/RenderThemeMac.mm:
     55        (WebCore::RenderThemeMac::isControlStyled): Removed code that made selects unstyle-able.
     56        (WebCore::RenderThemeMac::baselinePosition): Removed cases for MenuListAppearance and MenulistButtonAppearance.
     57        (WebCore::RenderThemeMac::popupButtonPadding): Added top and bottom padding so empty popups have the right baseline.
     58        (WebCore::TopGradientInterpolate): Added.
     59        (WebCore::BottomGradientInterpolate): Added.
     60        (WebCore::MainGradientInterpolate): Added.
     61        (WebCore::RenderThemeMac::paintMenuListButtonGradients): Added.  Draws gradients for styled popup menu button appearance.
     62        (WebCore::RenderThemeMac::paintMenuListButton): Calls paintMenuListButtonGradients, and draws arrow control.
     63        (WebCore::RenderThemeMac::adjustMenuListButtonStyle): Added to set padding and border radius to account for the arrow control size and font size.
     64
    1652006-08-25  Brady Eidson  <beidson@apple.com>
    266
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r16026 r16044  
    64636463                        isa = PBXProject;
    64646464                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
    6465                         compatibilityVersion = "Xcode 2.4";
    64666465                        hasScannedForEncodings = 1;
    64676466                        knownRegions = (
     
    64776476                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
    64786477                        projectDirPath = "";
    6479                         projectRoot = "";
    6480                         shouldCheckCompatibility = 1;
    64816478                        targets = (
    64826479                                93F198A508245E59001E9ABC /* WebCore */,
  • trunk/WebCore/css/cssstyleselector.cpp

    r16028 r16044  
    10801080
    10811081    // Let the theme also have a crack at adjusting the style.
    1082     if (style->hasAppearance()) {
    1083         if (m_hasUAAppearance && theme()->isControlStyled(style, m_borderData, m_backgroundData, m_backgroundColor))
    1084             style->setAppearance(NoAppearance);
    1085         else
    1086             theme()->adjustStyle(this, style, e);
    1087     }
     1082    if (style->hasAppearance())
     1083        theme()->adjustStyle(this, style, e, m_hasUAAppearance, m_borderData, m_backgroundData, m_backgroundColor);
    10881084   
    10891085#ifdef SVG_SUPPORT
  • trunk/WebCore/css/html4.css

    r15888 r16044  
    368368}
    369369
    370 input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, button:disabled {
     370input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled, button:disabled, select:disabled {
    371371    color: GrayText
    372372}
     
    403403    -webkit-box-align: center;
    404404    -webkit-rtl-ordering: logical;
     405    color: black;
     406    border: 1px solid;
     407    -webkit-border-radius: 5px;
     408    background-color: white;
     409    white-space: pre;
    405410}
    406411
     
    408413select[multiple],
    409414select[size][multiple] {
     415    // FIXME: When converting the list box implementation, remove these.
    410416    -webkit-appearance: none;
    411417    -webkit-box-align: initial;
    412418    box-sizing: initial;
     419    color: initial;
     420    border: initial;
     421    background-color: initial;
    413422}
    414423 
     
    418427    box-sizing: border-box;
    419428    -webkit-box-align: center;
     429    color: black;
     430    border: 1px solid;
     431    -webkit-border-radius: 5px;
     432    background-color: white;
    420433}
    421434
  • trunk/WebCore/platform/GraphicsContext.h

    r15999 r16044  
    9494        void drawEllipse(const IntRect&);
    9595        void drawArc(const IntRect&, float thickness, int startAngle, int angleSpan);
    96         void drawConvexPolygon(size_t numPoints, const IntPoint*);
     96        void drawConvexPolygon(size_t numPoints, const FloatPoint*, bool shouldAntialias = false);
    9797
    9898        void fillRect(const IntRect&, const Color&);
  • trunk/WebCore/platform/cairo/GraphicsContextCairo.cpp

    r15999 r16044  
    318318}
    319319
    320 void GraphicsContext::drawConvexPolygon(size_t npoints, const IntPoint* points)
     320void GraphicsContext::drawConvexPolygon(size_t npoints, const IntPoint* points, bool shouldAntialias)
    321321{
    322322    if (paintingDisabled())
     
    329329
    330330    cairo_save(context);
    331     cairo_set_antialias(context, CAIRO_ANTIALIAS_NONE);
     331    cairo_set_antialias(context, shouldAntialias ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE);
    332332    cairo_move_to(context, points[0].x(), points[0].y());
    333333    for (size_t i = 1; i < npoints; i++)
  • trunk/WebCore/platform/cg/GraphicsContextCG.cpp

    r15999 r16044  
    387387}
    388388
    389 void GraphicsContext::drawConvexPolygon(size_t npoints, const IntPoint* points)
     389void GraphicsContext::drawConvexPolygon(size_t npoints, const FloatPoint* points, bool shouldAntialias)
    390390{
    391391    if (paintingDisabled())
     
    399399    CGContextSaveGState(context);
    400400
    401     CGContextSetShouldAntialias(context, false);
     401    CGContextSetShouldAntialias(context, shouldAntialias);
    402402   
    403403    CGContextBeginPath(context);
  • trunk/WebCore/rendering/RenderBlock.cpp

    r15807 r16044  
    33323332    if (childrenInline()) {
    33333333        if (!firstLineBox() && hasLineIfEmpty())
    3334             return RenderFlow::baselinePosition(true) + borderTop() + paddingTop();
     3334            return RenderFlow::baselinePosition(true, true) + borderTop() + paddingTop();
    33353335        if (m_lastLineBox)
    33363336            return m_lastLineBox->yPos() + m_lastLineBox->baseline();
     
    33383338    }
    33393339    else {
     3340        bool haveNormalFlowChild = false;
    33403341        for (RenderObject* curr = lastChild(); curr; curr = curr->previousSibling()) {
    33413342            if (!curr->isFloatingOrPositioned()) {
     3343                haveNormalFlowChild = true;
    33423344                int result = curr->getBaselineOfLastLineBox();
    33433345                if (result != -1)
     
    33453347            }
    33463348        }
     3349        if (!haveNormalFlowChild && hasLineIfEmpty())
     3350            return RenderFlow::baselinePosition(true, true) + borderTop() + paddingTop();
    33473351    }
    33483352
  • trunk/WebCore/rendering/RenderBlock.h

    r15781 r16044  
    279279protected:
    280280    void newLine();
     281    virtual bool hasLineIfEmpty() const;
    281282
    282283private:
    283284    Position positionForBox(InlineBox *box, bool start=true) const;
    284285    Position positionForRenderer(RenderObject *renderer, bool start=true) const;
    285    
    286     bool hasLineIfEmpty() const;
    287    
     286       
    288287protected:
    289288    struct FloatingObject {
  • trunk/WebCore/rendering/RenderBox.cpp

    r16027 r16044  
    369369        if (!isBody() || !document()->isHTMLDocument() || document()->documentElement()->renderer()->style()->hasBackground())
    370370            paintBackgrounds(i.p, style()->backgroundColor(), style()->backgroundLayers(), my, mh, _tx, _ty, w, h);
     371        if (style()->hasAppearance())
     372            theme()->paintDecorations(this, i, IntRect(_tx, _ty, w, h));
    371373    }
    372374   
  • trunk/WebCore/rendering/RenderButton.h

    r15079 r16044  
    5151
    5252protected:
     53    virtual bool hasLineIfEmpty() const { return true; }
     54
    5355    RenderText* m_buttonText;
    5456    RenderBlock* m_inner;
  • trunk/WebCore/rendering/RenderFlexibleBox.cpp

    r15582 r16044  
    285285    else
    286286        layoutVerticalBox(relayoutChildren);
    287    
     287
    288288    int oldHeight = m_height;
    289289    calcHeight();
     
    419419            child = iterator.next();
    420420        }
     421       
     422        if (!iterator.first() && hasLineIfEmpty())
     423            m_height += lineHeight(true, true);
     424       
    421425        m_height += toAdd;
    422426
     
    874878
    875879        yPos = m_height;
     880       
     881        if (!iterator.first() && hasLineIfEmpty())
     882            m_height += lineHeight(true, true);
     883   
    876884        m_height += toAdd;
    877885
     
    10441052    // a height change, we revert our height back to the intrinsic height before returning.
    10451053    if (heightSpecified)
    1046         m_height = oldHeight;    
     1054        m_height = oldHeight;
    10471055}
    10481056
  • trunk/WebCore/rendering/RenderFlow.cpp

    r15286 r16044  
    743743               oc, style()->color(), os,
    744744               (lastline.isEmpty() || thisline.x() < lastline.x() || (lastline.right() - 1) <= thisline.x() ? ow : -ow),
    745                (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.right() - 1) <= thisline.x() ? ow : -ow),
    746                true);
     745               (nextline.isEmpty() || thisline.x() <= nextline.x() || (nextline.right() - 1) <= thisline.x() ? ow : -ow));
    747746   
    748747    // right edge
     
    755754               oc, style()->color(), os,
    756755               (lastline.isEmpty() || lastline.right() < thisline.right() || (thisline.right() - 1) <= lastline.x() ? ow : -ow),
    757                (nextline.isEmpty() || nextline.right() <= thisline.right() || (thisline.right() - 1) <= nextline.x() ? ow : -ow),
    758                true);
     756               (nextline.isEmpty() || nextline.right() <= thisline.right() || (thisline.right() - 1) <= nextline.x() ? ow : -ow));
    759757    // upper edge
    760758    if (thisline.x() < lastline.x())
     
    766764                   BSTop, oc, style()->color(), os,
    767765                   ow,
    768                    (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow,
    769                    true);
     766                   (!lastline.isEmpty() && tx + lastline.x() + 1 < r + ow) ? -ow : ow);
    770767   
    771768    if (lastline.right() < thisline.right())
     
    777774                   BSTop, oc, style()->color(), os,
    778775                   (!lastline.isEmpty() && l - ow < tx + lastline.right()) ? -ow : ow,
    779                    ow,
    780                    true);
     776                   ow);
    781777   
    782778    // lower edge
     
    789785                   BSBottom, oc, style()->color(), os,
    790786                   ow,
    791                    (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow,
    792                    true);
     787                   (!nextline.isEmpty() && tx + nextline.x() + 1 < r + ow) ? -ow : ow);
    793788   
    794789    if (nextline.right() < thisline.right())
     
    800795                   BSBottom, oc, style()->color(), os,
    801796                   (!nextline.isEmpty() && l - ow < tx + nextline.right()) ? -ow : ow,
    802                    ow,
    803                    true);
    804 }
    805 
    806 }
     797                   ow);
     798}
     799
     800}
  • trunk/WebCore/rendering/RenderMenuList.h

    r15991 r16044  
    6262    String text();
    6363
     64protected:
     65    virtual bool hasLineIfEmpty() const { return true; }
     66
    6467private:
    6568    void createInnerBlock();
  • trunk/WebCore/rendering/RenderObject.cpp

    r16028 r16044  
    812812
    813813void RenderObject::drawBorderArc(GraphicsContext* p, int x, int y, float thickness, IntSize radius, int angleStart,
    814     int angleSpan, BorderSide s, Color c, EBorderStyle style, bool firstCorner)
     814    int angleSpan, BorderSide s, Color c, const Color& textColor, EBorderStyle style, bool firstCorner)
    815815{
    816816    if ((style == DOUBLE && ((thickness / 2) < 3)) ||
    817817        ((style == RIDGE || style == GROOVE) && ((thickness / 2) < 2)))
    818818        style = SOLID;
     819   
     820    if (!c.isValid()) {
     821        if (style == INSET || style == OUTSET || style == RIDGE || style == GROOVE)
     822            c.setRGB(238, 238, 238);
     823        else
     824            c = textColor;
     825    }
    819826   
    820827    switch (style) {
     
    897904void RenderObject::drawBorder(GraphicsContext* p, int x1, int y1, int x2, int y2,
    898905                              BorderSide s, Color c, const Color& textcolor, EBorderStyle style,
    899                               int adjbw1, int adjbw2, bool invalidisInvert)
     906                              int adjbw1, int adjbw2)
    900907{
    901908    int width = (s == BSTop || s == BSBottom ? y2 - y1 : x2 - x1);
     
    905912
    906913    if (!c.isValid()) {
    907         if (invalidisInvert)
    908             // FIXME: The original KHTML did XOR here -- what do we want to do instead?
    909             c = Color::white;
    910         else {
    911             if (style == INSET || style == OUTSET || style == RIDGE || style == GROOVE)
    912                 c.setRGB(238, 238, 238);
    913             else
    914                 c = textcolor;
    915         }
     914        if (style == INSET || style == OUTSET || style == RIDGE || style == GROOVE)
     915            c.setRGB(238, 238, 238);
     916        else
     917            c = textcolor;
    916918    }
    917919
     
    10731075            return;
    10741076        }
    1075         IntPoint quad[4];
     1077        FloatPoint quad[4];
    10761078        switch (s) {
    10771079            case BSTop:
    1078                 quad[0] = IntPoint(x1 + max(-adjbw1, 0), y1);
    1079                 quad[1] = IntPoint(x1 + max( adjbw1, 0), y2);
    1080                 quad[2] = IntPoint(x2 - max( adjbw2, 0), y2);
    1081                 quad[3] = IntPoint(x2 - max(-adjbw2, 0), y1);
     1080                quad[0] = FloatPoint(x1 + max(-adjbw1, 0), y1);
     1081                quad[1] = FloatPoint(x1 + max( adjbw1, 0), y2);
     1082                quad[2] = FloatPoint(x2 - max( adjbw2, 0), y2);
     1083                quad[3] = FloatPoint(x2 - max(-adjbw2, 0), y1);
    10821084                break;
    10831085            case BSBottom:
    1084                 quad[0] = IntPoint(x1 + max( adjbw1, 0), y1);
    1085                 quad[1] = IntPoint(x1 + max(-adjbw1, 0), y2);
    1086                 quad[2] = IntPoint(x2 - max(-adjbw2, 0), y2);
    1087                 quad[3] = IntPoint(x2 - max( adjbw2, 0), y1);
     1086                quad[0] = FloatPoint(x1 + max( adjbw1, 0), y1);
     1087                quad[1] = FloatPoint(x1 + max(-adjbw1, 0), y2);
     1088                quad[2] = FloatPoint(x2 - max(-adjbw2, 0), y2);
     1089                quad[3] = FloatPoint(x2 - max( adjbw2, 0), y1);
    10881090                break;
    10891091            case BSLeft:
    1090                 quad[0] = IntPoint(x1, y1 + max(-adjbw1, 0));
    1091                 quad[1] = IntPoint(x1, y2 - max(-adjbw2, 0));
    1092                 quad[2] = IntPoint(x2, y2 - max( adjbw2, 0));
    1093                 quad[3] = IntPoint(x2, y1 + max( adjbw1, 0));
     1092                quad[0] = FloatPoint(x1, y1 + max(-adjbw1, 0));
     1093                quad[1] = FloatPoint(x1, y2 - max(-adjbw2, 0));
     1094                quad[2] = FloatPoint(x2, y2 - max( adjbw2, 0));
     1095                quad[3] = FloatPoint(x2, y1 + max( adjbw1, 0));
    10941096                break;
    10951097            case BSRight:
    1096                 quad[0] = IntPoint(x1, y1 + max( adjbw1, 0));
    1097                 quad[1] = IntPoint(x1, y2 - max( adjbw2, 0));
    1098                 quad[2] = IntPoint(x2, y2 - max(-adjbw2, 0));
    1099                 quad[3] = IntPoint(x2, y1 + max(-adjbw1, 0));
     1098                quad[0] = FloatPoint(x1, y1 + max( adjbw1, 0));
     1099                quad[1] = FloatPoint(x1, y2 - max( adjbw2, 0));
     1100                quad[2] = FloatPoint(x2, y2 - max(-adjbw2, 0));
     1101                quad[3] = FloatPoint(x2, y1 + max(-adjbw1, 0));
    11001102                break;
    11011103        }
     
    13241326            // Draw upper left arc
    13251327            drawBorderArc(p, leftX, leftY, thickness, topLeft, firstAngleStart, firstAngleSpan,
    1326                 BSTop, tc, ts, true);
     1328                BSTop, tc, style->color(), ts, true);
    13271329            if (applyLeftInnerClip)
    13281330                p->restore();
     
    13391341            // Draw upper right arc
    13401342            drawBorderArc(p, rightX, leftY, thickness, topRight, secondAngleStart, secondAngleSpan,
    1341                 BSTop, tc, ts, false);
     1343                BSTop, tc, style->color(), ts, false);
    13421344            if (applyRightInnerClip)
    13431345                p->restore();
     
    13941396            // Draw lower left arc
    13951397            drawBorderArc(p, leftX, leftY, thickness, bottomLeft, firstAngleStart, firstAngleSpan,
    1396                 BSBottom, bc, bs, true);
     1398                BSBottom, bc, style->color(), bs, true);
    13971399            if (applyLeftInnerClip)
    13981400                p->restore();
     
    14091411            // Draw lower right arc
    14101412            drawBorderArc(p, rightX, leftY, thickness, bottomRight, secondAngleStart, secondAngleSpan,
    1411                 BSBottom, bc, bs, false);
     1413                BSBottom, bc, style->color(), bs, false);
    14121414            if (applyRightInnerClip)
    14131415                p->restore();
     
    14571459            // Draw top left arc
    14581460            drawBorderArc(p, topX, topY, thickness, topLeft, firstAngleStart, firstAngleSpan,
    1459                 BSLeft, lc, ls, true);
     1461                BSLeft, lc, style->color(), ls, true);
    14601462            if (applyTopInnerClip)
    14611463                p->restore();
     
    14721474            // Draw bottom left arc
    14731475            drawBorderArc(p, topX, bottomY, thickness, bottomLeft, secondAngleStart, secondAngleSpan,
    1474                 BSLeft, lc, ls, false);
     1476                BSLeft, lc, style->color(), ls, false);
    14751477            if (applyBottomInnerClip)
    14761478                p->restore();
     
    15201522            // Draw top right arc
    15211523            drawBorderArc(p, topX, topY, thickness, topRight, firstAngleStart, firstAngleSpan,
    1522                 BSRight, rc, rs, true);
     1524                BSRight, rc, style->color(), rs, true);
    15231525            if (applyTopInnerClip)
    15241526                p->restore();
     
    15351537            // Draw bottom right arc
    15361538            drawBorderArc(p, topX, bottomY, thickness, bottomRight, secondAngleStart, secondAngleSpan,
    1537                 BSRight, rc, rs, false);
     1539                BSRight, rc, style->color(), rs, false);
    15381540            if (applyBottomInnerClip)
    15391541                p->restore();
     
    16481650    drawBorder(p, _tx-ow, _ty-ow, _tx, _ty+h+ow, BSLeft,
    16491651               Color(oc), style->color(),
    1650                os, ow, ow, true);
     1652               os, ow, ow);
    16511653
    16521654    drawBorder(p, _tx-ow, _ty-ow, _tx+w+ow, _ty, BSTop,
    16531655               Color(oc), style->color(),
    1654                os, ow, ow, true);
     1656               os, ow, ow);
    16551657
    16561658    drawBorder(p, _tx+w, _ty-ow, _tx+w+ow, _ty+h+ow, BSRight,
    16571659               Color(oc), style->color(),
    1658                os, ow, ow, true);
     1660               os, ow, ow);
    16591661
    16601662    drawBorder(p, _tx-ow, _ty+h, _tx+w+ow, _ty+h+ow, BSBottom,
    16611663               Color(oc), style->color(),
    1662                os, ow, ow, true);
     1664               os, ow, ow);
    16631665
    16641666}
  • trunk/WebCore/rendering/RenderObject.h

    r15930 r16044  
    703703    };
    704704    void drawBorderArc(GraphicsContext*, int x, int y, float thickness, IntSize radius, int angleStart,
    705         int angleSpan, BorderSide, Color, EBorderStyle, bool firstCorner);
     705        int angleSpan, BorderSide, Color, const Color& textcolor, EBorderStyle, bool firstCorner);
    706706    void drawBorder(GraphicsContext*, int x1, int y1, int x2, int y2, BorderSide,
    707         Color, const Color& textcolor, EBorderStyle, int adjbw1, int adjbw2, bool invalidisInvert = false);
     707        Color, const Color& textcolor, EBorderStyle, int adjbw1, int adjbw2);
    708708
    709709    virtual void setTable(RenderTable*) {};
  • trunk/WebCore/rendering/RenderTheme.cpp

    r15290 r16044  
    3636using namespace HTMLNames;
    3737
    38 void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e)
    39 {
     38void RenderTheme::adjustStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e,
     39                              bool UAHasAppearance, const BorderData& border, const BackgroundLayer& background, const Color& backgroundColor)
     40{
     41
    4042    // Force inline and table display styles to be inline-block (except for table- which is block)
    4143    if (style->display() == INLINE || style->display() == INLINE_TABLE || style->display() == TABLE_ROW_GROUP ||
     
    4749        style->setDisplay(BLOCK);
    4850   
     51    if (UAHasAppearance && theme()->isControlStyled(style, border, background, backgroundColor)) {
     52        if (style->appearance() == MenulistAppearance)
     53            style->setAppearance(MenulistButtonAppearance);
     54        else
     55            style->setAppearance(NoAppearance);
     56    }
     57
    4958    // Call the appropriate style adjustment method based off the appearance value.
    5059    switch (style->appearance()) {
     
    6372        case MenulistAppearance:
    6473            return adjustMenuListStyle(selector, style, e);
     74        case MenulistButtonAppearance:
     75            return adjustMenuListButtonStyle(selector, style, e);
    6576        default:
    6677            break;
     
    93104        case MenulistAppearance:
    94105            return paintMenuList(o, i, r);
     106        case MenulistButtonAppearance:
    95107        case TextFieldAppearance:
    96108        case TextAreaAppearance:
     
    114126        case TextAreaAppearance:
    115127            return paintTextArea(o, i, r);
     128        case MenulistButtonAppearance:
     129            return true;
     130        case CheckboxAppearance:
     131        case RadioAppearance:
     132        case PushButtonAppearance:
     133        case SquareButtonAppearance:
     134        case ButtonAppearance:
     135        case MenulistAppearance:
     136        default:
     137            break;
     138    }
     139   
     140    return false;
     141}
     142
     143bool RenderTheme::paintDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
     144{
     145    if (i.p->paintingDisabled())
     146        return false;
     147       
     148    // Call the appropriate paint method based off the appearance value.
     149    switch (o->style()->appearance()) {
     150        case MenulistButtonAppearance:
     151            return paintMenuListButton(o, i, r);
     152        case TextFieldAppearance:
     153        case TextAreaAppearance:
    116154        case CheckboxAppearance:
    117155        case RadioAppearance:
     
    174212    // There are more leaves than this, but we'll patch this function as we add support for
    175213    // more controls.
    176     return appearance != CheckboxAppearance && appearance != RadioAppearance && appearance != MenulistAppearance;
     214    return appearance != CheckboxAppearance && appearance != RadioAppearance;
    177215}
    178216
     
    317355}
    318356
    319 }
     357void RenderTheme::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
     358{
     359}
     360
     361}
  • trunk/WebCore/rendering/RenderTheme.h

    r15888 r16044  
    4444    // selection of control size based off the font, the disabling of appearance when certain other properties like
    4545    // "border" are set, or if the appearance is not supported by the theme.
    46     void adjustStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e);
     46    void adjustStyle(CSSStyleSelector*, RenderStyle*, Element*,
     47                    bool UAHasAppearance, const BorderData&, const BackgroundLayer&, const Color& backgroundColor);
    4748   
    4849    // This method is called to paint the widget as a background of the RenderObject.  A widget's foreground, e.g., the
     
    5152    bool paint(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
    5253    bool paintBorderOnly(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
     54    bool paintDecorations(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r);
    5355
    5456    // The remaining methods should be implemented by the platform-specific portion of the theme, e.g.,
     
    140142    virtual bool paintMenuList(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
    141143
     144    virtual void adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const;
     145    virtual bool paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r) { return true; }
    142146};
    143147
  • trunk/WebCore/rendering/RenderThemeMac.h

    r15888 r16044  
    8484    virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
    8585
     86    virtual bool paintMenuListButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
     87    virtual void adjustMenuListButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
     88   
    8689private:
    8790    IntRect inflateRect(const IntRect&, const IntSize&, const int* margins) const;
     
    120123    const int* popupButtonMargins() const;
    121124    const int* popupButtonPadding(NSControlSize) const;
     125    void paintMenuListButtonGradients(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
    122126
    123127private:
  • trunk/WebCore/rendering/RenderThemeMac.mm

    r15888 r16044  
    145145    if (style->appearance() == TextFieldAppearance || style->appearance() == TextAreaAppearance)
    146146        return style->border() != border;
    147     // FIXME: We should allow menulists to be styled- but not until we have a good design for styled popups.
    148     if (style->appearance() == MenulistAppearance)
    149         return false;
    150147    return RenderTheme::isControlStyled(style, border, background, backgroundColor);
    151148}
     
    266263    if (o->style()->appearance() == CheckboxAppearance || o->style()->appearance() == RadioAppearance)
    267264        return o->marginTop() + o->height() - 2; // The baseline is 2px up from the bottom of the checkbox/radio in AppKit.
    268     if (o->style()->appearance() == MenulistAppearance)
    269         return o->marginTop() + o->height() - 5; // This is to match AppKit.  There might be a better way to calculate this though.
    270265    return RenderTheme::baselinePosition(o);
    271266}
     
    679674    static const int padding[3][4] =
    680675    {
    681         { 0, 26, 0, 8 },
    682         { 0, 23, 0, 8 },
    683         { 0, 22, 0, 10 }
     676        { 2, 26, 3, 8 },
     677        { 2, 23, 3, 8 },
     678        { 2, 22, 3, 10 }
    684679    };
    685680    return padding[size];
     
    710705}
    711706
     707const float baseFontSize = 11.0;
     708const float baseArrowHeight = 4.0;
     709const float baseArrowWidth = 5.0;
     710const float baseSpaceBetweenArrows = 2.0;
     711const int arrowPaddingLeft = 6;
     712const int arrowPaddingRight = 6;
     713const int paddingBeforeSeparator = 4;
     714const int baseBorderRadius = 5;
     715const int styledPopupPaddingLeft = 8;
     716const int styledPopupPaddingTop = 1;
     717const int styledPopupPaddingBottom = 2;
     718
     719static void TopGradientInterpolate( void *info, float const *inData, float *outData )
     720{
     721    static float dark[4] = { 1, 1, 1, 0.4 };
     722    static float light[4] = { 1, 1, 1, 0.15 };
     723    float a = inData[0];
     724    int i = 0;
     725    for( i = 0; i < 4; i++ )
     726        outData[i] = ( 1.0 - a ) * dark[i] + a * light[i];
     727}
     728
     729static void BottomGradientInterpolate( void *info, float const *inData, float *outData )
     730{
     731    static float dark[4] = { 1, 1, 1, 0 };
     732    static float light[4] = { 1, 1, 1, 0.3 };
     733    float a = inData[0];
     734    int i = 0;
     735    for( i = 0; i < 4; i++ )
     736        outData[i] = ( 1.0 - a ) * dark[i] + a * light[i];
     737}
     738
     739static void MainGradientInterpolate( void *info, float const *inData, float *outData )
     740{
     741    static float dark[4] = { 0, 0, 0, 0.15 };
     742    static float light[4] = { 0, 0, 0, 0 };
     743    float a = inData[0];
     744    int i = 0;
     745    for( i = 0; i < 4; i++ )
     746        outData[i] = ( 1.0 - a ) * dark[i] + a * light[i];
     747}
     748
     749void RenderThemeMac::paintMenuListButtonGradients(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
     750{
     751    CGContextRef context = i.p->platformContext();
     752       
     753    i.p->save();
     754
     755    int radius = o->style()->borderTopLeftRadius().width();
     756   
     757    CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();   
     758
     759    IntRect topGradient(r.x(), r.y(), r.width(), r.height() / 2.0);
     760    struct CGFunctionCallbacks topCallbacks = { 0, TopGradientInterpolate, NULL };
     761    CGFunctionRef topFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &topCallbacks );
     762    CGShadingRef topShading = CGShadingCreateAxial( cspace, CGPointMake(topGradient.x(),  topGradient.y()),
     763                            CGPointMake(topGradient.x(), topGradient.bottom()), topFunction, false, false );
     764
     765    IntRect bottomGradient(r.x() + radius, r.y() + r.height() / 2.0, r.width() - 2 * radius, r.height() / 2.0);
     766    struct CGFunctionCallbacks bottomCallbacks = { 0, BottomGradientInterpolate, NULL };
     767    CGFunctionRef bottomFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &bottomCallbacks );
     768    CGShadingRef bottomShading = CGShadingCreateAxial( cspace, CGPointMake(bottomGradient.x(),  bottomGradient.y()),
     769                            CGPointMake(bottomGradient.x(), bottomGradient.bottom()), bottomFunction, false, false );
     770
     771    struct CGFunctionCallbacks mainCallbacks = { 0, MainGradientInterpolate, NULL };
     772    CGFunctionRef mainFunction = CGFunctionCreate( NULL, 1, NULL, 4, NULL, &mainCallbacks );
     773    CGShadingRef mainShading = CGShadingCreateAxial( cspace, CGPointMake(r.x(),  r.y()),
     774                            CGPointMake(r.x(), r.bottom()), mainFunction, false, false );
     775
     776    CGShadingRef leftShading = CGShadingCreateAxial( cspace, CGPointMake(r.x(),  r.y()),
     777                            CGPointMake(r.x() + radius, r.y()), mainFunction, false, false );                       
     778
     779    CGShadingRef rightShading = CGShadingCreateAxial( cspace, CGPointMake(r.right(),  r.y()),
     780                            CGPointMake(r.right() - radius, r.y()), mainFunction, false, false );                             
     781    i.p->save();
     782    CGContextClipToRect(context, r);
     783    i.p->addRoundedRectClip(r,
     784        o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
     785        o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     786    CGContextDrawShading(context, mainShading); 
     787    i.p->restore();     
     788
     789    i.p->save();
     790    CGContextClipToRect(context, topGradient);
     791    i.p->addRoundedRectClip(topGradient,
     792        o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
     793        IntSize(), IntSize());
     794    CGContextDrawShading(context, topShading); 
     795    i.p->restore();     
     796
     797    i.p->save();
     798    CGContextClipToRect(context, bottomGradient);
     799    i.p->addRoundedRectClip(bottomGradient,
     800        IntSize(), IntSize(),
     801        o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     802    CGContextDrawShading(context, bottomShading);
     803    i.p->restore();
     804   
     805    i.p->save();
     806    CGContextClipToRect(context, r);
     807    i.p->addRoundedRectClip(r,
     808        o->style()->borderTopLeftRadius(), o->style()->borderTopRightRadius(),
     809        o->style()->borderBottomLeftRadius(), o->style()->borderBottomRightRadius());
     810    CGContextDrawShading(context, leftShading);
     811    CGContextDrawShading(context, rightShading);
     812    i.p->restore();
     813   
     814    i.p->restore();
     815}
     816
     817bool RenderThemeMac::paintMenuListButton(RenderObject* o, const RenderObject::PaintInfo& i, const IntRect& r)
     818{       
     819    i.p->save();
     820       
     821    IntRect bounds = IntRect(r.x() + o->style()->borderLeftWidth(),
     822                             r.y() + o->style()->borderTopWidth(),
     823                             r.width() - o->style()->borderLeftWidth() - o->style()->borderRightWidth(),
     824                             r.height() - o->style()->borderTopWidth() - o->style()->borderBottomWidth());
     825    // Draw the gradients to give the styled popup menu a button appearance
     826    paintMenuListButtonGradients(o, i, bounds);
     827               
     828    float fontScale = o->style()->fontSize() / baseFontSize;
     829    float centerY = bounds.y() + bounds.height() / 2.0;
     830    float arrowHeight = baseArrowHeight * fontScale;
     831    float arrowWidth = baseArrowWidth * fontScale;   
     832    float leftEdge = bounds.right() - arrowPaddingRight - arrowWidth;
     833    float spaceBetweenArrows = baseSpaceBetweenArrows * fontScale;
     834   
     835    i.p->setFillColor(o->style()->color());
     836    i.p->setPen(Pen(o->style()->color()));
     837   
     838    FloatPoint arrow1[3];
     839    arrow1[0] = FloatPoint(leftEdge, centerY - spaceBetweenArrows / 2.0);
     840    arrow1[1] = FloatPoint(leftEdge + arrowWidth, centerY - spaceBetweenArrows / 2.0);
     841    arrow1[2] = FloatPoint(leftEdge + arrowWidth / 2.0, centerY - spaceBetweenArrows / 2.0 - arrowHeight);
     842
     843    // Draw the top arrow
     844    i.p->drawConvexPolygon(3, arrow1, true);
     845
     846    FloatPoint arrow2[3];
     847    arrow2[0] = FloatPoint(leftEdge, centerY + spaceBetweenArrows / 2.0);
     848    arrow2[1] = FloatPoint(leftEdge + arrowWidth, centerY + spaceBetweenArrows / 2.0);
     849    arrow2[2] = FloatPoint(leftEdge + arrowWidth / 2.0, centerY + spaceBetweenArrows / 2.0 + arrowHeight);   
     850   
     851    // Draw the bottom arrow
     852    i.p->drawConvexPolygon(3, arrow2, true);
     853   
     854    Color leftSeparatorColor(0, 0, 0, 40);
     855    Color rightSeparatorColor(255, 255, 255, 40);
     856    int separatorSpace = 2;
     857    int leftEdgeOfSeparator = leftEdge - arrowPaddingLeft;
     858   
     859    // Draw the separator to the left of the arrows
     860    i.p->setPen(Pen(leftSeparatorColor));
     861    i.p->drawLine(IntPoint(leftEdgeOfSeparator, bounds.y()), IntPoint(leftEdgeOfSeparator, bounds.bottom()));
     862
     863    i.p->setPen(Pen(rightSeparatorColor));
     864    i.p->drawLine(IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.y()), IntPoint(leftEdgeOfSeparator + separatorSpace, bounds.bottom()));
     865
     866    i.p->restore();
     867    return false;
     868}
     869
    712870void RenderThemeMac::adjustMenuListStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
    713871{
     
    738896    // system font for the control size instead.
    739897    setFontFromControlSize(selector, style, controlSize);
     898}
     899
     900void RenderThemeMac::adjustMenuListButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
     901{
     902    // Add in intrinsic margins if the font size isn't too small
     903    if (style->fontSize() >= 11)
     904        addIntrinsicMargins(style, NSRegularControlSize);
     905       
     906    float fontScale = style->fontSize() / baseFontSize;
     907    float arrowWidth = baseArrowWidth * fontScale;
     908   
     909    // We're overriding the padding to allow for the arrow control.  WinIE doesn't honor padding on selects, so
     910    // this shouldn't cause problems on the web.  If IE7 changes that, we should reconsider this.
     911    style->setPaddingLeft(Length(styledPopupPaddingLeft, Fixed));
     912    style->setPaddingRight(Length(arrowWidth + arrowPaddingLeft + arrowPaddingRight + paddingBeforeSeparator, Fixed));
     913    style->setPaddingTop(Length(styledPopupPaddingTop, Fixed));
     914    style->setPaddingBottom(Length(styledPopupPaddingBottom, Fixed));
     915   
     916    if (style->hasBorderRadius()) {
     917        style->setBorderRadius(IntSize(baseBorderRadius + fontScale - 1, baseBorderRadius + fontScale - 1));
     918    }
     919   
     920    const int minHeight = 15;
     921    style->setMinHeight(Length(minHeight, Fixed));
    740922}
    741923
  • trunk/WebCore/rendering/bidi.cpp

    r15781 r16044  
    17511751
    17521752    if (!firstLineBox() && hasLineIfEmpty())
    1753         m_height += lineHeight(true);
     1753        m_height += lineHeight(true, true);
    17541754
    17551755    // See if we have any lines that spill out of our block.  If we do, then we will possibly need to
Note: See TracChangeset for help on using the changeset viewer.