Commit 110b5f20 authored by darin@chromium.org's avatar darin@chromium.org

2009-04-16 Adam Langley <agl@google.com>

        Reviewed by Darin Fisher.

        Fix Chromium's rendering of <option> elements inside of <optgroups>.

        https://bugs.webkit.org/show_bug.cgi?id=25244

        Test (will included as a manual test by https://bugs.webkit.org/show_bug.cgi?id=24900):

        <select>
          <optgroup label="Should be bold">
            <option>Should not be bold</option>
          </optgroup>
        </select>

        * css/themeWin.css: adding comments
        * platform/chromium/PopupMenuChromium.cpp:
        (WebCore::PopupListBox::getRowFont): use menuStyle() rather than the item's style



git-svn-id: svn://svn.chromium.org/blink/trunk@42597 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7d36e8f7
2009-04-16 Adam Langley <agl@google.com>
Reviewed by Darin Fisher.
Fix Chromium's rendering of <option> elements inside of <optgroups>.
https://bugs.webkit.org/show_bug.cgi?id=25244
Test (will included as a manual test by https://bugs.webkit.org/show_bug.cgi?id=24900):
<select>
<optgroup label="Should be bold">
<option>Should not be bold</option>
</optgroup>
</select>
* css/themeWin.css: adding comments
* platform/chromium/PopupMenuChromium.cpp:
(WebCore::PopupListBox::getRowFont): use menuStyle() rather than the item's style
2009-04-16 Eric Roman <eroman@chromium.org> 2009-04-16 Eric Roman <eroman@chromium.org>
Reviewed by Alexey Proskuryakov. Reviewed by Alexey Proskuryakov.
...@@ -97,7 +97,10 @@ select[size="1"] { ...@@ -97,7 +97,10 @@ select[size="1"] {
-webkit-border-radius: 0; -webkit-border-radius: 0;
margin: 0; margin: 0;
} }
/* Options always use the selects' fonts */
/* Option font must be inherited because we depend on computing the size of the
<select> based on the size of the options, and they must use the same font
for that computation to be correct */
option { option {
font: inherit !important; font: inherit !important;
} }
......
...@@ -808,7 +808,7 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd ...@@ -808,7 +808,7 @@ void PopupListBox::paintRow(GraphicsContext* gc, const IntRect& rect, int rowInd
Font PopupListBox::getRowFont(int rowIndex) Font PopupListBox::getRowFont(int rowIndex)
{ {
Font itemFont = m_popupClient->itemStyle(rowIndex).font(); Font itemFont = m_popupClient->menuStyle().font();
if (m_popupClient->itemIsLabel(rowIndex)) { if (m_popupClient->itemIsLabel(rowIndex)) {
// Bold-ify labels (ie, an <optgroup> heading). // Bold-ify labels (ie, an <optgroup> heading).
FontDescription d = itemFont.fontDescription(); FontDescription d = itemFont.fontDescription();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment