LayoutTests:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2007 22:23:02 +0000 (22:23 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2007 22:23:02 +0000 (22:23 +0000)
commit71e6d9ad86e6b1a22990440205a84581cbe0cea5
tree358c30de3f46978ef7813a2acb0c4e67703c94d3
parent0d12210175741cd4b1c1c0e740334718c4f96701
LayoutTests:

        Reviewed by Hyatt and Adam.

        Added and updated tests for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element
        The metrics have changed for the anonymous block inside popup buttons.

        * fast/forms/menulist-narrow-width-expected.checksum: Added.
        * fast/forms/menulist-narrow-width-expected.png: Added.
        * fast/forms/menulist-narrow-width-expected.txt: Added.
        * fast/forms/menulist-narrow-width.html: Added.

        * editing/pasteboard/4641033-expected.txt:
        * editing/pasteboard/4944770-1-expected.txt:
        * editing/pasteboard/4944770-2-expected.txt:
        * editing/pasteboard/select-element-1-expected.txt:
        * editing/selection/caret-before-select-expected.txt:
        * editing/selection/replaced-boundaries-3-expected.txt:
        * editing/selection/select-box-expected.txt:
        * editing/selection/select-element-paragraph-boundary-expected.txt:
        * fast/block/float/float-avoidance-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/control-restrict-line-height-expected.txt:
        * fast/forms/disabled-select-change-index-expected.txt:
        * fast/forms/form-element-geometry-expected.txt:
        * fast/forms/menulist-separator-painting-expected.txt:
        * fast/forms/menulist-width-change-expected.txt:
        * fast/forms/option-script-expected.txt:
        * fast/forms/option-strip-whitespace-expected.txt:
        * fast/forms/option-text-clip-expected.txt:
        * fast/forms/select-accesskey-expected.txt:
        * fast/forms/select-align-expected.txt:
        * fast/forms/select-baseline-expected.txt:
        * fast/forms/select-change-listbox-to-popup-expected.txt:
        * fast/forms/select-disabled-appearance-expected.txt:
        * fast/forms/select-initial-position-expected.txt:
        * fast/forms/select-selected-expected.txt:
        * fast/forms/select-size-expected.txt:
        * fast/forms/select-style-expected.txt:
        * fast/forms/select-visual-hebrew-expected.txt:
        * fast/forms/select-writing-direction-natural-expected.txt:
        * fast/forms/stuff-on-my-optgroup-expected.txt:
        * fast/html/keygen-expected.txt:
        * fast/invalid/014-expected.txt:
        * fast/invalid/residual-style-expected.txt:
        * fast/parser/document-write-option-expected.txt:
        * fast/replaced/replaced-breaking-expected.txt:
        * fast/replaced/replaced-breaking-mixture-expected.txt:
        * fast/replaced/three-selects-break-expected.txt:
        * fast/replaced/width100percent-expected.txt:
        * fast/text/international/bidi-menulist-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 and Adam.

        Fix for <rdar://problem/5130590> REGRESSION: style="width:1px" on <select> element no longer hides the element

        Removed hack that forced large padding on popup buttons.  Now we put that padding in the inner block, so that
        the specified width will be honored.

        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::adjustInnerStyle): Set the padding on the inner block based on the metrics provided by the theme.
        (WebCore::RenderMenuList::controlClipRect): Clip to the intersection of the inner content box and the outer content box.
         This will leave room for the arrows which sit in the inner box padding, and if the inner box ever spills out of the outer box,
         that will get clipped too.
        (WebCore::RenderMenuList::calcPrefWidths):  Add in the inner box's padding and border to the pref widths.

        * rendering/RenderThemeMac.mm:
        (WebCore::RenderThemeMac::paintMenuList): Only inflate the rect for the shadow if the rect is big enough to fit the whole control.
         Also, on Leopard, the NSCell will draw outside of a small rect, so add a clip for that case.
        (WebCore::RenderThemeMac::paintMenuListButton): Restrict font scale to make sure the arrows will actually fit in the bounds vertically.
         Don't draw the arrows if they won't fit horizontally.  Reset padding.  Since WinIE doesn't honor padding for popups, its not critical to
         support padding at this time.
        (WebCore::RenderThemeMac::adjustMenuListStyle): Don't set the padding here.  Instead, we're going to set the padding on the inner block of the select.
        (WebCore::RenderThemeMac::adjustMenuListButtonStyle): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingLeft): Added.  Provides internal padding values for RenderMenuList.
        (WebCore::RenderThemeMac::popupInternalPaddingRight): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingTop): ditto.
        (WebCore::RenderThemeMac::popupInternalPaddingBottom): ditto.
        * rendering/RenderThemeMac.h:

        * rendering/RenderThemeSafari.cpp:  The same changes that were made to RenderThemeMac were made here, with variations for the arrow differences.
          This code should be refactored and shared, but now did not seem like the right time to do that refactoring.
        (WebCore::RenderThemeSafari::paintMenuList):
        (WebCore::RenderThemeSafari::paintMenuListButton):
        (WebCore::RenderThemeSafari::adjustMenuListStyle):
        (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
        (WebCore::RenderThemeSafari::popupInternalPaddingRight):
        (WebCore::RenderThemeSafari::popupInternalPaddingTop):
        (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
        (WebCore::RenderThemeSafari::adjustMenuListButtonStyle):
        * rendering/RenderThemeSafari.h:

        * rendering/RenderTheme.h: Added to provide internal padding values for RenderMenuList.
        (WebCore::RenderTheme::popupInternalPaddingLeft):
        (WebCore::RenderTheme::popupInternalPaddingRight):
        (WebCore::RenderTheme::popupInternalPaddingTop):
        (WebCore::RenderTheme::popupInternalPaddingBottom):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
107 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/4641033-expected.txt
LayoutTests/editing/pasteboard/4944770-1-expected.txt
LayoutTests/editing/pasteboard/4944770-2-expected.txt
LayoutTests/editing/pasteboard/select-element-1-expected.txt
LayoutTests/editing/selection/caret-before-select-expected.txt
LayoutTests/editing/selection/replaced-boundaries-3-expected.txt
LayoutTests/editing/selection/select-box-expected.txt
LayoutTests/editing/selection/select-element-paragraph-boundary-expected.txt
LayoutTests/fast/block/float/float-avoidance-expected.txt
LayoutTests/fast/block/margin-collapse/103-expected.txt
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/control-restrict-line-height-expected.txt
LayoutTests/fast/forms/disabled-select-change-index-expected.txt
LayoutTests/fast/forms/form-element-geometry-expected.txt
LayoutTests/fast/forms/menulist-narrow-width-expected.checksum [new file with mode: 0644]
LayoutTests/fast/forms/menulist-narrow-width-expected.png [new file with mode: 0644]
LayoutTests/fast/forms/menulist-narrow-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/forms/menulist-narrow-width.html [new file with mode: 0644]
LayoutTests/fast/forms/menulist-separator-painting-expected.txt
LayoutTests/fast/forms/menulist-width-change-expected.txt
LayoutTests/fast/forms/option-script-expected.txt
LayoutTests/fast/forms/option-strip-whitespace-expected.txt
LayoutTests/fast/forms/option-text-clip-expected.txt
LayoutTests/fast/forms/select-accesskey-expected.txt
LayoutTests/fast/forms/select-align-expected.txt
LayoutTests/fast/forms/select-baseline-expected.txt
LayoutTests/fast/forms/select-change-listbox-to-popup-expected.txt
LayoutTests/fast/forms/select-disabled-appearance-expected.txt
LayoutTests/fast/forms/select-initial-position-expected.txt
LayoutTests/fast/forms/select-selected-expected.txt
LayoutTests/fast/forms/select-size-expected.txt
LayoutTests/fast/forms/select-style-expected.txt
LayoutTests/fast/forms/select-visual-hebrew-expected.txt
LayoutTests/fast/forms/select-writing-direction-natural-expected.txt
LayoutTests/fast/forms/stuff-on-my-optgroup-expected.txt
LayoutTests/fast/html/keygen-expected.txt
LayoutTests/fast/invalid/014-expected.txt
LayoutTests/fast/invalid/residual-style-expected.txt
LayoutTests/fast/parser/document-write-option-expected.txt
LayoutTests/fast/replaced/replaced-breaking-expected.txt
LayoutTests/fast/replaced/replaced-breaking-mixture-expected.txt
LayoutTests/fast/replaced/three-selects-break-expected.txt
LayoutTests/fast/replaced/width100percent-expected.txt
LayoutTests/fast/text/international/bidi-menulist-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/rendering/RenderMenuList.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/RenderThemeSafari.cpp
WebCore/rendering/RenderThemeSafari.h