https://bugs.webkit.org/show_bug.cgi?id=24762
authoradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2009 23:46:27 +0000 (23:46 +0000)
committeradachan@apple.com <adachan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Mar 2009 23:46:27 +0000 (23:46 +0000)
commite158c6a2949cab1a4298b9f6193b239f172fa753
tree6b91768d5cbf08c1f2ea8fbfa5c1be4e37b24152
parentc607c71f9f3ccba2e48ed324325e4757f7ac6582
    https://bugs.webkit.org/show_bug.cgi?id=24762
        Support text-indent in <option> elements on windows platform.

        Reviewed by Adele Peterson.

        * css/themeWin.css:
        * platform/PopupMenuStyle.h: We don't honor font specified on <option> elements right now.  Make this
        explicit via windows themed default stylesheet.
        (WebCore::PopupMenuStyle::PopupMenuStyle): Also store text-indent and text-direction.
        (WebCore::PopupMenuStyle::textIndent):
        (WebCore::PopupMenuStyle::textDirection):
        * platform/win/PopupMenuWin.cpp:
        (WebCore::PopupMenu::paint): Adjust the text's x-coordinate if text-indent is supported for options and
        text-indent is specified with LTR direction.
        * rendering/RenderMenuList.cpp:
        (WebCore::RenderMenuList::updateOptionsWidth): Take text-indent into account if theme supports text-indent for options.
        (WebCore::RenderMenuList::itemStyle): Use new PopupMenuStyle constructor on windows.
        (WebCore::RenderMenuList::menuStyle): Ditto.
        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::menuStyle): Ditto.
        * rendering/RenderTheme.h:
        (WebCore::RenderTheme::popupOptionSupportsTextIndent): Added.  Default is false since we are only supporting it in windows for now.
        * rendering/RenderThemeWin.h:
        (WebCore::RenderThemeWin::popupOptionSupportsTextIndent): Returns true for windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/css/themeWin.css
WebCore/platform/PopupMenuStyle.h
WebCore/platform/win/PopupMenuWin.cpp
WebCore/rendering/RenderMenuList.cpp
WebCore/rendering/RenderTextControlSingleLine.cpp
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeWin.h