Summary: | Allow platform specific adjustments to the default style sheet | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tor Arne Vestbø <vestbo> | ||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | alp, hausmann, koivisto | ||||||||
Priority: | P3 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
Attachments: |
|
Description
Tor Arne Vestbø
2008-05-09 04:46:35 PDT
Created attachment 21035 [details]
Patch
This patch adds callback to the render theme for styling the media player controls, and modifies the html4.css to allow controls to be placed in all parts of the media element.
Antti, any comments? Comment on attachment 21035 [details]
Patch
do you know if the html4.css changes affect the mac or windows controls?
other than that concern, this looks pretty reasonable
I tried the html4.css changes on Safari/Mac and the controls looked and behaved like before. But I have found an issue with adjustMediaSliderThumbStyle(), which does not get called. I'll look into that. Also, we should probably let the theme style the audio element, since it's now hard-coded to: audio { width: 200px; height: 16px; } I'll get back to you with an updated patch. Created attachment 21386 [details]
Allow platform specific adjustments to the default style sheet
The new patch implements functionality to do platform specific adjustments to the default stylesheet.
This allows us to style the media control buttons by providing a default look before the UA and user styles are computed, which has the advantage of not overriding any user-document defined adjustments to the controls. It's also conceptually more in line with what we're doing, i.e. providing a default visual look, not fixing and overriding styles to ensure a given platform-look at all times.
Created attachment 21387 [details]
Allow platform specific adjustments to the default style sheet
Updated patch to reflect comments from Simon about QString::fromUtf8() and actually adding the css-file to the qrc-file :)
Comment on attachment 21387 [details]
Allow platform specific adjustments to the default style sheet
+#include "CSSStyleSheet.h"
This include is not needed in RenderTheme.cpp.
+void RenderTheme::adjustDefaultStyleSheet(CSSStyleSheet* style) {}
For people compiling with unused argument warnings it would be better to omit the word "style".
I don't see any major benefit to using the "all in one line" format here. This could just be laid out in the normal way.
Seems OK, r=me
Thanks for your comments Darin |