<?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>34492</bug_id>
          
          <creation_ts>2010-02-02 10:45:52 -0800</creation_ts>
          <short_desc>avoid using invalidated KURL object in Element::baseURI</short_desc>
          <delta_ts>2010-02-03 08:11:15 -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>WebCore Misc.</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></keywords>
          <priority>P3</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Bryan Yeung">bryeung</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>brettw</cc>
    
    <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>eric</cc>
    
    <cc>fishd</cc>
    
    <cc>levin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>187046</commentid>
    <comment_count>0</comment_count>
    <who name="Bryan Yeung">bryeung</who>
    <bug_when>2010-02-02 10:45:52 -0800</bug_when>
    <thetext>Currently, an invalidated KURL object is used to carry around a relative URL string in Element::baseURI.  KURLGoogle does not support this behaviour, and I think it is better to not make use of invalidated KURL objects.

Here is a simple patch that makes no semantic change and circumvents the use of the invalidated object.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187051</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 10:53:05 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; Here is a simple patch that makes no semantic change and circumvents the use of
&gt; the invalidated object.

Where?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187053</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 10:57:53 -0800</bug_when>
    <thetext>Please be clear, holding arbitrary strings that are not valid URLs is an intentional feature of KURL. To remove it we need to remove all clients that depend on that. It sure would be great to have the freedom to not need that feature, but we can’t get that by just fixing the cases we have already stumbled on, we need to look at all callers.

And then change the implementation so the mistake is easy to detect.

I know that Chromium has been living with all these bugs all along since KURLGoogle omitted that feature, but when fixing this please keep in mind that all other platforms have not been subject to the bugs.

KURLGoogle still seems like a bad idea to me. I know it’s pleasant for Chromium to share the same URL parsing with the other components in Chromium -- it would be nice to have that on the Mac too -- and someone may have the idea that it helps with security, but I believe that for the WebKit project as a whole would be great to make changes as needed to both the original KURL and KURLGoogle so their behavior is identical and then get rid of this unnecessary difference between platforms by deleting KURLGoogle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187055</commentid>
    <comment_count>3</comment_count>
      <attachid>47952</attachid>
    <who name="Bryan Yeung">bryeung</who>
    <bug_when>2010-02-02 11:00:12 -0800</bug_when>
    <thetext>Created attachment 47952
patch

Does it not work to add a patch from the bug creation page?

Anyway, here is the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187056</commentid>
    <comment_count>4</comment_count>
    <who name="Bryan Yeung">bryeung</who>
    <bug_when>2010-02-02 11:00:46 -0800</bug_when>
    <thetext>Sorry!  Wrong bug to attach the patch to.  Please ignore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187058</commentid>
    <comment_count>5</comment_count>
    <who name="Bryan Yeung">bryeung</who>
    <bug_when>2010-02-02 11:01:52 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Sorry!  Wrong bug to attach the patch to.  Please ignore.

Nope: I just didn&apos;t realize there were more comments, so this looked like a different bug.

Clearly I&apos;m not really used to bugzilla.  Sorry for the confusion and extraneous comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187059</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 11:02:38 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; Does it not work to add a patch from the bug creation page?

I never tried it before. Maybe it’s broken.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187060</commentid>
    <comment_count>7</comment_count>
      <attachid>47952</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 11:05:24 -0800</bug_when>
    <thetext>Comment on attachment 47952
patch

Change looks great, although I’d probably use assignment syntax rather than initialization to set up the baseAttribute local variable.

Generally it&apos;s not correct to set the review flag on a patch without a change log entry.

We require regression tests for bugs fixes. Since this patch fixes a bug, you must also include a regression test that fails on Chromium before this change and now succeeds with the fix. But neither the test itself nor the test results should be Chromium-specific.

review- because of the lack of change log and regression test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187068</commentid>
    <comment_count>8</comment_count>
      <attachid>47955</attachid>
    <who name="Bryan Yeung">bryeung</who>
    <bug_when>2010-02-02 11:22:33 -0800</bug_when>
    <thetext>Created attachment 47955
revised patch

Sorry for the incomplete patch last time.  This includes the ChangeLog entry.  There was already a test failing on Chromium without this change (LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg), so I do not think an additional regression test is necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187071</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 11:25:40 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; Sorry for the incomplete patch last time.  This includes the ChangeLog entry. 
&gt; There was already a test failing on Chromium without this change
&gt; (LayoutTests/svg/W3C-SVG-1.1/struct-image-07-t.svg), so I do not think an
&gt; additional regression test is necessary.

Typically a patch would include the corrected results or a change to the skipped list for a patch -- so I could see what test was changing behavior. But since Chromium has a different way of doing things, maybe that&apos;s why there&apos;s no such change here.

Despite the fact that a test was failing, a simpler test that targets this behavior more directly would be far better. It could even be a dumpAsText test.

Tests where success can only be judged from the pixel results are the lowest on our totem pole of test usefulness, so this existing test is only barely sufficient.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187072</commentid>
    <comment_count>10</comment_count>
      <attachid>47955</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-02-02 11:26:32 -0800</bug_when>
    <thetext>Comment on attachment 47955
