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

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

Issue 23851005: Change event isn't firing when the user reverts the value of a color/date/time input after JS cha… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updated test expectation Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point) 251 void SliderThumbElement::setPositionFromPoint(const LayoutPoint& point)
252 { 252 {
253 RefPtr<HTMLInputElement> input(hostInput()); 253 RefPtr<HTMLInputElement> input(hostInput());
254 Element* trackElement = input->userAgentShadowRoot()->getElementById(ShadowE lementNames::sliderTrack()); 254 Element* trackElement = input->userAgentShadowRoot()->getElementById(ShadowE lementNames::sliderTrack());
255 255
256 if (!input->renderer() || !renderBox() || !trackElement->renderBox()) 256 if (!input->renderer() || !renderBox() || !trackElement->renderBox())
257 return; 257 return;
258 258
259 input->setTextAsOfLastFormControlChangeEvent(input->value());
260 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p oint, UseTransforms)); 259 LayoutPoint offset = roundedLayoutPoint(input->renderer()->absoluteToLocal(p oint, UseTransforms));
261 bool isVertical = hasVerticalAppearance(input.get()); 260 bool isVertical = hasVerticalAppearance(input.get());
262 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection() ; 261 bool isLeftToRightDirection = renderBox()->style()->isLeftToRightDirection() ;
263 LayoutUnit trackSize; 262 LayoutUnit trackSize;
264 LayoutUnit position; 263 LayoutUnit position;
265 LayoutUnit currentPosition; 264 LayoutUnit currentPosition;
266 // We need to calculate currentPosition from absolute points becaue the 265 // We need to calculate currentPosition from absolute points becaue the
267 // renderer for this node is usually on a layer and renderBox()->x() and 266 // renderer for this node is usually on a layer and renderBox()->x() and
268 // y() are unusable. 267 // y() are unusable.
269 // FIXME: This should probably respect transforms. 268 // FIXME: This should probably respect transforms.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 case MediaVolumeSliderThumbPart: 466 case MediaVolumeSliderThumbPart:
468 case MediaFullScreenVolumeSliderPart: 467 case MediaFullScreenVolumeSliderPart:
469 case MediaFullScreenVolumeSliderThumbPart: 468 case MediaFullScreenVolumeSliderThumbPart:
470 return mediaSliderContainer; 469 return mediaSliderContainer;
471 default: 470 default:
472 return sliderContainer; 471 return sliderContainer;
473 } 472 }
474 } 473 }
475 474
476 } 475 }
OLDNEW
« no previous file with comments | « Source/core/html/TextFieldInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698