<?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>54361</bug_id>
          
          <creation_ts>2011-02-13 11:29:47 -0800</creation_ts>
          <short_desc>[Chromium] Issue 50685: Move CC icons to chrome/common and implement loadPlatformResource in RendererWebKitClientImpl.</short_desc>
          <delta_ts>2011-02-28 13:40:48 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</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>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Naoki Takano">honten</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dhollowa</cc>
    
    <cc>fishd</cc>
    
    <cc>honten</cc>
    
    <cc>isherman</cc>
    
    <cc>jhawkins</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>350423</commentid>
    <comment_count>0</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-13 11:29:47 -0800</bug_when>
    <thetext>[Chromium] Issue 50685:	Move CC icons to chrome/common and implement loadPlatformResource in RendererWebKitClientImpl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350427</commentid>
    <comment_count>1</comment_count>
      <attachid>82271</attachid>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-13 11:32:32 -0800</bug_when>
    <thetext>Created attachment 82271
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>350429</commentid>
    <comment_count>2</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-13 11:35:49 -0800</bug_when>
    <thetext>Could you review?

As I already mentioned in chrome CL, we have to commit at once.

But the build itself file without chrome side commit. Just not working correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352280</commentid>
    <comment_count>3</comment_count>
    <who name="James Hawkins">jhawkins</who>
    <bug_when>2011-02-16 12:58:42 -0800</bug_when>
    <thetext>+darin since I can&apos;t technically review.

I&apos;m not sure why you&apos;re adding loadPlatformResource() when there&apos;s already a loadResource() which does the same thing.

When I said use loadPlatformResource() in the TODO, I mean Image::loadPlatformResource().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352298</commentid>
    <comment_count>4</comment_count>
      <attachid>82271</attachid>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2011-02-16 13:27:37 -0800</bug_when>
    <thetext>Comment on attachment 82271
Patch

R- based on jhawkins feedback</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353646</commentid>
    <comment_count>5</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 10:14:28 -0800</bug_when>
    <thetext>Thank you for your review!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353663</commentid>
    <comment_count>6</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 10:42:13 -0800</bug_when>
    <thetext>Image::loadPlatformResource() calls PlatformBridge::loadPlatformImageResource(name),
And in loadPlatformImageResource(name), webKitClient()-&gt;loadResource(name) is called for now.

Also you mentioned &quot;implement loadPlatformResource in RendererWebKitClientImpl&quot; as a subject in http://code.google.com/p/chromium/issues/detail?id=50685

That&apos;s why I added loadPlatformResource() in WebKitClient which is the super class of RendererWebKitClientImpl.

Or do I have to change the call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of PlatformBridge::loadPlatformImageResource(name)?

What do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353671</commentid>
    <comment_count>7</comment_count>
    <who name="Ilya Sherman">isherman</who>
    <bug_when>2011-02-18 10:48:48 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; Image::loadPlatformResource() calls PlatformBridge::loadPlatformImageResource(name),
&gt; And in loadPlatformImageResource(name), webKitClient()-&gt;loadResource(name) is called for now.
&gt; 
&gt; Also you mentioned &quot;implement loadPlatformResource in RendererWebKitClientImpl&quot; as a subject in http://code.google.com/p/chromium/issues/detail?id=50685
&gt; 
&gt; That&apos;s why I added loadPlatformResource() in WebKitClient which is the super class of RendererWebKitClientImpl.
&gt; 
&gt; Or do I have to change the call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of PlatformBridge::loadPlatformImageResource(name)?
&gt; 
&gt; What do you think?

Let&apos;s see if we can just use Image::loadPlatformResource() for now, unless there&apos;s reason to go beyond that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353690</commentid>
    <comment_count>8</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 11:12:34 -0800</bug_when>
    <thetext>Ilya,

Thank you for your comment.

I will change to call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of calling PlatformBridge::loadPlatformImageResource(name).

Thanks,

