Changeset 91827 in webkit
- Timestamp:
- Jul 27, 2011 2:15:21 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r91826 r91827 1 2011-07-27 Shinya Kawanaka <shinyak@google.com> 2 3 Knob of a disabled or readonly range control should not be draggable. 4 https://bugs.webkit.org/show_bug.cgi?id=54820 5 6 Reviewed by Kent Tamura. 7 8 Added tests to confirm disabled or readonly range control is undraggable. 9 10 * fast/forms/range-drag-expected.txt: Added. 11 * fast/forms/range-drag.html: Added. 12 1 13 2011-07-27 Yuta Kitamura <yutak@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r91826 r91827 1 2011-07-27 Shinya Kawanaka <shinyak@google.com> 2 3 Knob of a disabled or readonly range control should not be draggable. 4 https://bugs.webkit.org/show_bug.cgi?id=54820 5 6 Reviewed by Kent Tamura. 7 8 Made disabled or readonly range control undraggable. 9 10 Test: fast/forms/range-drag.html 11 12 * html/RangeInputType.cpp: 13 (WebCore::RangeInputType::handleMouseDownEvent): 14 Added check that the element is readonly or disabled. 15 * html/shadow/SliderThumbElement.cpp: 16 (WebCore::SliderThumbElement::defaultEventHandler): ditto. 17 1 18 2011-07-27 Yuta Kitamura <yutak@chromium.org> 2 19 -
trunk/Source/WebCore/html/RangeInputType.cpp
r91333 r91827 154 154 void RangeInputType::handleMouseDownEvent(MouseEvent* event) 155 155 { 156 if (element()->disabled() || element()->readOnly()) 157 return; 158 156 159 Node* targetNode = event->target()->toNode(); 157 160 if (event->button() != LeftButton || !targetNode || (targetNode != element() && !targetNode->isDescendantOf(element()->shadowRoot()))) … … 167 170 if (element()->disabled() || element()->readOnly()) 168 171 return; 172 169 173 const String& key = event->keyIdentifier(); 170 174 -
trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp
r91574 r91827 271 271 } 272 272 273 // FIXME: Should handle this readonly/disabled check in more general way. 274 // Missing this kind of check is likely to occur elsewhere if adding it in each shadow element. 275 HTMLInputElement* input = hostInput(); 276 if (!input || input->isReadOnlyFormControl() || !input->isEnabledFormControl()) { 277 HTMLDivElement::defaultEventHandler(event); 278 return; 279 } 280 273 281 MouseEvent* mouseEvent = static_cast<MouseEvent*>(event); 274 282 bool isLeftButton = mouseEvent->button() == LeftButton; … … 375 383 376 384 } 377
Note: See TracChangeset
for help on using the changeset viewer.