<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>20946</bug_id>
          
          <creation_ts>2008-09-19 12:21:24 -0700</creation_ts>
          <short_desc>REGRESSION: Invalid CSS @media query should be ignored but isn&apos;t</short_desc>
          <delta_ts>2009-01-06 00:06:12 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Petersen">c.petersen87</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>apapirovski</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91801</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2008-09-19 12:21:24 -0700</bug_when>
    <thetext>* SUMMARY
With Webkit NB r36640 , a invalid CSS @media query should be ignored but isn&apos;t. This problem was originally found at http://store.iomega.com/section?SID=f2e44e869a9564289240548cef0a492cc48:4760&amp;secid=40299.

I have reduced it down with Tim H to a simple test case.

&lt;style&gt;
.test {
	background-color: green;
	width: 20px;
	height: 20px;
}

@media screen {

/* Any style rules after this will be ignored. */

.test {
	display: none;
}
&lt;/style&gt;

&lt;div class=&quot;test&quot;&gt;&lt;/div&gt;

* STEPS TO REPRODUCE
1. Open the attached file &quot;iomega.html&quot; in Safari 3.1.
2. Notice a green square (&lt; DIV&gt; ) appears on this page
3. Now, open this same test case in TOT. Notice the green square doesn&apos;t appear on the page at all.

The display: none; rule is being processed even thought it shouldn&apos;t be ( since the @media query is not valid)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91802</commentid>
    <comment_count>1</comment_count>
      <attachid>23577</attachid>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2008-09-19 12:22:09 -0700</bug_when>
    <thetext>Created attachment 23577
Reduced test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91803</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2008-09-19 12:22:53 -0700</bug_when>
    <thetext>&lt;rdar://problem/6232970&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102271</commentid>
    <comment_count>3</comment_count>
    <who name="Anatoli Papirovski">apapirovski</who>
    <bug_when>2008-12-11 13:31:31 -0800</bug_when>
    <thetext>The @media query is valid! See here http://www.w3.org/TR/CSS21/syndata.html#parsing-errors - specifically the section about &quot;Unexpected end of style sheet&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102272</commentid>
    <comment_count>4</comment_count>
    <who name="Anatoli Papirovski">apapirovski</who>
    <bug_when>2008-12-11 13:33:48 -0800</bug_when>
    <thetext>More information: Firefox 3 gets this wrong, Opera 9.5 gets it right.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104538</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2009-01-06 00:06:12 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; The @media query is valid! See here
&gt; http://www.w3.org/TR/CSS21/syndata.html#parsing-errors - specifically the
&gt; section about &quot;Unexpected end of style sheet&quot;.
&gt; 

I agree with Anatoli. The reported style sheet is absolutely correct.

(In reply to comment #4)
&gt; More information: Firefox 3 gets this wrong, Opera 9.5 gets it right.
&gt; 

Firefox 3.1 beta 2 has this bug fixed. 

I close this bug as INVALID since it doesn&apos;t describe a real bug.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>23577</attachid>
            <date>2008-09-19 12:22:09 -0700</date>
            <delta_ts>2008-09-19 12:22:09 -0700</delta_ts>
            <desc>Reduced test case</desc>
            <filename>iomega.html</filename>
            <type>text/html</type>
            <size>203</size>
            <attacher name="Chris Petersen">c.petersen87</attacher>
            
              <data encoding="base64">PHN0eWxlPgoudGVzdCB7CgliYWNrZ3JvdW5kLWNvbG9yOiBncmVlbjsKCXdpZHRoOiAyMHB4OwoJ
aGVpZ2h0OiAyMHB4Owp9CgpAbWVkaWEgc2NyZWVuIHsKCi8qIEFueSBzdHlsZSBydWxlcyBhZnRl
ciB0aGlzIHdpbGwgYmUgaWdub3JlZC4gKi8KCi50ZXN0IHsKCWRpc3BsYXk6IG5vbmU7Cn0KPC9z
dHlsZT4KCjxkaXYgY2xhc3M9InRlc3QiPjwvZGl2Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>