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

Unified Diff: Source/core/rendering/RenderListBox.cpp

Issue 14996003: Disabled select element should not fire onchange event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added test and moved the checks to RenderListBox Created 7 years, 7 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 | « Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderListBox.cpp
diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp
index 15eed0c8c1e4d2353c3367eff1dc4268c8086ca4..f76cdfae845bd3e19765f5dd8c92afd32129b5ab 100644
--- a/Source/core/rendering/RenderListBox.cpp
+++ b/Source/core/rendering/RenderListBox.cpp
@@ -562,6 +562,9 @@ void RenderListBox::autoscroll(const IntPoint&)
IntPoint pos = frame()->view()->windowToContents(frame()->eventHandler()->lastKnownMousePosition());
int endIndex = scrollToward(pos);
+ if (selectElement()->isDisabledFormControl())
+ return;
+
if (endIndex >= 0) {
HTMLSelectElement* select = selectElement();
m_inAutoscroll = true;
@@ -577,6 +580,9 @@ void RenderListBox::autoscroll(const IntPoint&)
void RenderListBox::stopAutoscroll()
{
+ if (selectElement()->isDisabledFormControl())
+ return;
+
selectElement()->listBoxOnChange();
}
« no previous file with comments | « Source/core/html/HTMLSelectElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698