LayoutTests:
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2006 05:24:57 +0000 (05:24 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2006 05:24:57 +0000 (05:24 +0000)
        - reverted CSS media queries patch, as it causes random crashes on the
        layout tests with a debug build.

        * fast/media/001-expected.checksum: Removed.
        * fast/media/001-expected.png: Removed.
        * fast/media/001-expected.txt: Removed.
        * fast/media/001.html: Removed.
        * fast/media/002-expected.checksum: Removed.
        * fast/media/002-expected.png: Removed.
        * fast/media/002-expected.txt: Removed.
        * fast/media/002.html: Removed.
        * fast/media/003-expected.checksum: Removed.
        * fast/media/003-expected.png: Removed.
        * fast/media/003-expected.txt: Removed.
        * fast/media/003.html: Removed.
        * fast/media/004-expected.checksum: Removed.
        * fast/media/004-expected.png: Removed.
        * fast/media/004-expected.txt: Removed.
        * fast/media/004.html: Removed.
        * fast/media/005-expected.checksum: Removed.
        * fast/media/005-expected.png: Removed.
        * fast/media/005-expected.txt: Removed.
        * fast/media/005.html: Removed.
        * fast/media/006-expected.checksum: Removed.
        * fast/media/006-expected.png: Removed.
        * fast/media/006-expected.txt: Removed.
        * fast/media/006.html: Removed.
        * fast/media/007-expected.checksum: Removed.
        * fast/media/007-expected.png: Removed.
        * fast/media/007-expected.txt: Removed.
        * fast/media/007.html: Removed.
        * fast/media/008-expected.checksum: Removed.
        * fast/media/008-expected.png: Removed.
        * fast/media/008-expected.txt: Removed.
        * fast/media/008.html: Removed.
        * fast/media/009-expected.checksum: Removed.
        * fast/media/009-expected.png: Removed.
        * fast/media/009-expected.txt: Removed.
        * fast/media/009.html: Removed.
        * fast/media/010-expected.checksum: Removed.
        * fast/media/010-expected.png: Removed.
        * fast/media/010-expected.txt: Removed.
        * fast/media/010.html: Removed.
        * fast/media/011-expected.checksum: Removed.
        * fast/media/011-expected.png: Removed.
        * fast/media/011-expected.txt: Removed.
        * fast/media/011.html: Removed.
        * fast/media/012-expected.checksum: Removed.
        * fast/media/012-expected.png: Removed.
        * fast/media/012-expected.txt: Removed.
        * fast/media/012.html: Removed.
        * fast/media/013-expected.checksum: Removed.
        * fast/media/013-expected.png: Removed.
        * fast/media/013-expected.txt: Removed.
        * fast/media/013.html: Removed.
        * fast/media/014-expected.checksum: Removed.
        * fast/media/014-expected.png: Removed.
        * fast/media/014-expected.txt: Removed.
        * fast/media/014.html: Removed.
        * fast/media/015-expected.checksum: Removed.
        * fast/media/015-expected.png: Removed.
        * fast/media/015-expected.txt: Removed.
        * fast/media/015.html: Removed.
        * fast/media/016-expected.checksum: Removed.
        * fast/media/016-expected.png: Removed.
        * fast/media/016-expected.txt: Removed.
        * fast/media/016.html: Removed.
        * fast/media/017-expected.checksum: Removed.
        * fast/media/017-expected.png: Removed.
        * fast/media/017-expected.txt: Removed.
        * fast/media/017.html: Removed.
        * fast/media/018-expected.checksum: Removed.
        * fast/media/018-expected.png: Removed.
        * fast/media/018-expected.txt: Removed.
        * fast/media/018.html: Removed.
        * fast/media/019-expected.checksum: Removed.
        * fast/media/019-expected.png: Removed.
        * fast/media/019-expected.txt: Removed.
        * fast/media/019.html: Removed.
        * fast/media/020-expected.checksum: Removed.
        * fast/media/020-expected.png: Removed.
        * fast/media/020-expected.txt: Removed.
        * fast/media/020.html: Removed.
        * fast/media/021-expected.checksum: Removed.
        * fast/media/021-expected.png: Removed.
        * fast/media/021-expected.txt: Removed.
        * fast/media/021.html: Removed.
        * fast/media/022-expected.checksum: Removed.
        * fast/media/022-expected.png: Removed.
        * fast/media/022-expected.txt: Removed.
        * fast/media/022.html: Removed.
        * fast/media/023-expected.checksum: Removed.
        * fast/media/023-expected.png: Removed.
        * fast/media/023-expected.txt: Removed.
        * fast/media/023.html: Removed.
        * fast/media/024-expected.checksum: Removed.
        * fast/media/024-expected.png: Removed.
        * fast/media/024-expected.txt: Removed.
        * fast/media/024.html: Removed.
        * fast/media/025-expected.checksum: Removed.
        * fast/media/025-expected.png: Removed.
        * fast/media/025-expected.txt: Removed.
        * fast/media/025.html: Removed.
        * fast/media/026-expected.checksum: Removed.
        * fast/media/026-expected.png: Removed.
        * fast/media/026.html: Removed.
        * fast/media/import-p-green.css: Removed.

WebCore:

        - reverted CSS media queries patch, as it causes random crashes on the
        layout tests with a debug build.

        * WebCore.xcodeproj/project.pbxproj:
        * css/css_grammar.y:
        * css/css_mediaqueryeval.cpp: Removed.
        * css/css_mediaqueryeval.h: Removed.
        * css/css_mediaqueryimpl.cpp: Removed.
        * css/css_mediaqueryimpl.h: Removed.
        * css/css_stylesheetimpl.cpp:
        (MediaListImpl::MediaListImpl):
        (MediaListImpl::contains):
        (MediaListImpl::deleteMedium):
        (MediaListImpl::mediaText):
        (MediaListImpl::setMediaText):
        * css/css_stylesheetimpl.h:
        (DOM::MediaListImpl::length):
        (DOM::MediaListImpl::item):
        (DOM::MediaListImpl::appendMedium):
        * css/css_valueimpl.h:
        * css/csshelper.h:
        * css/cssmediafeatures.in: Removed.
        * css/cssparser.cpp:
        * css/cssparser.h:
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::CSSStyleSelector):
        (WebCore::CSSStyleSelector::init):
        (WebCore::CSSStyleSelector::~CSSStyleSelector):
        (WebCore::CSSStyleSelector::loadDefaultStyle):
        (WebCore::CSSStyleSelector::styleForElement):
        (WebCore::CSSStyleSelector::styleRulesForElement):
        (WebCore::CSSRuleSet::addRulesFromSheet):
        (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
        * css/cssstyleselector.h:
        * css/makemediafeatures: Removed.
        * css/maketokenizer:
        * css/tokenizer.flex:
        * khtml/html/html_headimpl.cpp:
        (WebCore::HTMLLinkElementImpl::process):
        (WebCore::HTMLLinkElementImpl::setStyleSheet):
        (WebCore::HTMLStyleElementImpl::childrenChanged):
        * platform/Screen.h:
        * platform/mac/Screen.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@12567 268f45cc-cd09-0410-ab3c-d52691b4dbfc

127 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/media/001-expected.checksum [deleted file]
LayoutTests/fast/media/001-expected.png [deleted file]
LayoutTests/fast/media/001-expected.txt [deleted file]
LayoutTests/fast/media/001.html [deleted file]
LayoutTests/fast/media/002-expected.checksum [deleted file]
LayoutTests/fast/media/002-expected.png [deleted file]
LayoutTests/fast/media/002-expected.txt [deleted file]
LayoutTests/fast/media/002.html [deleted file]
LayoutTests/fast/media/003-expected.checksum [deleted file]
LayoutTests/fast/media/003-expected.png [deleted file]
LayoutTests/fast/media/003-expected.txt [deleted file]
LayoutTests/fast/media/003.html [deleted file]
LayoutTests/fast/media/004-expected.checksum [deleted file]
LayoutTests/fast/media/004-expected.png [deleted file]
LayoutTests/fast/media/004-expected.txt [deleted file]
LayoutTests/fast/media/004.html [deleted file]
LayoutTests/fast/media/005-expected.checksum [deleted file]
LayoutTests/fast/media/005-expected.png [deleted file]
LayoutTests/fast/media/005-expected.txt [deleted file]
LayoutTests/fast/media/005.html [deleted file]
LayoutTests/fast/media/006-expected.checksum [deleted file]
LayoutTests/fast/media/006-expected.png [deleted file]
LayoutTests/fast/media/006-expected.txt [deleted file]
LayoutTests/fast/media/006.html [deleted file]
LayoutTests/fast/media/007-expected.checksum [deleted file]
LayoutTests/fast/media/007-expected.png [deleted file]
LayoutTests/fast/media/007-expected.txt [deleted file]
LayoutTests/fast/media/007.html [deleted file]
LayoutTests/fast/media/008-expected.checksum [deleted file]
LayoutTests/fast/media/008-expected.png [deleted file]
LayoutTests/fast/media/008-expected.txt [deleted file]
LayoutTests/fast/media/008.html [deleted file]
LayoutTests/fast/media/009-expected.checksum [deleted file]
LayoutTests/fast/media/009-expected.png [deleted file]
LayoutTests/fast/media/009-expected.txt [deleted file]
LayoutTests/fast/media/009.html [deleted file]
LayoutTests/fast/media/010-expected.checksum [deleted file]
LayoutTests/fast/media/010-expected.png [deleted file]
LayoutTests/fast/media/010-expected.txt [deleted file]
LayoutTests/fast/media/010.html [deleted file]
LayoutTests/fast/media/011-expected.checksum [deleted file]
LayoutTests/fast/media/011-expected.png [deleted file]
LayoutTests/fast/media/011-expected.txt [deleted file]
LayoutTests/fast/media/011.html [deleted file]
LayoutTests/fast/media/012-expected.checksum [deleted file]
LayoutTests/fast/media/012-expected.png [deleted file]
LayoutTests/fast/media/012-expected.txt [deleted file]
LayoutTests/fast/media/012.html [deleted file]
LayoutTests/fast/media/013-expected.checksum [deleted file]
LayoutTests/fast/media/013-expected.png [deleted file]
LayoutTests/fast/media/013-expected.txt [deleted file]
LayoutTests/fast/media/013.html [deleted file]
LayoutTests/fast/media/014-expected.checksum [deleted file]
LayoutTests/fast/media/014-expected.png [deleted file]
LayoutTests/fast/media/014-expected.txt [deleted file]
LayoutTests/fast/media/014.html [deleted file]
LayoutTests/fast/media/015-expected.checksum [deleted file]
LayoutTests/fast/media/015-expected.png [deleted file]
LayoutTests/fast/media/015-expected.txt [deleted file]
LayoutTests/fast/media/015.html [deleted file]
LayoutTests/fast/media/016-expected.checksum [deleted file]
LayoutTests/fast/media/016-expected.png [deleted file]
LayoutTests/fast/media/016-expected.txt [deleted file]
LayoutTests/fast/media/016.html [deleted file]
LayoutTests/fast/media/017-expected.checksum [deleted file]
LayoutTests/fast/media/017-expected.png [deleted file]
LayoutTests/fast/media/017-expected.txt [deleted file]
LayoutTests/fast/media/017.html [deleted file]
LayoutTests/fast/media/018-expected.checksum [deleted file]
LayoutTests/fast/media/018-expected.png [deleted file]
LayoutTests/fast/media/018-expected.txt [deleted file]
LayoutTests/fast/media/018.html [deleted file]
LayoutTests/fast/media/019-expected.checksum [deleted file]
LayoutTests/fast/media/019-expected.png [deleted file]
LayoutTests/fast/media/019-expected.txt [deleted file]
LayoutTests/fast/media/019.html [deleted file]
LayoutTests/fast/media/020-expected.checksum [deleted file]
LayoutTests/fast/media/020-expected.png [deleted file]
LayoutTests/fast/media/020-expected.txt [deleted file]
LayoutTests/fast/media/020.html [deleted file]
LayoutTests/fast/media/021-expected.checksum [deleted file]
LayoutTests/fast/media/021-expected.png [deleted file]
LayoutTests/fast/media/021-expected.txt [deleted file]
LayoutTests/fast/media/021.html [deleted file]
LayoutTests/fast/media/022-expected.checksum [deleted file]
LayoutTests/fast/media/022-expected.png [deleted file]
LayoutTests/fast/media/022-expected.txt [deleted file]
LayoutTests/fast/media/022.html [deleted file]
LayoutTests/fast/media/023-expected.checksum [deleted file]
LayoutTests/fast/media/023-expected.png [deleted file]
LayoutTests/fast/media/023-expected.txt [deleted file]
LayoutTests/fast/media/023.html [deleted file]
LayoutTests/fast/media/024-expected.checksum [deleted file]
LayoutTests/fast/media/024-expected.png [deleted file]
LayoutTests/fast/media/024-expected.txt [deleted file]
LayoutTests/fast/media/024.html [deleted file]
LayoutTests/fast/media/025-expected.checksum [deleted file]
LayoutTests/fast/media/025-expected.png [deleted file]
LayoutTests/fast/media/025-expected.txt [deleted file]
LayoutTests/fast/media/025.html [deleted file]
LayoutTests/fast/media/026-expected.checksum [deleted file]
LayoutTests/fast/media/026-expected.png [deleted file]
LayoutTests/fast/media/026.html [deleted file]
LayoutTests/fast/media/import-p-green.css [deleted file]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/css_grammar.y
WebCore/css/css_mediaqueryeval.cpp [deleted file]
WebCore/css/css_mediaqueryeval.h [deleted file]
WebCore/css/css_mediaqueryimpl.cpp [deleted file]
WebCore/css/css_mediaqueryimpl.h [deleted file]
WebCore/css/css_stylesheetimpl.cpp
WebCore/css/css_stylesheetimpl.h
WebCore/css/css_valueimpl.h
WebCore/css/csshelper.h
WebCore/css/cssmediafeatures.in [deleted file]
WebCore/css/cssparser.cpp
WebCore/css/cssparser.h
WebCore/css/cssstyleselector.cpp
WebCore/css/cssstyleselector.h
WebCore/css/makemediafeatures [deleted file]
WebCore/css/maketokenizer
WebCore/css/tokenizer.flex
WebCore/khtml/html/html_headimpl.cpp
WebCore/platform/Screen.h
WebCore/platform/mac/Screen.mm

index 87e3165..9358108 100644 (file)
@@ -1,3 +1,113 @@
+2006-02-04  Maciej Stachowiak  <mjs@apple.com>
+
+        - reverted CSS media queries patch, as it causes random crashes on the
+        layout tests with a debug build.
+        
+        * fast/media/001-expected.checksum: Removed.
+        * fast/media/001-expected.png: Removed.
+        * fast/media/001-expected.txt: Removed.
+        * fast/media/001.html: Removed.
+        * fast/media/002-expected.checksum: Removed.
+        * fast/media/002-expected.png: Removed.
+        * fast/media/002-expected.txt: Removed.
+        * fast/media/002.html: Removed.
+        * fast/media/003-expected.checksum: Removed.
+        * fast/media/003-expected.png: Removed.
+        * fast/media/003-expected.txt: Removed.
+        * fast/media/003.html: Removed.
+        * fast/media/004-expected.checksum: Removed.
+        * fast/media/004-expected.png: Removed.
+        * fast/media/004-expected.txt: Removed.
+        * fast/media/004.html: Removed.
+        * fast/media/005-expected.checksum: Removed.
+        * fast/media/005-expected.png: Removed.
+        * fast/media/005-expected.txt: Removed.
+        * fast/media/005.html: Removed.
+        * fast/media/006-expected.checksum: Removed.
+        * fast/media/006-expected.png: Removed.
+        * fast/media/006-expected.txt: Removed.
+        * fast/media/006.html: Removed.
+        * fast/media/007-expected.checksum: Removed.
+        * fast/media/007-expected.png: Removed.
+        * fast/media/007-expected.txt: Removed.
+        * fast/media/007.html: Removed.
+        * fast/media/008-expected.checksum: Removed.
+        * fast/media/008-expected.png: Removed.
+        * fast/media/008-expected.txt: Removed.
+        * fast/media/008.html: Removed.
+        * fast/media/009-expected.checksum: Removed.
+        * fast/media/009-expected.png: Removed.
+        * fast/media/009-expected.txt: Removed.
+        * fast/media/009.html: Removed.
+        * fast/media/010-expected.checksum: Removed.
+        * fast/media/010-expected.png: Removed.
+        * fast/media/010-expected.txt: Removed.
+        * fast/media/010.html: Removed.
+        * fast/media/011-expected.checksum: Removed.
+        * fast/media/011-expected.png: Removed.
+        * fast/media/011-expected.txt: Removed.
+        * fast/media/011.html: Removed.
+        * fast/media/012-expected.checksum: Removed.
+        * fast/media/012-expected.png: Removed.
+        * fast/media/012-expected.txt: Removed.
+        * fast/media/012.html: Removed.
+        * fast/media/013-expected.checksum: Removed.
+        * fast/media/013-expected.png: Removed.
+        * fast/media/013-expected.txt: Removed.
+        * fast/media/013.html: Removed.
+        * fast/media/014-expected.checksum: Removed.
+        * fast/media/014-expected.png: Removed.
+        * fast/media/014-expected.txt: Removed.
+        * fast/media/014.html: Removed.
+        * fast/media/015-expected.checksum: Removed.
+        * fast/media/015-expected.png: Removed.
+        * fast/media/015-expected.txt: Removed.
+        * fast/media/015.html: Removed.
+        * fast/media/016-expected.checksum: Removed.
+        * fast/media/016-expected.png: Removed.
+        * fast/media/016-expected.txt: Removed.
+        * fast/media/016.html: Removed.
+        * fast/media/017-expected.checksum: Removed.
+        * fast/media/017-expected.png: Removed.
+        * fast/media/017-expected.txt: Removed.
+        * fast/media/017.html: Removed.
+        * fast/media/018-expected.checksum: Removed.
+        * fast/media/018-expected.png: Removed.
+        * fast/media/018-expected.txt: Removed.
+        * fast/media/018.html: Removed.
+        * fast/media/019-expected.checksum: Removed.
+        * fast/media/019-expected.png: Removed.
+        * fast/media/019-expected.txt: Removed.
+        * fast/media/019.html: Removed.
+        * fast/media/020-expected.checksum: Removed.
+        * fast/media/020-expected.png: Removed.
+        * fast/media/020-expected.txt: Removed.
+        * fast/media/020.html: Removed.
+        * fast/media/021-expected.checksum: Removed.
+        * fast/media/021-expected.png: Removed.
+        * fast/media/021-expected.txt: Removed.
+        * fast/media/021.html: Removed.
+        * fast/media/022-expected.checksum: Removed.
+        * fast/media/022-expected.png: Removed.
+        * fast/media/022-expected.txt: Removed.
+        * fast/media/022.html: Removed.
+        * fast/media/023-expected.checksum: Removed.
+        * fast/media/023-expected.png: Removed.
+        * fast/media/023-expected.txt: Removed.
+        * fast/media/023.html: Removed.
+        * fast/media/024-expected.checksum: Removed.
+        * fast/media/024-expected.png: Removed.
+        * fast/media/024-expected.txt: Removed.
+        * fast/media/024.html: Removed.
+        * fast/media/025-expected.checksum: Removed.
+        * fast/media/025-expected.png: Removed.
+        * fast/media/025-expected.txt: Removed.
+        * fast/media/025.html: Removed.
+        * fast/media/026-expected.checksum: Removed.
+        * fast/media/026-expected.png: Removed.
+        * fast/media/026.html: Removed.
+        * fast/media/import-p-green.css: Removed.
+
 2006-02-03  Darin Adler  <darin@apple.com>
 
         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=5210
diff --git a/LayoutTests/fast/media/001-expected.checksum b/LayoutTests/fast/media/001-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/001-expected.png b/LayoutTests/fast/media/001-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/001-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/001-expected.txt b/LayoutTests/fast/media/001-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/001.html b/LayoutTests/fast/media/001.html
deleted file mode 100644 (file)
index b538102..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title> HTML4 media descriptions parsing style element media= content</title>  
-<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
-
-<style type="text/css" media="3d-glasses, screen and resolution > 40dpi, braille">
-p { color: green; }
-</style>
-
-</head>
-<body>
-</body>
-<p> This text should be green. </p>
-</html>
diff --git a/LayoutTests/fast/media/002-expected.checksum b/LayoutTests/fast/media/002-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/002-expected.png b/LayoutTests/fast/media/002-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/002-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/002-expected.txt b/LayoutTests/fast/media/002-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/002.html b/LayoutTests/fast/media/002.html
deleted file mode 100644 (file)
index 2a91bca..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head>
-<title> HTML4 media descriptions parsing style element media= content</title> 
-<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
-<!-- actual testcase from http://www.hixie.ch/tests/evil/css/import/extra/styleexoticmedia.html -->
-<style type="text/css" media="screen;braille">
-p{color: green; }
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/003-expected.checksum b/LayoutTests/fast/media/003-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/003-expected.png b/LayoutTests/fast/media/003-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/003-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/003-expected.txt b/LayoutTests/fast/media/003-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/003.html b/LayoutTests/fast/media/003.html
deleted file mode 100644 (file)
index c00ffbf..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<head>
-<title> HTML4 media descriptions parsing style element media= content</title> 
-<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
-
-<!-- actual testcase from http://www.hixie.ch/tests/evil/css/import/extra/styleexoticmedia.html -->
-<style type="text/css" media="braille, all with print">
-p{color: green;}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p> 
-</body>
-</html>
diff --git a/LayoutTests/fast/media/004-expected.checksum b/LayoutTests/fast/media/004-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/004-expected.png b/LayoutTests/fast/media/004-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/004-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/004-expected.txt b/LayoutTests/fast/media/004-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/004.html b/LayoutTests/fast/media/004.html
deleted file mode 100644 (file)
index f07fdfe..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test:  media only all</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-
-<style type="text/css">
-@media only all { 
- p {
-  color: green;
- }
-}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/005-expected.checksum b/LayoutTests/fast/media/005-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/005-expected.png b/LayoutTests/fast/media/005-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/005-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/005-expected.txt b/LayoutTests/fast/media/005-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/005.html b/LayoutTests/fast/media/005.html
deleted file mode 100644 (file)
index cb2edb6..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: not braille, screen</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-
-<style type="text/css">
-@media not braille, screen { 
- p {
-  color: green;
- }
-}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/media/006-expected.checksum b/LayoutTests/fast/media/006-expected.checksum
deleted file mode 100644 (file)
index 2638c66..0000000
+++ /dev/null
@@ -1 +0,0 @@
-c3a4b15983b538a5247299245f383ea5
\ No newline at end of file
diff --git a/LayoutTests/fast/media/006-expected.png b/LayoutTests/fast/media/006-expected.png
deleted file mode 100644 (file)
index f81a569..0000000
Binary files a/LayoutTests/fast/media/006-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/006-expected.txt b/LayoutTests/fast/media/006-expected.txt
deleted file mode 100644 (file)
index aebbec7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 808x600
-  RenderCanvas at (0,0) size 785x585
-layer at (0,0) size 808x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock {P} at (0,0) size 769x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 378x18
-          text run at (0,0) width 378: "This text should be green if viewport is at most 800px wide."
-      RenderBlock {DIV} at (0,34) size 800x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 121x18
-          text run at (0,0) width 121: "div of width 800px"
diff --git a/LayoutTests/fast/media/006.html b/LayoutTests/fast/media/006.html
deleted file mode 100644 (file)
index c84810d..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: screen and (max-width: 800px)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: red;
-}
-@media screen and (max-width: 800px) {
-   p {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-<p> This text should be green if viewport is at most 800px wide.</p>
-<div style="width: 800px; background-color:lightblue;">div of width 800px</div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/007-expected.checksum b/LayoutTests/fast/media/007-expected.checksum
deleted file mode 100644 (file)
index 54d2303..0000000
+++ /dev/null
@@ -1 +0,0 @@
-05a863a321f32f15ca96f0b745ab6823
\ No newline at end of file
diff --git a/LayoutTests/fast/media/007-expected.png b/LayoutTests/fast/media/007-expected.png
deleted file mode 100644 (file)
index 821360d..0000000
Binary files a/LayoutTests/fast/media/007-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/007-expected.txt b/LayoutTests/fast/media/007-expected.txt
deleted file mode 100644 (file)
index c02113d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 399x18
-          text run at (0,0) width 399: "This text should be green if viewport is at most 800px x 600px."
diff --git a/LayoutTests/fast/media/007.html b/LayoutTests/fast/media/007.html
deleted file mode 100644 (file)
index 23e66ac..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: screen and (max-width: 800px) and (max-height:600px)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: red;
-}
-@media screen and (max-width: 800px) and (max-height:600px){
-   p {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-<p> This text should be green if viewport is at most 800px x 600px.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/008-expected.checksum b/LayoutTests/fast/media/008-expected.checksum
deleted file mode 100644 (file)
index 9dfbfbd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-13a8a15857868d43e1af1086030f97cf
\ No newline at end of file
diff --git a/LayoutTests/fast/media/008-expected.png b/LayoutTests/fast/media/008-expected.png
deleted file mode 100644 (file)
index 32b1021..0000000
Binary files a/LayoutTests/fast/media/008-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/008-expected.txt b/LayoutTests/fast/media/008-expected.txt
deleted file mode 100644 (file)
index 8225550..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 308x18
-          text run at (0,0) width 308: "This text should be green if color display is used."
diff --git a/LayoutTests/fast/media/008.html b/LayoutTests/fast/media/008.html
deleted file mode 100644 (file)
index 8257949..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: screen and (color)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#color" />
-
-<style type="text/css">
-p {
-  color: red;
-}
-@media screen and (color) {
-   p {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-<p> This text should be green if color display is used.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/009-expected.checksum b/LayoutTests/fast/media/009-expected.checksum
deleted file mode 100644 (file)
index 49da6cb..0000000
+++ /dev/null
@@ -1 +0,0 @@
-4c146be940e196c365414a6205da5a8d
\ No newline at end of file
diff --git a/LayoutTests/fast/media/009-expected.png b/LayoutTests/fast/media/009-expected.png
deleted file mode 100644 (file)
index 09d1e86..0000000
Binary files a/LayoutTests/fast/media/009-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/009-expected.txt b/LayoutTests/fast/media/009-expected.txt
deleted file mode 100644 (file)
index 1bc6635..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 381x18
-          text run at (0,0) width 381: "This text should be green if viewport width is at least 600px."
diff --git a/LayoutTests/fast/media/009.html b/LayoutTests/fast/media/009.html
deleted file mode 100644 (file)
index ee03317..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: import with screen and (min-width: 600px) </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-<link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#at-import" />
-
-<style type="text/css">
-p { color: red; } 
-</style>
-<style type="text/css">
-@import url(import-p-green.css) screen and (min-width: 600px);
-</style>
-</head>
-<body>
-<p> This text should be green if viewport width is at least 600px.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/010-expected.checksum b/LayoutTests/fast/media/010-expected.checksum
deleted file mode 100644 (file)
index 710b1d2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1c11b6a1285dfb1dad48634108141ce9
\ No newline at end of file
diff --git a/LayoutTests/fast/media/010-expected.png b/LayoutTests/fast/media/010-expected.png
deleted file mode 100644 (file)
index 8ae8bb2..0000000
Binary files a/LayoutTests/fast/media/010-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/010-expected.txt b/LayoutTests/fast/media/010-expected.txt
deleted file mode 100644 (file)
index 53d1cf6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 378x18
-          text run at (0,0) width 378: "This text should be green if viewing device is bitmap device"
diff --git a/LayoutTests/fast/media/010.html b/LayoutTests/fast/media/010.html
deleted file mode 100644 (file)
index 0257f8a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: import with screen and (grid: 0) </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css">
-@media screen and (grid: 0) {
-p { color: green; }
-}
-</style>
-</head>
-<body>
-<p> This text should be green if viewing device is bitmap device</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/media/011-expected.checksum b/LayoutTests/fast/media/011-expected.checksum
deleted file mode 100644 (file)
index 66c0eb6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-364923683606083e6728dc6edcf76f89
\ No newline at end of file
diff --git a/LayoutTests/fast/media/011-expected.png b/LayoutTests/fast/media/011-expected.png
deleted file mode 100644 (file)
index ffef682..0000000
Binary files a/LayoutTests/fast/media/011-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/011-expected.txt b/LayoutTests/fast/media/011-expected.txt
deleted file mode 100644 (file)
index 945bc17..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 399x18
-          text run at (0,0) width 399: "This text should be green if viewing device is not a grid device."
diff --git a/LayoutTests/fast/media/011.html b/LayoutTests/fast/media/011.html
deleted file mode 100644 (file)
index c05d3ae..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: import with not screen and (grid) </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#grid" />
-
-<style type="text/css">
-@media not screen and (grid) {
-p { color: green; }
-}
-</style>
-</head>
-<body>
-<p> This text should be green if viewing device is not a grid device.</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/media/012-expected.checksum b/LayoutTests/fast/media/012-expected.checksum
deleted file mode 100644 (file)
index b2c2964..0000000
+++ /dev/null
@@ -1 +0,0 @@
-c801be0c86a8d567b3f5be9ffe5e01f4
\ No newline at end of file
diff --git a/LayoutTests/fast/media/012-expected.png b/LayoutTests/fast/media/012-expected.png
deleted file mode 100644 (file)
index c345e8c..0000000
Binary files a/LayoutTests/fast/media/012-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/012-expected.txt b/LayoutTests/fast/media/012-expected.txt
deleted file mode 100644 (file)
index 8092a01..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 968x600
-  RenderCanvas at (0,0) size 785x585
-layer at (0,0) size 968x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock {P} at (0,0) size 769x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 381x18
-          text run at (0,0) width 381: "This text should be green if viewport is narrower than 60em."
-      RenderBlock {DIV} at (0,34) size 960x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 123x18
-          text run at (0,0) width 123: "div of length 60 em"
-      RenderBlock {DIV} at (0,52) size 800x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 124x18
-          text run at (0,0) width 124: "div of length 800px"
diff --git a/LayoutTests/fast/media/012.html b/LayoutTests/fast/media/012.html
deleted file mode 100644 (file)
index 3608c70..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: relative constraints test using screen and (max-width: 60em)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: red;
-}
-@media screen and (max-width: 60em) {
-   p {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-
-<p> This text should be green if viewport is narrower than 60em.  </p>
-
-<div style="width: 60em; background-color: lightblue;"> div of length 60 em </div>
-<div style="width: 800px; background-color: lightblue;"> div of length 800px </div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/013-expected.checksum b/LayoutTests/fast/media/013-expected.checksum
deleted file mode 100644 (file)
index 679e47a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bccd379d30fd3d06b032e0df3728e2b4
\ No newline at end of file
diff --git a/LayoutTests/fast/media/013-expected.png b/LayoutTests/fast/media/013-expected.png
deleted file mode 100644 (file)
index ca39f15..0000000
Binary files a/LayoutTests/fast/media/013-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/013-expected.txt b/LayoutTests/fast/media/013-expected.txt
deleted file mode 100644 (file)
index bbb63b1..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 808x600
-  RenderCanvas at (0,0) size 785x585
-layer at (0,0) size 808x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock {P} at (0,0) size 769x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 360x18
-          text run at (0,0) width 360: "This text should be green if viewport is wider than 30em."
-      RenderBlock {DIV} at (0,34) size 480x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 123x18
-          text run at (0,0) width 123: "div of length 30 em"
-      RenderBlock {DIV} at (0,52) size 800x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 124x18
-          text run at (0,0) width 124: "div of length 800px"
diff --git a/LayoutTests/fast/media/013.html b/LayoutTests/fast/media/013.html
deleted file mode 100644 (file)
index 9050394..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: relative constraints test using screen and (min-width: 30em)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: red;
-}
-@media screen and (min-width: 30em) {
-   p {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-
-<p> This text should be green if viewport is wider than 30em.  </p>
-
-<div style="width: 30em; background-color: lightblue;"> div of length 30 em </div>
-<div style="width: 800px; background-color: lightblue;"> div of length 800px </div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/014-expected.checksum b/LayoutTests/fast/media/014-expected.checksum
deleted file mode 100644 (file)
index ca5ca38..0000000
+++ /dev/null
@@ -1 +0,0 @@
-43a7cd01a8a6327c8980a0357097bab5
\ No newline at end of file
diff --git a/LayoutTests/fast/media/014-expected.png b/LayoutTests/fast/media/014-expected.png
deleted file mode 100644 (file)
index 61977f8..0000000
Binary files a/LayoutTests/fast/media/014-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/014-expected.txt b/LayoutTests/fast/media/014-expected.txt
deleted file mode 100644 (file)
index 568aeea..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 968x600
-  RenderCanvas at (0,0) size 785x585
-layer at (0,0) size 968x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock {P} at (0,0) size 769x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 728x18
-          text run at (0,0) width 728: "This text should be green if viewport is narrower than 60em. This tests that (min-width: 60em) can evaluate to false."
-      RenderBlock {DIV} at (0,34) size 960x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 123x18
-          text run at (0,0) width 123: "div of length 60 em"
-      RenderBlock {DIV} at (0,52) size 800x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 124x18
-          text run at (0,0) width 124: "div of length 800px"
diff --git a/LayoutTests/fast/media/014.html b/LayoutTests/fast/media/014.html
deleted file mode 100644 (file)
index b4eb207..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: relative constraints test using screen and (min-width: 60em)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: green;
-}
-@media screen and (min-width: 60em) {
-   p {
-     color: red;
-  }
-}
-</style>
-</head>
-<body>
-
-<p> This text should be green if viewport is narrower than 60em. This tests that (min-width: 60em) can evaluate to false.</p>
-
-<div style="width: 60em; background-color: lightblue;"> div of length 60 em </div>
-<div style="width: 800px; background-color: lightblue;"> div of length 800px </div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/015-expected.checksum b/LayoutTests/fast/media/015-expected.checksum
deleted file mode 100644 (file)
index 4b24c01..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bdd79ae10c3636b21df9cf919841ba91
\ No newline at end of file
diff --git a/LayoutTests/fast/media/015-expected.png b/LayoutTests/fast/media/015-expected.png
deleted file mode 100644 (file)
index 0aeee3d..0000000
Binary files a/LayoutTests/fast/media/015-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/015-expected.txt b/LayoutTests/fast/media/015-expected.txt
deleted file mode 100644 (file)
index 84d0848..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 808x600
-  RenderCanvas at (0,0) size 785x585
-layer at (0,0) size 808x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderBlock {P} at (0,0) size 769x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 710x18
-          text run at (0,0) width 710: "This text should be green if viewport is wider than 30em. This tests that (max-width: 30em) can evaluate to false."
-      RenderBlock {DIV} at (0,34) size 480x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 123x18
-          text run at (0,0) width 123: "div of length 30 em"
-      RenderBlock {DIV} at (0,52) size 800x18 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 124x18
-          text run at (0,0) width 124: "div of length 800px"
diff --git a/LayoutTests/fast/media/015.html b/LayoutTests/fast/media/015.html
deleted file mode 100644 (file)
index b09c166..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: relative constraints test using screen and (max-width: 30em)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-p {
-  color: green;
-}
-@media screen and (max-width: 30em) {
-   p {
-     color: red;
-  }
-}
-</style>
-</head>
-<body>
-
-<p> This text should be green if viewport is wider than 30em. This tests that (max-width: 30em) can evaluate to false. </p>
-
-<div style="width: 30em; background-color: lightblue;"> div of length 30 em </div>
-<div style="width: 800px; background-color: lightblue;"> div of length 800px </div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/016-expected.checksum b/LayoutTests/fast/media/016-expected.checksum
deleted file mode 100644 (file)
index c488e8b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-59693b3b56b343b7a841b54e4d5d41f2
\ No newline at end of file
diff --git a/LayoutTests/fast/media/016-expected.png b/LayoutTests/fast/media/016-expected.png
deleted file mode 100644 (file)
index 65a9c61..0000000
Binary files a/LayoutTests/fast/media/016-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/016-expected.txt b/LayoutTests/fast/media/016-expected.txt
deleted file mode 100644 (file)
index 78f1c87..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-layer at (0,0) size 785x608
-  RenderCanvas at (0,0) size 785x600
-layer at (0,0) size 785x600
-  RenderBlock {HTML} at (0,0) size 785x600
-    RenderBody {BODY} at (8,8) size 769x584
-      RenderInline {SPAN} at (0,0) size 315x18 [color=#008000]
-        RenderText {TEXT} at (239,0) size 315x18
-          text run at (239,0) width 315: "This text should be green if height is atleast 30ex ."
-      RenderText {TEXT} at (0,0) size 0x0
-      RenderBlock (floating) {DIV} at (0,0) size 115x229 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 115x18
-          text run at (0,0) width 115: "div of height 30ex"
-      RenderText {TEXT} at (0,0) size 0x0
-      RenderBlock (floating) {DIV} at (115,0) size 124x600 [bgcolor=#ADD8E6]
-        RenderText {TEXT} at (0,0) size 124x18
-          text run at (0,0) width 124: "div of height 600px"
-      RenderText {TEXT} at (0,0) size 0x0
-      RenderText {TEXT} at (0,0) size 0x0
-      RenderText {TEXT} at (0,0) size 0x0
diff --git a/LayoutTests/fast/media/016.html b/LayoutTests/fast/media/016.html
deleted file mode 100644 (file)
index 9616069..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: relative constraints test using screen and (min-height: 30ex)</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#width" />
-
-<style type="text/css">
-span {
-  color: red;
-}
-@media screen and (min-height: 30ex) {
-   span {
-     color: green;
-  }
-}
-</style>
-</head>
-<body>
-
-<span> This text should be green if height is atleast 30ex .</span>
-
-<div style="block:inline; float:left; height: 30ex; background-color: lightblue;"> div of height 30ex </div>
-<div style="block:inline; float:left; height: 600px; background-color: lightblue;"> div of height 600px </div>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/017-expected.checksum b/LayoutTests/fast/media/017-expected.checksum
deleted file mode 100644 (file)
index 551aced..0000000
+++ /dev/null
@@ -1 +0,0 @@
-7499a40172304d162bb6dbf0ac77e8dd
\ No newline at end of file
diff --git a/LayoutTests/fast/media/017-expected.png b/LayoutTests/fast/media/017-expected.png
deleted file mode 100644 (file)
index 15d3031..0000000
Binary files a/LayoutTests/fast/media/017-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/017-expected.txt b/LayoutTests/fast/media/017-expected.txt
deleted file mode 100644 (file)
index abf8b8c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 317x18
-          text run at (0,0) width 317: "This text should be green on bitmap color devices."
diff --git a/LayoutTests/fast/media/017.html b/LayoutTests/fast/media/017.html
deleted file mode 100644 (file)
index b7a7827..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: screen and (color) and (grid:0) should evaluate true</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-
-<style type="text/css" media="screen and (color) and (grid:0)">
- p {
-  color: green;
- }
-</style>
-
-</head>
-<body>
-<p> This text should be green on bitmap color devices.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/018-expected.checksum b/LayoutTests/fast/media/018-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/018-expected.png b/LayoutTests/fast/media/018-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/018-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/018-expected.txt b/LayoutTests/fast/media/018-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/018.html b/LayoutTests/fast/media/018.html
deleted file mode 100644 (file)
index 81b9be7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: not braille</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css">
-@media not braille { 
- p {
-  color: green;
- }
-}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/media/019-expected.checksum b/LayoutTests/fast/media/019-expected.checksum
deleted file mode 100644 (file)
index 0dc845a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bfd66393358e49a5b1c09f4acb698233
\ No newline at end of file
diff --git a/LayoutTests/fast/media/019-expected.png b/LayoutTests/fast/media/019-expected.png
deleted file mode 100644 (file)
index 30393f9..0000000
Binary files a/LayoutTests/fast/media/019-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/019-expected.txt b/LayoutTests/fast/media/019-expected.txt
deleted file mode 100644 (file)
index fe0af81..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {TEXT} at (0,0) size 610x18
-          text run at (0,0) width 610: "The text below should be green and contain \"braille, media, screen and (color) and (grid: 0), tty\"."
-      RenderBlock {P} at (0,34) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 312x18
-          text run at (0,0) width 312: "braille, media, screen and (color) and (grid: 0), tty"
diff --git a/LayoutTests/fast/media/019.html b/LayoutTests/fast/media/019.html
deleted file mode 100644 (file)
index 50c88bf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: stylesheet media.mediaText property inspection</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-
-<style type="text/css" media="braille, media with error, screen and (color) and (grid:0), tty resolution > 600px">
-#result {
-  color: green;
-}
-</style>
-
-<script language="javascript">
-function test() {
-    re = document.getElementById("result");
-    re.innerHTML = "started";
-    re.innerHTML = document.styleSheets[0].media.mediaText;
-}
-</script>
-
-</head>
-<body onload="test()">
-<p> The text below should be green and contain "braille, media, screen and (color) and (grid: 0), tty". </p>
-<p id="result">test not run</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/020-expected.checksum b/LayoutTests/fast/media/020-expected.checksum
deleted file mode 100644 (file)
index 0dc845a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-bfd66393358e49a5b1c09f4acb698233
\ No newline at end of file
diff --git a/LayoutTests/fast/media/020-expected.png b/LayoutTests/fast/media/020-expected.png
deleted file mode 100644 (file)
index 30393f9..0000000
Binary files a/LayoutTests/fast/media/020-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/020-expected.txt b/LayoutTests/fast/media/020-expected.txt
deleted file mode 100644 (file)
index fe0af81..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {TEXT} at (0,0) size 610x18
-          text run at (0,0) width 610: "The text below should be green and contain \"braille, media, screen and (color) and (grid: 0), tty\"."
-      RenderBlock {P} at (0,34) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 312x18
-          text run at (0,0) width 312: "braille, media, screen and (color) and (grid: 0), tty"
diff --git a/LayoutTests/fast/media/020.html b/LayoutTests/fast/media/020.html
deleted file mode 100644 (file)
index be2d988..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: stylesheet media.mediaText property inspection should work</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-<link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" />
-
-<style type="text/css" media="braille, media with error, screen and (color) and (grid:0), tty resolution > 600px">
-#result {
-  color: green;
-}
-</style>
-
-<script language="javascript">
-function test() {
-    re = document.getElementById("result");
-    re.innerHTML = "started";
-    re.innerHTML = document.styleSheets[0].media.item(0) 
-                    + ", " + document.styleSheets[0].media.item(1) 
-                    + ", " + document.styleSheets[0].media.item(2) 
-                    + ", " + document.styleSheets[0].media.item(3) ;                                        
-}
-</script>
-
-</head>
-<body onload="test()">
-<p> The text below should be green and contain "braille, media, screen and (color) and (grid: 0), tty". </p>
-<p id="result">test not run</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/021-expected.checksum b/LayoutTests/fast/media/021-expected.checksum
deleted file mode 100644 (file)
index 24f456d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5f9f2be9db02e8db55395eed16fd5d24
\ No newline at end of file
diff --git a/LayoutTests/fast/media/021-expected.png b/LayoutTests/fast/media/021-expected.png
deleted file mode 100644 (file)
index 50e330d..0000000
Binary files a/LayoutTests/fast/media/021-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/021-expected.txt b/LayoutTests/fast/media/021-expected.txt
deleted file mode 100644 (file)
index 9066d32..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {TEXT} at (0,0) size 560x18
-          text run at (0,0) width 560: "This text should be green and below should read \"braille, not screen, screen and (color)\"."
-      RenderBlock {P} at (0,34) size 784x18
-        RenderText {TEXT} at (0,0) size 232x18
-          text run at (0,0) width 232: "braille, not screen, screen and (color)"
-      RenderBlock {P} at (0,68) size 784x18
-        RenderText {TEXT} at (0,0) size 182x18
-          text run at (0,0) width 182: "expected to fail (24.07.2005)"
diff --git a/LayoutTests/fast/media/021.html b/LayoutTests/fast/media/021.html
deleted file mode 100644 (file)
index 67882c7..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: stylesheet media appendMedium should work</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
-<link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" />
-<style type="text/css" media="braille, not screen">
-p {
-  color: green;
-}
-</style>
-
-<script language="javascript">
-function test() {
-    var re = document.getElementById("result");
-    var media = document.styleSheets[0].media;
-    media.appendMedium("screen and (color)");
-    var first = true;
-    for (var i = 0; i < media.length; ++i) {        
-        if (!first)  re.innerHTML += ", " + media.item(i);
-        else re.innerHTML = media.item(i);
-        first = false;
-    }
-
-}
-</script>
-
-</head>
-<body onload="test()">
-<!-- XXX: NOTE! This will fail until dynamic setting of media property causes style recalculation.
-          This is not the case currently (24.07.2005)
--->
-<p> This text should be green and below should read "braille, not screen, screen and (color)". </p>
-<p id="result">test not run</p>
-<p> expected to fail (24.07.2005)</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/022-expected.checksum b/LayoutTests/fast/media/022-expected.checksum
deleted file mode 100644 (file)
index c8a51f6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ab6b6fd71e9f104e2db1642352a043d7
\ No newline at end of file
diff --git a/LayoutTests/fast/media/022-expected.png b/LayoutTests/fast/media/022-expected.png
deleted file mode 100644 (file)
index 5bcd010..0000000
Binary files a/LayoutTests/fast/media/022-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/022-expected.txt b/LayoutTests/fast/media/022-expected.txt
deleted file mode 100644 (file)
index 7987d34..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {TEXT} at (0,0) size 445x18
-          text run at (0,0) width 445: "This text should be green and below should read \"media list is empty\"."
-      RenderBlock {P} at (0,34) size 784x18
-        RenderText {TEXT} at (0,0) size 117x18
-          text run at (0,0) width 117: "media list is empty"
diff --git a/LayoutTests/fast/media/022.html b/LayoutTests/fast/media/022.html
deleted file mode 100644 (file)
index b86bdfe..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: stylesheet media deleteMedium should work</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-<link rel="help" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html" />
-<style type="text/css" media="braille, not screen">
-p {
-  color: green;
-}
-</style>
-
-<script language="javascript">
-function test() {
-    var re = document.getElementById("result");
-    var media = document.styleSheets[0].media;
-    media.appendMedium("screen and (color)");
-    while (media.length) {
-        media.deleteMedium(media.item(0));
-    }
-    re.innerHTML = "media list is empty"
-    var first = true;
-    for (var i = 0; i < media.length; ++i) {        
-        if (!first)  re.innerHTML += ", " + media.item(i);
-        else re.innerHTML = media.item(i);
-        first = false;
-    }
-}
-</script>
-
-</head>
-<body onload="test()">
-<!-- XXX: NOTE! This will fail until dynamic setting of media property causes style recalculation.
-          This is not the case currently (24.07.2005)
--->
-<p> This text should be green and below should read "media list is empty".  </p>
-<p id="result">test not run</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/023-expected.checksum b/LayoutTests/fast/media/023-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/023-expected.png b/LayoutTests/fast/media/023-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/023-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/023-expected.txt b/LayoutTests/fast/media/023-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/023.html b/LayoutTests/fast/media/023.html
deleted file mode 100644 (file)
index 0da63fb..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: media not braille should eval true</title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css" media="not braille">
-p {
-  color: green;
-}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/024-expected.checksum b/LayoutTests/fast/media/024-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/024-expected.png b/LayoutTests/fast/media/024-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/024-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/024-expected.txt b/LayoutTests/fast/media/024-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/024.html b/LayoutTests/fast/media/024.html
deleted file mode 100644 (file)
index 99b22e0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: media not screen should eval false </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css">
-p {
-    color: green;
-}
-</style>
-
-<style type="text/css" media="not screen">
-p {
-    color: red;
-}
-</style>
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/025-expected.checksum b/LayoutTests/fast/media/025-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/025-expected.png b/LayoutTests/fast/media/025-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/025-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/025-expected.txt b/LayoutTests/fast/media/025-expected.txt
deleted file mode 100644 (file)
index b8e584f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-layer at (0,0) size 800x600
-  RenderCanvas at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18 [color=#008000]
-        RenderText {TEXT} at (0,0) size 163x18
-          text run at (0,0) width 163: "This text should be green."
diff --git a/LayoutTests/fast/media/025.html b/LayoutTests/fast/media/025.html
deleted file mode 100644 (file)
index 60a79eb..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: media all and invalid should eval false </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css">
-p {
-    color: green;
-}
-
-@media all and invalid {
-p {
-    color: red;
-}
-}
-</style>
-
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/026-expected.checksum b/LayoutTests/fast/media/026-expected.checksum
deleted file mode 100644 (file)
index b861cda..0000000
+++ /dev/null
@@ -1 +0,0 @@
-915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
diff --git a/LayoutTests/fast/media/026-expected.png b/LayoutTests/fast/media/026-expected.png
deleted file mode 100644 (file)
index 57bc6ac..0000000
Binary files a/LayoutTests/fast/media/026-expected.png and /dev/null differ
diff --git a/LayoutTests/fast/media/026.html b/LayoutTests/fast/media/026.html
deleted file mode 100644 (file)
index 90d0a32..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<html>
-<head>
-<title> CSS3 media query test: matches color or monochrome screens </title>  
-<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/" />
-
-<style type="text/css">
-
-p {
-    color: red;
-}
-
-@media all and (color) {
-p { color: green;}
-}
-
-@media all and (monochrome){
-p { color: green;}
-}
-
-</style>
-
-
-</head>
-<body>
-<p> This text should be green.</p>
-</body>
-</html>
diff --git a/LayoutTests/fast/media/import-p-green.css b/LayoutTests/fast/media/import-p-green.css
deleted file mode 100644 (file)
index 37d1e04..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-p {
- color: green;
-}
index 41fdf7f..3529841 100644 (file)
@@ -1,3 +1,49 @@
+2006-02-04  Maciej Stachowiak  <mjs@apple.com>
+
+        - reverted CSS media queries patch, as it causes random crashes on the
+        layout tests with a debug build.
+        
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/css_grammar.y:
+        * css/css_mediaqueryeval.cpp: Removed.
+        * css/css_mediaqueryeval.h: Removed.
+        * css/css_mediaqueryimpl.cpp: Removed.
+        * css/css_mediaqueryimpl.h: Removed.
+        * css/css_stylesheetimpl.cpp:
+        (MediaListImpl::MediaListImpl):
+        (MediaListImpl::contains):
+        (MediaListImpl::deleteMedium):
+        (MediaListImpl::mediaText):
+        (MediaListImpl::setMediaText):
+        * css/css_stylesheetimpl.h:
+        (DOM::MediaListImpl::length):
+        (DOM::MediaListImpl::item):
+        (DOM::MediaListImpl::appendMedium):
+        * css/css_valueimpl.h:
+        * css/csshelper.h:
+        * css/cssmediafeatures.in: Removed.
+        * css/cssparser.cpp:
+        * css/cssparser.h:
+        * css/cssstyleselector.cpp:
+        (WebCore::CSSStyleSelector::CSSStyleSelector):
+        (WebCore::CSSStyleSelector::init):
+        (WebCore::CSSStyleSelector::~CSSStyleSelector):
+        (WebCore::CSSStyleSelector::loadDefaultStyle):
+        (WebCore::CSSStyleSelector::styleForElement):
+        (WebCore::CSSStyleSelector::styleRulesForElement):
+        (WebCore::CSSRuleSet::addRulesFromSheet):
+        (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
+        * css/cssstyleselector.h:
+        * css/makemediafeatures: Removed.
+        * css/maketokenizer:
+        * css/tokenizer.flex:
+        * khtml/html/html_headimpl.cpp:
+        (WebCore::HTMLLinkElementImpl::process):
+        (WebCore::HTMLLinkElementImpl::setStyleSheet):
+        (WebCore::HTMLStyleElementImpl::childrenChanged):
+        * platform/Screen.h:
+        * platform/mac/Screen.mm:
+
 2006-02-04  Andrew Wellington  <proton@wiretapped.net>
 
         Reviewed and tweaked by Darin.
index 5a13757..f877af1 100644 (file)
                1A69D381085627410009880D /* domparser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A69D37F085627410009880D /* domparser.h */; };
                1A69D382085627410009880D /* domparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A69D380085627410009880D /* domparser.cpp */; };
                1ADB5699098827AD0032EEE2 /* JSEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADB5698098827AD0032EEE2 /* JSEvents.cpp */; };
-               47E4D99E09937047006A96C7 /* css_mediaqueryeval.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47E4D99A09937047006A96C7 /* css_mediaqueryeval.cpp */; };
-               47E4D99F09937047006A96C7 /* css_mediaqueryeval.h in Headers */ = {isa = PBXBuildFile; fileRef = 47E4D99B09937047006A96C7 /* css_mediaqueryeval.h */; };
-               47E4D9A009937047006A96C7 /* css_mediaqueryimpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 47E4D99C09937047006A96C7 /* css_mediaqueryimpl.cpp */; };
-               47E4D9A109937047006A96C7 /* css_mediaqueryimpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 47E4D99D09937047006A96C7 /* css_mediaqueryimpl.h */; };
                550A0BC9085F6039007353D6 /* dom_qname.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* dom_qname.cpp */; };
                550A0BCA085F6039007353D6 /* dom_qname.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* dom_qname.h */; };
                550A0BCD085F604D007353D6 /* htmlnames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BCB085F604D007353D6 /* htmlnames.cpp */; };
                2D90660B0665D937006B6F1A /* KWQClipboard.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = KWQClipboard.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                2D90660C0665D937006B6F1A /* KWQClipboard.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = KWQClipboard.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                4758C44308C5F217009BAF05 /* KCanvasPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KCanvasPath.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-               47E4D99A09937047006A96C7 /* css_mediaqueryeval.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = css_mediaqueryeval.cpp; sourceTree = "<group>"; };
-               47E4D99B09937047006A96C7 /* css_mediaqueryeval.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = css_mediaqueryeval.h; sourceTree = "<group>"; };
-               47E4D99C09937047006A96C7 /* css_mediaqueryimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = css_mediaqueryimpl.cpp; sourceTree = "<group>"; };
-               47E4D99D09937047006A96C7 /* css_mediaqueryimpl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = css_mediaqueryimpl.h; sourceTree = "<group>"; };
                5150C2A10702629000AF642C /* WebDashboardRegion.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDashboardRegion.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                5150C2A50702629800AF642C /* WebDashboardRegion.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDashboardRegion.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                51F6A3D50663BF04004D2919 /* html_canvasimpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = html_canvasimpl.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                F523D18402DE42E8018635CA /* css */ = {
                        isa = PBXGroup;
                        children = (
-                               47E4D99A09937047006A96C7 /* css_mediaqueryeval.cpp */,
-                               47E4D99B09937047006A96C7 /* css_mediaqueryeval.h */,
-                               47E4D99C09937047006A96C7 /* css_mediaqueryimpl.cpp */,
-                               47E4D99D09937047006A96C7 /* css_mediaqueryimpl.h */,
                                BCEA477A097CAAC80094C9E4 /* css_base.cpp */,
                                BCEA477B097CAAC80094C9E4 /* css_base.h */,
                                BCEA477C097CAAC80094C9E4 /* css_computedstyle.cpp */,
                                BC6B7A9809933F2E0052867B /* ImageDecoder.h in Headers */,
                                BC6B7B3C099355460052867B /* ImageData.h in Headers */,
                                BC6B7BBC0993611A0052867B /* PDFDocumentImage.h in Headers */,
-                               47E4D99F09937047006A96C7 /* css_mediaqueryeval.h in Headers */,
-                               47E4D9A109937047006A96C7 /* css_mediaqueryimpl.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        buildConfigurationList = 149C283908902B11008A9EFC /* Build configuration list for PBXNativeTarget "WebCore" */;
                        buildPhases = (
                                932FC2C70824B485005B3C75 /* cssproperties.c/h */,
-                               47E4D99809936F1B006A96C7 /* cssmediafeatures.c/h */,
                                932FC2BC0824B422005B3C75 /* cssvalues.c/h */,
                                932FC0B70824A175005B3C75 /* doctypes.cpp */,
                                93EA686C08249AF400687F56 /* kentities.c */,
                        shellPath = /bin/sh;
                        shellScript = "/usr/bin/perl -I\"$SRCROOT/bindings/scripts\" \"$SRCROOT/bindings/scripts/generate-bindings.pl\" --generator JS --idldir \"$SRCROOT/khtml/xml\" --outputdir \"$DERIVED_FILE_DIR\"\n";
                };
-               47E4D99809936F1B006A96C7 /* cssmediafeatures.c/h */ = {
-                       isa = PBXShellScriptBuildPhase;
-                       buildActionMask = 2147483647;
-                       files = (
-                       );
-                       inputPaths = (
-                               css/cssmediafeatures.in,
-                               css/makemediafeatures,
-                       );
-                       name = cssmediafeatures.c/h;
-                       outputPaths = (
-                               "$(DERIVED_FILE_DIR)/cssmediafeatures.h",
-                               "$(DERIVED_FILE_DIR)/cssmediafeatures.c",
-                       );
-                       runOnlyForDeploymentPostprocessing = 0;
-                       shellPath = /bin/sh;
-                       shellScript = "cat css/cssmediafeatures.in > \"$DERIVED_FILE_DIR/cssmediafeatures.in\"\ncd \"$DERIVED_FILE_DIR\"\nsh \"$SRCROOT/css/makemediafeatures\"";
-               };
                932FC0B70824A175005B3C75 /* doctypes.cpp */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                                BC6B7B4E0993578B0052867B /* ImageData.mm in Sources */,
                                BC6B7BAF0993603C0052867B /* Image.cpp in Sources */,
                                BC6B7BC3099361560052867B /* PDFDocumentImage.mm in Sources */,
-                               47E4D99E09937047006A96C7 /* css_mediaqueryeval.cpp in Sources */,
-                               47E4D9A009937047006A96C7 /* css_mediaqueryimpl.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 54eb5c3..b872e28 100644 (file)
@@ -27,7 +27,6 @@
 #include "css_ruleimpl.h"
 #include "css_stylesheetimpl.h"
 #include "css_valueimpl.h"
-#include "css_mediaqueryimpl.h"
 #include "cssparser.h"
 #include "dom_string.h"
 #include "htmlnames.h"
@@ -55,7 +54,6 @@ using namespace HTMLNames;
 #define __inline
 #include "cssproperties.c"
 #include "cssvalues.c"
-#include "cssmediafeatures.c"
 #undef __inline
 
 namespace WebCore {
@@ -114,14 +112,6 @@ static inline int getValueID(const char *tagStr, int len)
     return val->id;
 }
 
-static inline int getMediaFeatureID(const char *tagStr, int len)
-{
-    const struct css_media_feature_pair *feat = findMediaFeature(tagStr, len);
-    if (!feat)
-        return 0;
-
-    return feat->id;
-}
 
 #define YYDEBUG 0
 #define YYPARSE_PARAM parser
@@ -146,12 +136,6 @@ static inline int getMediaFeatureID(const char *tagStr, int len)
     char tok;
     Value value;
     ValueList *valueList;
-
-    int mediaFeatureId;
-    MediaQueryImpl *mediaQuery;
-    MediaQueryExpImpl *mediaQueryExp;
-    MediaQueryExpListImpl *mediaQueryExpList;
-    MediaQueryImpl::Restrictor mediaQueryRestrictor;
 }
 
 %{
@@ -191,14 +175,9 @@ static int cssyylex(YYSTYPE *yylval) { return CSSParser::current()->lex(yylval);
 %token KHTML_RULE_SYM
 %token KHTML_DECLS_SYM
 %token KHTML_VALUE_SYM
-%token KHTML_MEDIAQUERY_SYM
 
 %token IMPORTANT_SYM
 
-%token MEDIA_ONLY
-%token MEDIA_NOT
-%token MEDIA_AND
-
 %token <val> QEMS
 %token <val> EMS
 %token <val> EXS
@@ -245,15 +224,9 @@ static int cssyylex(YYSTYPE *yylval) { return CSSParser::current()->lex(yylval);
 %type <string> medium
 %type <string> hexcolor
 
-%type <mediaFeatureId> media_feature
 %type <mediaList> media_list
 %type <mediaList> maybe_media_list
-%type <mediaQuery> media_query
-%type <mediaQueryRestrictor> maybe_media_restrictor
-%type <valueList> maybe_media_value
-%type <mediaQueryExp> media_query_exp
-%type <mediaQueryExpList> media_query_exp_list
-%type <mediaQueryExpList> maybe_media_query_exp_list
+
 %type <ruleList> ruleset_list
 
 %type <prop_id> property
@@ -292,7 +265,6 @@ stylesheet:
   | khtml_rule maybe_space
   | khtml_decls maybe_space
   | khtml_value maybe_space
-  | khtml_mediaquery maybe_space
   ;
 
 khtml_rule:
@@ -320,18 +292,6 @@ khtml_value:
     }
 ;
 
-khtml_mediaquery:
-    KHTML_MEDIAQUERY_SYM WHITESPACE maybe_space media_query '}' {
-        CSSParser *p = static_cast<CSSParser *>(parser);
-        p->mediaQuery = $4;
-    }
-    | KHTML_MEDIAQUERY_SYM WHITESPACE maybe_space media_query error '}'{
-        CSSParser *p = static_cast<CSSParser *>(parser);
-        p->mediaQuery = $4;
-    }
-
-;
-
 maybe_space:
     /* empty */
   | maybe_space WHITESPACE
@@ -427,86 +387,6 @@ STRING
 | URI
 ;
 
-media_feature:
-    IDENT maybe_space {
-        QString str = qString($1);
-        $$ = getMediaFeatureID( str.lower().latin1(), str.length() );
-    }
-;
-
-maybe_media_value:
-    /*empty*/ {
-        $$ = 0;
-    }
-    | ':' maybe_space expr maybe_space {
-        $$ = $3;
-    }
-;
-
-media_query_exp:
-    '(' maybe_space media_feature maybe_space maybe_media_value ')' maybe_space {
-        $$ = new MediaQueryExpImpl($3, $5);
-    }
-;
-
-media_query_exp_list:
-    media_query_exp {
-        $$ = new MediaQueryExpListImpl;
-        $$->append($1);
-    }
-    | media_query_exp_list MEDIA_AND maybe_space media_query_exp {
-        $$ = $1;
-        if ($$)
-            $$->append($4);
-        else
-            delete ($4);
-    }
-    | media_query_exp_list error {
-        // Error while parsing media feature list. Delete the list and return 0, which means
-        // that we should handle the media query as css 2.1 media type (or HTML4 media description)
-        delete ($1);
-        $$=0;
-    }
-   ;
-
-maybe_media_query_exp_list:
-    /*empty*/ {
-        $$ = new MediaQueryExpListImpl;
-    }
-    | MEDIA_AND maybe_space media_query_exp_list {
-        $$ = $3;
-    }
-    | MEDIA_AND error {
-        $$ = 0;
-    }
-;
-
-maybe_media_restrictor:
-    /*empty*/{
-        $$ = MediaQueryImpl::None;
-    }
-    | MEDIA_ONLY {
-        $$ = MediaQueryImpl::Only;
-    }
-    | MEDIA_NOT {
-        $$ = MediaQueryImpl::Not;
-    }
-;
-
-media_query:
-    maybe_media_restrictor maybe_space medium maybe_media_query_exp_list {
-        if ($4) {
-            $$ = new MediaQueryImpl($1, domString($3), $4);
-        } else if ($1 == MediaQueryImpl::Only) {
-            $$ = new MediaQueryImpl(MediaQueryImpl::None, "only", new MediaQueryExpListImpl);
-        } else  if ($1 == MediaQueryImpl::Not) {
-            $$ = new MediaQueryImpl(MediaQueryImpl::None, "not", new MediaQueryExpListImpl);
-        } else {
-            $$ = new MediaQueryImpl(MediaQueryImpl::None, domString($3), new MediaQueryExpListImpl);
-        }
-    }
-;
-
 maybe_media_list:
      /* empty */ {
         $$ = new MediaListImpl();
@@ -519,25 +399,23 @@ media_list:
     /* empty */ {
         $$ = 0;
     }
-    | media_query {
+    | medium {
         $$ = new MediaListImpl();
-        $$->appendMediaQuery($1);
+        $$->appendMedium( domString($1).lower() );
     }
-    | media_list ',' maybe_space media_query {
+    | media_list ',' maybe_space medium {
         $$ = $1;
         if ($$)
-            $$->appendMediaQuery($4);
-        else
-            delete $4
+            $$->appendMedium( domString($4) );
     }
     | media_list error {
         delete $1;
         $$ = 0;
     }
-;
+    ;
 
 media:
-    MEDIA_SYM maybe_space maybe_media_list '{' maybe_space ruleset_list '}' {
+    MEDIA_SYM maybe_space media_list '{' maybe_space ruleset_list '}' {
         CSSParser *p = static_cast<CSSParser *>(parser);
         if ( $3 && $6 &&
              p->styleElement && p->styleElement->isCSSStyleSheet() ) {
diff --git a/WebCore/css/css_mediaqueryeval.cpp b/WebCore/css/css_mediaqueryeval.cpp
deleted file mode 100644 (file)
index effe94e..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-#include "config.h"
-#include "css_mediaqueryeval.h"
-#include "css_stylesheetimpl.h"
-#include "cssmediafeatures.h"
-#include "css_valueimpl.h"
-#include "rendering/render_style.h"
-#include "page/FrameView.h"
-#include "Screen.h"
-
-
-using namespace WebCore;
-using namespace DOM;
-
-MediaQueryEvaluator:: MediaQueryEvaluator(bool mediaFeatureResult)
-    : m_view(0)
-    , m_style(0)
-    , m_expResult(mediaFeatureResult)
-{
-}
-
-MediaQueryEvaluator:: MediaQueryEvaluator(const QString& acceptedMediaType, bool mediaFeatureResult)
-    : m_mediaType(acceptedMediaType)
-    , m_view(0)
-    , m_style(0)
-    , m_expResult(mediaFeatureResult)
-{
-}
-
-MediaQueryEvaluator:: MediaQueryEvaluator(const QString& acceptedMediaType, FrameView* view, RenderStyle* style)
-    : m_mediaType(acceptedMediaType.lower())
-    , m_view(view)
-    , m_style(style)
-    , m_expResult(false) // doesn't matter
-{
-}
-
-MediaQueryEvaluator::~MediaQueryEvaluator()
-{
-}
-
-bool MediaQueryEvaluator::mediaTypeMatch(const QString& mediaTypeToMatch) const
-{
-    return mediaTypeToMatch.isNull()
-        || mediaTypeToMatch.isEmpty()
-        || (mediaTypeToMatch.startsWith("all", false) && mediaTypeToMatch.length() == 3)
-        || mediaTypeToMatch.lower() == m_mediaType;
-}
-
-static bool applyRestrictor(MediaQueryImpl::Restrictor r, bool value)
-{
-    return r == MediaQueryImpl::Not ? !value : value;
-}
-
-bool MediaQueryEvaluator::eval(const MediaListImpl* mediaList) const
-{
-    if (!mediaList)
-        return true;
-
-    QPtrListIterator<MediaQueryImpl> it(*mediaList->mediaQueries());
-    if (!it.current())
-        return true; // empty query list evaluates to true
-
-    // iterate over queries, stop if any of them eval to true (OR semantics)
-    bool result = false;
-    for (MediaQueryImpl* query = it.current(); query && (result==false); query = ++it) {
-
-        if (mediaTypeMatch(query->mediaType())) {
-            QPtrListIterator<MediaQueryExpImpl> exp_it(*query->expressions()->list());
-            // iterate through expressions, stop if any of them eval to false (AND semantics)
-            MediaQueryExpImpl* exp = 0;
-            for (exp = exp_it.current(); exp && eval(exp); exp = ++exp_it) /* empty*/;
-
-            // assume true if we are at the end of the list, otherwise assume false
-            result = applyRestrictor(query->restrictor(), !exp);
-        } else {
-            result = applyRestrictor(query->restrictor(), false);
-        }
-    }
-    return result;
-}
-
-static bool parseAspectRatio(CSSValueImpl* value, int* a, int* b)
-{
-    if (value->isValueList() ){
-        CSSValueListImpl* valueList = static_cast<CSSValueListImpl*>(value);
-        if (valueList->length() == 3 ) {
-            CSSValueImpl* i0 = valueList->item(0);
-            CSSValueImpl* i1 = valueList->item(1);
-            CSSValueImpl* i2 = valueList->item(2);
-            if (i0->isPrimitiveValue() && static_cast<CSSPrimitiveValueImpl*>(i0)->primitiveType() == CSSPrimitiveValue::CSS_NUMBER
-                && i1->isPrimitiveValue() && static_cast<CSSPrimitiveValueImpl*>(i1)->primitiveType() == CSSPrimitiveValue::CSS_STRING
-                && i2->isPrimitiveValue() && static_cast<CSSPrimitiveValueImpl*>(i2)->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) {
-                DOMString str = static_cast<CSSPrimitiveValueImpl*>(i1)->getStringValue();
-                if (!str.isNull() && str.length() == 1 && str[0] == QChar('/')) {
-                    *a = (int) static_cast<CSSPrimitiveValueImpl*>(i0)->getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
-                    *b = (int) static_cast<CSSPrimitiveValueImpl*>(i2)->getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
-                    return true;
-                }
-            }
-        }
-    }
-    return false;
-}
-
-bool MediaQueryEvaluator::eval(const MediaQueryExpImpl* expr) const
-{
-    if (!m_view || !m_style)
-        return m_expResult;
-    CSSValueImpl* value = expr->value();
-    CSSPrimitiveValueImpl* primitive = 0;
-
-    bool isNumberValue = false;
-    double numberValue = -1;
-    int primitiveLength = -1;
-
-    if (value && value->isPrimitiveValue()) {
-        primitive = static_cast<CSSPrimitiveValueImpl*>(value);
-        primitiveLength = primitive->computeLength(m_style);
-        if (primitive->primitiveType() == CSSPrimitiveValue::CSS_NUMBER) {
-            isNumberValue = true;
-            numberValue = primitive->getFloatValue(CSSPrimitiveValue::CSS_NUMBER);
-        }
-    }
-
-    switch (expr->mediaFeature()) {
-
-        case CSS_MEDIA_FEAT_MONOCHROME:
-            if (!screenIsMonochrome(m_view))
-                return false;
-            /* fall through*/
-        case CSS_MEDIA_FEAT_COLOR: {
-            int bitsPerComponent = screenDepthPerComponent(m_view);
-            if (value)
-                return (isNumberValue && bitsPerComponent == (int)numberValue);
-            else
-                return bitsPerComponent != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MIN_MONOCHROME: 
-            if (!screenIsMonochrome(m_view))
-                return false;
-            /* fall through */
-        case CSS_MEDIA_FEAT_MIN_COLOR: {
-            int bitsPerComponent = screenDepthPerComponent(m_view);
-            if (value)
-                return (isNumberValue && bitsPerComponent >= (int)numberValue);
-            else
-                return bitsPerComponent != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MAX_MONOCHROME: 
-            if (!screenIsMonochrome(m_view))
-                return false;
-            /* fall through */
-        case CSS_MEDIA_FEAT_MAX_COLOR: {
-            int bitsPerComponent = screenDepthPerComponent(m_view);
-            if (value)
-                return (isNumberValue && bitsPerComponent <= (int)numberValue);
-            else
-                return bitsPerComponent != 0;
-        }
-
-        case CSS_MEDIA_FEAT_COLOR_INDEX:
-        case CSS_MEDIA_FEAT_MIN_COLOR_INDEX:
-        case CSS_MEDIA_FEAT_MAX_COLOR_INDEX:
-            /// XXX: how to get display mode from KWQ?
-            break;
-
-        case CSS_MEDIA_FEAT_DEVICE_ASPECT_RATIO: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                int a;
-                int b;
-                if (parseAspectRatio(value, &a, &b))
-                    return (b!=0) && (a*sg.height() == b*sg.width());
-                else
-                    return false;
-            } else {
-                // (device-aspect-ratio), assume if we have a device, its aspect ratio is non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MIN_DEVICE_ASPECT_RATIO: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                int a;
-                int b;
-                if (parseAspectRatio(value, &a, &b))
-                    return (b!=0) && (((double)sg.width()/sg.height()) >= ((double)a/b));
-                else
-                    return false;
-            } else {
-                // (min-device-aspect-ratio), assume if we have a device, its aspect ratio is non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MAX_DEVICE_ASPECT_RATIO: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                int a;
-                int b;
-                if (parseAspectRatio(value, &a, &b))
-                    return (b!=0) && (((double)sg.width()/sg.height()) <= ((double)a/b));
-                else
-                    return false;
-            } else {
-                // (max-device-aspect-ratio), assume if we have a device, its aspect ratio is non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_DEVICE_HEIGHT: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.height() == primitiveLength);
-            } else {
-                // (device-height), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MIN_DEVICE_HEIGHT: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.height() >= primitiveLength);
-            } else {
-                // (min-device-height), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MAX_DEVICE_HEIGHT: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.height() <= primitiveLength);
-            } else {
-                // (max-device-height), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_DEVICE_WIDTH: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.width() == primitiveLength);
-            } else {
-                // (device-width), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MIN_DEVICE_WIDTH: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.width() >= primitiveLength);
-            } else {
-                // (min-device-width), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_MAX_DEVICE_WIDTH: {
-            if (value) {
-                IntRect sg = screenRect(m_view);
-                return (primitive && sg.width() <= primitiveLength);
-            } else {
-                // (max-device-width), assume if we have a device, assume non-zero
-                return true;
-            }
-        }
-
-        case CSS_MEDIA_FEAT_GRID: {
-            // if output device is bitmap, grid: 0 == true
-            if (value)
-                return (isNumberValue &&  (int)numberValue == 0 );
-            else
-                return false;
-        }
-
-        case CSS_MEDIA_FEAT_HEIGHT: {
-            if (value)
-                return primitive && m_view->visibleHeight() == primitiveLength;
-            else
-                return m_view->visibleHeight() != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MIN_HEIGHT: {
-            if (value)
-                return primitive && m_view->visibleHeight() >= primitiveLength;
-            else
-                return m_view->visibleHeight() != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MAX_HEIGHT: {
-            if (value)
-                return (primitive && m_view->visibleHeight() <= primitiveLength);
-            else
-                return (m_view->visibleHeight() != 0);
-        }
-
-        case CSS_MEDIA_FEAT_WIDTH: {
-            if (value)
-                return primitive && m_view->visibleWidth() == primitiveLength;
-            else
-                return m_view->visibleWidth() != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MIN_WIDTH: {
-            if (value)
-                return primitive && m_view->visibleWidth() >= primitiveLength;
-            else
-                return m_view->visibleWidth() != 0;
-        }
-
-        case CSS_MEDIA_FEAT_MAX_WIDTH:{
-            if (value)
-                return primitive && m_view->visibleWidth() <= primitiveLength;
-            else
-                return m_view->visibleWidth() != 0;
-        }
-
-        case CSS_MEDIA_FEAT_RESOLUTION:
-        case CSS_MEDIA_FEAT_MIN_RESOLUTION:
-        case CSS_MEDIA_FEAT_MAX_RESOLUTION:
-            //XXX: CSS_DIMENSION doesn't seem to be supported by KHTML
-            break;
-
-        case CSS_MEDIA_FEAT_SCAN:
-            // scan applies to tv media types
-            return false;
-
-        case CSS_MEDIA_FEAT_INVALID:
-        default:
-            break;
-    }
-
-    return false;
-}
diff --git a/WebCore/css/css_mediaqueryeval.h b/WebCore/css/css_mediaqueryeval.h
deleted file mode 100644 (file)
index d2b4b12..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef CSS_css_mediaqueryeval_h
-#define CSS_css_mediaqueryeval_h
-
-#include <qstring.h>
-#include <qvaluelist.h>
-
-#include "css/css_mediaqueryimpl.h"
-
-namespace WebCore {
-  class FrameView;
-  class RenderStyle;
-}
-
-namespace DOM {
-  class MediaListImpl;
-
-/**
- * Class that evaluates css media queries as defined in
- * CSS3 Module "Media Queries" (http://www.w3.org/TR/css3-mediaqueries/)
- * Special constructors are needed, if simple media queries are to be
- * evaluated without knowledge of the medium features. This can happen
- * for example when parsing UA stylesheets, if evaluation is done
- * right after parsing.
- *
- * the boolean parameter is used to approximate results of evaluation, if
- * the device characteristics are not known. This can be used to prune the loading
- * of stylesheets to only those which are probable to match.
- */
-class MediaQueryEvaluator
-{
-public:
-    /** Creates evaluator which evaluates only simple media queries
-     *  Evaluator returns true for "all", and returns value of \mediaFeatureResult
-     *  for any media features
-     */
-    MediaQueryEvaluator(bool mediaFeatureResult = false);
-
-    /** Creates evaluator which evaluates only simple media queries
-     *  Evaluator  returns true for acceptedMediaType, but not any media features
-     */
-    MediaQueryEvaluator(const QString& acceptedMediaType, bool mediaFeatureResult = false);
-
-    /** Creates evaluator which evaluates full media queries
-     */
-    MediaQueryEvaluator(const QString& acceptedMediaType, FrameView* view,
-                        khtml::RenderStyle* style);
-
-    ~MediaQueryEvaluator();
-
-    bool mediaTypeMatch(const QString& mediaTypeToMatch) const;
-
-    /** Evaluates a list of media queries */
-    bool eval(const DOM::MediaListImpl* query) const;
-
-    /** Evaluates media query subexpression, ie "and (media-feature: value)" part */
-    bool eval(const DOM::MediaQueryExpImpl* expr) const;
-
-private:
-
-    QString m_mediaType;
-    WebCore::FrameView* m_view; // not owned
-    WebCore::RenderStyle* m_style; // not owned
-    bool m_expResult;
-};
-
-} // namespace
-#endif
diff --git a/WebCore/css/css_mediaqueryimpl.cpp b/WebCore/css/css_mediaqueryimpl.cpp
deleted file mode 100644 (file)
index 74f4d64..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-#include "config.h"
-#include "css_mediaqueryimpl.h"
-#include "cssparser.h"
-#include "css_base.h"
-#include "css_valueimpl.h"
-
-using namespace DOM;
-using namespace khtml;
-
-MediaQueryExpImpl::MediaQueryExpImpl(int mediaFeatureId, DOM::ValueList* valueList)
-    : m_mediaFeatureId(mediaFeatureId)
-    , m_value(0)
-{   
-    if (valueList) {
-
-        if ( valueList->numValues == 1 ) {
-            DOM::Value* value = valueList->current();
-
-            if ( value->id != 0 ) {
-                m_value = new CSSPrimitiveValueImpl( value->id );
-            } else if ( value->unit == CSSPrimitiveValue::CSS_STRING )
-                m_value = new CSSPrimitiveValueImpl( domString( value->string ),
-                                                     (CSSPrimitiveValue::UnitTypes) value->unit );
-            else if ( value->unit >= CSSPrimitiveValue::CSS_NUMBER &&
-                      value->unit <= CSSPrimitiveValue::CSS_KHZ ) {
-                m_value = new CSSPrimitiveValueImpl( value->fValue,
-                                                     (CSSPrimitiveValue::UnitTypes) value->unit );
-            }
-            valueList->next();
-        } else if ( valueList->numValues > 1) {
-            // create list of values
-            // currently accepts only <integer>/<integer>
-
-            CSSValueListImpl* list = new CSSValueListImpl();
-            Value* value = 0;
-            bool isValid = true;
-
-            while ((value = valueList->current()) && isValid) {
-                if ( value->unit == Value::Operator && value->iValue == '/' ) {
-                    list->append(new CSSPrimitiveValueImpl("/", CSSPrimitiveValue::CSS_STRING));
-                } else if (value->unit == CSSPrimitiveValue::CSS_NUMBER) {
-                    list->append(new CSSPrimitiveValueImpl(value->fValue, CSSPrimitiveValue::CSS_NUMBER));
-                } else {
-                    isValid = false;
-                }
-                value = valueList->next();
-            }
-            if (isValid)
-                m_value = list;
-            else
-                delete(list);
-
-        }
-    }
-}
-
-MediaQueryExpImpl::~MediaQueryExpImpl()
-{
-    delete (m_value);
-}
-
-int MediaQueryExpImpl::mediaFeature() const
-{
-    return m_mediaFeatureId;
-}
-
-CSSValueImpl* MediaQueryExpImpl::value() const
-{
-    return m_value;
-}
-
-MediaQueryImpl::MediaQueryImpl(Restrictor r, const DOM::DOMString &mediaType, MediaQueryExpListImpl* exprs)
-    : m_restrictor(r)
-    , m_mediaType(mediaType)
-    , m_expressions(exprs)
-{
-}
-
-MediaQueryImpl::~MediaQueryImpl()
-{
-    delete(m_expressions);
-}
-
-MediaQueryImpl::Restrictor MediaQueryImpl::restrictor() const
-{
-    return m_restrictor;
-}
-
-MediaQueryExpListImpl* MediaQueryImpl::expressions() const
-{
-    return m_expressions;
-}
-
-QString MediaQueryImpl::mediaType() const
-{
-    return m_mediaType.qstring();
-}
-
-bool MediaQueryImpl::operator==(const MediaQueryImpl& other) const
-{
-    // XXX: case sensitiveness?
-    if (m_restrictor != other.m_restrictor || m_mediaType != other.m_mediaType)
-        return false;
-
-    QPtrListIterator<MediaQueryExpImpl> exp_it(*m_expressions->list());
-    QPtrListIterator<MediaQueryExpImpl> oexp_it(*other.m_expressions->list());
-    MediaQueryExpImpl* exp = 0;
-    MediaQueryExpImpl* oexp = 0;
-    for (exp = exp_it.current(), oexp = oexp_it.current(); exp && oexp; exp = ++exp_it, oexp = ++oexp_it) {
-        if (!(*exp == *oexp) )
-            return false;
-    }
-
-    return (!exp && !oexp);
-}
diff --git a/WebCore/css/css_mediaqueryimpl.h b/WebCore/css/css_mediaqueryimpl.h
deleted file mode 100644 (file)
index 12b42de..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef CSS_css_mediaqueryimpl_h
-#define CSS_css_mediaqueryimpl_h
-
-#include <qvaluelist.h>
-#include <qptrlist.h>
-
-#include "dom/dom_string.h"
-#include "css/css_base.h"
-#include "css/css_valueimpl.h"
-namespace DOM {
-class ValueList;
-class CSSPrimitiveValue;
-
-class MediaQueryExpImpl {
-public:
-    MediaQueryExpImpl(int mediaFeatureId, ValueList* values);
-    ~MediaQueryExpImpl();
-
-    int mediaFeature() const;
-    CSSValueImpl* value() const;
-
-    bool operator==(const MediaQueryExpImpl& other) const  {
-        return (other.m_mediaFeatureId == m_mediaFeatureId)
-            && ((!other.m_value && !m_value)
-                || (other.m_value && m_value && other.m_value->cssText() == m_value->cssText()));
-    }
-
-private:
-    int m_mediaFeatureId;
-    CSSValueImpl* m_value;
-};
-
-class MediaQueryExpListImpl
-{
-public:
-    MediaQueryExpListImpl() { exps.setAutoDelete(true); }
-
-    void append(MediaQueryExpImpl* newExp) { exps.append(newExp); }
-    const QPtrList<MediaQueryExpImpl>* list() const { return &exps; }
-
-private:
-    QPtrList<MediaQueryExpImpl> exps;
-};
-
-
-class MediaQueryImpl {
-public:
-    enum Restrictor{
-        Only, Not, None
-    };
-
-    MediaQueryImpl(Restrictor r, const DOMString &mediaType, MediaQueryExpListImpl* exprs);
-    ~MediaQueryImpl();
-
-    Restrictor restrictor() const;
-    MediaQueryExpListImpl* expressions() const;
-    QString mediaType() const;
-
-    bool operator==(const MediaQueryImpl& other) const;
-
- private:
-    Restrictor m_restrictor;
-    DOMString m_mediaType;
-    MediaQueryExpListImpl* m_expressions;
-};
-
-} // namespace
-
-#endif
index 507cbc0..655b662 100644 (file)
@@ -34,8 +34,6 @@
 #include "css/css_valueimpl.h"
 #include "css/cssparser.h"
 #include "css/css_stylesheetimpl.h"
-#include "css/css_mediaqueryeval.h"
-#include "cssmediafeatures.h"
 
 #include "html/html_documentimpl.h"
 #include "loader.h"
@@ -334,17 +332,21 @@ MediaListImpl::MediaListImpl( CSSStyleSheetImpl *parentSheet,
                               const DOMString &media )
     : StyleBaseImpl( parentSheet )
 {
-    m_lstQueries.setAutoDelete(true);
     setMediaText( media );
 }
 
 MediaListImpl::MediaListImpl( CSSRuleImpl *parentRule, const DOMString &media )
     : StyleBaseImpl(parentRule)
 {
-    m_lstQueries.setAutoDelete(true);
     setMediaText( media );
 }
 
+bool MediaListImpl::contains( const DOMString &medium ) const
+{
+    return m_lstMedia.count() == 0 || m_lstMedia.contains( medium ) ||
+            m_lstMedia.contains( "all" );
+}
+
 CSSStyleSheetImpl *MediaListImpl::parentStyleSheet() const
 {
     return parent()->isCSSStyleSheet() ? static_cast<CSSStyleSheetImpl *>(parent()) : 0;
@@ -357,103 +359,33 @@ CSSRuleImpl *MediaListImpl::parentRule() const
 
 void MediaListImpl::deleteMedium( const DOMString &oldMedium )
 {
-    MediaListImpl tempMediaList;
-    CSSParser p(true);
-
-    if (p.parseMediaQuery(&tempMediaList, oldMedium)) {
-        const MediaQueryImpl* oldQuery = QPtrListIterator<MediaQueryImpl>(*tempMediaList.mediaQueries()).current();
-
-        QPtrListIterator<MediaQueryImpl> q_it(m_lstQueries);
-        for(MediaQueryImpl* query = q_it.current(); query; query = ++q_it) {
-            if (*query == *oldQuery) {
-                m_lstQueries.remove(query);
-                break;
-            }
-        }
-    } else {
-        // XXX: throw DOM exception
-    }
-}
-
-static DOM::DOMString mediaQueryAsDOMString(const MediaQueryImpl* query)
-{
-    DOM::DOMString text;
-    switch (query->restrictor()) {
-        case MediaQueryImpl::Only:
-            text += "only ";
-            break;
-        case MediaQueryImpl::Not:
-            text += "not ";
-            break;
-        default:
-            break;
-    }
-    text += query->mediaType();
-    QPtrListIterator<MediaQueryExpImpl> exp_it(*query->expressions()->list());
-    for (MediaQueryExpImpl* exp = exp_it.current(); exp; exp = ++exp_it) {
-        text += " and (";
-        text += getMediaFeatureName(exp->mediaFeature());
-        if (exp->value()) {
-            text += ": ";
-            text += exp->value()->cssText();
+    for ( QValueList<DOMString>::Iterator it = m_lstMedia.begin(); it != m_lstMedia.end(); ++it ) {
+        if ((*it) == oldMedium) {
+            m_lstMedia.remove( it );
+            return;
         }
-        text += ")";
     }
-    return text;
 }
 
 DOM::DOMString MediaListImpl::mediaText() const
 {
-    DOMString text;
-    QPtrListIterator<MediaQueryImpl> q_it(m_lstQueries);
-    bool first = true;
-    for (MediaQueryImpl* query = q_it.current(); query; query = ++q_it) {
-        if (!first)
+    DOMString text = "";
+    for (QValueList<DOMString>::ConstIterator it = m_lstMedia.begin(); it != m_lstMedia.end(); ++it) {
+        if (text.length() > 0)
             text += ", ";
-        else
-            first = false;
-        text += mediaQueryAsDOMString(query);
+        text += *it;
     }
     return text;
 }
 
 void MediaListImpl::setMediaText(const DOM::DOMString &value)
 {
-    CSSParser p(true);
-    m_lstQueries.clear();
-
-    QStringList list = QStringList::split(',', value.qstring());
-    for (QStringList::Iterator it = list.begin(); it != list.end(); ++it) {
+    m_lstMedia.clear();
+    QStringList list = QStringList::split( ',', value.qstring() );
+    for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+    {
         DOMString medium = (*it).stripWhiteSpace();
-        if (medium != "") {
-            if (!p.parseMediaQuery( this, medium )) {
-                // FAIL
-                // XXX: throw DOM exception
-            }
-        }
+        if (!medium.isEmpty())
+            m_lstMedia.append( medium );
     }
 }
-
-DOM::DOMString MediaListImpl::item(unsigned long index) const
-{
-    // XXX: inefficient and ugly! QPtrList doesn't have at() const
-    QPtrListIterator<MediaQueryImpl> q_it(m_lstQueries);
-    MediaQueryImpl* query = q_it.current();
-    for (; query && index; query = ++q_it) --index;
-    if (query)
-        return mediaQueryAsDOMString(query);
-    return DOM::DOMString();
-}
-
-void MediaListImpl::appendMedium(const DOM::DOMString &newMedium)
-{
-    CSSParser p(true);
-    if (!p.parseMediaQuery(this, newMedium)) {
-        // XXX: throw dom exception
-    }
-}
-
-void MediaListImpl::appendMediaQuery(MediaQueryImpl* mediaQuery)
-{
-    m_lstQueries.append(mediaQuery);
-}
index 3c2076c..86bcdd4 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "dom/dom_string.h"
 #include "css/css_base.h"
-#include "css/css_mediaqueryimpl.h"
 
 namespace khtml {
     class CachedCSSStyleSheet;
@@ -162,23 +161,26 @@ public:
 
     CSSStyleSheetImpl *parentStyleSheet() const;
     CSSRuleImpl *parentRule() const;
-    unsigned long length() const { return m_lstQueries.count(); }
-    DOM::DOMString item ( unsigned long index ) const;
+    unsigned length() const { return m_lstMedia.count(); }
+    DOM::DOMString item ( unsigned index ) const { return m_lstMedia[index]; }
     void deleteMedium ( const DOM::DOMString &oldMedium );
-    void appendMedium ( const DOM::DOMString &newMedium );
+    void appendMedium ( const DOM::DOMString &newMedium ) { m_lstMedia.append(newMedium); }
 
     DOM::DOMString mediaText() const;
     void setMediaText(const DOM::DOMString &value);
 
     /**
+     * Check if the list contains either the requested medium, or the
+     * catch-all "all" media type. Returns true when found, false otherwise.
+     * Since not specifying media types should be treated as "all" according
+     * to DOM specs, an empty list always returns true.
+     *
      * _NOT_ part of the DOM!
      */
-    void appendMediaQuery(MediaQueryImpl* mediaQuery);
-    const QPtrList<MediaQueryImpl>* mediaQueries() const { return &m_lstQueries; }
+    bool contains( const DOM::DOMString &medium ) const;
 
 protected:
-    QPtrList<MediaQueryImpl> m_lstQueries;
-    DOM::DOMString m_mediaText;    
+    QValueList<DOM::DOMString> m_lstMedia;
 };
 
 
index 217ec38..0a603c7 100644 (file)
@@ -28,6 +28,8 @@
 #include "CachedObjectClient.h"
 #include <qvaluelist.h>
 
+class QPaintDeviceMetrics;
+
 namespace khtml {
     class RenderStyle;
     class CachedImage;
index 72d47f0..ddf4239 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "dom/dom_string.h"
 
+class QPaintDeviceMetrics;
 class KHTMLSettings;
 
 namespace DOM
diff --git a/WebCore/css/cssmediafeatures.in b/WebCore/css/cssmediafeatures.in
deleted file mode 100644 (file)
index 2b16339..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-color
-color-index
-device-aspect-ratio
-device-height
-device-width
-grid
-height
-max-color
-max-color-index
-max-device-aspect-ratio
-max-device-height
-max-device-width
-max-height
-max-monochrome
-max-resolution
-max-width
-min-color
-min-color-index
-min-device-aspect-ratio
-min-device-height
-min-device-width
-min-height
-min-monochrome
-min-resolution
-min-width
-monochrome
-resolution
-scan
-width
index f740311..237138a 100644 (file)
@@ -33,7 +33,6 @@
 #include "css_valueimpl.h"
 #include "css_ruleimpl.h"
 #include "css_stylesheetimpl.h"
-#include "css_mediaqueryimpl.h"
 #include "cssproperties.h"
 #include "cssvalues.h"
 #include "helper.h"
@@ -299,30 +298,6 @@ bool CSSParser::parseDeclaration( CSSMutableStyleDeclarationImpl *declaration, c
     return ok;
 }
 
-bool CSSParser::parseMediaQuery( DOM::MediaListImpl *queries, const DOM::DOMString &string )
-{    
-    if (string.isEmpty() || string.isNull()) {
-        return true;
-    }
-    mediaQuery = 0;
-    // can't use { because tokenizer state switches from mediaquery to initial state when it sees { token.
-    // instead insert one " " (which is WHITESPACE in parser.y)
-    setupParser ("@-khtml-mediaquery ", string, "} ");
-    
-    CSSParser *old = currentParser;
-    currentParser = this;
-    cssyyparse( this );
-    currentParser = old;
-    
-    bool ok = false;
-    if (mediaQuery) {
-        ok = true;
-        queries->appendMediaQuery(mediaQuery);
-        mediaQuery = 0;
-    }
-    
-    return ok;
-}
 
 void CSSParser::addProperty(int propId, CSSValueImpl *value, bool important)
 {
@@ -2862,7 +2837,6 @@ typedef unsigned int YY_CHAR;
 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
 #define yyterminate() yyTok = END_TOKEN; return yyTok
 #define YY_FATAL_ERROR(a)
-#define BEGIN yy_start = 1 + 2 *
 
 #include "tokenizer.cpp"
 
index 9dcf8f8..82bbbc9 100644 (file)
@@ -40,8 +40,6 @@ namespace DOM {
     class CSSMutableStyleDeclarationImpl;
     class CSSProperty;
     class CSSRuleListImpl;
-    class MediaListImpl;
-    class MediaQueryImpl;
 
 
     struct ParseString {
@@ -115,7 +113,6 @@ namespace DOM {
         static RGBA32 CSSParser::parseColor( const DOM::DOMString &string );
        bool parseColor( DOM::CSSMutableStyleDeclarationImpl *declaration, const DOM::DOMString &string );
        bool parseDeclaration( DOM::CSSMutableStyleDeclarationImpl *decls, const DOM::DOMString &string );
-    bool parseMediaQuery( DOM::MediaListImpl *queries, const DOM::DOMString &string );
 
        static CSSParser *current() { return currentParser; }
 
@@ -172,7 +169,6 @@ namespace DOM {
        int id;
        DOM::StyleListImpl *styleElement;
        DOM::CSSRuleImpl *rule;
-    DOM::MediaQueryImpl *mediaQuery;
        ValueList *valueList;
        CSSProperty **parsedProperties;
        int numParsedProperties;
index 4d5ec44..9dcb7e7 100644 (file)
@@ -38,7 +38,6 @@
 #include "csshelper.h"
 #include "cssproperties.h"
 #include "cssvalues.h"
-#include "css_mediaqueryeval.h"
 #include "font.h"
 #include "helper.h"
 #include "html_documentimpl.h"
@@ -170,7 +169,7 @@ public:
     
     typedef HashMap<AtomicStringImpl*, CSSRuleDataList*> AtomRuleMap;
     
-    void addRulesFromSheet(DOM::CSSStyleSheetImpl* sheet, DOM::MediaQueryEvaluator* medium);
+    void addRulesFromSheet(CSSStyleSheetImpl* sheet, const DOMString &medium = "screen");
     
     void addRule(CSSStyleRuleImpl* rule, CSSSelector* sel);
     void addToRuleSet(AtomicStringImpl* key, AtomRuleMap& map,
@@ -213,31 +212,11 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, QString userStyleSheet, S
     settings = view ? view->frame()->settings() : 0;
     if (!defaultStyle)
         loadDefaultStyle();
+    m_medium = view ? view->mediaType() : QString("all");
 
     m_userStyle = 0;
     m_userSheet = 0;
 
-    // construct document root element default style. this is needed 
-    // to evaluate media queries that contain relative constraints, like "screen and (max-width: 10em)"
-    // This is here instead of constructor, because when constructor is run, 
-    // document doesn't have documentElement
-    // XXX: this assumes that element that gets passed to styleForElement -call 
-    // is from the document that owns the style selector        
-    if (view) {
-        m_medium = new MediaQueryEvaluator(view->mediaType());
-    } else {        
-        m_medium = new MediaQueryEvaluator("all");
-    }
-    ElementImpl *root = doc->documentElement();
-    if (root) {         
-        m_rootDefaultStyle = defaultStyleForRoot(root);
-        // dont ref, because the RenderStyle is allocated from global heap
-    }
-    if (m_rootDefaultStyle && view) {           
-        delete m_medium;
-        m_medium = new MediaQueryEvaluator(view->mediaType(), view, m_rootDefaultStyle);
-    }
-
     // FIXME: This sucks! The user sheet is reparsed every time!
     if (!userStyleSheet.isEmpty()) {
         m_userSheet = new CSSStyleSheetImpl(doc);
@@ -265,20 +244,7 @@ CSSStyleSelector::CSSStyleSelector( CSSStyleSheetImpl *sheet )
 
     if(!defaultStyle) loadDefaultStyle();
     FrameView *view = sheet->doc()->view();
-
-    if (view) {
-        m_medium = new MediaQueryEvaluator(view->mediaType());
-    } else {        
-        m_medium = new MediaQueryEvaluator("all");
-    }
-    ElementImpl *root = sheet->doc()->documentElement();
-    if (root) {         
-        m_rootDefaultStyle = defaultStyleForRoot(root);
-    }
-    if (m_rootDefaultStyle && view) {           
-        delete m_medium;
-        m_medium = new MediaQueryEvaluator(view->mediaType(), view, m_rootDefaultStyle);
-    }
+    m_medium =  view ? view->mediaType() : QString("all");
 
     m_authorStyle = new CSSRuleSet();
     m_authorStyle->addRulesFromSheet( sheet, m_medium );
@@ -289,9 +255,6 @@ void CSSStyleSelector::init()
     element = 0;
     settings = 0;
     m_matchedRuleCount = m_matchedDeclCount = m_tmpRuleCount = 0;
-    m_rootDefaultStyle = 0;
-    m_medium = 0;
-    m_resolvingForRootDefaultStyle = false;
 }
 
 void CSSStyleSelector::setEncodedURL(const KURL& url)
@@ -313,8 +276,6 @@ void CSSStyleSelector::setEncodedURL(const KURL& url)
 
 CSSStyleSelector::~CSSStyleSelector()
 {
-    delete m_medium;    
-    ::delete m_rootDefaultStyle;
     delete m_authorStyle;
     delete m_userStyle;
     delete m_userSheet;
@@ -355,23 +316,19 @@ void CSSStyleSelector::loadDefaultStyle()
 
     // Strict-mode rules.
     defaultSheet = parseUASheet(html4UserAgentStyleSheet);
-
-    MediaQueryEvaluator screenEval("screen");
-    defaultStyle->addRulesFromSheet(defaultSheet, &screenEval);
-
-    MediaQueryEvaluator printEval("print");
-    defaultPrintStyle->addRulesFromSheet(defaultSheet, &printEval);
+    defaultStyle->addRulesFromSheet(defaultSheet, "screen");
+    defaultPrintStyle->addRulesFromSheet(defaultSheet, "print");
 
 #if SVG_SUPPORT
     // SVG rules.
     svgSheet = parseUASheet(svgUserAgentStyleSheet);
-    defaultStyle->addRulesFromSheet(svgSheet, &screenEval);
-    defaultPrintStyle->addRulesFromSheet(svgSheet, &printEval);
+    defaultStyle->addRulesFromSheet(svgSheet, "screen");
+    defaultPrintStyle->addRulesFromSheet(svgSheet, "print");
 #endif
 
     // Quirks-mode rules.
     quirksSheet = parseUASheet(quirksUserAgentStyleSheet);
-    defaultQuirksStyle->addRulesFromSheet(quirksSheet, &screenEval);
+    defaultQuirksStyle->addRulesFromSheet(quirksSheet, "screen");
 }
 
 void CSSStyleSelector::addMatchedRule(CSSRuleData* rule)
@@ -753,7 +710,7 @@ RenderStyle* CSSStyleSelector::locateSharedStyle()
 
 RenderStyle* CSSStyleSelector::styleForElement(ElementImpl* e, RenderStyle* defaultParent, bool allowSharing)
 {
-    if (!m_resolvingForRootDefaultStyle && !e->getDocument()->haveStylesheetsLoaded()) {
+    if (!e->getDocument()->haveStylesheetsLoaded()) {
         if (!styleNotYetAvailable) {
             styleNotYetAvailable = ::new RenderStyle();
             styleNotYetAvailable->setDisplay(NONE);
@@ -775,11 +732,7 @@ RenderStyle* CSSStyleSelector::styleForElement(ElementImpl* e, RenderStyle* defa
     }
     initForStyleResolve(e, defaultParent);
 
-    if (m_resolvingForRootDefaultStyle) {
-        style = ::new RenderStyle();
-    } else {
-        style = new (e->getDocument()->renderArena()) RenderStyle();
-    }
+    style = new (e->getDocument()->renderArena()) RenderStyle();
     if (parentStyle)
         style->inheritFrom(parentStyle);
     else
@@ -794,65 +747,61 @@ RenderStyle* CSSStyleSelector::styleForElement(ElementImpl* e, RenderStyle* defa
         matchRules(defaultQuirksStyle, firstUARule, lastUARule);
     
     // 3. If our medium is print, then we match rules from the print sheet.
-    if (m_medium->mediaTypeMatch("print"))
+    if (m_medium == "print")
         matchRules(defaultPrintStyle, firstUARule, lastUARule);
 
+    // 4. Now we check user sheet rules.
     int firstUserRule = -1, lastUserRule = -1;
-    int firstAuthorRule = -1, lastAuthorRule = -1;
-    if (!m_resolvingForRootDefaultStyle) {
-        // 4. Now we check user sheet rules.
-        matchRules(m_userStyle, firstUserRule, lastUserRule);
+    matchRules(m_userStyle, firstUserRule, lastUserRule);
 
-        // 5. Now check author rules, beginning first with presentational attributes
-        // mapped from HTML.
-        if (styledElement) {
-            // Ask if the HTML element has mapped attributes.
-            if (styledElement->hasMappedAttributes()) {
-                // Walk our attribute list and add in each decl.
-                const NamedMappedAttrMapImpl* map = styledElement->mappedAttributes();
-                for (uint i = 0; i < map->length(); i++) {
-                    MappedAttributeImpl* attr = map->attributeItem(i);
-                    if (attr->decl()) {
-                        if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
-                        lastAuthorRule = m_matchedDeclCount;
-                        addMatchedDeclaration(attr->decl());
-                    }
+    // 5. Now check author rules, beginning first with presentational attributes
+    // mapped from HTML.
+    int firstAuthorRule = -1, lastAuthorRule = -1;
+    if (styledElement) {
+        // Ask if the HTML element has mapped attributes.
+        if (styledElement->hasMappedAttributes()) {
+            // Walk our attribute list and add in each decl.
+            const NamedMappedAttrMapImpl* map = styledElement->mappedAttributes();
+            for (uint i = 0; i < map->length(); i++) {
+                MappedAttributeImpl* attr = map->attributeItem(i);
+                if (attr->decl()) {
+                    if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
+                    lastAuthorRule = m_matchedDeclCount;
+                    addMatchedDeclaration(attr->decl());
                 }
             }
-
-            // Now we check additional mapped declarations.
-            // Tables and table cells share an additional mapped rule that must be applied
-            // after all attributes, since their mapped style depends on the values of multiple attributes.
-            CSSMutableStyleDeclarationImpl* attributeDecl = styledElement->additionalAttributeStyleDecl();
-            if (attributeDecl) {
-                if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
-                lastAuthorRule = m_matchedDeclCount;
-                addMatchedDeclaration(attributeDecl);
-            }
         }
 
-        // 6. Check the rules in author sheets next.
-        matchRules(m_authorStyle, firstAuthorRule, lastAuthorRule);
-
-        // 7. Now check our inline style attribute.
-        if (styledElement) {
-            CSSMutableStyleDeclarationImpl* inlineDecl = styledElement->inlineStyleDecl();
-            if (inlineDecl) {
-                if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
-                lastAuthorRule = m_matchedDeclCount;
-                addMatchedDeclaration(inlineDecl);
-            }
+        // Now we check additional mapped declarations.
+        // Tables and table cells share an additional mapped rule that must be applied
+        // after all attributes, since their mapped style depends on the values of multiple attributes.
+        CSSMutableStyleDeclarationImpl* attributeDecl = styledElement->additionalAttributeStyleDecl();
+        if (attributeDecl) {
+            if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
+            lastAuthorRule = m_matchedDeclCount;
+            addMatchedDeclaration(attributeDecl);
         }
     }
-
+    
+    // 6. Check the rules in author sheets next.
+    matchRules(m_authorStyle, firstAuthorRule, lastAuthorRule);
+    
+    // 7. Now check our inline style attribute.
+    if (styledElement) {
+        CSSMutableStyleDeclarationImpl* inlineDecl = styledElement->inlineStyleDecl();
+        if (inlineDecl) {
+            if (firstAuthorRule == -1) firstAuthorRule = m_matchedDeclCount;
+            lastAuthorRule = m_matchedDeclCount;
+            addMatchedDeclaration(inlineDecl);
+        }
+    }
+    
     // Now we have all of the matched rules in the appropriate order.  Walk the rules and apply
     // high-priority properties first, i.e., those properties that other properties depend on.
     // The order is (1) high-priority not important, (2) high-priority important, (3) normal not important
     // and (4) normal important.
-    if (!m_resolvingForRootDefaultStyle) {
-        applyDeclarations(true, false, 0, m_matchedDeclCount-1);
-        applyDeclarations(true, true, firstAuthorRule, lastAuthorRule);
-    }
+    applyDeclarations(true, false, 0, m_matchedDeclCount-1);
+    applyDeclarations(true, true, firstAuthorRule, lastAuthorRule);
     applyDeclarations(true, true, firstUserRule, lastUserRule);
     applyDeclarations(true, true, firstUARule, lastUARule);
     
@@ -878,10 +827,8 @@ RenderStyle* CSSStyleSelector::styleForElement(ElementImpl* e, RenderStyle* defa
     // Now do the author and user normal priority properties and all the !important properties.
     applyDeclarations(false, false, lastUARule+1, m_matchedDeclCount-1);
     applyDeclarations(false, true, firstAuthorRule, lastAuthorRule);
-    if (!m_resolvingForRootDefaultStyle) {
-        applyDeclarations(false, true, firstUserRule, lastUserRule);
-        applyDeclarations(false, true, firstUARule, lastUARule);
-    }
+    applyDeclarations(false, true, firstUserRule, lastUserRule);
+    applyDeclarations(false, true, firstUARule, lastUARule);
     
     // If our font got dirtied by one of the non-essential font props, 
     // go ahead and update it a second time.
@@ -1107,7 +1054,7 @@ RefPtr<CSSRuleListImpl> CSSStyleSelector::styleRulesForElement(ElementImpl* e, b
             matchRules(defaultQuirksStyle, firstUARule, lastUARule);
         
         // If our medium is print, then we match rules from the print sheet.
-        if (m_medium->mediaTypeMatch("print"))
+        if (m_medium == "print")
             matchRules(defaultPrintStyle, firstUARule, lastUARule);
 
         // Now we check user sheet rules.
@@ -1631,14 +1578,14 @@ void CSSRuleSet::addRule(CSSStyleRuleImpl* rule, CSSSelector* sel)
         m_universalRules->append(m_ruleCount++, rule, sel);
 }
 
-void CSSRuleSet::addRulesFromSheet(CSSStyleSheetImpl *sheet, MediaQueryEvaluator *medium)
+void CSSRuleSet::addRulesFromSheet(CSSStyleSheetImpl *sheet, const DOMString &medium)
 {
     if (!sheet || !sheet->isCSSStyleSheet())
         return;
 
     // No media implies "all", but if a media list exists it must
     // contain our current medium
-    if (sheet->media() && !medium->eval(sheet->media()))
+    if (sheet->media() && !sheet->media()->contains(medium))
         return; // the style sheet doesn't apply
 
     int len = sheet->length();
@@ -1652,14 +1599,14 @@ void CSSRuleSet::addRulesFromSheet(CSSStyleSheetImpl *sheet, MediaQueryEvaluator
         }
         else if(item->isImportRule()) {
             CSSImportRuleImpl *import = static_cast<CSSImportRuleImpl *>(item);
-            if (!import->media() || medium->eval(import->media()))
+            if (!import->media() || import->media()->contains(medium))
                 addRulesFromSheet(import->styleSheet(), medium);
         }
         else if(item->isMediaRule()) {
             CSSMediaRuleImpl *r = static_cast<CSSMediaRuleImpl*>(item);
             CSSRuleListImpl *rules = r->cssRules();
 
-            if ((!r->media() || medium->eval(r->media())) && rules) {
+            if ((!r->media() || r->media()->contains(medium)) && rules) {
                 // Traverse child elements of the @media rule.
                 for (unsigned j = 0; j < rules->length(); j++) {
                     CSSRuleImpl *childItem = rules->item(j);
@@ -4339,15 +4286,5 @@ Color CSSStyleSelector::getColorFromPrimitiveValue(CSSPrimitiveValueImpl* primit
         col.setRgb(primitiveValue->getRGBColorValue());
     return col;    
 }
-    
-RenderStyle* CSSStyleSelector::defaultStyleForRoot(ElementImpl* e)
-{
-    // XXX: Not a nice way to make the allocation of new style from global heap 
-    // (and not from RenderArena), and to prevent selector to match author stylesheet rules 
-    m_resolvingForRootDefaultStyle = true;
-    RenderStyle* result = styleForElement(e, 0, false);
-    m_resolvingForRootDefaultStyle = false;
-    return result;
-}
 
 } // namespace WebCore
index 909b07f..0f482aa 100644 (file)
@@ -40,7 +40,6 @@ class CSSRuleSet;
 class CSSSelector;
 class CSSStyleSheetImpl;
 class CSSValueImpl;
-class MediaQueryEvaluator;
 class DocumentImpl;
 class ElementImpl;
 class Frame;
@@ -175,7 +174,6 @@ public:
  
     private:
         void init();
-        RenderStyle *defaultStyleForRoot(DOM::ElementImpl* e);
         
         void mapBackgroundAttachment(BackgroundLayer* layer, CSSValueImpl* value);
         void mapBackgroundClip(BackgroundLayer* layer, CSSValueImpl* value);
@@ -201,10 +199,8 @@ public:
         CSSRuleListImpl* m_ruleList;
         bool m_collectRulesOnly;
 
-        DOM::MediaQueryEvaluator* m_medium;
-        RenderStyle* m_rootDefaultStyle;
-        bool m_resolvingForRootDefaultStyle;
-        
+        QString m_medium;
+
         RenderStyle::PseudoId dynamicPseudo;
         
         RenderStyle *style;
diff --git a/WebCore/css/makemediafeatures b/WebCore/css/makemediafeatures
deleted file mode 100644 (file)
index cbf7ea6..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#   This file is part of the KDE libraries
-#
-#   Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
-#
-#   This library is free software; you can redistribute it and/or
-#   modify it under the terms of the GNU Library General Public
-#   License as published by the Free Software Foundation; either
-#   version 2 of the License, or (at your option) any later version.
-#
-#   This library is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   Library General Public License for more details.
-#
-#   You should have received a copy of the GNU Library General Public License
-#   along with this library; see the file COPYING.LIB.  If not, write to
-#   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-#   Boston, MA 02111-1307, USA.
-#
-#----------------------------------------------------------------------------
-#
-#  KDE HTML Widget -- Script to generate cssmediafeatures.c and cssmediafeatures.h
-#
-grep "^[^\#]" cssmediafeatures.in > cssmediafeatures.strip
-
-echo -e '%{\n/* This file is automatically generated from cssmediafeatures.in by makeprop, do not edit */\n/* Copyright 1999 W. Bastian */\n#include "cssmediafeatures.h"\n%}\nstruct css_media_feature_pair {\n    const char *name;\n    int id;\n};\n%%' > cssmediafeatures.gperf
-cat cssmediafeatures.strip | awk '{ do { prop = $0; gsub("-", "_"); print prop ", CSS_MEDIA_FEAT_" toupper($0) } while (getline) }' >> cssmediafeatures.gperf
-echo '%%' >> cssmediafeatures.gperf
-echo -e '/* This file is automatically generated from cssmediafeatures.in by makeprop, do not edit */\n/* Copyright 1998 W. Bastian */\n\n#ifndef CSSMEDIAFEATURES_H\n#define CSSMEDIAFEATURES_H\n\nDOM::DOMString getMediaFeatureName(unsigned short id);\n' > cssmediafeatures.h
-cat cssmediafeatures.strip | awk '{ \
-i=1; \
-print "#define CSS_MEDIA_FEAT_INVALID 0"; \
-print "#define CSS_MEDIA_FEAT_MIN 1"; \
-do { gsub("-", "_"); print "#define CSS_MEDIA_FEAT_" toupper($0) " " i; i = i + 1 } while (getline); \
-print ""; \
-print "#define CSS_MEDIA_FEAT_MAX CSS_MEDIA_FEAT_WIDTH"; \
-print "#define CSS_MEDIA_FEAT_TOTAL " i \
-}' >> cssmediafeatures.h
-gperf -a -L 'ANSI-C' -E -C -c -o -t -k '*' -NfindMediaFeature -Hhash_media_feat -Wwordlist_media_feat -D -s 2 cssmediafeatures.gperf > cssmediafeatures.c || exit 1
-echo -e '#endif\n' >> cssmediafeatures.h
-
-cat cssmediafeatures.strip | awk '{ \
-i=1; \
-print "static const char * const mediaFeatureList[] = {"; \
-print "\"\","; \
-do { print "\"" $0 "\", "; i = i + 1 } while (getline); \
-print "    0"; \
-print "};"; \
-print "DOMString getMediaFeatureName(unsigned short id)"; \
-print "{"; \
-print "    if(id >= CSS_MEDIA_FEAT_TOTAL || id == 0)"; \
-print "      return DOMString();";\
-print "    else";\
-print "      return DOMString(mediaFeatureList[id]);"; \
-print "};"; \
-print ""; \
-}' >> cssmediafeatures.c
index daa70c8..7a39e21 100644 (file)
@@ -53,15 +53,6 @@ while (<>) {
     print;
 }
 
-# media query, tokenizer state support
-while (<>) {
-  last if /yytext/;
-}
-while (<>) {
-  last if not (/define/ || /line/) ;
-  print;
-}
-
 while (<>) {
     last if /^YY_DECL/;
 }
index 84abb09..b051784 100644 (file)
@@ -1,8 +1,6 @@
 %option case-insensitive
 %option noyywrap
 %option 8bit
-%option stack
-%s mediaquery
 
 h               [0-9a-fA-F]
 nonascii        [\200-\377]
@@ -35,9 +33,6 @@ range           \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|
 "^="                    {yyTok = BEGINSWITH; return yyTok;}
 "$="                    {yyTok = ENDSWITH; return yyTok;}
 "*="                    {yyTok = CONTAINS; return yyTok;}
-<mediaquery>"not"       {yyTok = MEDIA_NOT; return yyTok;}
-<mediaquery>"only"      {yyTok = MEDIA_ONLY; return yyTok;}
-<mediaquery>"and"       {yyTok = MEDIA_AND; return yyTok;}
 
 {string}                {yyTok = STRING; return yyTok;}
 
@@ -45,16 +40,15 @@ range           \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|
 
 "#"{name}               {yyTok = HASH; return yyTok;}
 
-"@import"               {BEGIN(mediaquery); yyTok = IMPORT_SYM; return yyTok;}
+"@import"               {yyTok = IMPORT_SYM; return yyTok;}
 "@page"                 {yyTok = PAGE_SYM; return yyTok;}
-"@media"                {BEGIN(mediaquery); yyTok = MEDIA_SYM; return yyTok;}
+"@media"                {yyTok = MEDIA_SYM; return yyTok;}
 "@font-face"            {yyTok = FONT_FACE_SYM; return yyTok;}
 "@charset"              {yyTok = CHARSET_SYM; return yyTok;}
 "@namespace"            {yyTok = NAMESPACE_SYM; return yyTok; }
 "@-khtml-rule"    {yyTok = KHTML_RULE_SYM; return yyTok; }
 "@-khtml-decls"   {yyTok = KHTML_DECLS_SYM; return yyTok; }
 "@-khtml-value"   {yyTok = KHTML_VALUE_SYM; return yyTok; }
-"@-khtml-mediaquery"   {BEGIN(mediaquery); yyTok = KHTML_MEDIAQUERY_SYM; return yyTok; }
 
 "!"{w}"important"         {yyTok = IMPORTANT_SYM; return yyTok;}
 
@@ -85,8 +79,6 @@ range           \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|
 U\+{range}              {yyTok = UNICODERANGE; return yyTok;}
 U\+{h}{1,6}-{h}{1,6}    {yyTok = UNICODERANGE; return yyTok;}
 
-<mediaquery>"{"         |
-<mediaquery>";"         {BEGIN(INITIAL); yyTok = *yytext; return yyTok; }
 .                       {yyTok = *yytext; return yyTok;}
 
 %%
index 10a0aea..0e9fcf4 100644 (file)
@@ -43,7 +43,6 @@
 #include "css/cssstyleselector.h"
 #include "css/css_stylesheetimpl.h"
 #include "css/csshelper.h"
-#include "css/css_mediaqueryeval.h"
 #include "htmlnames.h"
 
 #include <kurl.h>
@@ -237,10 +236,7 @@ void HTMLLinkElementImpl::process()
         // no need to load style sheets which aren't for the screen output
         // ### there may be in some situations e.g. for an editor or script to manipulate
        // also, don't load style sheets for standalone documents
-        MediaQueryEvaluator allEval(true), screenEval("screen", true), printEval("print", true);
-        MediaListImpl* media = new MediaListImpl();
-        media->setMediaText( m_media );
-        if (allEval.eval(media) || screenEval.eval(media) || printEval.eval(media)) {
+        if (m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print")) {
             m_loading = true;
 
             // Add ourselves as a pending sheet, but only if we aren't an alternate 
@@ -254,8 +250,6 @@ void HTMLLinkElementImpl::process()
             m_cachedSheet = getDocument()->docLoader()->requestStyleSheet(m_url, chset);
             if (m_cachedSheet)
                 m_cachedSheet->ref(this);
-        } else {
-            delete media;
         }
     }
     else if (m_sheet) {
@@ -282,9 +276,9 @@ void HTMLLinkElementImpl::setStyleSheet(const DOM::DOMString &url, const DOM::DO
     m_sheet = new CSSStyleSheetImpl(this, url);
     m_sheet->parseString(sheetStr, !getDocument()->inCompatMode());
 
-    MediaListImplmedia = new MediaListImpl(m_sheet.get(), m_media);
+    MediaListImpl *media = new MediaListImpl(m_sheet.get(), m_media);
     m_sheet->setMedia( media );
-    
+
     m_loading = false;
 
     // Tell the doc about the sheet.
@@ -756,23 +750,16 @@ void HTMLStyleElementImpl::childrenChanged()
         m_sheet = 0;
     }
 
-    m_loading = false;    
-    if ((m_type.isEmpty() || m_type == "text/css")) {// Type must be empty or CSS
-        MediaListImpl* media = new MediaListImpl();
-        media->setMediaText(m_media);
-        MediaQueryEvaluator allEval(true), screenEval("screen", true),  printEval("print", true);
-        if (allEval.eval(media) || screenEval.eval(media) || printEval.eval(media)) {
-            getDocument()->addPendingSheet();
-            m_loading = true;
-            m_sheet = new CSSStyleSheetImpl(this);
-            m_sheet->ref();
-            m_sheet->parseString(text, !getDocument()->inCompatMode());
-            media->setParent(m_sheet.get());
-            m_sheet->setMedia(media);
-            m_loading = false;
-        } else {
-            delete media;
-        }
+    m_loading = false;
+    if ((m_type.isEmpty() || m_type == "text/css") // Type must be empty or CSS
+         && (m_media.isNull() || m_media.contains("screen") || m_media.contains("all") || m_media.contains("print"))) {
+        getDocument()->addPendingSheet();
+        m_loading = true;
+        m_sheet = new CSSStyleSheetImpl(this);
+        m_sheet->parseString(text, !getDocument()->inCompatMode());
+        MediaListImpl *media = new MediaListImpl(m_sheet.get(), m_media);
+        m_sheet->setMedia(media);
+        m_loading = false;
     }
 
     if (!isLoading() && m_sheet)
index 8caa16e..4f2e9fd 100644 (file)
@@ -33,8 +33,6 @@ namespace WebCore {
     class IntRect;
 
     int screenDepth(QWidget*);
-    int screenDepthPerComponent(QWidget*);
-    bool screenIsMonochrome(QWidget*);
     IntRect screenRect(QWidget*);
     IntRect usableScreenRect(QWidget*);
 
index f4ae806..9004d4b 100644 (file)
@@ -50,22 +50,6 @@ int screenDepth(QWidget* widget)
     return [screen(widget) depth];
 }
 
-int screenDepthPerComponent(QWidget* widget)
-{
-   return NSBitsPerSampleFromDepth([screen(widget) depth]);
-}
-
-bool screenIsMonochrome(QWidget* widget)
-{
-    NSScreen* s = screen(widget);
-    NSDictionary* dd = [s deviceDescription];
-    NSString* colorSpaceName = [dd objectForKey:NSDeviceColorSpaceName];
-    // XXX: can named colorspace or custom colorspace be monochrome?
-    // XXX: will NS*BlackColorSpace or NS*WhiteColorSpace be always monochrome?
-    return colorSpaceName == NSCalibratedWhiteColorSpace || colorSpaceName == NSCalibratedBlackColorSpace || 
-        colorSpaceName == NSDeviceWhiteColorSpace || colorSpaceName == NSDeviceBlackColorSpace;
-}
-
 IntRect screenRect(QWidget* widget)
 {
     return enclosingIntRect(flipGlobalRect([screen(widget) frame]));