New issue
Advanced search Search tips

Issue 795910 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

LiveNodeList for LabelableElements::labels() doesn't get invalidated correctly for HTMLInputElements

Project Member Reported by adithyas@chromium.org, Dec 18 2017

Issue description

Currently, when the type of an input element is changed, the "labels" LiveNodeList isn't invalidated if the shadow subtree of the input element
isn't changed by the type change (for example, going from type="hidden" to type="checkbox"). This is a problem when going from a type that supports labels to a type that doesn't. 

This causes a failure in external/wpt/html/semantics/forms/the-label-element/labelable-elements.html (https://chromium.googlesource.com/chromium/src/+/bb65e11e10c704249b39c1060405887245cf3d68/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-label-element/labelable-elements-expected.txt)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 20 2017

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

commit 562a3cf328943cc75c2171b04eac144016eb3064
Author: Adithya Srinivasan <adithyas@chromium.org>
Date: Wed Dec 20 14:59:20 2017

Invalidate labels LiveNodeList when input type changes

When the type of an HTMLInputElement changes, the labels LiveNodeList
inconsistently gets invalidated (depending whether the shadow subtree of
the input element changes).

This CL causes invalidation of the labels nodelist to happen any time
any of the name/id/type/for/form attributes changes for an element.

Bug:  795910 
Change-Id: Ice58060e06150f58b4fb5c8771a413091446ff62
Reviewed-on: https://chromium-review.googlesource.com/833249
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Commit-Queue: Adithya Srinivasan <adithyas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525329}
[delete] https://crrev.com/af0c93961bfb53a33cbe96d2c0432a309b82a876/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-label-element/labelable-elements-expected.txt
[modify] https://crrev.com/562a3cf328943cc75c2171b04eac144016eb3064/third_party/WebKit/Source/core/html/forms/LabelsNodeList.cpp

Status: Fixed (was: Assigned)

Comment 3 by tkent@chromium.org, Jan 9 2018

 Issue 692405  has been merged into this issue.

Sign in to add a comment