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

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 133443011: Add text field change handling for autofill preview in textarea element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update documentation as per tkent's review comments Created 6 years, 9 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/web/ChromeClientImpl.h ('k') | Source/web/WebFormControlElement.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 896
897 webFrame->client()->forwardInputEvent(&webEvent); 897 webFrame->client()->forwardInputEvent(&webEvent);
898 } else if (event->isWheelEvent()) { 898 } else if (event->isWheelEvent()) {
899 WebMouseWheelEventBuilder webEvent(webFrame->frameView(), document->rend erer(), *static_cast<WebCore::WheelEvent*>(event)); 899 WebMouseWheelEventBuilder webEvent(webFrame->frameView(), document->rend erer(), *static_cast<WebCore::WheelEvent*>(event));
900 if (webEvent.type == WebInputEvent::Undefined) 900 if (webEvent.type == WebInputEvent::Undefined)
901 return; 901 return;
902 webFrame->client()->forwardInputEvent(&webEvent); 902 webFrame->client()->forwardInputEvent(&webEvent);
903 } 903 }
904 } 904 }
905 905
906 // FIXME: This function is to be removed once both chromium and blink changes
907 // for BUG332557 are in.
906 void ChromeClientImpl::didChangeValueInTextField(HTMLInputElement& inputElement) 908 void ChromeClientImpl::didChangeValueInTextField(HTMLInputElement& inputElement)
907 { 909 {
908 if (!m_webView->autofillClient()) 910 if (!m_webView->autofillClient())
909 return; 911 return;
910 m_webView->autofillClient()->textFieldDidChange(WebInputElement(&inputElemen t)); 912 m_webView->autofillClient()->textFieldDidChange(WebInputElement(&inputElemen t));
911 } 913 }
912 914
915 void ChromeClientImpl::didChangeValueInTextField(HTMLFormControlElement& element )
916 {
917 if (!m_webView->autofillClient())
918 return;
919 m_webView->autofillClient()->textFieldDidChange(WebFormControlElement(&eleme nt));
920 }
921
913 void ChromeClientImpl::didEndEditingOnTextField(HTMLInputElement& inputElement) 922 void ChromeClientImpl::didEndEditingOnTextField(HTMLInputElement& inputElement)
914 { 923 {
915 if (m_webView->autofillClient()) 924 if (m_webView->autofillClient())
916 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp utElement)); 925 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp utElement));
917 } 926 }
918 927
919 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) 928 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input)
920 { 929 {
921 if (m_webView->autofillClient()) 930 if (m_webView->autofillClient())
922 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in put)); 931 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in put));
(...skipping 18 matching lines...) Expand all
941 { 950 {
942 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); 951 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url));
943 } 952 }
944 953
945 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) 954 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url)
946 { 955 {
947 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); 956 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url);
948 } 957 }
949 958
950 } // namespace blink 959 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/WebFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698