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

Issue 1148293010: Listen to focus change events instead of assuming they happen at next rAF (Closed)

Created:
5 years, 6 months ago by Sami
Modified:
5 years, 6 months ago
CC:
blink-reviews
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Listen to focus change events instead of assuming they happen at next rAF focus-shadowhost-display-none.html is testing a case where a focused element immediately unfocuses by hiding itself. The test assumes that the unfocus completes by the next requestAnimationFrame, but because Document uses a timer to implement unfocusing[1], this ordering isn't guaranteed. This patch makes the test more robust by listening to the blur event explicitly instead of assuming this relationship with requestAnimationFrame. BUG=463143 [1] clearFocusedElementSoon at https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/Document.cpp&rcl=1432882933&l=1888 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196141

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -4 lines) Patch
M LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html View 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Sami
5 years, 6 months ago (2015-05-29 12:25:43 UTC) #2
alex clarke (OOO till 29th)
Looks fine to me.
5 years, 6 months ago (2015-05-29 12:27:15 UTC) #3
alex clarke (OOO till 29th)
lgtm Since this is blocking the TimerBase refactoring I think we should land this now. ...
5 years, 6 months ago (2015-05-29 12:30:17 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1148293010/1
5 years, 6 months ago (2015-05-29 12:31:48 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=196141
5 years, 6 months ago (2015-05-29 13:43:15 UTC) #7
kochi
5 years, 6 months ago (2015-06-01 02:37:55 UTC) #8
Message was sent while issue was closed.
lgtm

Thanks for catching this.

FYI adding some information for supporting this change.

Actually I think the timing/order is not well defined on spec
as to requestAnimationFrame and focus->display:none
transition.

On the other hand,
display:none -> blur is discussed in whatwg ML:
https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Jan/0023.html

Powered by Google App Engine
This is Rietveld 408576698