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

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: Update of change event for range input type Created 6 years, 11 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
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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 String valueString = serializeForNumberType(value); 300 String valueString = serializeForNumberType(value);
301 if (valueString == input->value()) 301 if (valueString == input->value())
302 return; 302 return;
303 303
304 // FIXME: This is no longer being set from renderer. Consider updating the m ethod name. 304 // FIXME: This is no longer being set from renderer. Consider updating the m ethod name.
305 input->setValueFromRenderer(valueString); 305 input->setValueFromRenderer(valueString);
306 if (renderer()) 306 if (renderer())
307 renderer()->setNeedsLayout(); 307 renderer()->setNeedsLayout();
308 input->dispatchFormControlChangeEvent();
309 } 308 }
310 309
311 void SliderThumbElement::startDragging() 310 void SliderThumbElement::startDragging()
312 { 311 {
313 if (Frame* frame = document().frame()) { 312 if (Frame* frame = document().frame()) {
314 frame->eventHandler().setCapturingMouseEventsNode(this); 313 frame->eventHandler().setCapturingMouseEventsNode(this);
315 m_inDragMode = true; 314 m_inDragMode = true;
316 } 315 }
317 } 316 }
318 317
319 void SliderThumbElement::stopDragging() 318 void SliderThumbElement::stopDragging()
320 { 319 {
321 if (!m_inDragMode) 320 if (!m_inDragMode)
322 return; 321 return;
323 322
324 if (Frame* frame = document().frame()) 323 if (Frame* frame = document().frame())
325 frame->eventHandler().setCapturingMouseEventsNode(0); 324 frame->eventHandler().setCapturingMouseEventsNode(0);
326 m_inDragMode = false; 325 m_inDragMode = false;
327 if (renderer()) 326 if (renderer())
328 renderer()->setNeedsLayout(); 327 renderer()->setNeedsLayout();
328 hostInput()->dispatchFormControlChangeEvent();
329 } 329 }
330 330
331 void SliderThumbElement::defaultEventHandler(Event* event) 331 void SliderThumbElement::defaultEventHandler(Event* event)
332 { 332 {
333 if (!event->isMouseEvent()) { 333 if (!event->isMouseEvent()) {
334 HTMLDivElement::defaultEventHandler(event); 334 HTMLDivElement::defaultEventHandler(event);
335 return; 335 return;
336 } 336 }
337 337
338 // FIXME: Should handle this readonly/disabled check in more general way. 338 // 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: 465 case MediaVolumeSliderThumbPart:
466 case MediaFullScreenVolumeSliderPart: 466 case MediaFullScreenVolumeSliderPart:
467 case MediaFullScreenVolumeSliderThumbPart: 467 case MediaFullScreenVolumeSliderThumbPart:
468 return mediaSliderContainer; 468 return mediaSliderContainer;
469 default: 469 default:
470 return sliderContainer; 470 return sliderContainer;
471 } 471 }
472 } 472 }
473 473
474 } 474 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698