<?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>246498</bug_id>
          
          <creation_ts>2022-10-13 18:31:53 -0700</creation_ts>
          <short_desc>Canvas strokeStyle does not always get applied</short_desc>
          <delta_ts>2022-10-16 18:59:56 -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>Canvas</component>
          <version>Safari 16</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>245465</dup_id>
          
          <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>1</everconfirmed>
          <reporter name="Jon Woyame">jon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>dino</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1905506</commentid>
    <comment_count>0</comment_count>
    <who name="Jon Woyame">jon</who>
    <bug_when>2022-10-13 18:31:53 -0700</bug_when>
    <thetext>Safari&apos;s &lt;canvas&gt; has fairly recently acquired a regression where `strokeStyle` is not getting applied properly.

As stroke() is called iteratively, it sometimes uses older color values, despite `strokeStyle` being changed prior to the call.

This has been documented with a code snippet on Stack Overflow:

https://stackoverflow.com/questions/74050672/html5-canvas-context-does-not-update-in-safari

It is also observed in a similar example by @Kaiido:

https://jsfiddle.net/7awL4fg3/

This has been tested on a MacBook Pro with Apple Silicon, and several iPhones.

It is present in Safari 16 and Safari Technology Preview.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1906019</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-10-16 18:59:56 -0700</bug_when>
    <thetext>Sounds like bug 245465 (please see its dupes for details).

Please verify with a future Safari Technology Preview, once release notes say that it&apos;s beyond 254889@main.

*** This bug has been marked as a duplicate of bug 245465 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>