Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Issue 2179123004: DevTools: fix stick to bottom in console viewport (Closed)

Created:
4 years, 4 months ago by luoe
Modified:
4 years, 4 months ago
Reviewers:
dgozman, lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, sergeyv+blink_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: fix stick to bottom in console viewport BUG=603294 Committed: https://crrev.com/47da3b4f70636bbac1d874a6710ee6a5806b5392 Cr-Commit-Position: refs/heads/master@{#411829}

Patch Set 1 #

Patch Set 2 : Best attempt at tests #

Total comments: 8

Patch Set 3 : Address comments #

Total comments: 18

Patch Set 4 : Address comments #

Total comments: 2

Patch Set 5 : Rename forTest fn() #

Total comments: 12

Patch Set 6 : rebase #

Patch Set 7 : Address comments #

Total comments: 12

Patch Set 8 : Address comments #

Patch Set 9 : Rename ...onMouseWheel to onWheel #

Patch Set 10 : Comments addressed. #

Total comments: 8

Patch Set 11 : Introduce partialUpdate flag, address comments #

Patch Set 12 : rebase #

Patch Set 13 : Replace partial flag with 'maybeDirtyWhileMuted' #

Patch Set 14 : Don't stick onkeydown when prompt fills viewport #

Total comments: 8

Patch Set 15 : Address comments #

Patch Set 16 : Comments addressed #

Total comments: 1

Patch Set 17 : Add check for viewport range changes #

Patch Set 18 : Visible ranges too #

Total comments: 1

Patch Set 19 : Remove all range logic, pageUp is no longer special #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -34 lines) Patch
M third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 3 chunks +104 lines, -18 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 18 1 chunk +21 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +83 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js View 1 2 3 11 12 18 9 chunks +33 lines, -10 lines 0 comments Download

Messages

