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

Unified Diff: Source/core/html/HTMLOptionElement.cpp

Issue 159743002: Select when disabled should not allow value change and popup is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/select/select-mouseDisabled-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptionElement.cpp
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index 7b5bc1ff0043e6e5f1a0c07259eb15684654972e..8f699ec1833d8a225fd49f3fee63da715b7c5ed5 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -327,9 +327,13 @@ bool HTMLOptionElement::isDisabledFormControl() const
{
if (ownElementDisabled())
return true;
+ bool status = false;
+ ContainerNode* select = parentNode();
if (Element* parent = parentElement())
- return parent->hasTagName(optgroupTag) && parent->isDisabledFormControl();
- return false;
+ status = parent->hasTagName(optgroupTag) && parent->isDisabledFormControl();
+ if (!status && select && select->hasTagName(selectTag))
+ status = ownerSelectElement()->isDisabledOrReadOnly();
tkent 2014/02/12 08:15:43 We can't do this change. This function should mat
+ return status;
}
Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode* insertionPoint)
« no previous file with comments | « LayoutTests/fast/forms/select/select-mouseDisabled-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698