<?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>159113</bug_id>
          
          <creation_ts>2016-06-24 23:02:32 -0700</creation_ts>
          <short_desc>Don&apos;t keep all newly created potential custom elements alive when the feature is disabled</short_desc>
          <delta_ts>2016-06-27 20:26:05 -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>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>esprehn+autocc</cc>
    
    <cc>kangil.han</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1205316</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-06-24 23:02:32 -0700</bug_when>
    <thetext>Custom elements spec has been updated to not upgrade all elements unless they&apos;re inserted into a document.
We don&apos;t have a time to update the code fully but we should at least avoid queuing them up
and keeping them all alive when the feature is disabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205317</commentid>
    <comment_count>1</comment_count>
      <attachid>282047</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-06-24 23:10:29 -0700</bug_when>
    <thetext>Created attachment 282047
Fixes the bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205465</commentid>
    <comment_count>2</comment_count>
      <attachid>282047</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-06-26 20:15:37 -0700</bug_when>
    <thetext>Comment on attachment 282047
Fixes the bug

View in context: https://bugs.webkit.org/attachment.cgi?id=282047&amp;action=review

OK

&gt; Source/WebCore/ChangeLog:9
&gt; +        The custom elements spec has also been updated to not do this but we&apos;ll implement that behavior later.

Maybe a better way to say this is:

Ideally we want to conform to the behavior in the Custom Elements spec. and only upgrade an element that is inserted into the document.

&gt; Source/WebCore/dom/Document.cpp:900
&gt; +    if (RuntimeEnabledFeatures::sharedFeatures().customElementsEnabled()
&gt; +        &amp;&amp; Document::validateCustomElementName(localName) == CustomElementNameValidationStatus::Valid) {

Can we/would it make sense to write a test for this change? I would hope that such a test could be updated once we implement the behavior defined in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205466</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-06-26 21:14:08 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Comment on attachment 282047 [details]
&gt; Fixes the bug
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=282047&amp;action=review
&gt;
&gt; &gt; Source/WebCore/dom/Document.cpp:900
&gt; &gt; +    if (RuntimeEnabledFeatures::sharedFeatures().customElementsEnabled()
&gt; &gt; +        &amp;&amp; Document::validateCustomElementName(localName) == CustomElementNameValidationStatus::Valid) {
&gt; 
&gt; Can we/would it make sense to write a test for this change? I would hope
&gt; that such a test could be updated once we implement the behavior defined in
&gt; the spec.

It&apos;s theoretically possible with GCController.collect() but I&apos;ve never been able to write a test with that successfully with JSC in the past. The test always ends up being either flaky or not functional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205853</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-06-27 20:24:55 -0700</bug_when>
    <thetext>&lt;rdar://problem/27046824&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1205854</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2016-06-27 20:26:05 -0700</bug_when>
    <thetext>Committed r202537: &lt;http://trac.webkit.org/changeset/202537&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>282047</attachid>
            <date>2016-06-24 23:10:29 -0700</date>
            <delta_ts>2016-06-26 20:15:37 -0700</delta_ts>
            <desc>Fixes the bug</desc>
            <filename>bug-159113-20160624231018.patch</filename>
            <type>text/plain</type>
            <size>1796</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIwMjQ2NykKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE2LTA2LTI0ICBSeW9zdWtl
IE5pd2EgIDxybml3YUB3ZWJraXQub3JnPgorCisgICAgICAgIERvbid0IGtlZXAgYWxsIG5ld2x5
IGNyZWF0ZWQgcG90ZW50aWFsIGN1c3RvbSBlbGVtZW50cyBhbGl2ZSB3aGVuIHRoZSBmZWF0dXJl
IGlzIGRpc2FibGVkCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraX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iAgICAgUXVh
bGlmaWVkTmFtZSBxdWFsaWZpZWROYW1lKG51bGxBdG9tLCBsb2NhbE5hbWUsIHhodG1sTmFtZXNw
YWNlVVJJKTsKIAogI2lmIEVOQUJMRShDVVNUT01fRUxFTUVOVFMpCi0gICAgaWYgKERvY3VtZW50
Ojp2YWxpZGF0ZUN1c3RvbUVsZW1lbnROYW1lKGxvY2FsTmFtZSkgPT0gQ3VzdG9tRWxlbWVudE5h
bWVWYWxpZGF0aW9uU3RhdHVzOjpWYWxpZCkgeworICAgIGlmIChSdW50aW1lRW5hYmxlZEZlYXR1
cmVzOjpzaGFyZWRGZWF0dXJlcygpLmN1c3RvbUVsZW1lbnRzRW5hYmxlZCgpCisgICAgICAgICYm
IERvY3VtZW50Ojp2YWxpZGF0ZUN1c3RvbUVsZW1lbnROYW1lKGxvY2FsTmFtZSkgPT0gQ3VzdG9t
RWxlbWVudE5hbWVWYWxpZGF0aW9uU3RhdHVzOjpWYWxpZCkgewogICAgICAgICBSZWY8SFRNTEVs
ZW1lbnQ+IGVsZW1lbnQgPSBIVE1MRWxlbWVudDo6Y3JlYXRlKHF1YWxpZmllZE5hbWUsIGRvY3Vt
ZW50KTsKICAgICAgICAgZWxlbWVudC0+c2V0SXNVbnJlc29sdmVkQ3VzdG9tRWxlbWVudCgpOwog
ICAgICAgICBkb2N1bWVudC5lbnN1cmVDdXN0b21FbGVtZW50RGVmaW5pdGlvbnMoKS5hZGRVcGdy
YWRlQ2FuZGlkYXRlKGVsZW1lbnQuZ2V0KCkpOwo=
</data>
<flag name="review"
          id="305869"
          type_id="1"
          status="+"
          setter="dbates"
    />
          </attachment>
      

    </bug>

</bugzilla>