<?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>301089</bug_id>
          
          <creation_ts>2025-10-20 05:35:34 -0700</creation_ts>
          <short_desc>[GTK][WPE] Add WebKitImage utility class to the public API</short_desc>
          <delta_ts>2025-11-07 05:35:39 -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>WebKitGTK</component>
          <version>WebKit 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>301086</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Simon Pena">spena</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>jmurphy</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2152555</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-10-20 05:35:34 -0700</bug_when>
    <thetext>The goal is to use it as representation of site icons (favicons) and WebExtension icons. Here&apos;s the list of requirements, extracted from bug #301086:

- It least it needs to allow querying width, height, stride, and provide a method to obtain a GBytes wrapping a buffer with 32bpp RGBA/BGRA pixels.
- Implementing the GIcon and GLoadableIcon interfaces would be desirable.
- For the GTK port, it may have a method to obtain a GdkTexture out of it, for the sake of convenience (optional?).
- Provide a nullable “url” property which may be filled with the URL from which the image was loaded (doubtful: would it better belong in a WebKitFavicon subclass?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152582</commentid>
    <comment_count>1</comment_count>
    <who name="Jamie Murphy">jmurphy</who>
    <bug_when>2025-10-20 08:36:37 -0700</bug_when>
    <thetext>One thing I&apos;d like to see if possible would be the ability to scale an image, as the WebExtensions code does have the capability of resizing an image to fit a better screen size. Implementing GIcon would be desirable, yes, and WebExtensions already uses GIcon so this makes it easier on the API side to port.

I don&apos;t think the &quot;url&quot; property would be super useful for the overall class, it should be added to a sublcass. While extensions do have a concept of a URL that the image could be loaded from, it doesn&apos;t really make sense to expose that unless the extension itself wants to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152586</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-10-20 09:05:08 -0700</bug_when>
    <thetext>Subclasses are complex, though. If it&apos;s really useful to have subclasses, then OK. But otherwise we should avoid it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2152587</commentid>
    <comment_count>3</comment_count>
    <who name="Jamie Murphy">jmurphy</who>
    <bug_when>2025-10-20 09:08:13 -0700</bug_when>
    <thetext>I don&apos;t think the property is useful for WebExtensions usage, but if it&apos;s more difficult to use a subclass, we could include it and just document that it&apos;s not used with WebExtensions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2153131</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pena">spena</who>
    <bug_when>2025-10-21 14:55:33 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/52767</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2156711</commentid>
    <comment_count>5</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2025-11-05 13:46:57 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/53480</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2157237</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-11-07 05:35:36 -0800</bug_when>
    <thetext>Committed 302720@main (f53dba1d3a1d): &lt;https://commits.webkit.org/302720@main&gt;

Reviewed commits have been landed. Closing PR #52767 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>