| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |