Index: Source/core/html/HTMLSelectElement.cpp |
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp |
index 097f90eed19660aaa225dc054ff684f1bd2821c3..585417fefee3fe7b642271b96979577027bdef4a 100644 |
--- a/Source/core/html/HTMLSelectElement.cpp |
+++ b/Source/core/html/HTMLSelectElement.cpp |
@@ -1061,8 +1061,10 @@ bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event) |
// gets called from RenderMenuList::valueChanged, which gets called |
// after the user makes a selection from the menu. |
saveLastSelection(); |
- if (RenderMenuList* menuList = toRenderMenuList(renderer())) |
- menuList->showPopup(); |
+ if (RenderMenuList* menuList = toRenderMenuList(renderer())) { |
+ if (!isDisabledOrReadOnly()) |
tkent
2014/02/17 00:14:30
* <select> can not be read-only.
* This check has
Habib Virji
2014/02/18 10:23:21
Done.
"<select> can not be read-only."
--> Select
|
+ menuList->showPopup(); |
+ } |
event->setDefaultHandled(); |
} |
return true; |
@@ -1148,8 +1150,10 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event) |
// gets called from RenderMenuList::valueChanged, which gets called |
// after the user makes a selection from the menu. |
saveLastSelection(); |
- if (RenderMenuList* menuList = toRenderMenuList(renderer())) |
- menuList->showPopup(); |
+ if (RenderMenuList* menuList = toRenderMenuList(renderer())) { |
+ if (!isDisabledOrReadOnly()) |
+ menuList->showPopup(); |
+ } |
handled = true; |
} |
} else if (renderTheme.popsMenuByArrowKeys()) { |
@@ -1166,8 +1170,10 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event) |
// gets called from RenderMenuList::valueChanged, which gets called |
// after the user makes a selection from the menu. |
saveLastSelection(); |
- if (RenderMenuList* menuList = toRenderMenuList(renderer())) |
- menuList->showPopup(); |
+ if (RenderMenuList* menuList = toRenderMenuList(renderer())) { |
+ if (!isDisabledOrReadOnly()) |
+ menuList->showPopup(); |
+ } |
handled = true; |
} else if (keyCode == '\r') { |
if (form()) |
@@ -1194,7 +1200,8 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event* event) |
// which gets called after the user makes a selection from |
// the menu. |
saveLastSelection(); |
- menuList->showPopup(); |
+ if (!isDisabledOrReadOnly()) |
+ menuList->showPopup(); |
} |
} |
} |