Commit 1f63b91e authored by bdakin's avatar bdakin

Reviewed by Hyatt. Tweaked by Maciej. Tweaks reviewed by Beth.

        Landed by Beth.

        CSS3 Media Queries implementation.
        <http://bugzilla.opendarwin.org/show_bug.cgi?id=4127>

        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/kjs_css.cpp:
        (KJS::DOMMediaList::put):
        (KJS::KJS::DOMMediaListProtoFunc::callAsFunction):
        * bindings/objc/DOMCSS.mm:
        (-[DOMMediaList setMediaText:]):
        (-[DOMMediaList deleteMedium:]):
        (-[DOMMediaList appendMedium:]):
        * css/CSSGrammar.y:
        * css/MediaFeatureNames.cpp: Added.
        (WebCore::MediaFeatureNames::init):
        * css/MediaFeatureNames.h: Added.
        * css/MediaList.cpp:
        (WebCore::MediaList::MediaList):
        (WebCore::MediaList::~MediaList):
        (WebCore::parseMediaDescriptor):
        (WebCore::MediaList::deleteMedium):
        (WebCore::MediaList::mediaText):
        (WebCore::MediaList::setMediaText):
        (WebCore::MediaList::item):
        (WebCore::MediaList::appendMedium):
        (WebCore::MediaList::appendMediaQuery):
        * css/MediaList.h:
        (WebCore::MediaList::MediaList):
        (WebCore::MediaList::length):
        (WebCore::MediaList::mediaQueries):
        * css/MediaQuery.cpp: Added.
        (WebCore::MediaQuery::MediaQuery):
        (WebCore::MediaQuery::~MediaQuery):
        (WebCore::MediaQuery::operator==):
        (WebCore::MediaQuery::cssText):
        * css/MediaQuery.h: Added.
        (WebCore::MediaQuery::):
        (WebCore::MediaQuery::restrictor):
        (WebCore::MediaQuery::expressions):
        (WebCore::MediaQuery::mediaType):
        (WebCore::MediaQuery::append):
        * css/MediaQueryEvaluator.cpp: Added.
        (WebCore::):
        (WebCore::MediaQueryEvaluator):
        (WebCore::MediaQueryEvaluator::~MediaQueryEvaluator):
        (WebCore::MediaQueryEvaluator::mediaTypeMatch):
        (WebCore::applyRestrictor):
        (WebCore::MediaQueryEvaluator::eval):
        (WebCore::parseAspectRatio):
        (WebCore::cmpvalue):
        (WebCore::numberValue):
        (WebCore::colorMediaFeatureEval):
        (WebCore::monochromeMediaFeatureEval):
        (WebCore::device_aspect_ratioMediaFeatureEval):
        (WebCore::gridMediaFeatureEval):
        (WebCore::device_heightMediaFeatureEval):
        (WebCore::device_widthMediaFeatureEval):
        (WebCore::heightMediaFeatureEval):
        (WebCore::widthMediaFeatureEval):
        (WebCore::min_colorMediaFeatureEval):
        (WebCore::max_colorMediaFeatureEval):
        (WebCore::min_monochromeMediaFeatureEval):
        (WebCore::max_monochromeMediaFeatureEval):
        (WebCore::min_device_aspect_ratioMediaFeatureEval):
        (WebCore::max_device_aspect_ratioMediaFeatureEval):
        (WebCore::min_heightMediaFeatureEval):
        (WebCore::max_heightMediaFeatureEval):
        (WebCore::min_widthMediaFeatureEval):
        (WebCore::max_widthMediaFeatureEval):
        (WebCore::min_device_heightMediaFeatureEval):
        (WebCore::max_device_heightMediaFeatureEval):
        (WebCore::min_device_widthMediaFeatureEval):
        (WebCore::max_device_widthMediaFeatureEval):
        (WebCore::createFunctionMap):
        * css/MediaQueryEvaluator.h: Added.
        * css/MediaQueryExp.cpp: Added.
        (WebCore::MediaQueryExp::MediaQueryExp):
        (WebCore::MediaQueryExp::~MediaQueryExp):
        * css/MediaQueryExp.h: Added.
        (WebCore::MediaQueryExp::mediaFeature):
        (WebCore::MediaQueryExp::value):
        (WebCore::MediaQueryExp::operator==):
        * css/StyleSheet.cpp:
        (WebCore::StyleSheet::setMedia):
        * css/cssparser.cpp:
        (WebCore::CSSParser::CSSParser):
        (WebCore::CSSParser::~CSSParser):
        (WebCore::CSSParser::setupParser):
        (WebCore::CSSParser::parseMediaQuery):
        (WebCore::CSSParser::createFloatingMediaQueryExp):
        (WebCore::CSSParser::sinkFloatingMediaQueryExp):
        (WebCore::CSSParser::createFloatingMediaQueryExpList):
        (WebCore::CSSParser::sinkFloatingMediaQueryExpList):
        (WebCore::CSSParser::createFloatingMediaQuery):
        (WebCore::CSSParser::sinkFloatingMediaQuery):
        * css/cssparser.h:
        * css/cssstyleselector.cpp:
        (WebCore::CSSStyleSelector::CSSStyleSelector):
        (WebCore::CSSStyleSelector::init):
        (WebCore::CSSStyleSelector::~CSSStyleSelector):
        (WebCore::CSSStyleSelector::loadDefaultStyle):
        (WebCore::CSSStyleSelector::matchUARules):
        (WebCore::CSSStyleSelector::styleForElement):
        (WebCore::CSSStyleSelector::pseudoStyleForElement):
        (WebCore::CSSStyleSelector::updateFont):
        (WebCore::CSSStyleSelector::cacheBorderAndBackground):
        (WebCore::CSSStyleSelector::styleRulesForElement):
        (WebCore::CSSRuleSet::addRulesFromSheet):
        * css/cssstyleselector.h:
        * css/maketokenizer:
        * css/tokenizer.flex:
        * dom/DOMImplementation.cpp:
        (WebCore::DOMImplementation::createCSSStyleSheet):
        * html/HTMLLinkElement.cpp:
        (WebCore::HTMLLinkElement::process):
        (WebCore::HTMLLinkElement::setStyleSheet):
        * html/HTMLStyleElement.cpp:
        (WebCore::HTMLStyleElement::childrenChanged):
        * ksvg2/svg/SVGDOMImplementation.cpp:
        (SVGDOMImplementation::createCSSStyleSheet):
        * ksvg2/svg/SVGStyleElement.cpp:
        (WebCore::SVGStyleElement::childrenChanged):
        * page/Frame.cpp:
        (WebCore::Frame::Frame):
        * platform/Screen.h:
        * platform/mac/ScreenMac.mm:
        (WebCore::screenDepthPerComponent):
        (WebCore::screenIsMonochrome):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@14779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 24793c50
