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

Side by Side Diff: webkit/glue/editor_client_impl.cc

Issue 42198: Autocomplete should show even when text field is not empty (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The Mac interface forwards most of these commands to the application layer, 5 // The Mac interface forwards most of these commands to the application layer,
6 // and I'm not really sure what to do about most of them. 6 // and I'm not really sure what to do about most of them.
7 7
8 #include "config.h" 8 #include "config.h"
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 DCHECK(element->hasLocalName(WebCore::HTMLNames::inputTag)); 665 DCHECK(element->hasLocalName(WebCore::HTMLNames::inputTag));
666 Autofill(static_cast<WebCore::HTMLInputElement*>(element), false); 666 Autofill(static_cast<WebCore::HTMLInputElement*>(element), false);
667 } 667 }
668 668
669 void EditorClientImpl::ShowAutofillForNode(WebCore::Node* node) { 669 void EditorClientImpl::ShowAutofillForNode(WebCore::Node* node) {
670 if (node->nodeType() == WebCore::Node::ELEMENT_NODE) { 670 if (node->nodeType() == WebCore::Node::ELEMENT_NODE) {
671 WebCore::Element* element = static_cast<WebCore::Element*>(node); 671 WebCore::Element* element = static_cast<WebCore::Element*>(node);
672 if (element->hasLocalName(WebCore::HTMLNames::inputTag)) { 672 if (element->hasLocalName(WebCore::HTMLNames::inputTag)) {
673 WebCore::HTMLInputElement* input_element = 673 WebCore::HTMLInputElement* input_element =
674 static_cast<WebCore::HTMLInputElement*>(element); 674 static_cast<WebCore::HTMLInputElement*>(element);
675 if (input_element->value().isEmpty()) 675 Autofill(input_element, true);
676 Autofill(input_element, true);
677 } 676 }
678 } 677 }
679 } 678 }
680 679
681 void EditorClientImpl::Autofill(WebCore::HTMLInputElement* input_element, 680 void EditorClientImpl::Autofill(WebCore::HTMLInputElement* input_element,
682 bool autofill_on_empty_value) { 681 bool autofill_on_empty_value) {
683 // Cancel any pending DoAutofill calls. 682 // Cancel any pending DoAutofill calls.
684 autofill_factory_.RevokeAll(); 683 autofill_factory_.RevokeAll();
685 684
686 // Let's try to trigger autofill for that field, if applicable. 685 // Let's try to trigger autofill for that field, if applicable.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 } 911 }
913 return L"(UNKNOWN AFFINITY)"; 912 return L"(UNKNOWN AFFINITY)";
914 } 913 }
915 914
916 std::wstring EditorClientImpl::Describe(WebCore::CSSStyleDeclaration* style) { 915 std::wstring EditorClientImpl::Describe(WebCore::CSSStyleDeclaration* style) {
917 // TODO(pamg): Implement me. It's not clear what WebKit produces for this 916 // TODO(pamg): Implement me. It's not clear what WebKit produces for this
918 // (their [style description] method), and none of the layout tests provide 917 // (their [style description] method), and none of the layout tests provide
919 // an example. But because none of them use it, it's not yet important. 918 // an example. But because none of them use it, it's not yet important.
920 return std::wstring(); 919 return std::wstring();
921 } 920 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698