Bug 37296 - [Qt] User agent style sheets are crippled by moc -E in make-css-file-arrays.pl
: [Qt] User agent style sheets are crippled by moc -E in make-css-file-arrays.pl
Status: CLOSED FIXED
: WebKit
CSS
: 528+ (Nightly build)
: PC Linux
: P2 Normal
Assigned To:
:
: Qt
:
: 35784
  Show dependency treegraph
 
Reported: 2010-04-08 16:15 PST by
Modified: 2010-04-09 01:13 PST (History)


Attachments
Proposed fix v1 (8.37 KB, patch)
2010-04-08 16:24 PST, Andras Becsi
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-04-08 16:15:11 PST
The Qt port uses WebCore/css/make-css-file-arrays.pl with the --preprocessor moc -E option to remove unneeded comments and whitespaces from default user agent style sheets found in WebCore/css/, but unforunatelly moc also removes the @ before at-keywords (for example the namespace keyword) and all hexadecimal colors beginning with # (moc assumes it is a preprocessor directive), so the generated arrays in UserAgentStyleSheetsData.cpp include invalid rules which are ignored by the parser.
Therefore the parser does not set the namespace and does not set colours specified by the default stylesheets.
Since no other port uses the --preprocessor option, and the script removes unneeded comments and whitespaces from the css files using regexps anyhow, this option and the usage of any preprocessor on css files can safely be removed from the script.
Because of the resulting change in the arrays three platform dependent test results have to be updated:

editing/execCommand/insert-list-xml.xhtml
svg/custom/createImageElement2.xhtml
svg/custom/use-on-symbol-inside-pattern.svg

These test results are more Mac alike now.
------- Comment #1 From 2010-04-08 16:24:56 PST -------
Created an attachment (id=52914) [details]
Proposed fix v1
------- Comment #2 From 2010-04-09 00:28:49 PST -------
(From update of attachment 52914 [details])
I agree that it's a moc bug, but I like your solution of removing the unnecessary use of the preprocessor for the stylesheets altogether.
------- Comment #3 From 2010-04-09 01:09:09 PST -------
(In reply to comment #2)
> (From update of attachment 52914 [details] [details])
> I agree that it's a moc bug, but I like your solution of removing the
> unnecessary use of the preprocessor for the stylesheets altogether.

Thanks Simon.
Patch landed in r57316.
Closing bug.
------- Comment #4 From 2010-04-09 01:13:12 PST -------
Revision r57316 cherry-picked into qtwebkit-2.0 with commit f641072ff389b247427f9f5d6d9baf770fa9055f