Skip to content

Commit

Permalink
feat(webkit): roll to r1472 (#6425)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed May 5, 2021
1 parent 477b93b commit 791443d
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 11 deletions.
2 changes: 1 addition & 1 deletion browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"name": "webkit",
"revision": "1468",
"revision": "1472",
"installByDefault": true,
"revisionOverrides": {
"mac10.14": "1443"
Expand Down
60 changes: 52 additions & 8 deletions src/server/webkit/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8031,11 +8031,19 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
*/
export type ScreencastId = string;

export type screencastFramePayload = {
/**
* Base64 data
*/
data: string;
deviceWidth: number;
deviceHeight: number;
}

/**
* Starts recoring video to speified file.
*/
export type startParameters = {
export type startVideoParameters = {
/**
* Output file location.
*/
Expand All @@ -8044,7 +8052,7 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
height: number;
scale?: number;
}
export type startReturnValue = {
export type startVideoReturnValue = {
/**
* Unique identifier of the screencast.
*/
Expand All @@ -8053,9 +8061,38 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
/**
* Stops recoding video. Returns after the file has been closed.
*/
export type stopParameters = {
export type stopVideoParameters = {
}
export type stopReturnValue = {
export type stopVideoReturnValue = {
}
/**
* Starts screencast.
*/
export type startScreencastParameters = {
width: number;
height: number;
quality: number;
}
export type startScreencastReturnValue = {
/**
* Screencast session generation.
*/
generation: number;
}
/**
* Stops screencast.
*/
export type stopScreencastParameters = {
}
export type stopScreencastReturnValue = {
}
export type screencastFrameAckParameters = {
/**
* Screencast session generation
*/
generation: number;
}
export type screencastFrameAckReturnValue = {
}
}

Expand Down Expand Up @@ -8612,6 +8649,7 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
"Playwright.downloadFinished": Playwright.downloadFinishedPayload;
"Playwright.screencastFinished": Playwright.screencastFinishedPayload;
"Runtime.executionContextCreated": Runtime.executionContextCreatedPayload;
"Screencast.screencastFrame": Screencast.screencastFramePayload;
"ScriptProfiler.trackingStart": ScriptProfiler.trackingStartPayload;
"ScriptProfiler.trackingUpdate": ScriptProfiler.trackingUpdatePayload;
"ScriptProfiler.trackingComplete": ScriptProfiler.trackingCompletePayload;
Expand Down Expand Up @@ -8895,8 +8933,11 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
"Runtime.enableControlFlowProfiler": Runtime.enableControlFlowProfilerParameters;
"Runtime.disableControlFlowProfiler": Runtime.disableControlFlowProfilerParameters;
"Runtime.getBasicBlocks": Runtime.getBasicBlocksParameters;
"Screencast.start": Screencast.startParameters;
"Screencast.stop": Screencast.stopParameters;
"Screencast.startVideo": Screencast.startVideoParameters;
"Screencast.stopVideo": Screencast.stopVideoParameters;
"Screencast.startScreencast": Screencast.startScreencastParameters;
"Screencast.stopScreencast": Screencast.stopScreencastParameters;
"Screencast.screencastFrameAck": Screencast.screencastFrameAckParameters;
"ScriptProfiler.startTracking": ScriptProfiler.startTrackingParameters;
"ScriptProfiler.stopTracking": ScriptProfiler.stopTrackingParameters;
"ServiceWorker.getInitializationInfo": ServiceWorker.getInitializationInfoParameters;
Expand Down Expand Up @@ -9184,8 +9225,11 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the
"Runtime.enableControlFlowProfiler": Runtime.enableControlFlowProfilerReturnValue;
"Runtime.disableControlFlowProfiler": Runtime.disableControlFlowProfilerReturnValue;
"Runtime.getBasicBlocks": Runtime.getBasicBlocksReturnValue;
"Screencast.start": Screencast.startReturnValue;
"Screencast.stop": Screencast.stopReturnValue;
"Screencast.startVideo": Screencast.startVideoReturnValue;
"Screencast.stopVideo": Screencast.stopVideoReturnValue;
"Screencast.startScreencast": Screencast.startScreencastReturnValue;
"Screencast.stopScreencast": Screencast.stopScreencastReturnValue;
"Screencast.screencastFrameAck": Screencast.screencastFrameAckReturnValue;
"ScriptProfiler.startTracking": ScriptProfiler.startTrackingReturnValue;
"ScriptProfiler.stopTracking": ScriptProfiler.stopTrackingReturnValue;
"ServiceWorker.getInitializationInfo": ServiceWorker.getInitializationInfoReturnValue;
Expand Down
4 changes: 2 additions & 2 deletions src/server/webkit/wkPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ export class WKPage implements PageDelegate {

async _startScreencast(options: types.PageScreencastOptions): Promise<void> {
assert(!this._recordingVideoFile);
const { screencastId } = await this._pageProxySession.send('Screencast.start', {
const { screencastId } = await this._pageProxySession.send('Screencast.startVideo', {
file: options.outputFile,
width: options.width,
height: options.height,
Expand All @@ -749,7 +749,7 @@ export class WKPage implements PageDelegate {
async _stopScreencast(): Promise<void> {
if (!this._recordingVideoFile)
return;
await this._pageProxySession.sendMayFail('Screencast.stop');
await this._pageProxySession.sendMayFail('Screencast.stopVideo');
this._recordingVideoFile = null;
}

Expand Down

0 comments on commit 791443d

Please sign in to comment.