LayoutTests:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 23:44:05 +0000 (23:44 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Aug 2006 23:44:05 +0000 (23:44 +0000)
commit3de686fa0ba225027688e6d04d69b9a68d15100b
tree87f043826ca6fdb3e92826eb25ad03e2817d0052
parent385b44c174f27a294896cea3b910ef87d29cda68
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
102 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/4641033-expected.txt
LayoutTests/editing/selection/replaced-boundaries-3-expected.txt
LayoutTests/editing/selection/select-box-expected.txt
LayoutTests/fast/block/margin-collapse/103-expected.txt
LayoutTests/fast/borders/borderRadiusInvalidColor-expected.checksum [new file with mode: 0644]
LayoutTests/fast/borders/borderRadiusInvalidColor-expected.png [new file with mode: 0644]
LayoutTests/fast/borders/borderRadiusInvalidColor-expected.txt [new file with mode: 0644]
LayoutTests/fast/borders/borderRadiusInvalidColor.html [new file with mode: 0644]
LayoutTests/fast/forms/001-expected.checksum
LayoutTests/fast/forms/001-expected.png
LayoutTests/fast/forms/001-expected.txt
LayoutTests/fast/forms/003-expected.txt
LayoutTests/fast/forms/004-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label01-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label02-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label03-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label04-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label06-expected.txt
LayoutTests/fast/forms/HTMLOptionElement_label07-expected.txt
LayoutTests/fast/forms/form-element-geometry-expected.checksum
LayoutTests/fast/forms/form-element-geometry-expected.png
LayoutTests/fast/forms/form-element-geometry-expected.txt
LayoutTests/fast/forms/option-script-expected.txt
LayoutTests/fast/forms/option-text-clip-expected.txt
LayoutTests/fast/forms/select-baseline-expected.checksum [new file with mode: 0644]
LayoutTests/fast/forms/select-baseline-expected.png [new file with mode: 0644]
LayoutTests/fast/forms/select-baseline-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/select-baseline.html [new file with mode: 0644]
LayoutTests/fast/forms/select-change-listbox-to-popup-expected.txt
LayoutTests/fast/forms/select-selected-expected.txt
LayoutTests/fast/forms/select-style-expected.txt
LayoutTests/fast/forms/select-visual-hebrew-expected.txt
LayoutTests/fast/invalid/014-expected.txt
LayoutTests/fast/parser/document-write-option-expected.txt
LayoutTests/fast/replaced/width100percent-expected.txt
LayoutTests/http/tests/navigation/anchor-basic-expected.txt
LayoutTests/http/tests/navigation/anchor-frames-expected.txt
LayoutTests/http/tests/navigation/anchor-goback-expected.txt
LayoutTests/http/tests/navigation/anchor-subframeload-expected.txt
LayoutTests/http/tests/navigation/javascriptlink-basic-expected.txt
LayoutTests/http/tests/navigation/javascriptlink-frames-expected.txt
LayoutTests/http/tests/navigation/javascriptlink-goback-expected.txt
LayoutTests/http/tests/navigation/javascriptlink-subframeload-expected.txt
LayoutTests/http/tests/navigation/metaredirect-basic-expected.txt
LayoutTests/http/tests/navigation/metaredirect-frames-expected.txt
LayoutTests/http/tests/navigation/metaredirect-goback-expected.txt
LayoutTests/http/tests/navigation/metaredirect-subframeload-expected.txt
LayoutTests/http/tests/navigation/post-goback2-expected.txt
LayoutTests/http/tests/navigation/postredirect-goback2-expected.txt
LayoutTests/http/tests/navigation/redirect302-basic-expected.txt
LayoutTests/http/tests/navigation/redirect302-frames-expected.txt
LayoutTests/http/tests/navigation/redirect302-goback-expected.txt
LayoutTests/http/tests/navigation/redirect302-subframeload-expected.txt
LayoutTests/http/tests/navigation/relativeanchor-basic-expected.txt
LayoutTests/http/tests/navigation/relativeanchor-frames-expected.txt
LayoutTests/http/tests/navigation/relativeanchor-goback-expected.txt
LayoutTests/http/tests/navigation/slowmetaredirect-basic-expected.txt
LayoutTests/http/tests/navigation/slowtimerredirect-basic-expected.txt
LayoutTests/http/tests/navigation/success200-basic-expected.txt
LayoutTests/http/tests/navigation/success200-frames-expected.txt
LayoutTests/http/tests/navigation/success200-frames-loadsame-expected.txt
LayoutTests/http/tests/navigation/success200-goback-expected.txt
LayoutTests/http/tests/navigation/success200-loadsame-expected.txt
LayoutTests/http/tests/navigation/success200-reload-expected.txt
LayoutTests/http/tests/navigation/success200-subframeload-expected.txt
LayoutTests/http/tests/navigation/timerredirect-basic-expected.txt
LayoutTests/http/tests/navigation/timerredirect-frames-expected.txt
LayoutTests/http/tests/navigation/timerredirect-goback-expected.txt
LayoutTests/http/tests/navigation/timerredirect-subframeload-expected.txt
LayoutTests/tables/mozilla/bugs/bug1188-expected.txt
LayoutTests/tables/mozilla/bugs/bug18359-expected.txt
LayoutTests/tables/mozilla/bugs/bug2479-3-expected.txt
LayoutTests/tables/mozilla/bugs/bug2479-4-expected.txt
LayoutTests/tables/mozilla/bugs/bug29326-expected.txt
LayoutTests/tables/mozilla/bugs/bug33855-expected.txt
LayoutTests/tables/mozilla/bugs/bug4382-expected.txt
LayoutTests/tables/mozilla/bugs/bug96334-expected.txt
LayoutTests/tables/mozilla/core/margins-expected.txt
LayoutTests/tables/mozilla/dom/tableDom-expected.txt
LayoutTests/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/cssstyleselector.cpp
WebCore/css/html4.css
WebCore/platform/GraphicsContext.h
WebCore/platform/cairo/GraphicsContextCairo.cpp
WebCore/platform/cg/GraphicsContextCG.cpp
WebCore/rendering/RenderBlock.cpp
WebCore/rendering/RenderBlock.h
WebCore/rendering/RenderBox.cpp
WebCore/rendering/RenderButton.h
WebCore/rendering/RenderFlexibleBox.cpp
WebCore/rendering/RenderFlow.cpp
WebCore/rendering/RenderMenuList.h
WebCore/rendering/RenderObject.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTheme.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/bidi.cpp