From 367b67f214a36bee756f0e303177fd17e75995a8 Mon Sep 17 00:00:00 2001 From: "abecsi@webkit.org" Date: Fri, 9 Apr 2010 07:59:04 +0000 Subject: [PATCH] [Qt] User agent style sheets are crippled by moc -E in make-css-file-arrays.pl https://bugs.webkit.org/show_bug.cgi?id=37296 Reviewed by Simon Hausmann. Patch by Andras Becsi WebCore: Do not use moc to preprocess user agent style sheets because it removes at-symbols and hexadecimal colours from declarations. Remove unneeded preprocessor usage from make-css-file-arrays.pl since the script processes default css files using regular expressions therefore preprocessing is redundant. * WebCore.pri: remove --preprocessor usage * css/make-css-file-arrays.pl: remove gcc dependency LayoutTests: Update expected files after removal of moc preprocessing of default css sheets. These test results now only differ in metrics from Mac ones. * platform/qt/editing/execCommand/insert-list-xml-expected.txt: * platform/qt/svg/custom/createImageElement2-expected.txt: * platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@57316 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 14 ++++++++++++++ .../editing/execCommand/insert-list-xml-expected.txt | 1 - .../qt/svg/custom/createImageElement2-expected.txt | 20 +++++++++++++++----- .../custom/use-on-symbol-inside-pattern-expected.txt | 8 ++++---- WebCore/ChangeLog | 15 +++++++++++++++ WebCore/WebCore.pri | 2 +- WebCore/css/make-css-file-arrays.pl | 17 +---------------- 7 files changed, 50 insertions(+), 27 deletions(-) diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index da5bb45..cd2018b 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,17 @@ +2010-04-09 Andras Becsi + + Reviewed by Simon Hausmann. + + [Qt] User agent style sheets are crippled by moc -E in make-css-file-arrays.pl + https://bugs.webkit.org/show_bug.cgi?id=37296 + + Update expected files after removal of moc preprocessing of default css sheets. + These test results now only differ in metrics from Mac ones. + + * platform/qt/editing/execCommand/insert-list-xml-expected.txt: + * platform/qt/svg/custom/createImageElement2-expected.txt: + * platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt: + 2010-04-08 Chris Evans Reviewed by Sam Weinig. diff --git a/LayoutTests/platform/qt/editing/execCommand/insert-list-xml-expected.txt b/LayoutTests/platform/qt/editing/execCommand/insert-list-xml-expected.txt index 4fad8d3..e4c98d7 100644 --- a/LayoutTests/platform/qt/editing/execCommand/insert-list-xml-expected.txt +++ b/LayoutTests/platform/qt/editing/execCommand/insert-list-xml-expected.txt @@ -1,4 +1,3 @@ .
  1. .
