<?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>14007</bug_id>
          
          <creation_ts>2007-06-05 16:14:06 -0700</creation_ts>
          <short_desc>Unclosed CSS block causes incorrect handling of rest of stylesheet</short_desc>
          <delta_ts>2022-07-07 12:32:06 -0700</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>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Sprehn">esprehn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>bfulgham</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8305</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-06-05 16:14:06 -0700</bug_when>
    <thetext>If a block is not closed and the rule following it is not a type selector then unclosed block and all rules until the end of the are ignored.

Reproducible in Safari 2 and the latest nightly (Mon Jun 4 23:39:30 GMT 2007, 21970).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8306</commentid>
    <comment_count>1</comment_count>
      <attachid>14871</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-06-05 16:17:52 -0700</bug_when>
    <thetext>Created attachment 14871
Unclosed block followed by non-type selector.

The text in the examples should be colored the same as the color for each word.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8307</commentid>
    <comment_count>2</comment_count>
      <attachid>14872</attachid>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-06-05 16:19:41 -0700</bug_when>
    <thetext>Created attachment 14872
Unclosed Block Followed By Type Selector

Text should be colored the same as word specifies.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8308</commentid>
    <comment_count>3</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2007-06-05 16:25:47 -0700</bug_when>
    <thetext>Apparently the handling seems to differ based on if there&apos;s a type or non-type selector after the unclosed block. Both behaviors are wrong as per the spec and behavior of FireFox and IE.

If there&apos;s a type selector Webkit ignores the entire rest of the sheet and the rules in the unclosed block.

If there&apos;s no type selector Webkit closes the block at the next rule, ignores the that rule, but doesn&apos;t ignore the rest of the stylesheet or the rule that was missing the close brace.

Behavior as per the spec and the what other browsers do is to make the whole rest of the sheet into &quot;invalid rules&quot; and ignore them, but to respect the rules in the unclosed block that happened before the next rule was encountered.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8312</commentid>
    <comment_count>4</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-06-05 17:00:49 -0700</bug_when>
    <thetext>Confirmed with a local debug build of WebKit r21976 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135).

Both examples work in Firefox 2.0.0.4 and Opera 9.10.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8325</commentid>
    <comment_count>5</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-06-06 00:36:59 -0700</bug_when>
    <thetext>Is this the same bug as 12558?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8339</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-06-06 04:13:48 -0700</bug_when>
    <thetext>I&apos;m not sure if this can be closed as a duplicate - but it&apos;s closely related for sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100639</commentid>
    <comment_count>7</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-11-28 14:01:28 -0800</bug_when>
    <thetext>Bug 12558 is fixed now, but this is not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1881442</commentid>
    <comment_count>8</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-07 12:32:06 -0700</bug_when>
    <thetext>Safari, Chrome, and Firefox produce the same output for both test cases. I don&apos;t believe any compatibility issues remain for this bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14871</attachid>
            <date>2007-06-05 16:17:52 -0700</date>
            <delta_ts>2007-06-05 16:20:28 -0700</delta_ts>
            <desc>Unclosed block followed by non-type selector.</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>462</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KCjxodG1sPgoKPGhlYWQ+
Cgk8dGl0bGU+Zm9vPC90aXRsZT4KCTxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29u
dGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4KCQoJPHN0eWxlIHR5cGU9InRleHQvY3Nz
Ij4KCQlib2R5IHsKCQkJY29sb3I6IGJsdWU7CgkJfQoJCgkJcCB7CgkJCWNvbG9yOiByZWQ7CgkJ
CgkJLmRpdiB7CgkJCWNvbG9yOiBwaW5rOwoJCX0KCQkKCQlzcGFuIHsKCQkJY29sb3I6IGdyZWVu
OwoJCX0KCTwvc3R5bGU+CgkKPC9oZWFkPgo8Ym9keT4KCWJsdWUKCTxwPnJlZDwvcD4KCTxkaXYg
Y2xhc3M9ImRpdiI+CgkJYmx1ZSA8c3Bhbj5ibHVlPC9zcGFuPgoJPC9kaXY+CgkKPC9ib2R5Pgo8
L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>14872</attachid>
            <date>2007-06-05 16:19:41 -0700</date>
            <delta_ts>2007-06-05 16:19:41 -0700</delta_ts>
            <desc>Unclosed Block Followed By Type Selector</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>461</size>
            <attacher name="Elliott Sprehn">esprehn</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICJodHRwOi8vd3d3LnczLm9yZy9UUi9odG1sNC9zdHJpY3QuZHRkIj4KCjxodG1sPgoKPGhlYWQ+
Cgk8dGl0bGU+Zm9vPC90aXRsZT4KCTxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29u
dGVudD0idGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04Ij4KCQoJPHN0eWxlIHR5cGU9InRleHQvY3Nz
Ij4KCQlib2R5IHsKCQkJY29sb3I6IGJsdWU7CgkJfQoJCgkJcCB7CgkJCWNvbG9yOiByZWQ7CgkJ
CgkJZGl2IHsKCQkJY29sb3I6IHBpbms7CgkJfQoJCQoJCXNwYW4gewoJCQljb2xvcjogZ3JlZW47
CgkJfQoJPC9zdHlsZT4KCQo8L2hlYWQ+Cjxib2R5PgoJYmx1ZQoJPHA+cmVkPC9wPgoJPGRpdiBj
bGFzcz0iZGl2Ij4KCQlibHVlIDxzcGFuPmJsdWU8L3NwYW4+Cgk8L2Rpdj4KCQo8L2JvZHk+Cjwv
aHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>