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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27422</bug_id>
          
          <creation_ts>2014-11-24 23:26:01 +0000</creation_ts>
          <short_desc>Remove CSSCharsetRule?</short_desc>
          <delta_ts>2015-04-14 11:49:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>CSSOM</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>http://code.google.com/p/chromium/issues/detail?id=438147</see_also>
    
    <see_also>https://bugzilla.mozilla.org/show_bug.cgi?id=1148694</see_also>
          <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="Philip Jägenstedt">philipj</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115432</commentid>
    <comment_count>0</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-24 23:26:01 +0000</bug_when>
    <thetext>http://dev.w3.org/csswg/cssom/#csscharsetrule

Need a decision to converge on, and the counter makes it seem likely safe to remove:
https://www.chromestatus.com/metrics/feature/timeline/popularity/426</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115443</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-11-25 09:08:07 +0000</bug_when>
    <thetext>The use counter counts usage of CSSCharsetRule#encoding but compat problems could manifest without using that attribute, e.g. by assuming a certain index for a later rule in cssRules.

I recommend removing it in one of the browsers. If it sticks I&apos;ll remove it from the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115483</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-25 23:02:12 +0000</bug_when>
    <thetext>You you write a sentence or two why you want to get rid of CSSCharsetRule from the spec, for reference in an Intent to Remove? If you could mark it as at risk or something in the spec that would be nice too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115486</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-11-25 23:50:18 +0000</bug_when>
    <thetext>http://dev.w3.org/csswg/css-syntax/#charset-rule explains a bit why it doesn&apos;t make sense to have it in the object model.

Also see http://www.w3.org/mid/op.wxt85uaqidj3kv@simons-macbook-pro.local

* @charset is a syntax construct that should not be part of the object model, much like the BOM and comments are not part of the object model.
* When parsing a stylesheet, the first few bytes are scanned for a specific byte pattern to select an encoding. When the actual CSS parser comes to the @charset rule, it is parsed with normal @-rule syntax rules, which is laxer than the scanner. Thus the object model can be claiming an encoding that was not actually picked up by the @charset scanner.
* CSSCharsetRule can be modified but that does not change the encoding of the stylesheet.
* CSSCharsetRule complicates other parts of CSSOM e.g. insertRule, removeRule, CSSNamespaceRule.

I&apos;ve marked it as being considered for removal in the spec:
https://dvcs.w3.org/hg/csswg/rev/86a5f6f5df18</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115499</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-11-26 08:49:02 +0000</bug_when>
    <thetext>Thanks, I&apos;ll try to get it removed from Blink and let you know how it goes!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116985</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-01-10 00:45:08 +0000</bug_when>
    <thetext>It&apos;s been removed in Blink, but hasn&apos;t reached the stable channel yet:
https://code.google.com/p/chromium/issues/detail?id=438147</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119000</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-03-28 02:45:32 +0000</bug_when>
    <thetext>The removal reached stable with M41 and Chrome 41 was released on March 3. I haven&apos;t heard anything and can&apos;t find any bug report, so it worked out well. Please remove from spec :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119191</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-04-02 09:37:32 +0000</bug_when>
    <thetext>OK, removed.

https://github.com/w3c/csswg-drafts/commit/a7d1486917739758f84e3324d8082632f94509a8

Tab, please make css-syntax not create an at-rule for @charset and then reassign to me, so CSSOM doesn&apos;t need to check for it in insertRule.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119388</commentid>
    <comment_count>8</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2015-04-08 22:03:54 +0000</bug_when>
    <thetext>(In reply to Simon Pieters from comment #7)
&gt; Tab, please make css-syntax not create an at-rule for @charset and then
&gt; reassign to me, so CSSOM doesn&apos;t need to check for it in insertRule.

Done.  It&apos;s now explicitly defined as not a valid rule, and the first one in a stylesheet is explicitly dropped during stylesheet parsing, so grammar-checking that requires some rules (like @import) to be first in the stylesheet won&apos;t get messed up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119392</commentid>
    <comment_count>9</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2015-04-09 12:22:19 +0000</bug_when>
    <thetext>https://github.com/w3c/csswg-drafts/commit/8398f6ff88eafc91b307919d6a9ce8fe52a0e750</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119492</commentid>
    <comment_count>10</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2015-04-14 11:49:40 +0000</bug_when>
    <thetext>Thanks all!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>