<?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>98907</bug_id>
          
          <creation_ts>2012-10-10 08:01:49 -0700</creation_ts>
          <short_desc>Document calls createElement with the wrong parameters.</short_desc>
          <delta_ts>2012-10-10 21:56:55 -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>New Bugs</component>
          <version>528+ (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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>98050</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Mike West">mkwst</reporter>
          <assigned_to name="Mike West">mkwst</assigned_to>
          <cc>ap</cc>
    
    <cc>jochen</cc>
    
    <cc>tkent</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>738953</commentid>
    <comment_count>0</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-10-10 08:01:49 -0700</bug_when>
    <thetext>Document calls createElement with the wrong parameters.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>738955</commentid>
    <comment_count>1</comment_count>
      <attachid>167998</attachid>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-10-10 08:06:25 -0700</bug_when>
    <thetext>Created attachment 167998
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>738957</commentid>
    <comment_count>2</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-10-10 08:10:58 -0700</bug_when>
    <thetext>This isn&apos;t so trivial as the others I&apos;ve seen today.

Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn&apos;t generate an exception; the second argument is a bool, which the ExceptionCode autocasts into.

There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place.

Hi Kent! Would you mind taking a look at this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>738967</commentid>
    <comment_count>3</comment_count>
    <who name="">jochen</who>
    <bug_when>2012-10-10 08:21:23 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; This isn&apos;t so trivial as the others I&apos;ve seen today.
&gt; 
&gt; Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn&apos;t generate an exception; the second argument is a bool, which the ExceptionCode autocasts into.
&gt; 
&gt; There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place.
&gt; 
&gt; Hi Kent! Would you mind taking a look at this?

I could imagine that you&apos;d need to invoke the version that actually takes a ec: if the document is an xml doc, a different type of element needs to be created.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>738971</commentid>
    <comment_count>4</comment_count>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-10-10 08:27:21 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; This isn&apos;t so trivial as the others I&apos;ve seen today.
&gt; &gt; 
&gt; &gt; Document::importNode calls Document::createElement with a QualifiedName and ExceptionCode. The Document::createElement that takes a QualifiedName doesn&apos;t generate an exception; the second argument is a bool, which the ExceptionCode autocasts into.
&gt; &gt; 
&gt; &gt; There is, however, a Document::createElement that takes an AtomicString and an Exception code. I wonder if that was the original intent. CCing Kent Tamura, who looks like he wrote that code in the first place.
&gt; &gt; 
&gt; &gt; Hi Kent! Would you mind taking a look at this?
&gt; 
&gt; I could imagine that you&apos;d need to invoke the version that actually takes a ec: if the document is an xml doc, a different type of element needs to be created.

So we likely need &apos;oldElement-&gt;localName()&apos; instead of &apos;oldElement-&gt;tagQName()&apos;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>739445</commentid>
    <comment_count>5</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2012-10-10 17:55:32 -0700</bug_when>
    <thetext>The purpose of http://trac.webkit.org/changeset/104275 was to use createElement with QualifiedName argument. So the patch is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>739447</commentid>
    <comment_count>6</comment_count>
      <attachid>167998</attachid>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2012-10-10 17:55:45 -0700</bug_when>
    <thetext>Comment on attachment 167998
Patch

ok</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>739594</commentid>
    <comment_count>7</comment_count>
      <attachid>167998</attachid>
    <who name="Mike West">mkwst</who>
    <bug_when>2012-10-10 21:38:26 -0700</bug_when>
    <thetext>Comment on attachment 167998
Patch

Alright, thanks for taking a look! Throwing this into the queue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>739608</commentid>
    <comment_count>8</comment_count>
      <attachid>167998</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-10 21:56:52 -0700</bug_when>
    <thetext>Comment on attachment 167998
Patch

Clearing flags on attachment: 167998

Committed r131015: &lt;http://trac.webkit.org/changeset/131015&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>739609</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-10 21:56:55 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>167998</attachid>
            <date>2012-10-10 08:06:25 -0700</date>
            <delta_ts>2012-10-10 21:56:52 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-98907-20121010170524.patch</filename>
            <type>text/plain</type>
            <size>1741</size>
            <attacher name="Mike West">mkwst</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTMwNzQ5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZTQ2MjUyYTMyMmU0MjE1
MjU2NGYyYmEwYmNiNDJhMmZkZTdiZTYxZC4uODM5ZmUxOTc0YTI5N2RhYjMyY2FjMjEwZmZlNjhm
OWU2ZjQzNmUyOSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIxIEBACisyMDEyLTEwLTEwICBNaWtl
IFdlc3QgIDxta3dzdEBnb29nbGUuY29tPgorCisgICAgICAgIERvY3VtZW50IGNhbGxzIGNyZWF0
ZUVsZW1lbnQgd2l0aCB0aGUgd3JvbmcgcGFyYW1ldGVycy4KKyAgICAgICAgaHR0cHM6Ly9idWdz
LndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTk4OTA3CisKKyAgICAgICAgUmV2aWV3ZWQgYnkg
Tk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgRG9jdW1lbnQ6OmltcG9ydE5vZGUgY2FsbHMgRG9j
dW1lbnQ6OmNyZWF0ZUVsZW1lbnQgd2l0aCBhIFF1YWxpZmllZE5hbWUKKyAgICAgICAgYW5kIEV4
Y2VwdGlvbkNvZGUuIFRoZSBEb2N1bWVudDo6Y3JlYXRlRWxlbWVudCB0aGF0IHRha2VzIGEKKyAg
ICAgICAgUXVhbGlmaWVkTmFtZSBkb2Vzbid0IGdlbmVyYXRlIGFuIGV4Y2VwdGlvbjs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