(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; Image::loadPlatformResource() calls PlatformBridge::loadPlatformImageResource(name),
&gt; &gt; And in loadPlatformImageResource(name), webKitClient()-&gt;loadResource(name) is called for now.
&gt; &gt; 
&gt; &gt; Also you mentioned &quot;implement loadPlatformResource in RendererWebKitClientImpl&quot; as a subject in http://code.google.com/p/chromium/issues/detail?id=50685
&gt; &gt; 
&gt; &gt; That&apos;s why I added loadPlatformResource() in WebKitClient which is the super class of RendererWebKitClientImpl.
&gt; &gt; 
&gt; &gt; Or do I have to change the call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of PlatformBridge::loadPlatformImageResource(name)?
&gt; &gt; 
&gt; &gt; What do you think?
&gt; 
&gt; Let&apos;s see if we can just use Image::loadPlatformResource() for now, unless there&apos;s reason to go beyond that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353692</commentid>
    <comment_count>9</comment_count>
    <who name="Ilya Sherman">isherman</who>
    <bug_when>2011-02-18 11:15:58 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; I will change to call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of calling PlatformBridge::loadPlatformImageResource(name).

What&apos;s wrong with calling PlatformBridge::loadPlatformImageResource()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353715</commentid>
    <comment_count>10</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 11:46:16 -0800</bug_when>
    <thetext>IMHO, calling PlatformBridge::loadPlatformImageResource() is better.

Because the function is also used from Source/WebCore/platform/graphics/chromium/ImageChromiumMac.mm
And if we move it, we have to move ImageChromiumMac.mm also.

That is another reason I changed PlatformBridge::loadPlatformImageResource().

(In reply to comment #9)
&gt; (In reply to comment #8)
&gt; &gt; I will change to call RendererWebKitClientImpl::loadPlatformResource() directly from Image::loadPlatformResource() instead of calling PlatformBridge::loadPlatformImageResource(name).
&gt; 
&gt; What&apos;s wrong with calling PlatformBridge::loadPlatformImageResource()?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353750</commentid>
    <comment_count>11</comment_count>
    <who name="Ilya Sherman">isherman</who>
    <bug_when>2011-02-18 12:34:03 -0800</bug_when>
    <thetext>To be clearer: Do we really need WebKit changes in order to move the resources in Chromium?  If so, why?

I really don&apos;t know this code at all well, but it doesn&apos;t seem to me like any WebKit changes should be necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353798</commentid>
    <comment_count>12</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 13:29:29 -0800</bug_when>
    <thetext>Ilya,

I agree we might not need to change WebKit if if we just move the resource.


But, again, I already asked James here

http://code.google.com/p/chromium/issues/detail?id=50685

&gt;2, does &quot;loadPlatformResource&quot; mean &quot;loadResource&quot;? Or do we have to declare another function different from &quot;loadResouce&quot;? And should we use &quot;loadPlatformResource&quot; for icon loading and change the calling in WebKit source code?


And he replied,

&gt;re: loadPlatformResource. No, it means loadPlatformResource. ack-grep is your friend.

I don&apos;t know his intention, but I guess he wanted to separate the function according to the resource location.

Thanks,

(In reply to comment #11)
&gt; To be clearer: Do we really need WebKit changes in order to move the resources in Chromium?  If so, why?
&gt; 
&gt; I really don&apos;t know this code at all well, but it doesn&apos;t seem to me like any WebKit changes should be necessary.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353806</commentid>
    <comment_count>13</comment_count>
    <who name="Ilya Sherman">isherman</who>
    <bug_when>2011-02-18 13:45:25 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; Ilya,
&gt; 
&gt; I agree we might not need to change WebKit if if we just move the resource.
&gt; 
&gt; 
&gt; But, again, I already asked James here
&gt; 
&gt; http://code.google.com/p/chromium/issues/detail?id=50685
&gt; 
&gt; &gt;2, does &quot;loadPlatformResource&quot; mean &quot;loadResource&quot;? Or do we have to declare another function different from &quot;loadResouce&quot;? And should we use &quot;loadPlatformResource&quot; for icon loading and change the calling in WebKit source code?
&gt; 
&gt; 
&gt; And he replied,
&gt; 
&gt; &gt;re: loadPlatformResource. No, it means loadPlatformResource. ack-grep is your friend.
&gt; 
&gt; I don&apos;t know his intention, but I guess he wanted to separate the function according to the resource location.

It sounds like he meant Image::loadPlatformResource():

&quot;When I said use loadPlatformResource() in the TODO, I mean Image::loadPlatformResource().&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353820</commentid>
    <comment_count>14</comment_count>
    <who name="Naoki Takano">honten</who>
    <bug_when>2011-02-18 14:09:01 -0800</bug_when>
    <thetext>Ok, so do you agree to change Image::loadPlatformResource()?

(In reply to comment #13)
&gt; (In reply to comment #12)
&gt; &gt; Ilya,
&gt; &gt; 
&gt; &gt; I agree we might not need to change WebKit if if we just move the resource.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; But, again, I already asked James here
&gt; &gt; 
&gt; &gt; http://code.google.com/p/chromium/issues/detail?id=50685
&gt; &gt; 
&gt; &gt; &gt;2, does &quot;loadPlatformResource&quot; mean &quot;loadResource&quot;? Or do we have to declare another function different from &quot;loadResouce&quot;? And should we use &quot;loadPlatformResource&quot; for icon loading and change the calling in WebKit source code?
&gt; &gt; 
&gt; &gt; 
&gt; &gt; And he replied,
&gt; &gt; 
&gt; &gt; &gt;re: loadPlatformResource. No, it means loadPlatformResource. ack-grep is your friend.
&gt; &gt; 
&gt; &gt; I don&apos;t know his intention, but I guess he wanted to separate the function according to the resource location.
&gt; 
&gt; It sounds like he meant Image::loadPlatformResource():
&gt; 
&gt; &quot;When I said use loadPlatformResource() in the TODO, I mean Image::loadPlatformResource().&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353826</commentid>
    <comment_count>15</comment_count>
    <who name="Ilya Sherman">isherman</who>
    <bug_when>2011-02-18 14:23:54 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; Ok, so do you agree to change Image::loadPlatformResource()?

Could you please explain what change exactly is needed and why?  That might be easiest to do just by uploading the diff and perhaps pointing out the relevant part of it.

Again, I do not know this corner of the code at all well, but it looks to me like we should be able to just use it as-is and still be able to move the image resources, which is the real goal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>353848</commentid>
    <comment_count>16</comment_count>
    <who name="David Holloway">dhollowa</who>
    <bug_when>2011-02-18 14:48:21 -0800</bug_when>
    <thetext>It appears that:

Image::loadPlatformResource calls
PlatformBridge::loadPlatformImageResource which calls
WebKitClient::loadResource

So we end up at the same place via a different route.

There&apos;s no advantage to adding a new method to the WebKitClient interface.

There is little (if any) advantage to taking the Image::loadPlatformResource route.

So I would lobby that we abandon this patch.  However it would be very nice to rename the resources on the Chrome side to be chrome/common/resources/cc_amex.png, chrome/common/resources/cc_generic.png, etc.  But let&apos;s discuss that in http://codereview.chromium.org/6516002/.


(In reply to comment #15)
&gt; (In reply to comment #14)
&gt; &gt; Ok, so do you agree to change Image::loadPlatformResource()?
&gt; 
&gt; Could you please explain what change exactly is needed and why?  That might be easiest to do just by uploading the diff and perhaps pointing out the relevant part of it.
&gt; 
&gt; Again, I do not know this corner of the code at all well, but it looks to me like we should be able to just use it as-is and still be able to move the image resources, which is the real goal.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>82271</attachid>
            <date>2011-02-13 11:32:32 -0800</date>
            <delta_ts>2011-02-16 13:27:37 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-54361-20110213113231.patch</filename>
            <type>text/plain</type>
            <size>2461</size>
            <attacher name="Naoki Takano">honten</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvY2hyb21pdW0vQ2hhbmdlTG9nIGIvU291cmNlL1dl
YktpdC9jaHJvbWl1bS9DaGFuZ2VMb2cKaW5kZXggNmU5NTc4NWFiNjdiZGE4ZWYyY2E4YjUwNGIz
ZjEyYjk5ZmVjM2QyOS4uYzJiNDQxNTJhYzgwNzBkZDJhODVhOTM1OTllN2U2YjVkOGFlOTJiYSAx
MDA2NDQKLS0tIGEvU291cmNlL1dlYktpdC9jaHJvbWl1bS9DaGFuZ2VMb2cKKysrIGIvU291cmNl
L1dlYktpdC9jaHJvbWl1bS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNSBAQAorMjAxMS0wMi0xMyAg
TmFva2kgVGFrYW5vICA8dGFrYW5vLm5hb2tpQGdtYWlsLmNvbT4KKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBbQ2hyb21pdW1dIElzc3VlIDUwNjg1OiBN
b3ZlIENDIGljb25zIHRvI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
S2l0L2Nocm9taXVtL3NyYy9QbGF0Zm9ybUJyaWRnZS5jcHAKKysrIGIvU291cmNlL1dlYktpdC9j
aHJvbWl1bS9zcmMvUGxhdGZvcm1CcmlkZ2UuY3BwCkBAIC02MjcsNyArNjI3LDcgQEAgTlBPYmpl
Y3QqIFBsYXRmb3JtQnJpZGdlOjpwbHVnaW5TY3JpcHRhYmxlT2JqZWN0KFdpZGdldCogd2lkZ2V0
KQogCiBQYXNzUmVmUHRyPEltYWdlPiBQbGF0Zm9ybUJyaWRnZTo6bG9hZFBsYXRmb3JtSW1hZ2VS
ZXNvdXJjZShjb25zdCBjaGFyKiBuYW1lKQogewotICAgIGNvbnN0IFdlYkRhdGEmIHJlc291cmNl
ID0gd2ViS2l0Q2xpZW50KCktPmxvYWRSZXNvdXJjZShuYW1lKTsKKyAgICBjb25zdCBXZWJEYXRh
JiByZXNvdXJjZSA9IHdlYktpdENsaWVudCgpLT5sb2FkUGxhdGZvcm1SZXNvdXJjZShuYW1lKTsK
ICAgICBpZiAocmVzb3VyY2UuaXNFbXB0eSgpKQogICAgICAgICByZXR1cm4gSW1hZ2U6Om51bGxJ
bWFnZSgpOwogCg==
</data>
<flag name="review"
          id="73918"
          type_id="1"
          status="-"
          setter="fishd"
    />
          </attachment>
      

    </bug>

</bugzilla>