Bug 21408
| Summary: | User agent stylesheet contains Mac-specific rules | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ojan Vafai <ojan> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | ahmad.saleem792, bfulgham, hyatt, ntim, simon.fraser |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Ojan Vafai
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ojan Vafai
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)
Dave Hyatt
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.
Dave Hyatt
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.
Dave Hyatt
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.
Ahmad Saleem
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!