Bug 190854 - Web Inspector: Canvas: capture changes to <canvas> that would affect the recorded context
Summary: Web Inspector: Canvas: capture changes to <canvas> that would affect the reco...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: WebInspectorCanvasRecording
  Show dependency treegraph
 
Reported: 2018-10-23 18:39 PDT by Devin Rousso
Modified: 2018-11-03 16:25 PDT (History)
10 users (show)

See Also:


Attachments
Patch (59.26 KB, patch)
2018-10-28 15:49 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] After Patch is applied (900.01 KB, image/png)
2018-10-28 15:50 PDT, Devin Rousso
no flags Details
Patch (58.65 KB, patch)
2018-10-28 15:56 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (39.47 KB, patch)
2018-11-03 13:43 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-10-23 18:39:03 PDT
This includes changes to `width` and `height`, and maybe `transferToImageBitmap`.
Comment 1 Devin Rousso 2018-10-28 15:49:32 PDT
Created attachment 353264 [details]
Patch
Comment 2 Devin Rousso 2018-10-28 15:50:39 PDT
Created attachment 353265 [details]
[Image] After Patch is applied
Comment 3 Devin Rousso 2018-10-28 15:56:05 PDT
Created attachment 353266 [details]
Patch

Whoops.  Forgot to stage a few things before uploading.
Comment 4 Matt Baker 2018-11-02 10:40:15 PDT
Comment on attachment 353266 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353266&action=review

> Source/WebInspectorUI/ChangeLog:17
> +        `context`'s `canvas` instead of directly to the `context`).

The context replacers for all three context types are the same, but are ordered differently. Why is this? Why have these values at all if they are always "canvas"?

> Source/WebCore/bindings/js/CallTracer.cpp:35
> +void CallTracer::recordCanvasAction(HTMLCanvasElement& canvasElement, const String& name, Vector<RecordCanvasActionVariant>&& parameters)

Can we pass HTMLCanvasElement as a const reference? CanvasBase::renderingContent() is a const member function that returns a non-const pointer, so you shouldn't need to make a bunch of other stuff const to plumb the value through to InspectorInstrumentation.
Comment 5 Devin Rousso 2018-11-03 13:43:55 PDT
Created attachment 353781 [details]
Patch
Comment 6 Matt Baker 2018-11-03 15:58:35 PDT
Comment on attachment 353781 [details]
Patch

r=me
Comment 7 WebKit Commit Bot 2018-11-03 16:24:42 PDT
Comment on attachment 353781 [details]
Patch

Clearing flags on attachment: 353781

Committed r237777: <https://trac.webkit.org/changeset/237777>
Comment 8 WebKit Commit Bot 2018-11-03 16:24:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-11-03 16:25:20 PDT
<rdar://problem/45787282>