<?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>176893</bug_id>
          
          <creation_ts>2017-09-14 01:03:30 -0700</creation_ts>
          <short_desc>Web Inspector: REGRESSION(r221901): Single frame recordings don&apos;t reset the recording navigation item</short_desc>
          <delta_ts>2017-09-27 12:30:10 -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>Web Inspector</component>
          <version>WebKit 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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>176762</dependson>
          <blocked>173807</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Devin Rousso">hi</reporter>
          <assigned_to name="Devin Rousso">hi</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>mattbaker</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1348691</commentid>
    <comment_count>0</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2017-09-14 01:03:30 -0700</bug_when>
    <thetext>* Steps to reproduce:
1. Open WebInspector on a page with a 2D &lt;canvas&gt;
2. Select the 2D &lt;canvas&gt; in the Resources tab
3. Shift-click the recording navigation item to record a single frame
4. Wait for the recording tab to appear once the recording has finished
5. Switch back to the Resources tab
 =&gt; The recording navigation item still shows the grey &quot;stop&quot; box, even though the recording has finished</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348692</commentid>
    <comment_count>1</comment_count>
      <attachid>320744</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2017-09-14 01:05:13 -0700</bug_when>
    <thetext>Created attachment 320744
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348815</commentid>
    <comment_count>2</comment_count>
      <attachid>320744</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2017-09-14 09:50:09 -0700</bug_when>
    <thetext>Comment on attachment 320744
Patch

r-, because we should be able to add test coverage for this. In recording2d.html whenever RecordingFinished is received, we should check that WI.CanvasManager.recordingCanvas is null.

I should have added this test when introducing this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1349968</commentid>
    <comment_count>3</comment_count>
    <who name="Devin Rousso">hi</who>
    <bug_when>2017-09-18 10:23:29 -0700</bug_when>
    <thetext>(In reply to Matt Baker from comment #2)
&gt; Comment on attachment 320744 [details]
&gt; Patch
&gt; 
&gt; r-, because we should be able to add test coverage for this. In
&gt; recording2d.html whenever RecordingFinished is received, we should check
&gt; that WI.CanvasManager.recordingCanvas is null.
&gt; 
&gt; I should have added this test when introducing this change.

None of the tests use `CanvasManager.prototype.startRecording`.  All the recording tests directly call `requestRecording`/`cancelRecording` on `CanvasAgent`.  The issue is that the `CanvasManager` functions don&apos;t expose the `error` object or allow for a callback, both of which are needed in the tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350008</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2017-09-18 11:26:39 -0700</bug_when>
    <thetext>(In reply to Devin Rousso from comment #3)
&gt; (In reply to Matt Baker from comment #2)
&gt; &gt; Comment on attachment 320744 [details]
&gt; &gt; Patch
&gt; &gt; 
&gt; &gt; r-, because we should be able to add test coverage for this. In
&gt; &gt; recording2d.html whenever RecordingFinished is received, we should check
&gt; &gt; that WI.CanvasManager.recordingCanvas is null.
&gt; &gt; 
&gt; &gt; I should have added this test when introducing this change.
&gt; 
&gt; None of the tests use `CanvasManager.prototype.startRecording`.  All the
&gt; recording tests directly call `requestRecording`/`cancelRecording` on
&gt; `CanvasAgent`.  The issue is that the `CanvasManager` functions don&apos;t expose
&gt; the `error` object or allow for a callback, both of which are needed in the
&gt; tests.

If CanvasManager isn&apos;t testable, then we should take steps to address that. Updating it to be promise-based would be one solution. We could also rely more of event dispatched from the manager. Currently, when requestRecording fails CanvasManager dispatches a RecordingFinished event with a null recording. This is enough information to write a test, as long as you don&apos;t care about the actual error message.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350011</commentid>
    <comment_count>5</comment_count>
      <attachid>320744</attachid>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2017-09-18 11:27:11 -0700</bug_when>
    <thetext>Comment on attachment 320744
Patch

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350028</commentid>
    <comment_count>6</comment_count>
      <attachid>320744</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-09-18 11:56:42 -0700</bug_when>
    <thetext>Comment on attachment 320744
Patch

Clearing flags on attachment: 320744

Committed r222171: &lt;http://trac.webkit.org/changeset/222171&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1350029</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2017-09-18 11:56:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1353431</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-09-27 12:30:10 -0700</bug_when>
    <thetext>&lt;rdar://problem/34693389&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>320744</attachid>
            <date>2017-09-14 01:05:13 -0700</date>
            <delta_ts>2017-09-18 11:56:42 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-176893-20170914010512.patch</filename>
            <type>text/plain</type>
            <size>1844</size>
            <attacher name="Devin Rousso">hi</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IGI4YmVlNzI2MjIxZTg2NjVhM2EyY2M5NDgzY2Rm
MWQwYzU1N2Y2MWQuLjljZDYxYjYzMDg0YTljOGZiMmI4NDE2YWUxY2FhMTE0YjU1MjY0YWEgMTAw
NjQ0Ci0tLSBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dl
Ykluc3BlY3RvclVJL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE3IEBACisyMDE3LTA5LTE0ICBEZXZp
biBSb3Vzc28gIDx3ZWJraXRAZGV2aW5yb3Vzc28uY29tPgorCisgICAgICAgIFdlYiBJbnNwZWN0
b3I6IFJFR1JFU1NJT04ocjIyMTkwMSk6IFNpbmdsZSBmcmFtZSByZWNvcmRpbmdzIGRvbid0IHJl
c2V0IHRoZSByZWNvcmRpbmcgbmF2aWdhdGlvbiBpdGVtCisgICAgICAgIGh0dHBzOi8vYnVncy53
ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xNzY4OTMKKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICAqIFVzZXJJbnRlcmZhY2UvQ29udHJvbGxlcnMvQ2Fu
dmFzTWFuYWdlci5qczoKKyAgICAgICAgKFdJLkNhbnZhc01hbmFnZXIucHJvdG90eXBlLnJlY29y
ZGluZ0ZpbmlzaGVkKToKKyAgICAgICAgU2V0IHRoZSBgX3JlY29yZGluZ0NhbnZhc2AgdG8gbnVs
bCB3aGVuZXZlciBhIHJ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