Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Web Inspector: Timelines Tab: Screenshots: include images from `conso…
…le.screenshot` https://bugs.webkit.org/show_bug.cgi?id=240853 Reviewed by Patrick Angle. This is nice for developers as it gives them a way to visualize all of their `console.screenshot`, which can be used to see visual snapshots of particular nodes/areas since it's configurable (instead of the general "snapshot the viewport after compositing"). * Source/JavaScriptCore/inspector/protocol/Console.json: * Source/JavaScriptCore/inspector/ConsoleMessage.h: * Source/JavaScriptCore/inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::ConsoleMessage): (Inspector::ConsoleMessage::addToFrontend): * Source/WebInspectorUI/UserInterface/Protocol/ConsoleObserver.js: (WI.ConsoleObserver.prototype.messageAdded): * Source/WebInspectorUI/UserInterface/Controllers/ConsoleManager.js: (WI.ConsoleManager.prototype.messageWasAdded): * Source/WebInspectorUI/UserInterface/Models/ConsoleMessage.js: (WI.ConsoleMessage): (WI.ConsoleMessage.prototype.get timestamp): Added. Add a `timestamp` to console messages so that the frontend can know when the message was created. * Source/WebCore/page/PageConsoleClient.cpp: (WebCore::PageConsoleClient::screenshot): Capture a `timestamp` before snapshotting so it doesn't skew where it's shown in the Timelines Tab. * Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js: (WI.TimelineManager): (WI.TimelineManager.prototype._processRecord): (WI.TimelineManager.prototype._handleMessageAdded): Added. Listen for `WI.ConsoleManager.Event.MessageAdded` to add `console.screenshot` to the Timelines Tab. * Source/WebCore/inspector/TimelineRecordFactory.h: * Source/WebCore/inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createScreenshotData): * Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::captureScreenshot): * Source/WebInspectorUI/UserInterface/Models/ScreenshotsTimelineRecord.js: (WI.ScreenshotsTimelineRecord): (WI.ScreenshotsTimelineRecord.async fromJSON): (WI.ScreenshotsTimelineRecord.prototype.toJSON): (WI.ScreenshotsTimelineRecord.prototype.get width): Deleted. (WI.ScreenshotsTimelineRecord.prototype.get height): Deleted. * Source/WebInspectorUI/UserInterface/Views/ScreenshotsTimelineOverviewGraph.js: (WI.ScreenshotsTimelineOverviewGraph.prototype.layout): Drop `width`/`height` from screenshot records as the `dataURL` will contain it (after loading). * LayoutTests/inspector/console/console-api-expected.txt: * LayoutTests/inspector/console/console-screenshot.html: * LayoutTests/inspector/console/console-table-expected.txt: * LayoutTests/inspector/timeline/timeline-event-screenshots.html: * LayoutTests/inspector/timeline/timeline-event-screenshots-expected.txt: * LayoutTests/inspector/worker/console-basic-expected.txt: Canonical link: https://commits.webkit.org/250942@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
19 changed files
with
175 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.