2006-06-09 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
Reviewed by Hyatt.
Test cases for CSS3 Media Queries implementation.
<http://bugzilla.opendarwin.org/show_bug.cgi?id=4127>
* fast/media/import-p-green.css: Added.
* fast/media/import-p-red.css: Added.
* fast/media/media-descriptor-syntax-01-expected.checksum: Added.
* fast/media/media-descriptor-syntax-01-expected.png: Added.
* fast/media/media-descriptor-syntax-01-expected.txt: Added.
* fast/media/media-descriptor-syntax-01.html: Added.
* fast/media/media-descriptor-syntax-02-expected.checksum: Added.
* fast/media/media-descriptor-syntax-02-expected.png: Added.
* fast/media/media-descriptor-syntax-02-expected.txt: Added.
* fast/media/media-descriptor-syntax-02.html: Added.
* fast/media/media-descriptor-syntax-03-expected.checksum: Added.
* fast/media/media-descriptor-syntax-03-expected.png: Added.
* fast/media/media-descriptor-syntax-03-expected.txt: Added.
* fast/media/media-descriptor-syntax-03.html: Added.
* fast/media/media-descriptor-syntax-04-expected.checksum: Added.
* fast/media/media-descriptor-syntax-04-expected.png: Added.
* fast/media/media-descriptor-syntax-04-expected.txt: Added.
* fast/media/media-descriptor-syntax-04.html: Added.
* fast/media/media-descriptor-syntax-05-expected.checksum: Added.
* fast/media/media-descriptor-syntax-05-expected.png: Added.
* fast/media/media-descriptor-syntax-05-expected.txt: Added.
* fast/media/media-descriptor-syntax-05.html: Added.
* fast/media/media-descriptor-syntax-06-expected.checksum: Added.
* fast/media/media-descriptor-syntax-06-expected.png: Added.
* fast/media/media-descriptor-syntax-06-expected.txt: Added.
* fast/media/media-descriptor-syntax-06.html: Added.
* fast/media/media-type-syntax-01-expected.checksum: Added.
* fast/media/media-type-syntax-01-expected.png: Added.
* fast/media/media-type-syntax-01-expected.txt: Added.
* fast/media/media-type-syntax-01.html: Added.
* fast/media/media-type-syntax-02-expected.checksum: Added.
* fast/media/media-type-syntax-02-expected.png: Added.
* fast/media/media-type-syntax-02-expected.txt: Added.
* fast/media/media-type-syntax-02.html: Added.
* fast/media/mq-compound-query-01-expected.checksum: Added.
* fast/media/mq-compound-query-01-expected.png: Added.
* fast/media/mq-compound-query-01-expected.txt: Added.
* fast/media/mq-compound-query-01.html: Added.
* fast/media/mq-compound-query-02-expected.checksum: Added.
* fast/media/mq-compound-query-02-expected.png: Added.
* fast/media/mq-compound-query-02-expected.txt: Added.
* fast/media/mq-compound-query-02.html: Added.
* fast/media/mq-compound-query-03-expected.checksum: Added.
* fast/media/mq-compound-query-03-expected.png: Added.
* fast/media/mq-compound-query-03-expected.txt: Added.
* fast/media/mq-compound-query-03.html: Added.
* fast/media/mq-compound-query-04-expected.checksum: Added.
* fast/media/mq-compound-query-04-expected.png: Added.
* fast/media/mq-compound-query-04-expected.txt: Added.
* fast/media/mq-compound-query-04.html: Added.
* fast/media/mq-compound-query-05-expected.checksum: Added.
* fast/media/mq-compound-query-05-expected.png: Added.
* fast/media/mq-compound-query-05-expected.txt: Added.
* fast/media/mq-compound-query-05.html: Added.
* fast/media/mq-grid-01-expected.checksum: Added.
* fast/media/mq-grid-01-expected.png: Added.
* fast/media/mq-grid-01-expected.txt: Added.
* fast/media/mq-grid-01.html: Added.
* fast/media/mq-grid-02-expected.checksum: Added.
* fast/media/mq-grid-02-expected.png: Added.
* fast/media/mq-grid-02-expected.txt: Added.
* fast/media/mq-grid-02.html: Added.
* fast/media/mq-invalid-media-feature-01-expected.checksum: Added.
* fast/media/mq-invalid-media-feature-01-expected.png: Added.
* fast/media/mq-invalid-media-feature-01-expected.txt: Added.
* fast/media/mq-invalid-media-feature-01.html: Added.
* fast/media/mq-invalid-media-feature-02-expected.checksum: Added.
* fast/media/mq-invalid-media-feature-02-expected.png: Added.
* fast/media/mq-invalid-media-feature-02-expected.txt: Added.
* fast/media/mq-invalid-media-feature-02.html: Added.
* fast/media/mq-invalid-media-feature-03-expected.checksum: Added.
* fast/media/mq-invalid-media-feature-03-expected.png: Added.
* fast/media/mq-invalid-media-feature-03-expected.txt: Added.
* fast/media/mq-invalid-media-feature-03.html: Added.
* fast/media/mq-invalid-media-feature-04-expected.checksum: Added.
* fast/media/mq-invalid-media-feature-04-expected.png: Added.
* fast/media/mq-invalid-media-feature-04-expected.txt: Added.
* fast/media/mq-invalid-media-feature-04.html: Added.
* fast/media/mq-invalid-syntax-01-expected.checksum: Added.
* fast/media/mq-invalid-syntax-01-expected.png: Added.
* fast/media/mq-invalid-syntax-01-expected.txt: Added.
* fast/media/mq-invalid-syntax-01.html: Added.
* fast/media/mq-invalid-syntax-02-expected.checksum: Added.
* fast/media/mq-invalid-syntax-02-expected.png: Added.
* fast/media/mq-invalid-syntax-02-expected.txt: Added.
* fast/media/mq-invalid-syntax-02.html: Added.
* fast/media/mq-invalid-syntax-03-expected.checksum: Added.
* fast/media/mq-invalid-syntax-03-expected.png: Added.
* fast/media/mq-invalid-syntax-03-expected.txt: Added.
* fast/media/mq-invalid-syntax-03.html: Added.
* fast/media/mq-invalid-syntax-04-expected.checksum: Added.
* fast/media/mq-invalid-syntax-04-expected.png: Added.
* fast/media/mq-invalid-syntax-04-expected.txt: Added.
* fast/media/mq-invalid-syntax-04.html: Added.
* fast/media/mq-invalid-syntax-05-expected.checksum: Added.
* fast/media/mq-invalid-syntax-05-expected.png: Added.
* fast/media/mq-invalid-syntax-05-expected.txt: Added.
* fast/media/mq-invalid-syntax-05.html: Added.
* fast/media/mq-js-media-except-01-expected.checksum: Added.
* fast/media/mq-js-media-except-01-expected.png: Added.
* fast/media/mq-js-media-except-01-expected.txt: Added.
* fast/media/mq-js-media-except-01.html: Added.
* fast/media/mq-js-media-except-02-expected.checksum: Added.
* fast/media/mq-js-media-except-02-expected.png: Added.
* fast/media/mq-js-media-except-02-expected.txt: Added.
* fast/media/mq-js-media-except-02.html: Added.
* fast/media/mq-js-media-except-03-expected.checksum: Added.
* fast/media/mq-js-media-except-03-expected.png: Added.
* fast/media/mq-js-media-except-03-expected.txt: Added.
* fast/media/mq-js-media-except-03.html: Added.
* fast/media/mq-js-media-forward-syntax-expected.checksum: Added.
* fast/media/mq-js-media-forward-syntax-expected.png: Added.
* fast/media/mq-js-media-forward-syntax-expected.txt: Added.
* fast/media/mq-js-media-forward-syntax.html: Added.
* fast/media/mq-js-stylesheet-media-01-expected.checksum: Added.
* fast/media/mq-js-stylesheet-media-01-expected.png: Added.
* fast/media/mq-js-stylesheet-media-01-expected.txt: Added.
* fast/media/mq-js-stylesheet-media-01.html: Added.
* fast/media/mq-js-stylesheet-media-02-expected.checksum: Added.
* fast/media/mq-js-stylesheet-media-02-expected.png: Added.
* fast/media/mq-js-stylesheet-media-02-expected.txt: Added.
* fast/media/mq-js-stylesheet-media-02.html: Added.
* fast/media/mq-js-stylesheet-media-03-expected.checksum: Added.
* fast/media/mq-js-stylesheet-media-03-expected.png: Added.
* fast/media/mq-js-stylesheet-media-03-expected.txt: Added.
* fast/media/mq-js-stylesheet-media-03.html: Added.
* fast/media/mq-js-stylesheet-media-04-expected.checksum: Added.
* fast/media/mq-js-stylesheet-media-04-expected.png: Added.
* fast/media/mq-js-stylesheet-media-04-expected.txt: Added.
* fast/media/mq-js-stylesheet-media-04.html: Added.
* fast/media/mq-min-constraint-expected.checksum: Added.
* fast/media/mq-min-constraint-expected.png: Added.
* fast/media/mq-min-constraint-expected.txt: Added.
* fast/media/mq-min-constraint.html: Added.
* fast/media/mq-relative-constraints-02-expected.checksum: Added.
* fast/media/mq-relative-constraints-02-expected.png: Added.
* fast/media/mq-relative-constraints-02-expected.txt: Added.
* fast/media/mq-relative-constraints-02.html: Added.
* fast/media/mq-relative-constraints-03-expected.checksum: Added.
* fast/media/mq-relative-constraints-03-expected.png: Added.
* fast/media/mq-relative-constraints-03-expected.txt: Added.
* fast/media/mq-relative-constraints-03.html: Added.
* fast/media/mq-relative-constraints-04-expected.checksum: Added.
* fast/media/mq-relative-constraints-04-expected.png: Added.
* fast/media/mq-relative-constraints-04-expected.txt: Added.
* fast/media/mq-relative-constraints-04.html: Added.
* fast/media/mq-relative-constraints-05-expected.checksum: Added.
* fast/media/mq-relative-constraints-05-expected.png: Added.
* fast/media/mq-relative-constraints-05-expected.txt: Added.
* fast/media/mq-relative-constraints-05.html: Added.
* fast/media/mq-relative-constraints-06-expected.checksum: Added.
* fast/media/mq-relative-constraints-06-expected.png: Added.
* fast/media/mq-relative-constraints-06-expected.txt: Added.
* fast/media/mq-relative-constraints-06.html: Added.
* fast/media/mq-relative-constraints-07-expected.checksum: Added.
* fast/media/mq-relative-constraints-07-expected.png: Added.
* fast/media/mq-relative-constraints-07-expected.txt: Added.
* fast/media/mq-relative-constraints-07.html: Added.
* fast/media/mq-relative-constraints-08-expected.checksum: Added.
* fast/media/mq-relative-constraints-08-expected.png: Added.
* fast/media/mq-relative-constraints-08-expected.txt: Added.
* fast/media/mq-relative-constraints-08.html: Added.
* fast/media/mq-relative-constraints-09-expected.checksum: Added.
* fast/media/mq-relative-constraints-09-expected.png: Added.
* fast/media/mq-relative-constraints-09-expected.txt: Added.
* fast/media/mq-relative-constraints-09.html: Added.
* fast/media/mq-simple-neg-query-01-expected.checksum: Added.
* fast/media/mq-simple-neg-query-01-expected.png: Added.
* fast/media/mq-simple-neg-query-01-expected.txt: Added.
* fast/media/mq-simple-neg-query-01.html: Added.
* fast/media/mq-simple-neg-query-02-expected.checksum: Added.
* fast/media/mq-simple-neg-query-02-expected.png: Added.
* fast/media/mq-simple-neg-query-02-expected.txt: Added.
* fast/media/mq-simple-neg-query-02.html: Added.
* fast/media/mq-simple-neg-query-03-expected.checksum: Added.
* fast/media/mq-simple-neg-query-03-expected.png: Added.
* fast/media/mq-simple-neg-query-03-expected.txt: Added.
* fast/media/mq-simple-neg-query-03.html: Added.
* fast/media/mq-simple-neg-query-04-expected.checksum: Added.
* fast/media/mq-simple-neg-query-04-expected.png: Added.
* fast/media/mq-simple-neg-query-04-expected.txt: Added.
* fast/media/mq-simple-neg-query-04.html: Added.
* fast/media/mq-simple-neg-query-05-expected.checksum: Added.
* fast/media/mq-simple-neg-query-05-expected.png: Added.
* fast/media/mq-simple-neg-query-05-expected.txt: Added.
* fast/media/mq-simple-neg-query-05.html: Added.
* fast/media/mq-simple-query-01-expected.checksum: Added.
* fast/media/mq-simple-query-01-expected.png: Added.
* fast/media/mq-simple-query-01-expected.txt: Added.
* fast/media/mq-simple-query-01.html: Added.
* fast/media/mq-simple-query-02-expected.checksum: Added.
* fast/media/mq-simple-query-02-expected.png: Added.
* fast/media/mq-simple-query-02-expected.txt: Added.
* fast/media/mq-simple-query-02.html: Added.
* fast/media/mq-simple-query-03-expected.checksum: Added.
* fast/media/mq-simple-query-03-expected.png: Added.
* fast/media/mq-simple-query-03-expected.txt: Added.
* fast/media/mq-simple-query-03.html: Added.
* fast/media/mq-simple-query-04-expected.checksum: Added.
* fast/media/mq-simple-query-04-expected.png: Added.
* fast/media/mq-simple-query-04-expected.txt: Added.
* fast/media/mq-simple-query-04.html: Added.
* fast/media/mq-simple-query-05-expected.checksum: Added.
* fast/media/mq-simple-query-05-expected.png: Added.
* fast/media/mq-simple-query-05-expected.txt: Added.
* fast/media/mq-simple-query-05.html: Added.
* fast/media/mq-valueless-expected.checksum: Added.
* fast/media/mq-valueless-expected.png: Added.
* fast/media/mq-valueless-expected.txt: Added.
* fast/media/mq-valueless.html: Added.
* fast/media/mq-width-absolute-01-expected.checksum: Added.
* fast/media/mq-width-absolute-01-expected.png: Added.
* fast/media/mq-width-absolute-01-expected.txt: Added.
* fast/media/mq-width-absolute-01.html: Added.
* fast/media/mq-width-absolute-02-expected.checksum: Added.
* fast/media/mq-width-absolute-02-expected.png: Added.
* fast/media/mq-width-absolute-02-expected.txt: Added.
* fast/media/mq-width-absolute-02.html: Added.
* fast/media/mq-width-absolute-03-expected.checksum: Added.
* fast/media/mq-width-absolute-03-expected.png: Added.
* fast/media/mq-width-absolute-03-expected.txt: Added.
* fast/media/mq-width-absolute-03.html: Added.
* fast/media/mq-width-absolute-04-expected.checksum: Added.
* fast/media/mq-width-absolute-04-expected.png: Added.
* fast/media/mq-width-absolute-04-expected.txt: Added.
* fast/media/mq-width-absolute-04.html: Added.
2006-06-08 Justin Garcia <justin.garcia@apple.com>
Reviewed by levi
p { color: red }
\ No newline at end of file
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptors test: parsing style element media attribute, forward-compatible syntax</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>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax</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>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax</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>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax</title>
<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
<style type="text/css" media=",,,,">
p { color: green }
</style>
</head>
<body>
<p> This text should be green.</p>
</body>
</html>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax</title>
<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
<style type="text/css" media="*****|{}- |[|">
p { color: green }
</style>
</head>
<body>
<p> This text should be green.</p>
</body>
</html>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>HTML4 media descriptor test: parsing style element media attribute, forward-compatible syntax</title>
<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
<style type="text/css" media=" ">
p { color: green }
</style>
</head>
<body>
<p> This text should be green.</p>
</body>
</html>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>CSS2.1 media type test: parsing simple @media css rule.</title>
<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
<style type="text/css">
@media all { p { color: green } }
</style>
</head>
<body>
</body>
<p> This text should be green. </p>
</html>
915a9e795ad41ad5998dba4f681f98dc
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>CSS2.1 media type test: parsing simple @media css rule. Media type ,,,, should be considered as invalid syntax</title>
<link rel="help" href="http://www.w3.org/TR/REC-html40/types.html#h-6.13" />
<style type="text/css">
p { color: green }
@media ,,,,, { p { color: red } }
</style>
</head>
<body>
</body>
<p> This text should be green. </p>
</html>
7499a40172304d162bb6dbf0ac77e8dd
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>CSS3 media query test: media query testing compound queries (screen and (color) and (grid:0)). Using style element, media attribute.</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>
7499a40172304d162bb6dbf0ac77e8dd
\ No newline at end of file
layer at (0,0) size 800x600
RenderView 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."
<html>
<head>
<title>CSS3 media query test: media query testing compound queries (screen and (color) and (grid:0)). Using link element, media attribute</title>
<link rel="help" href="http://www.w3.org/TR/css3-mediaqueries/#syntax" />
<link rel="stylesheet" type="text/css"