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

Side by Side Diff: Source/WebCore/html/RangeInputType.cpp

Issue 8336009: Merge 97351 - REGRESSION(r89915): <input type=email multiple> don't show the default value (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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 | « Source/WebCore/html/RangeInputType.h ('k') | Source/WebCore/html/TextFieldInputType.h » ('j') | 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 void RangeInputType::valueChanged() 287 void RangeInputType::valueChanged()
288 { 288 {
289 sliderThumbElementOf(element())->setPositionFromValue(); 289 sliderThumbElementOf(element())->setPositionFromValue();
290 } 290 }
291 291
292 String RangeInputType::fallbackValue() 292 String RangeInputType::fallbackValue()
293 { 293 {
294 return serializeForNumberType(StepRange(element()).defaultValue()); 294 return serializeForNumberType(StepRange(element()).defaultValue());
295 } 295 }
296 296
297 String RangeInputType::sanitizeValue(const String& proposedValue) 297 String RangeInputType::sanitizeValue(const String& proposedValue) const
298 { 298 {
299 // If the proposedValue is null than this is a reset scenario and we
300 // want the range input's value attribute to take priority over the
301 // calculated default (middle) value.
302 if (proposedValue.isNull())
303 return proposedValue;
304
305 return serializeForNumberType(StepRange(element()).clampValue(proposedValue) ); 299 return serializeForNumberType(StepRange(element()).clampValue(proposedValue) );
306 } 300 }
307 301
308 bool RangeInputType::shouldRespectListAttribute() 302 bool RangeInputType::shouldRespectListAttribute()
309 { 303 {
310 return true; 304 return true;
311 } 305 }
312 306
313 } // namespace WebCore 307 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/RangeInputType.h ('k') | Source/WebCore/html/TextFieldInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698