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

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

Issue 10783036: Merge 122224 - Input type=range issue with events not being raised when value set in js (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 startDragging(); 211 startDragging();
212 } 212 }
213 213
214 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) 214 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point)
215 { 215 {
216 HTMLInputElement* input = hostInput(); 216 HTMLInputElement* input = hostInput();
217 217
218 if (!input->renderer() || !renderer()) 218 if (!input->renderer() || !renderer())
219 return; 219 return;
220 220
221 input->setTextAsOfLastFormControlChangeEvent(input->value());
221 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p oint, false, true)); 222 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p oint, false, true));
222 bool isVertical = hasVerticalAppearance(input); 223 bool isVertical = hasVerticalAppearance(input);
223 LayoutUnit trackSize; 224 LayoutUnit trackSize;
224 LayoutUnit position; 225 LayoutUnit position;
225 LayoutUnit currentPosition; 226 LayoutUnit currentPosition;
226 // We need to calculate currentPosition from absolute points becaue the 227 // We need to calculate currentPosition from absolute points becaue the
227 // renderer for this node is usually on a layer and renderBox()->x() and 228 // renderer for this node is usually on a layer and renderBox()->x() and
228 // y() are unusable. 229 // y() are unusable.
229 // FIXME: This should probably respect transforms. 230 // FIXME: This should probably respect transforms.
230 LayoutPoint absoluteThumbOrigin = renderBox()->absoluteBoundingBoxRectIgnori ngTransforms().location(); 231 LayoutPoint absoluteThumbOrigin = renderBox()->absoluteBoundingBoxRectIgnori ngTransforms().location();
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 case MediaVolumeSliderThumbPart: 447 case MediaVolumeSliderThumbPart:
447 case MediaFullScreenVolumeSliderPart: 448 case MediaFullScreenVolumeSliderPart:
448 case MediaFullScreenVolumeSliderThumbPart: 449 case MediaFullScreenVolumeSliderThumbPart:
449 return mediaSliderContainer; 450 return mediaSliderContainer;
450 default: 451 default:
451 return sliderContainer; 452 return sliderContainer;
452 } 453 }
453 } 454 }
454 455
455 } 456 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/onchange-range-slider-expected.txt ('k') | Source/WebCore/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698