Summary: | Web Inspector: WebSockets: Messages log should remain being scrolled to the bottom when a new message is added | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||||
Component: | Web Inspector | Assignee: | Nikita Vasilyev <nvasilyev> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, inspector-bugzilla-changes, mattbaker | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Nikita Vasilyev
2017-03-24 17:40:02 PDT
Created attachment 305527 [details]
Patch
Comment on attachment 305527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=305527&action=review r=me, with some style suggestions. > Source/WebInspectorUI/ChangeLog:16 > + Batch WebSocketContentView DOM modifications using requestAnimationFrames. "requestAnimationFrame" should be singular. > Source/WebInspectorUI/UserInterface/Views/WebSocketContentView.js:103 > + this._scheduledUpdateFramesIdentifier = requestAnimationFrame(() => this._updateFrames()); Utilities.js defines Object.onNextFrame, which does exactly this! You could probably switch to that and remove a bunch of boilerplate. For an example see TreeElement.js:194. > Source/WebInspectorUI/UserInterface/Views/WebSocketContentView.js:145 > + isText: opcode === WebInspector.WebSocketResource.OpCodes.TextFrame, Since its value is used above, `isText` could be a stand-alone variable, defined and initialized above `nodeText`: let isText = opcode === WebInspector.WebSocketResource.OpCodes.TextFrame; let nodeText = isText ? data : WebInspector.WebSocketContentView.textForOpcode(opcode); let attributes = {isOutgoing, isText}; ... Created attachment 305813 [details]
Patch
Comment on attachment 305813 [details] Patch Clearing flags on attachment: 305813 Committed r214587: <http://trac.webkit.org/changeset/214587> All reviewed patches have been landed. Closing bug. |