[Webkit-unassigned] [Bug 25244] New: <option> elements inside an <optgroup> are bold on Chromium

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 16 14:14:14 PDT 2009


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

           Summary: <option> elements inside an <optgroup> are bold on
                    Chromium
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: agl at chromium.org


On Chromium (Windows and Linux) the following is currently misrendered:

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

This occurs because the renderStyle of the element is used as the base style
for rendering. In html4.css we have:

optgroup {
  font-weight: bolder;
}

option {
  font-weight: normal;
}

However, in themeWin.css:

/* Options always use the selects' fonts */
option {
    font: inherit !important;
}

This stops the font-weight: normal in html4.css from taking effect. The
overriding rule was added in https://bugs.webkit.org/show_bug.cgi?id=24762
because otherwise a differnt font on the <option> could make the text wider
than the <select>. This isn't an issue for the <optgroup> as they can't be
selected.

Because of this we switch Chromium from using the element's style to using the
menuStyle() and implementing the bolding in code.

platform/mac/PopupMenuMac.mm: uses the itemStyle. However, themeWin.css isn't
  in play here so everything works out.
platform/gtk/PopupMenuGtk.cpp: renders using GTK. Doesn't appear to observe the
  style or type save for |itemIsEnabled|.
platform/win/PopupMenuWin.cpp: uses the menuStyle and handles bold itself.
platform/chromium/PopupMenuChromium.cpp: changed in this patch to observe
  menuStyle()
platform/wx/PopupMenuWx.cpp: renders with WX. Doesn't appear to observe the
  style or type.
platform/qt/PopupMenuQt.cpp: code to observe the style is #if 0'ed out


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list