New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591226 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

OPTION, checkbox and radio should suport ':default' selector

Project Member Reported by tkent@chromium.org, Mar 1 2016

Issue description

Comment 1 by tkent@chromium.org, Mar 2 2016

Components: Blink>Forms>Option Blink>Forms>Checkbox
Owner: ramy...@samsung.com
Status: Assigned (was: Available)
Would like to work on this bug.

Comment 3 by tkent@chromium.org, Mar 3 2016

Components: Blink>Forms>Radio
Summary: OPTION, checkbox and radio should suport ':default' selector (was: OPTION and checkbox should suport ':default' selector)
Added a patch at https://codereview.chromium.org/1756483005/

@tkent

Hi if I modify the expected results of default.html in 
LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/ I'm getting the following presubmit errors.


**Presubmit ERRORS **
* The following files are passing testharness results without console error messages, they should be removed:
/home/ramya.v/chromium/src/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt
ERROR: found passing testharness results without console error messages.

Can you please let me know how to correct the result from FAIL to PASS after this patch.

Comment 5 by tkent@chromium.org, Mar 3 2016

#4,

You should remove default-expected.txt because it doesn't contain FAIL lines.

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e3a05d6080ba6ae25af2835573ff9e2406b90c0

commit 6e3a05d6080ba6ae25af2835573ff9e2406b90c0
Author: ramya.v <ramya.v@samsung.com>
Date: Fri Mar 04 13:42:29 2016

Option, checkbox and radio should support ':default' selector

Spec: https://html.spec.whatwg.org/multipage/scripting.html#selector-default

This patch adds support for the following to match :default
pseudo class
a)input elements to which the checked attribute applies and
that have a checked attribute
b)option elements that have a selected attribute

This patch does not support handling dynamic state changes
to input types to add/remove :default class.

BUG= 591226 

Review URL: https://codereview.chromium.org/1756483005

Cr-Commit-Position: refs/heads/master@{#379279}

[add] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/LayoutTests/fast/css/pseudo-default-checkbox-radio.html
[add] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/LayoutTests/fast/css/pseudo-default-option.html
[delete] https://crrev.com/3ee990d9bbf799ee4a81f843e6b1ab71d61883ba/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLButtonElement.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLButtonElement.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLFormControlElement.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLInputElement.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/HTMLOptionElement.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.h
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/InputType.cpp
[modify] https://crrev.com/6e3a05d6080ba6ae25af2835573ff9e2406b90c0/third_party/WebKit/Source/core/html/forms/InputType.h

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60169b204c832cf0f3ac5b1387b6532fe2238b1a

commit 60169b204c832cf0f3ac5b1387b6532fe2238b1a
Author: ramya.v <ramya.v@samsung.com>
Date: Tue Mar 08 04:46:07 2016

Invalidate pseudo default state when checked and selected attributes are updated dynamically.

Added tests to check if :default selector is reflected correctly in following cases.
a)Updating type attribute of input element.
b)Updating checked status of input element.
c)Updating checked attribute of input element.
d)Updating selected status of option element.
e)Updating selected attribute of option element.

BUG= 591226 

Review URL: https://codereview.chromium.org/1768913002

Cr-Commit-Position: refs/heads/master@{#379743}

[modify] https://crrev.com/60169b204c832cf0f3ac5b1387b6532fe2238b1a/third_party/WebKit/LayoutTests/fast/css/pseudo-default-dynamic.html
[modify] https://crrev.com/60169b204c832cf0f3ac5b1387b6532fe2238b1a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
[modify] https://crrev.com/60169b204c832cf0f3ac5b1387b6532fe2238b1a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp

Status: Fixed (was: Assigned)

Comment 9 by tkent@chromium.org, Mar 8 2016

Labels: M-51

Sign in to add a comment