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

Side by Side Diff: Source/WebCore/html/TextFieldInputType.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/TextFieldInputType.h ('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) 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 for (unsigned i = 0; i < newLength; ++i) { 266 for (unsigned i = 0; i < newLength; ++i) {
267 const UChar current = string[i]; 267 const UChar current = string[i];
268 if (current < ' ' && current != '\t') { 268 if (current < ' ' && current != '\t') {
269 newLength = i; 269 newLength = i;
270 break; 270 break;
271 } 271 }
272 } 272 }
273 return string.left(newLength); 273 return string.left(newLength);
274 } 274 }
275 275
276 String TextFieldInputType::sanitizeValue(const String& proposedValue) 276 String TextFieldInputType::sanitizeValue(const String& proposedValue) const
277 { 277 {
278 #if ENABLE(WCSS) 278 #if ENABLE(WCSS)
279 if (!element()->isConformToInputMask(proposedValue)) { 279 if (!element()->isConformToInputMask(proposedValue)) {
280 if (isConformToInputMask(element()->value())) 280 if (isConformToInputMask(element()->value()))
281 return element->value(); 281 return element->value();
282 return String(); 282 return String();
283 } 283 }
284 #endif 284 #endif
285 return limitLength(proposedValue.removeCharacters(isASCIILineBreak), HTMLInp utElement::maximumLength); 285 return limitLength(proposedValue.removeCharacters(isASCIILineBreak), HTMLInp utElement::maximumLength);
286 } 286 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 m_placeholder = HTMLDivElement::create(element()->document()); 352 m_placeholder = HTMLDivElement::create(element()->document());
353 m_placeholder->setShadowPseudoId("-webkit-input-placeholder"); 353 m_placeholder->setShadowPseudoId("-webkit-input-placeholder");
354 element()->shadowRoot()->insertBefore(m_placeholder, m_container ? m_con tainer->nextSibling() : innerTextElement()->nextSibling(), ec); 354 element()->shadowRoot()->insertBefore(m_placeholder, m_container ? m_con tainer->nextSibling() : innerTextElement()->nextSibling(), ec);
355 ASSERT(!ec); 355 ASSERT(!ec);
356 } 356 }
357 m_placeholder->setInnerText(placeholderText, ec); 357 m_placeholder->setInnerText(placeholderText, ec);
358 ASSERT(!ec); 358 ASSERT(!ec);
359 } 359 }
360 360
361 } // namespace WebCore 361 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/TextFieldInputType.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698