<?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>137337</bug_id>
          
          <creation_ts>2014-10-02 01:29:04 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 8): When constructing a new document that has sibling forms, the second form ends up being a child of the first form</short_desc>
          <delta_ts>2014-12-11 16:04:28 -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>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>139561</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Shawn Jansepar">shawnjan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>justin</cc>
    
    <cc>kpeatt</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>mikek</cc>
    
    <cc>stewart</cc>
    
    <cc>tedtate</cc>
    
    <cc>timmywillisn</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1038810</commentid>
    <comment_count>0</comment_count>
    <who name="Shawn Jansepar">shawnjan</who>
    <bug_when>2014-10-02 01:29:04 -0700</bug_when>
    <thetext>Summary:
When constructing a new document using document.implementation.createHTMLDocument and setting innerHTML of the body of that new document with a string of HTML content that has sibling forms, the second form ends up being a child of the first form. This is something I&apos;ve only ever encountered on iOS8 Safari (has been tested all the way down to iOS4.2, Android 2.1, Firefox 4, etc without any issue).

Steps to Reproduce:
1. Grab minimal test case and run it on iOS8.0.(0|1|2)
2. Note that the document isn&apos;t correctly constructed, as the second form ends up becoming a child of the first form.

Expected Results:
The document created from the string should have forms as siblings of one and other.

Actual Results:
The document isn&apos;t correctly constructed, as the second form ends up becoming a child of the first form.

Version:
iOS8 (12A365) and newer

A minimal test case is attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1038811</commentid>
    <comment_count>1</comment_count>
      <attachid>239090</attachid>
    <who name="Shawn Jansepar">shawnjan</who>
    <bug_when>2014-10-02 01:29:38 -0700</bug_when>
    <thetext>Created attachment 239090
Minimal test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1039133</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-10-02 23:20:43 -0700</bug_when>
    <thetext>&lt;rdar://problem/18535909&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1054094</commentid>
    <comment_count>3</comment_count>
    <who name="Michał Gołębiowski-Owczarek">m.goleb+bugzilla</who>
    <bug_when>2014-12-10 02:09:12 -0800</bug_when>
    <thetext>This broke a security-related patch in jQuery:
https://github.com/jquery/jquery/pull/1505

We had to back it out because it broke Safari 8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1054666</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-12-11 16:04:28 -0800</bug_when>
    <thetext>This looks  like https://bugs.webkit.org/show_bug.cgi?id=139561

*** This bug has been marked as a duplicate of bug 139561 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>239090</attachid>
            <date>2014-10-02 01:29:38 -0700</date>
            <delta_ts>2014-10-02 01:29:38 -0700</delta_ts>
            <desc>Minimal test case</desc>
            <filename>ios8-innerhtml-bug.html</filename>
            <type>text/html</type>
            <size>1083</size>
            <attacher name="Shawn Jansepar">shawnjan</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICAgIDx0aXRsZT5pT1M4IGJvZHkuaW5uZXJI
VE1MIGJ1ZzwvdGl0bGU+CiAgICA8c3R5bGU+CiAgICAgICAgcCB7CiAgICAgICAgICAgIGRpc3Bs
YXk6IG5vbmU7CiAgICAgICAgICAgIGZvbnQtc2l6ZTogMThweDsKICAgICAgICAgICAgcGFkZGlu
ZzogNXB4OwogICAgICAgIH0KICAgICAgICAuc3VjY2VzcyB7CiAgICAgICAgICAgIGJhY2tncm91
bmQtY29sb3I6IGdyZWVuOwogICAgICAgIH0KICAgICAgICAuZmFpbHVyZSB7CiAgICAgICAgICAg
IGJhY2tncm91bmQtY29sb3I6IHJlZDsKICAgICAgICB9CiAgICA8L3N0eWxlPgogICAgPG1ldGEg
bmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCI+CjwvaGVhZD4KPGJv
ZHk+CiAgICA8cCBjbGFzcz0nc3VjY2Vzcyc+U3VjY2VzcyAtIERvY3VtZW50IHdhcyBjb25zdHJ1
Y3RlZCBjb3JyZWN0bHkgd2l0aCBmb3JtcyB0aGF0IGFyZSBzaWJsaW5nczwvcD4KICAgIDxwIGNs
YXNzPSdmYWlsdXJlJz5GYWlsdXJlIC0gRG9jdW1lbnQgd2FzIG5vdCBjb25zdHJ1Y3RlZCBjb3Jy
ZWN0bHkuIFNlY29uZCBmb3JtIGVuZHMgdXAgYmVpbmcgYSBjaGlsZCBvZiB0aGUgZmlyc3QgZm9y
bS48L3A+CiAgICA8c2NyaXB0PgogICAgICAgIHZhciBkb2MgPSBkb2N1bWVudC5pbXBsZW1lbnRh
dGlvbi5jcmVhdGVIVE1MRG9jdW1lbnQoIiIpOwogICAgICAgIHZhciBib2R5RWwgPSB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