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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp

Issue 1422573006: Disabled FIELDSET elements should not be focusable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for fast/events/tabindex-focus-blur-all.html Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/fieldset/fieldset-disabled-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 void HTMLFieldSetElement::childrenChanged(const ChildrenChange& change) 97 void HTMLFieldSetElement::childrenChanged(const ChildrenChange& change)
98 { 98 {
99 HTMLFormControlElement::childrenChanged(change); 99 HTMLFormControlElement::childrenChanged(change);
100 for (HTMLLegendElement& legend : Traversal<HTMLLegendElement>::childrenOf(*t his)) 100 for (HTMLLegendElement& legend : Traversal<HTMLLegendElement>::childrenOf(*t his))
101 invalidateDisabledStateUnder(legend); 101 invalidateDisabledStateUnder(legend);
102 } 102 }
103 103
104 bool HTMLFieldSetElement::supportsFocus() const 104 bool HTMLFieldSetElement::supportsFocus() const
105 { 105 {
106 return HTMLElement::supportsFocus(); 106 return HTMLElement::supportsFocus() && !isDisabledFormControl();
107 } 107 }
108 108
109 const AtomicString& HTMLFieldSetElement::formControlType() const 109 const AtomicString& HTMLFieldSetElement::formControlType() const
110 { 110 {
111 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString: :ConstructFromLiteral)); 111 DEFINE_STATIC_LOCAL(const AtomicString, fieldset, ("fieldset", AtomicString: :ConstructFromLiteral));
112 return fieldset; 112 return fieldset;
113 } 113 }
114 114
115 LayoutObject* HTMLFieldSetElement::createLayoutObject(const ComputedStyle&) 115 LayoutObject* HTMLFieldSetElement::createLayoutObject(const ComputedStyle&)
116 { 116 {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 150 }
151 } 151 }
152 152
153 const FormAssociatedElement::List& HTMLFieldSetElement::associatedElements() con st 153 const FormAssociatedElement::List& HTMLFieldSetElement::associatedElements() con st
154 { 154 {
155 refreshElementsIfNeeded(); 155 refreshElementsIfNeeded();
156 return m_associatedElements; 156 return m_associatedElements;
157 } 157 }
158 158
159 } // namespace 159 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/forms/fieldset/fieldset-disabled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698