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

Issue 14248006: A focused element should lose focus when it becomes unfocusable. (Closed)

Created:
7 years, 8 months ago by tkent
Modified:
7 years, 7 months ago
Reviewers:
eseidel, esprehn, ojan
CC:
blink-reviews, esprehn, inferno
Visibility:
Public.

Description

A focused element should lose focus when it becomes unfocusable. According to the specification, we should remove focus when a focused element becomes unforcusable, and Internet Explorer follows it. We check focusable state after layout asynchronously because setFocusedNode(0) dispatches synchronous events and callers of Document::updateLayout don't expect DOM state changes. Also, we introduce m_didPostCheckFocusedNodeTask flag to avoid duplicated tasks in the pending task queue. BUG=178146 TEST=automated; This patch adds a layout test. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150870

Patch Set 1 #

Total comments: 4

Patch Set 2 : style nits #

Patch Set 3 : add a FIXME comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -1 line) Patch
A LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable.html View 1 chunk +46 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLDocument/active-element-gets-unforcusable-expected.txt View 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 chunks +32 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
tkent
I'm not sure if this is the beast way to fix the bug.
7 years, 8 months ago (2013-04-23 03:21:48 UTC) #1
eseidel
I'm really confused what this is trying to do. This appear to queue a task ...
7 years, 7 months ago (2013-05-09 03:42:29 UTC) #2
tkent
On 2013/05/09 03:42:29, Eric Seidel wrote: > I'm really confused what this is trying to ...
7 years, 7 months ago (2013-05-09 03:46:55 UTC) #3
eseidel
So I guess the idea is that you want to mark the document as "needing ...
7 years, 7 months ago (2013-05-09 07:24:02 UTC) #4
eseidel
Can we view the "updating the focus" as a separate phase (like painting, layer construction, ...
7 years, 7 months ago (2013-05-09 07:24:26 UTC) #5
tkent
On 2013/05/09 07:24:02, Eric Seidel wrote: > So I guess the idea is that you ...
7 years, 7 months ago (2013-05-09 21:37:42 UTC) #6
tkent
eseidel, ojan, do you have any other comments?
7 years, 7 months ago (2013-05-20 22:00:31 UTC) #7
esprehn
Some style nits. https://codereview.chromium.org/14248006/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/14248006/diff/1/Source/core/dom/Document.cpp#newcode388 Source/core/dom/Document.cpp:388: class FocusedNodeChecker: public ScriptExecutionContext::Task { Missing ...
7 years, 7 months ago (2013-05-20 22:03:44 UTC) #8
tkent
https://codereview.chromium.org/14248006/diff/1/Source/core/dom/Document.cpp File Source/core/dom/Document.cpp (right): https://codereview.chromium.org/14248006/diff/1/Source/core/dom/Document.cpp#newcode388 Source/core/dom/Document.cpp:388: class FocusedNodeChecker: public ScriptExecutionContext::Task { On 2013/05/20 22:03:44, esprehn ...
7 years, 7 months ago (2013-05-20 22:29:45 UTC) #9
eseidel
lgtm I don't think this is the right way to fix the bug. But I ...
7 years, 7 months ago (2013-05-22 05:11:48 UTC) #10
eseidel
These "after this phase, do this task" bits of code are littered throughout rendering, and ...
7 years, 7 months ago (2013-05-22 05:12:55 UTC) #11
tkent
I add a FIXME comment, and will land this ...
7 years, 7 months ago (2013-05-22 05:29:40 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/14248006/35001
7 years, 7 months ago (2013-05-22 05:29:54 UTC) #13
commit-bot: I haz the power
7 years, 7 months ago (2013-05-22 06:48:04 UTC) #14
Message was sent while issue was closed.
Change committed as 150870

Powered by Google App Engine
This is Rietveld 408576698