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

Issue 23496036: Make it possible to focus on 0-size form controls and anchors. (Closed)

Created:
7 years, 3 months ago by tkent
Modified:
7 years, 3 months ago
Reviewers:
keishi
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Make it possible to focus on 0-size form controls and anchors. We assumed form controls and anchor elements with 0-size were not focusable. It's inconsistent with other elements with tabIndex or contentEditable, and incompatible with IE11 and Firefox 23. We remove rendererIsFocusable override of HTMLFormControlElement, and remove renderer box check in HTMLAnchorElement::isKeyboardFocusable. As for crbug.com/285595, when we removed focus from an input/textarea element by 0-size, the element kept the selection. So FrameSelection::setFocusedNodeIfNeeded set focus on the element again when an editing command was invoked by a keyboard input. This issue is revolved by this CL because we don't remove focus by 0-size. BUG=168121, 285595 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157405

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -47 lines) Patch
M LayoutTests/fast/events/anchor-empty-focus.html View 1 chunk +25 lines, -18 lines 0 comments Download
M LayoutTests/fast/events/anchor-empty-focus-expected.txt View 1 chunk +10 lines, -2 lines 0 comments Download
A LayoutTests/fast/forms/focus-on-control-with-zero-size.html View 1 chunk +56 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/focus-on-control-with-zero-size-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/html/HTMLAnchorElement.cpp View 1 chunk +8 lines, -17 lines 0 comments Download
M Source/core/html/HTMLFormControlElement.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLFormControlElement.cpp View 1 chunk +0 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
tkent
7 years, 3 months ago (2013-09-06 06:53:24 UTC) #1
keishi
lgtm
7 years, 3 months ago (2013-09-06 13:54:54 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tkent@chromium.org/23496036/4001
7 years, 3 months ago (2013-09-07 02:31:18 UTC) #3
commit-bot: I haz the power
7 years, 3 months ago (2013-09-07 02:36:12 UTC) #4
Message was sent while issue was closed.
Change committed as 157405

Powered by Google App Engine
This is Rietveld 408576698