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

Side by Side Diff: Source/core/html/shadow/SliderThumbElement.cpp

Issue 125973004: Update of change event for range input type (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: OnChange to also trigger OnInput event 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/forms/range/slider-onchange-event-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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 317
318 void SliderThumbElement::stopDragging() 318 void SliderThumbElement::stopDragging()
319 { 319 {
320 if (!m_inDragMode) 320 if (!m_inDragMode)
321 return; 321 return;
322 322
323 if (Frame* frame = document().frame()) 323 if (Frame* frame = document().frame())
324 frame->eventHandler().setCapturingMouseEventsNode(0); 324 frame->eventHandler().setCapturingMouseEventsNode(0);
325 m_inDragMode = false; 325 m_inDragMode = false;
326
327 // Dispatch both change and input event when drag is stopped
328 hostInput()->dispatchFormControlInputEvent();
329 hostInput()->dispatchFormControlChangeEvent();
330
326 if (renderer()) 331 if (renderer())
327 renderer()->setNeedsLayout(); 332 renderer()->setNeedsLayout();
328 hostInput()->dispatchFormControlChangeEvent();
329 } 333 }
330 334
331 void SliderThumbElement::defaultEventHandler(Event* event) 335 void SliderThumbElement::defaultEventHandler(Event* event)
332 { 336 {
333 if (!event->isMouseEvent()) { 337 if (!event->isMouseEvent()) {
334 HTMLDivElement::defaultEventHandler(event); 338 HTMLDivElement::defaultEventHandler(event);
335 return; 339 return;
336 } 340 }
337 341
338 // FIXME: Should handle this readonly/disabled check in more general way. 342 // FIXME: Should handle this readonly/disabled check in more general way.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 case MediaVolumeSliderThumbPart: 469 case MediaVolumeSliderThumbPart:
466 case MediaFullScreenVolumeSliderPart: 470 case MediaFullScreenVolumeSliderPart:
467 case MediaFullScreenVolumeSliderThumbPart: 471 case MediaFullScreenVolumeSliderThumbPart:
468 return mediaSliderContainer; 472 return mediaSliderContainer;
469 default: 473 default:
470 return sliderContainer; 474 return sliderContainer;
471 } 475 }
472 } 476 }
473 477
474 } 478 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/range/slider-onchange-event-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698