PASS - diff --git a/LayoutTests/platform/qt/svg/custom/createImageElement2-expected.txt b/LayoutTests/platform/qt/svg/custom/createImageElement2-expected.txt index 26eb211..08ead4a 100644 --- a/LayoutTests/platform/qt/svg/custom/createImageElement2-expected.txt +++ b/LayoutTests/platform/qt/svg/custom/createImageElement2-expected.txt @@ -1,8 +1,18 @@ layer at (0,0) size 800x600 RenderView at (0,0) size 800x600 -layer at (0,0) size 800x120 - RenderBlock {html} at (0,0) size 800x120 - RenderBlock {body} at (8,8) size 784x104 - RenderSVGRoot {svg} at (8,8) size 600x100 - RenderSVGImage {image} at (18,18) size 100x60 +layer at (0,0) size 800x104 + RenderBlock {html} at (0,0) size 800x104 + RenderInline {head} at (0,0) size 86x20 RenderText {#text} at (0,0) size 0x0 + RenderInline {title} at (0,0) size 82x20 + RenderText {#text} at (0,84) size 82x20 + text run at (0,84) width 82: "SVG Image" + RenderText {#text} at (82,84) size 4x20 + text run at (82,84) width 4: " " + RenderText {#text} at (0,0) size 0x0 + RenderInline {body} at (0,0) size 600x20 + RenderText {#text} at (0,0) size 0x0 + RenderSVGRoot {svg} at (86,0) size 600x100 + RenderSVGImage {image} at (96,10) size 100x60 + RenderText {#text} at (0,0) size 0x0 + RenderText {#text} at (0,0) size 0x0 diff --git a/LayoutTests/platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt b/LayoutTests/platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt index bda5ceb..c91500d 100644 --- a/LayoutTests/platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt +++ b/LayoutTests/platform/qt/svg/custom/use-on-symbol-inside-pattern-expected.txt @@ -1,5 +1,5 @@ -KRenderingPaintServer {id="pat00" [type=PATTERN] [bbox=at (-10,-15) size 30x45]} -KRenderingPaintServer {id="pat01" [type=PATTERN] [bbox=at (-11.38,-16.87) size 30x45]} +KRenderingPaintServer {id="pat00" [type=PATTERN] [bbox=at (0,0) size 30x45]} +KRenderingPaintServer {id="pat01" [type=PATTERN] [bbox=at (0,0) size 30x45]} layer at (0,0) size 800x600 RenderView at (0,0) size 800x600 layer at (0,0) size 225x425 @@ -29,11 +29,11 @@ layer at (0,0) size 225x425 chunk 1 text run 1 at (0.00,10.00) startOffset 0 endOffset 10 width 74.00: "coniferous" RenderSVGContainer {use} at (8,8) size 205x94 RenderSVGContainer {g} at (8,8) size 205x94 - RenderPath {path} at (8,8) size 205x94 [stroke={[type=SOLID] [color=#B42D25] [stroke width=2.00]}] [fill={[type=PATTERN] [bbox=at (-10,-15) size 30x45]}] [data="M0.00,50.00 L100.00,0.00 L200.00,20.00 L150.00,70.00 L50.00,90.00 L0.00,50.00"] + RenderPath {path} at (8,8) size 205x94 [stroke={[type=SOLID] [color=#B42D25] [stroke width=2.00]}] [fill={[type=PATTERN] [bbox=at (0,0) size 30x45]}] [data="M0.00,50.00 L100.00,0.00 L200.00,20.00 L150.00,70.00 L50.00,90.00 L0.00,50.00"] RenderSVGContainer {g} at (8,104) size 205x98 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,110.00)}] RenderSVGText {text} at (0,10) size 85x20 contains 1 chunk(s) RenderSVGInlineText {#text} at (0,-16) size 85x20 chunk 1 text run 1 at (0.00,10.00) startOffset 0 endOffset 10 width 85.00: "broadLeave" RenderSVGContainer {use} at (8,108) size 205x94 RenderSVGContainer {g} at (8,108) size 205x94 - RenderPath {path} at (8,108) size 205x94 [stroke={[type=SOLID] [color=#B42D25] [stroke width=2.00]}] [fill={[type=PATTERN] [bbox=at (-11.38,-16.87) size 30x45]}] [data="M0.00,50.00 L100.00,0.00 L200.00,20.00 L150.00,70.00 L50.00,90.00 L0.00,50.00"] + RenderPath {path} at (8,108) size 205x94 [stroke={[type=SOLID] [color=#B42D25] [stroke width=2.00]}] [fill={[type=PATTERN] [bbox=at (0,0) size 30x45]}] [data="M0.00,50.00 L100.00,0.00 L200.00,20.00 L150.00,70.00 L50.00,90.00 L0.00,50.00"] diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index bd41bcb..d47bd1b 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,18 @@ +2010-04-09 Andras Becsi + + Reviewed by Simon Hausmann. + + [Qt] User agent style sheets are crippled by moc -E in make-css-file-arrays.pl + https://bugs.webkit.org/show_bug.cgi?id=37296 + + Do not use moc to preprocess user agent style sheets because it removes at-symbols + and hexadecimal colours from declarations. + Remove unneeded preprocessor usage from make-css-file-arrays.pl since the script + processes default css files using regular expressions therefore preprocessing is redundant. + + * WebCore.pri: remove --preprocessor usage + * css/make-css-file-arrays.pl: remove gcc dependency + 2010-04-08 Chris Evans Reviewed by Sam Weinig. diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri index be1d56bf..039f26c 100644 --- a/WebCore/WebCore.pri +++ b/WebCore/WebCore.pri @@ -698,7 +698,7 @@ addExtraCompiler(colordata) stylesheets.wkScript = $$PWD/css/make-css-file-arrays.pl stylesheets.output = $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheetsData.cpp stylesheets.input = stylesheets.wkScript -stylesheets.commands = perl $$stylesheets.wkScript --preprocessor \"$${QMAKE_MOC} -E\" $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED +stylesheets.commands = perl $$stylesheets.wkScript $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h ${QMAKE_FILE_OUT} $$STYLESHEETS_EMBED stylesheets.depends = $$STYLESHEETS_EMBED stylesheets.clean = ${QMAKE_FILE_OUT} ${QMAKE_VAR_WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h addExtraCompiler(stylesheets, $${WC_GENERATED_SOURCES_DIR}/UserAgentStyleSheets.h) diff --git a/WebCore/css/make-css-file-arrays.pl b/WebCore/css/make-css-file-arrays.pl index 9ffeaa7..dad530c 100755 --- a/WebCore/css/make-css-file-arrays.pl +++ b/WebCore/css/make-css-file-arrays.pl @@ -23,21 +23,6 @@ use strict; use Getopt::Long; -my $preprocessor; - -GetOptions('preprocessor=s' => \$preprocessor); - -if (!$preprocessor) { - require Config; - my $gccLocation = ""; - if (($Config::Config{'osname'}) =~ /solaris/i) { - $gccLocation = "/usr/sfw/bin/gcc"; - } else { - $gccLocation = "/usr/bin/gcc"; - } - $preprocessor = $gccLocation . " -E -P -x c++"; -} - my $header = $ARGV[0]; shift; @@ -55,7 +40,7 @@ for my $in (@ARGV) { my $name = $1; # Slurp in the CSS file. - open IN, $preprocessor . " " . $in . "|" or die; + open IN, "<", $in or die; my $text; { local $/; $text = ; } close IN; -- 1.8.3.1