Total messages: 40 (12 generated)
luoe
This was built with a ton of <3 from Pavel! Note: Patch 2 includes a ...
4 years, 4 months ago (2016-07-30 00:44:05 UTC) #2
lushnikov
https://codereview.chromium.org/2179123004/diff/20001/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js File third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js (right): https://codereview.chromium.org/2179123004/diff/20001/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js#newcode63 third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js:63: this._observer = new MutationObserver(this.refresh.bind(this)); what do you use mutation ...
4 years, 4 months ago (2016-07-30 01:31:12 UTC) #3
dgozman
To overcome hardcoded timeout we can hardcode larger timeout in the test itself! https://codereview.chromium.org/2179123004/diff/20001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File ...
4 years, 4 months ago (2016-07-30 16:15:54 UTC) #4
luoe
Comments addressed and tests updated. Ptal https://codereview.chromium.org/2179123004/diff/20001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/20001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode1033 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:1033: setTimeout(updateViewportState.bind(this), 200); On ...
4 years, 4 months ago (2016-08-01 21:44:37 UTC) #5
lushnikov
https://codereview.chromium.org/2179123004/diff/40001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2179123004/diff/40001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html#newcode82 third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:82: stray line https://codereview.chromium.org/2179123004/diff/40001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html#newcode84 third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:84: function testViewportMuationsShouldPreserveStickToBottom(next) Muations -> Mutations ...
4 years, 4 months ago (2016-08-02 00:10:48 UTC) #6
luoe
Thanks for the detailed review. Comments addressed https://codereview.chromium.org/2179123004/diff/40001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2179123004/diff/40001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html#newcode82 third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:82: On 2016/08/02 ...
4 years, 4 months ago (2016-08-02 19:17:15 UTC) #7
lushnikov
this looks good for me. The 200ms timeout (and the necessity of waiting for it ...
4 years, 4 months ago (2016-08-02 19:37:25 UTC) #8
luoe
Function renamed. Ptal https://codereview.chromium.org/2179123004/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/60001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode1056 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:1056: _updateViewportForTest: function() On 2016/08/02 19:37:25, lushnikov ...
4 years, 4 months ago (2016-08-03 17:16:24 UTC) #9
dgozman
https://codereview.chromium.org/2179123004/diff/80001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2179123004/diff/80001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html#newcode66 third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:66: function onUpdateTimeout() { style: { on next line https://codereview.chromium.org/2179123004/diff/80001/third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html#newcode87 ...
4 years, 4 months ago (2016-08-03 21:19:01 UTC) #12
luoe
Comments addressed, ptal dgozman@. Notes: - _updateStickToBottomOnMouseUp() didn't actually need to make another scheduleViewportUpdate() call, ...
4 years, 4 months ago (2016-08-04 23:13:02 UTC) #15
dgozman
https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode1062 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:1062: _updateStickToBottomOnMouseWheel: function() Do we handle touchpad here? Are there ...
4 years, 4 months ago (2016-08-05 17:10:01 UTC) #16
dgozman
https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode163 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:163: this._messagesElement.addEventListener("keydown", this._updateStickToBottomOnKeyDown.bind(this), true); false https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode1023 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:1023: this._wasScrolledToBottom = this._messagesElement.isScrolledToBottom(); ...
4 years, 4 months ago (2016-08-05 17:36:42 UTC) #17
luoe
comments addressed. https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/120001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode163 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:163: this._messagesElement.addEventListener("keydown", this._updateStickToBottomOnKeyDown.bind(this), true); On 2016/08/05 17:36:42, dgozman ...
4 years, 4 months ago (2016-08-05 19:43:57 UTC) #18
dgozman
https://codereview.chromium.org/2179123004/diff/180001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/180001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode767 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:767: if (event.key === "PageUp") { Let's move this back ...
4 years, 4 months ago (2016-08-05 21:08:25 UTC) #19
luoe
Noticeable changes: - addition of a boolean partialUpdateRefresh flag to fix a slow case with ...
4 years, 4 months ago (2016-08-05 23:05:58 UTC) #20
luoe
Removed partialRefresh flag. Introduced 'maybeDirtyWhileMuted' check so that we scheduleViewportUpdates when possibly dirty. Ptal
4 years, 4 months ago (2016-08-09 17:29:48 UTC) #21
luoe
On keydown, if the prompt fills the entire viewport, we should not jump down. Ptal
4 years, 4 months ago (2016-08-09 20:57:57 UTC) #22
dgozman
https://codereview.chromium.org/2179123004/diff/250001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/250001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode383 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:383: if (this._muteViewportUpdates) Let's do dirty flag here as well. ...
4 years, 4 months ago (2016-08-09 21:16:48 UTC) #23
luoe
I'm not sure that I wrote the test in the best way possible. It currently ...
4 years, 4 months ago (2016-08-10 01:03:07 UTC) #24
luoe
I'm not sure that I wrote the test in the best way possible. It currently ...
4 years, 4 months ago (2016-08-10 01:03:07 UTC) #25
dgozman
Just a single comment. Thanks for the tests! https://codereview.chromium.org/2179123004/diff/290001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/290001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode773 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:773: if ...
4 years, 4 months ago (2016-08-10 21:39:45 UTC) #26
luoe
Visible ranges logic added.... Ptal
4 years, 4 months ago (2016-08-11 21:27:22 UTC) #27
luoe
Comments addressed, no more range logic!!! https://codereview.chromium.org/2179123004/diff/330001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js File third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js (right): https://codereview.chromium.org/2179123004/diff/330001/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js#newcode773 third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js:773: if (event.key === ...
4 years, 4 months ago (2016-08-12 18:18:12 UTC) #28
dgozman
lgtm
4 years, 4 months ago (2016-08-12 18:22:13 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2179123004/350001
4 years, 4 months ago (2016-08-13 00:18:44 UTC) #36
commit-bot: I haz the power
Committed patchset #19 (id:350001)
4 years, 4 months ago (2016-08-13 00:23:21 UTC) #37
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/47da3b4f70636bbac1d874a6710ee6a5806b5392 Cr-Commit-Position: refs/heads/master@{#411829}
4 years, 4 months ago (2016-08-13 00:25:45 UTC) #39
lushnikov
4 years, 4 months ago (2016-08-17 21:15:58 UTC) #40
Message was sent while issue was closed.
A revert of this CL (patchset #19 id:350001) has been created in
https://codereview.chromium.org/2256873002/ by lushnikov@chromium.org.

The reason for reverting is: Reverting as this adds 200 ms for evaluation
commands in console.

Repro:
1. open console
2. evaluate "1"
3. wait for response.

Powered by Google App Engine
This is Rietveld 408576698