REGRESSION: Text INPUT inside a LABEL associated to a radio button can't get focus by mouse press.
This is a regression by Blink r153039 [1], which made radio buttons
mouse-focusable.
We fix this regression by improving specification conformance.
The specification [2] says:
> The activation behavior of a label element for events targeted at interactive
> content descendants of a label element, and any descendants of those
> interactive content descendants, must be to do nothing.
We didn't have such behavior. Implementing it fixes the regression beucase mouse
press on the text <input> does nothing for <label>.
The new behavior is compatible with IE.
Implementation:
We introduce HTMLElement::isInteractiveContent virtual function. Interactive
content elements defined by the specification should override it so that it
returns true. HTMLLabelElement checks if a click event is inside an interactive
content.
[1] http://src.chromium.org/viewvc/blink?revision=153039&view=revision
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#the-label-element
BUG=305751
TEST=automated
Review URL: https://codereview.chromium.org/26689007
git-svn-id: svn://svn.chromium.org/blink/trunk@159400 bbb929c8-8fbe-4397-9dbb-9b2b20218538
33 files changed