Bug 21408 - User agent stylesheet contains Mac-specific rules
Summary: User agent stylesheet contains Mac-specific rules
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 13:19 PDT by Ojan Vafai
Modified: 2023-03-25 16:43 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2008-10-06 13:19:04 PDT
As an example, in Chromium and presumably in whatever builds use RenderThemeWin, we don't want rounded-corners on select elements.

Right now, Chromium just add some CSS to the end of html4.css and quirks.css with our overrides, but in order to do so we've needed to fork DerivedSources.make.

I'm open to any solution. In general, it seems like we might want a mechanism for platform specific user-agent stylesheets.
Comment 1 Ojan Vafai 2008-10-06 13:24:17 PDT
As a reference here's our current somewhat nasty hack to make it work:

USER_AGENT_STYLE_SHEETS = $(WebCore)/css/view-source.css $(WebCore)/css/svg.css 
UserAgentStyleSheets.h : css/make-css-file-arrays.pl $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/html4.css $(WebCore)/css/quirks.css $(PORTROOT)/css/html4-overrides.css $(PORTROOT)/css/quirks-overrides.css
	cat $(WebCore)/css/html4.css $(PORTROOT)/css/html4-overrides.css > $(DerivedSourcesDir)/html4.css
	cat $(WebCore)/css/quirks.css $(PORTROOT)/css/quirks-overrides.css > $(DerivedSourcesDir)/quirks.css
	perl $< $@ UserAgentStyleSheetsData.cpp $(DerivedSourcesDir)/html4.css $(DerivedSourcesDir)/quirks.css $(USER_AGENT_STYLE_SHEETS)
Comment 2 Dave Hyatt 2008-10-06 13:38:05 PDT
We shouldn't need platform-specific user agent sheets at all.  Mac-specific rules just need  to move into RenderTheme C++ code instead of being in the stylesheet. The Mac/Win ports both use a "Mac" look on Safari WebKit, so some rules have crept into the stylesheet that assume the Mac look.  Those rules just need to be eliminated.
Comment 3 Dave Hyatt 2008-10-06 13:40:08 PDT
Please file bugs on the rules that were problematic.  Then we can work on getting those rules removed from the stylesheet (or expressed in a more general way using custom keywords if applicable).

I've retitled the bug to represent the problem rather than suggesting a solution.

Comment 4 Dave Hyatt 2008-10-06 13:49:32 PDT
Yeah, I am wrong about the border rule, since it's really about something that applies when the theme has turned off.

We probably will need platform-specific rules.  I'd prefer a preprocessor-based solution (like Mozilla has for its XUL CSS files) rather than having new files.

Comment 5 Ahmad Saleem 2023-03-25 16:43:25 PDT
If I am not wrong, we don't have any platform specific rules now in UA stylesheets, even if we have - I think we can deal with them as separate bug rather than one broader and this older bug.

Marking this "RESOLVED WONTFIX", please reopen if this is still applicable. Thanks!