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

Side by Side Diff: Source/core/html/forms/TextFieldInputType.cpp

Issue 408883003: Remove shouldUseInputMethod (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove shouldUseInputMethod completely Created 6 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
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.h ('k') | Source/web/WebViewImpl.cpp » ('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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 { 373 {
374 if (SpinButtonElement* spinButton = spinButtonElement()) 374 if (SpinButtonElement* spinButton = spinButtonElement())
375 spinButton->releaseCapture(); 375 spinButton->releaseCapture();
376 } 376 }
377 377
378 bool TextFieldInputType::supportsReadOnly() const 378 bool TextFieldInputType::supportsReadOnly() const
379 { 379 {
380 return true; 380 return true;
381 } 381 }
382 382
383 bool TextFieldInputType::shouldUseInputMethod() const
384 {
385 return true;
386 }
387
388 static bool isASCIILineBreak(UChar c) 383 static bool isASCIILineBreak(UChar c)
389 { 384 {
390 return c == '\r' || c == '\n'; 385 return c == '\r' || c == '\n';
391 } 386 }
392 387
393 static String limitLength(const String& string, unsigned maxLength) 388 static String limitLength(const String& string, unsigned maxLength)
394 { 389 {
395 unsigned newLength = std::min(maxLength, string.length()); 390 unsigned newLength = std::min(maxLength, string.length());
396 if (newLength == string.length()) 391 if (newLength == string.length())
397 return string; 392 return string;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 return shouldSpinButtonRespondToMouseEvents() && element().focused(); 549 return shouldSpinButtonRespondToMouseEvents() && element().focused();
555 } 550 }
556 551
557 void TextFieldInputType::spinButtonDidReleaseMouseCapture(SpinButtonElement::Eve ntDispatch eventDispatch) 552 void TextFieldInputType::spinButtonDidReleaseMouseCapture(SpinButtonElement::Eve ntDispatch eventDispatch)
558 { 553 {
559 if (eventDispatch == SpinButtonElement::EventDispatchAllowed) 554 if (eventDispatch == SpinButtonElement::EventDispatchAllowed)
560 element().dispatchFormControlChangeEvent(); 555 element().dispatchFormControlChangeEvent();
561 } 556 }
562 557
563 } // namespace blink 558 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/forms/TextFieldInputType.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698