revised patch

&gt; +2010-02-02  Bryan Yeung  &lt;bryeung@bryeung-chrome.(none)&gt;

Strange address here.

r=me despite my concerns mentioned in comments above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187085</commentid>
    <comment_count>11</comment_count>
      <attachid>47955</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-02-02 12:04:36 -0800</bug_when>
    <thetext>Comment on attachment 47955
revised patch

Clearing flags on attachment: 47955

Committed r54245: &lt;http://trac.webkit.org/changeset/54245&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187086</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-02-02 12:04:44 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187205</commentid>
    <comment_count>13</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2010-02-02 16:54:23 -0800</bug_when>
    <thetext>Committed r54264: &lt;http://trac.webkit.org/changeset/54264&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187208</commentid>
    <comment_count>14</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2010-02-02 17:06:05 -0800</bug_when>
    <thetext>Rolled out due to major chromium bustage with this patch. 

Rolllout: http://trac.webkit.org/changeset/54264</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187220</commentid>
    <comment_count>15</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2010-02-02 17:54:23 -0800</bug_when>
    <thetext>Actually, it looks like I may have been wrong. Once the canary bot gets well. I&apos;d be happy to re-commit this (since it was rolled out incorrectly) -- sometimes it is hard to tell which patch caused the issue :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187367</commentid>
    <comment_count>16</comment_count>
    <who name="David Levin">levin</who>
    <bug_when>2010-02-03 08:11:15 -0800</bug_when>
    <thetext>Committed again unchanged from before http://trac.webkit.org/changeset/54282

Sorry about the mix-up here.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47952</attachid>
            <date>2010-02-02 11:00:12 -0800</date>
            <delta_ts>2010-02-02 11:22:33 -0800</delta_ts>
            <desc>patch</desc>
            <filename>p1.txt</filename>
            <type>text/plain</type>
            <size>733</size>
            <attacher name="Bryan Yeung">bryeung</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvZG9tL0VsZW1lbnQuY3BwIGIvV2ViQ29yZS9kb20vRWxlbWVu
dC5jcHAKaW5kZXggYWM0ZmRiMy4uNTU2MWZlZiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9kb20vRWxl
bWVudC5jcHAKKysrIGIvV2ViQ29yZS9kb20vRWxlbWVudC5jcHAKQEAgLTcwMiw3ICs3MDIsOCBA
QCB2b2lkIEVsZW1lbnQ6OnNldFByZWZpeChjb25zdCBBdG9taWNTdHJpbmcmIHByZWZpeCwgRXhj
ZXB0aW9uQ29kZSYgZWMpCiAKIEtVUkwgRWxlbWVudDo6YmFzZVVSSSgpIGNvbnN0CiB7Ci0gICAg
S1VSTCBiYXNlKEtVUkwoKSwgZ2V0QXR0cmlidXRlKGJhc2VBdHRyKSk7CisgICAgY29uc3QgQXRv
bWljU3RyaW5nJiBiYXNlQXR0cmlidXRlKGdldEF0dHJpYnV0ZShiYXNlQXR0cikpOworICAgIEtV
UkwgYmFzZShLVVJMKCksIGJhc2VBdHRyaWJ1dGUpOwogICAgIGlmICghYmFzZS5wcm90b2NvbCgp
LmlzRW1wdHkoKSkKICAgICAgICAgcmV0dXJuIGJhc2U7CiAKQEAgLTcxNCw3ICs3MTUsNyBAQCBL
VVJMIEVsZW1lbnQ6OmJhc2VVUkkoKSBjb25zdAogICAgIGlmIChwYXJlbnRCYXNlLmlzTnVsbCgp
KQogICAgICAgICByZXR1cm4gYmFzZTsKIAotICAgIHJldHVybiBLVVJMKHBhcmVudEJhc2UsIGJh
c2Uuc3RyaW5nKCkpOworICAgIHJldHVybiBLVVJMKHBhcmVudEJhc2UsIGJhc2VBdHRyaWJ1dGUp
OwogfQogCiB2b2lkIEVsZW1lbnQ6OmNyZWF0ZUF0dHJpYnV0ZU1hcCgpIGNvbnN0Cg==
</data>
<flag name="review"
          id="30533"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47955</attachid>
            <date>2010-02-02 11:22:33 -0800</date>
            <delta_ts>2010-02-02 12:04:35 -0800</delta_ts>
            <desc>revised patch</desc>
            <filename>p1.txt</filename>
            <type>text/plain</type>
            <size>1507</size>
            <attacher name="Bryan Yeung">bryeung</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
YWJkYmI1OC4uNjczMDc4MiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxOSBAQAorMjAxMC0wMi0wMiAgQnJ5YW4gWWV1bmcg
IDxicnlldW5nQGJyeWV1bmctY2hyb21lLihub25lKT4KKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBdm9pZCB1c2luZyBhbiBpbnZhbG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