<?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>249248</bug_id>
          
          <creation_ts>2022-12-13 12:56:17 -0800</creation_ts>
          <short_desc>[GPU Process] [FormControls] Route drawing the ControlPart through GraphicsContext</short_desc>
          <delta_ts>2022-12-16 07:06:54 -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>Layout and Rendering</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>249168</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Said Abou-Hallawa">sabouhallawa</reporter>
          <assigned_to name="Said Abou-Hallawa">sabouhallawa</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>fujii</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1918894</commentid>
    <comment_count>0</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2022-12-13 12:56:17 -0800</bug_when>
    <thetext>We will make RenderBox create a ControlPart from its DOM element. We will start by the MeterPart as an example for the whole workflow since it is a simple control.

RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart() which will delegate the call to ControlPart::draw(). ControlPart::draw() will create the PlatformControl using its ControlFactory. On macOS the ControlFactory will be of type ControlFactoryMac and the PlatformControl will be of type MeterMac. ControlPart::draw() will call MeterMac::draw() which will call AppKit to draw the NSLevelIndicatorCell.

For GPUP a new DisplayList item named DrawControlPart will be added. This will route the display to RemoteDisplayListRecorder which will call drawControlPart() from its ImageBuffer context. Because ControlFactoryMac will use a single NSLevelIndicatorCell for all MeterMac it creates, there should be a ControlFactoryMac per rendering thread in GPUP. So each RemoteDisplayListRecorder should have one ControlFactoryMac and should set it all in the ControlParts its renders through ControlPart::setControlFactory().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918895</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-12-13 12:56:48 -0800</bug_when>
    <thetext>&lt;rdar://problem/103315944&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918896</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2022-12-13 12:57:33 -0800</bug_when>
    <thetext>&gt; RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart()

What role will RenderTheme play in this code path?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1918899</commentid>
    <comment_count>3</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2022-12-13 13:07:40 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/7566</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919863</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-16 02:33:23 -0800</bug_when>
    <thetext>Committed 257981@main (27e83068fe9e): &lt;https://commits.webkit.org/257981@main&gt;

Reviewed commits have been landed. Closing PR #7566 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1919920</commentid>
    <comment_count>5</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2022-12-16 07:06:54 -0800</bug_when>
    <thetext>(In reply to Simon Fraser (smfr) from comment #2)
&gt; &gt; RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart()
&gt; 
&gt; What role will RenderTheme play in this code path?

RenderTheme will create the ControlPart from the RenderBox and its renderer. RenderThemeMac will answer questions specific to macOS when creating the ControlPart.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>