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

Issue 2319523004: DevTools: Remember the last focused widget. (Closed)

Created:
4 years, 3 months ago by einbinder
Modified:
4 years, 3 months ago
Reviewers:
dgozman, luoe, pfeldman
CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, pfeldman
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: Remember the last focused widget. When focusing a widget, try to focus the last focused child widget instead of the first child widget. BUG=646046 Committed: https://crrev.com/1817d1b7a6958902adb487eac198c6d13d96a423 Cr-Commit-Position: refs/heads/master@{#418121}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use the document focus listener #

Patch Set 3 : Fix stray braces #

Total comments: 7

Patch Set 4 : setDefaultFocusedChild #

Total comments: 8

Patch Set 5 : Select only visible widgets #

Total comments: 8

Patch Set 6 : Allow defaultFocusedChild to be null #

Patch Set 7 : Add test #

Total comments: 10

Patch Set 8 : Make test better #

Patch Set 9 : Fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -10 lines) Patch
A third_party/WebKit/LayoutTests/inspector/components/widget-focus.html View 1 2 3 4 5 6 7 8 1 chunk +99 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/components/widget-focus-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js View 1 2 3 1 chunk +0 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/SplitWidget.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/Widget.js View 1 2 3 4 5 5 chunks +43 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (5 generated)
einbinder
Ptal. It works, there are a few issues but I'd like some feedback before I ...
4 years, 3 months ago (2016-09-07 18:30:37 UTC) #2
einbinder
Instead of listening for focus on the defaultFocusedElement, I listen on the document and walk ...
4 years, 3 months ago (2016-09-07 23:57:58 UTC) #3
dgozman
I propose this: - keep wasFocused and _lastFocusedChild; - public restoreFocusedChild() returns boolean; - focus() ...
4 years, 3 months ago (2016-09-08 00:26:09 UTC) #4
pfeldman
https://codereview.chromium.org/2319523004/diff/40001/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js File third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js (left): https://codereview.chromium.org/2319523004/diff/40001/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js#oldcode128 third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js:128: this._sourcesView.focus(); Did we only have one? https://codereview.chromium.org/2319523004/diff/40001/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js File third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js ...
4 years, 3 months ago (2016-09-08 00:53:50 UTC) #5
luoe
https://codereview.chromium.org/2319523004/diff/1/third_party/WebKit/Source/devtools/front_end/ui/Widget.js File third_party/WebKit/Source/devtools/front_end/ui/Widget.js (right): https://codereview.chromium.org/2319523004/diff/1/third_party/WebKit/Source/devtools/front_end/ui/Widget.js#newcode451 third_party/WebKit/Source/devtools/front_end/ui/Widget.js:451: this._defaultFocusedElement.removeEventListener("focus", this._boundWasFocused); Should this and L437 also get useCapture ...
4 years, 3 months ago (2016-09-08 20:48:56 UTC) #6
einbinder
I started doing dgozman's restoreFocus proposal, but it got messy because implementing a defaultFocusedChild by ...
4 years, 3 months ago (2016-09-09 01:32:16 UTC) #7
dgozman
https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js File third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js (right): https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js#newcode874 third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js:874: stray blank line https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js File third_party/WebKit/Source/devtools/front_end/ui/Widget.js (right): https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js#newcode442 third_party/WebKit/Source/devtools/front_end/ui/Widget.js:442: ...
4 years, 3 months ago (2016-09-12 16:50:22 UTC) #8
einbinder
ptal https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js File third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js (right): https://codereview.chromium.org/2319523004/diff/60001/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js#newcode874 third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js:874: On 2016/09/12 at 16:50:21, dgozman wrote: > stray ...
4 years, 3 months ago (2016-09-12 18:18:54 UTC) #10
dgozman
https://codereview.chromium.org/2319523004/diff/80001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js File third_party/WebKit/Source/devtools/front_end/ui/Widget.js (right): https://codereview.chromium.org/2319523004/diff/80001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js#newcode242 third_party/WebKit/Source/devtools/front_end/ui/Widget.js:242: if (!this._parentWidget._defaultFocusedChild) I think we can now remove this ...
4 years, 3 months ago (2016-09-12 18:24:54 UTC) #11
einbinder
https://codereview.chromium.org/2319523004/diff/80001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js File third_party/WebKit/Source/devtools/front_end/ui/Widget.js (right): https://codereview.chromium.org/2319523004/diff/80001/third_party/WebKit/Source/devtools/front_end/ui/Widget.js#newcode242 third_party/WebKit/Source/devtools/front_end/ui/Widget.js:242: if (!this._parentWidget._defaultFocusedChild) On 2016/09/12 at 18:24:54, dgozman wrote: > ...
4 years, 3 months ago (2016-09-12 18:37:12 UTC) #12
dgozman
Code looks good, let's add a unit test. I think calling focusWidgetFromNode to emulate focus ...
4 years, 3 months ago (2016-09-12 18:44:48 UTC) #13
einbinder
Added a test.
4 years, 3 months ago (2016-09-12 19:29:00 UTC) #14
dgozman
lgtm https://codereview.chromium.org/2319523004/diff/120001/third_party/WebKit/LayoutTests/inspector/widget-focus.html File third_party/WebKit/LayoutTests/inspector/widget-focus.html (right): https://codereview.chromium.org/2319523004/diff/120001/third_party/WebKit/LayoutTests/inspector/widget-focus.html#newcode1 third_party/WebKit/LayoutTests/inspector/widget-focus.html:1: <html> Let's place it under inspector/components. https://codereview.chromium.org/2319523004/diff/120001/third_party/WebKit/LayoutTests/inspector/widget-focus.html#newcode10 third_party/WebKit/LayoutTests/inspector/widget-focus.html:10: ...
4 years, 3 months ago (2016-09-12 21:21:14 UTC) #15
einbinder
https://codereview.chromium.org/2319523004/diff/120001/third_party/WebKit/LayoutTests/inspector/widget-focus.html File third_party/WebKit/LayoutTests/inspector/widget-focus.html (right): https://codereview.chromium.org/2319523004/diff/120001/third_party/WebKit/LayoutTests/inspector/widget-focus.html#newcode1 third_party/WebKit/LayoutTests/inspector/widget-focus.html:1: <html> On 2016/09/12 at 21:21:14, dgozman wrote: > Let's ...
4 years, 3 months ago (2016-09-12 22:19:05 UTC) #16
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/2319523004/160001
4 years, 3 months ago (2016-09-12 22:48:37 UTC) #19
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 3 months ago (2016-09-13 00:27:08 UTC) #20
commit-bot: I haz the power
4 years, 3 months ago (2016-09-13 00:30:01 UTC) #22
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/1817d1b7a6958902adb487eac198c6d13d96a423
Cr-Commit-Position: refs/heads/master@{#418121}

Powered by Google App Engine
This is Rietveld 408576698