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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2285923002: Simplify handling of text input types in RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the glitch. Created 4 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
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/public/web/WebTextInputType.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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 if (type == InputTypeNames::search) 680 if (type == InputTypeNames::search)
681 return WebTextInputTypeSearch; 681 return WebTextInputTypeSearch;
682 if (type == InputTypeNames::email) 682 if (type == InputTypeNames::email)
683 return WebTextInputTypeEmail; 683 return WebTextInputTypeEmail;
684 if (type == InputTypeNames::number) 684 if (type == InputTypeNames::number)
685 return WebTextInputTypeNumber; 685 return WebTextInputTypeNumber;
686 if (type == InputTypeNames::tel) 686 if (type == InputTypeNames::tel)
687 return WebTextInputTypeTelephone; 687 return WebTextInputTypeTelephone;
688 if (type == InputTypeNames::url) 688 if (type == InputTypeNames::url)
689 return WebTextInputTypeURL; 689 return WebTextInputTypeURL;
690 if (type == InputTypeNames::date)
691 return WebTextInputTypeDate;
692 if (type == InputTypeNames::datetime_local)
693 return WebTextInputTypeDateTimeLocal;
694 if (type == InputTypeNames::month)
695 return WebTextInputTypeMonth;
696 if (type == InputTypeNames::time)
697 return WebTextInputTypeTime;
698 if (type == InputTypeNames::week)
699 return WebTextInputTypeWeek;
700 if (type == InputTypeNames::text) 690 if (type == InputTypeNames::text)
701 return WebTextInputTypeText; 691 return WebTextInputTypeText;
702 692
703 return WebTextInputTypeNone; 693 return WebTextInputTypeNone;
704 } 694 }
705 695
706 if (isHTMLTextAreaElement(*element)) { 696 if (isHTMLTextAreaElement(*element)) {
707 if (toHTMLTextAreaElement(*element).isDisabledOrReadOnly()) 697 if (toHTMLTextAreaElement(*element).isDisabledOrReadOnly())
708 return WebTextInputTypeNone; 698 return WebTextInputTypeNone;
709 return WebTextInputTypeTextArea; 699 return WebTextInputTypeTextArea;
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 } 1447 }
1458 1448
1459 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const 1449 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const
1460 { 1450 {
1461 if (!m_imeAcceptEvents) 1451 if (!m_imeAcceptEvents)
1462 return nullptr; 1452 return nullptr;
1463 return focusedLocalFrameInWidget(); 1453 return focusedLocalFrameInWidget();
1464 } 1454 }
1465 1455
1466 } // namespace blink 1456 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | third_party/WebKit/public/web/WebTextInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698