<?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>103681</bug_id>
          
          <creation_ts>2012-11-29 15:52:45 -0800</creation_ts>
          <short_desc>non HTMLElement documentElement ignores display: none</short_desc>
          <delta_ts>2012-11-30 16:15:01 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>103475</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elliott Sprehn">esprehn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>779552</commentid>
    <comment_count>0</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-11-29 15:52:45 -0800</bug_when>
    <thetext>If you replace the documentElement with a non-html element and then set it to display: none we ignore it.

ex.

&lt;iframe id=&quot;doc&quot;&gt;&lt;/iframe&gt;

&lt;script&gt;
    var doc = document.getElementById(&apos;doc&apos;).contentDocument;
    var root = doc.implementation.createDocument().createElement(&apos;not-a-real-element&apos;);
    doc.replaceChild(root, doc.documentElement);
    root.appendChild(document.createElement(&apos;style&apos;)).textContent = &apos;not-a-real-element { display: none }&apos;;
    root.appendChild(document.createElement(&apos;p&apos;)).textContent = &apos;Should not be visible&apos;;
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>779565</commentid>
    <comment_count>1</comment_count>
    <who name="Elliott Sprehn">esprehn</who>
    <bug_when>2012-11-29 16:07:40 -0800</bug_when>
    <thetext>This is fixed by Bug 103475.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>