Changeset 223998 in webkit


Ignore:
Timestamp:
Oct 25, 2017 4:50:11 PM (6 years ago)
Author:
webkit@devinrousso.com
Message:

Web Inspector: Canvas Tab: starting a second recording doesn't show red titlebar if the first recording was empty
https://bugs.webkit.org/show_bug.cgi?id=178805
<rdar://problem/35176303>

Reviewed by Brian Burg.

Source/WebCore:

No new tests, updated existing tests.

  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
If the recording was stopped and had no data, reset the CallTracingActive flag to false.

LayoutTests:

  • inspector/canvas/recording-2d-expected.txt:
  • inspector/canvas/recording-2d.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r223997 r223998  
     12017-10-25  Devin Rousso  <webkit@devinrousso.com>
     2
     3        Web Inspector: Canvas Tab: starting a second recording doesn't show red titlebar if the first recording was empty
     4        https://bugs.webkit.org/show_bug.cgi?id=178805
     5        <rdar://problem/35176303>
     6
     7        Reviewed by Brian Burg.
     8
     9        * inspector/canvas/recording-2d-expected.txt:
     10        * inspector/canvas/recording-2d.html:
     11
    1122017-10-25  Devin Rousso  <webkit@devinrousso.com>
    213
  • trunk/LayoutTests/inspector/canvas/recording-2d-expected.txt

    r222182 r223998  
    13651365PASS: The parameter should be null.
    13661366
     1367-- Running test case: Canvas.recording2D.NoActions
     1368PASS: A recording should have been started and stopped once.
     1369PASS: A recording should have been started and stopped twice.
     1370
  • trunk/LayoutTests/inspector/canvas/recording-2d.html

    r222888 r223998  
    472472    });
    473473
     474    suite.addTestCase({
     475        name: "Canvas.recording2D.NoActions",
     476        description: "Check that a canvas is still able to be recorded after stopping a recording with no actions.",
     477        test(resolve, reject) {
     478            let canvas = getCanvas(WI.Canvas.ContextType.Canvas2D);
     479            if (!canvas)
     480                throw "Missing 2D canvas.";
     481
     482            let eventCount = 0;
     483            function handleRecordingStopped(event) {
     484                InspectorTest.assert(event.data.canvas === canvas, "We should have stopped recording the selected canvas.");
     485                ++eventCount;
     486
     487                if (eventCount == 1)
     488                    InspectorTest.pass("A recording should have been started and stopped once.");
     489
     490                if (eventCount >= 2) {
     491                    InspectorTest.pass("A recording should have been started and stopped twice.");
     492
     493                    WI.canvasManager.removeEventListener(handleRecordingStopped);
     494                    resolve();
     495                }
     496            }
     497            WI.canvasManager.addEventListener(WI.CanvasManager.Event.RecordingStopped, handleRecordingStopped);
     498
     499            WI.canvasManager.startRecording(canvas);
     500            WI.canvasManager.stopRecording();
     501
     502            WI.canvasManager.startRecording(canvas);
     503            WI.canvasManager.stopRecording();
     504        },
     505    });
     506
    474507    suite.runTestCasesAndFinish();
    475508}
  • trunk/Source/WebCore/ChangeLog

    r223996 r223998  
     12017-10-25  Devin Rousso  <webkit@devinrousso.com>
     2
     3        Web Inspector: Canvas Tab: starting a second recording doesn't show red titlebar if the first recording was empty
     4        https://bugs.webkit.org/show_bug.cgi?id=178805
     5        <rdar://problem/35176303>
     6
     7        Reviewed by Brian Burg.
     8
     9        No new tests, updated existing tests.
     10
     11        * inspector/InspectorCanvasAgent.cpp:
     12        (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
     13        If the recording was stopped and had no data, reset the CallTracingActive flag to false.
     14
    1152017-10-25  Keith Miller  <keith_miller@apple.com>
    216
  • trunk/Source/WebCore/inspector/InspectorCanvasAgent.cpp

    r223476 r223998  
    462462
    463463    if (!inspectorCanvas->hasRecordingData()) {
    464         if (forceDispatch)
     464        if (forceDispatch) {
    465465            m_frontendDispatcher->recordingFinished(inspectorCanvas->identifier(), nullptr);
     466
     467            inspectorCanvas->resetRecordingData();
     468        }
    466469        return;
    467470    }
Note: See TracChangeset for help on using the changeset viewer.