Changeset 91004 in webkit


Ignore:
Timestamp:
Jul 14, 2011 9:42:50 AM (13 years ago)
Author:
isherman@chromium.org
Message:

Rename AutoFill -> Autofill and autoFill -> autofill
https://bugs.webkit.org/show_bug.cgi?id=64333
http://code.google.com/p/chromium/issues/detail?id=72758

Reviewed by Darin Fisher.

  • WebKit.gyp:
  • public/WebAutofillClient.h:

(WebKit::WebAutofillClient::didAcceptAutofillSuggestion):
(WebKit::WebAutofillClient::didSelectAutofillSuggestion):
(WebKit::WebAutofillClient::didClearAutofillSelection):
(WebKit::WebAutofillClient::removeAutocompleteSuggestion):
(WebKit::WebAutofillClient::textFieldDidBeginEditing):
(WebKit::WebAutofillClient::textFieldDidEndEditing):
(WebKit::WebAutofillClient::textFieldDidChange):
(WebKit::WebAutofillClient::textFieldDidReceiveKeyDown):
(WebKit::WebAutofillClient::~WebAutofillClient):

  • public/WebNode.h:
  • public/WebView.h:
  • src/AutofillPopupMenuClient.cpp:

(WebKit::AutofillPopupMenuClient::AutofillPopupMenuClient):
(WebKit::AutofillPopupMenuClient::~AutofillPopupMenuClient):
(WebKit::AutofillPopupMenuClient::getSuggestionsCount):
(WebKit::AutofillPopupMenuClient::getSuggestion):
(WebKit::AutofillPopupMenuClient::getLabel):
(WebKit::AutofillPopupMenuClient::getIcon):
(WebKit::AutofillPopupMenuClient::removeSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::canRemoveSuggestionAtIndex):
(WebKit::AutofillPopupMenuClient::valueChanged):
(WebKit::AutofillPopupMenuClient::selectionChanged):
(WebKit::AutofillPopupMenuClient::selectionCleared):
(WebKit::AutofillPopupMenuClient::itemText):
(WebKit::AutofillPopupMenuClient::itemLabel):
(WebKit::AutofillPopupMenuClient::itemIcon):
(WebKit::AutofillPopupMenuClient::itemIsEnabled):
(WebKit::AutofillPopupMenuClient::itemStyle):
(WebKit::AutofillPopupMenuClient::menuStyle):
(WebKit::AutofillPopupMenuClient::clientPaddingLeft):
(WebKit::AutofillPopupMenuClient::clientPaddingRight):
(WebKit::AutofillPopupMenuClient::popupDidHide):
(WebKit::AutofillPopupMenuClient::itemIsSeparator):
(WebKit::AutofillPopupMenuClient::itemIsWarning):
(WebKit::AutofillPopupMenuClient::setTextFromItem):
(WebKit::AutofillPopupMenuClient::fontSelector):
(WebKit::AutofillPopupMenuClient::hostWindow):
(WebKit::AutofillPopupMenuClient::createScrollbar):
(WebKit::AutofillPopupMenuClient::initialize):
(WebKit::AutofillPopupMenuClient::setSuggestions):
(WebKit::AutofillPopupMenuClient::convertListIndexToInternalIndex):
(WebKit::AutofillPopupMenuClient::getWebView):
(WebKit::AutofillPopupMenuClient::textFieldStyle):

  • src/AutofillPopupMenuClient.h:

(WebKit::AutofillPopupMenuClient::itemToolTip):
(WebKit::AutofillPopupMenuClient::itemAccessibilityText):
(WebKit::AutofillPopupMenuClient::clientInsetLeft):
(WebKit::AutofillPopupMenuClient::clientInsetRight):
(WebKit::AutofillPopupMenuClient::listSize):
(WebKit::AutofillPopupMenuClient::selectedIndex):
(WebKit::AutofillPopupMenuClient::itemIsLabel):
(WebKit::AutofillPopupMenuClient::itemIsSelected):
(WebKit::AutofillPopupMenuClient::shouldPopOver):
(WebKit::AutofillPopupMenuClient::valueShouldChangeOnHotTrack):
(WebKit::AutofillPopupMenuClient::getTextField):
(WebKit::AutofillPopupMenuClient::getSelectedIndex):
(WebKit::AutofillPopupMenuClient::setSelectedIndex):

  • src/EditorClientImpl.cpp:

(WebKit::EditorClientImpl::textFieldDidBeginEditing):
(WebKit::EditorClientImpl::textFieldDidEndEditing):
(WebKit::EditorClientImpl::textDidChangeInTextField):
(WebKit::EditorClientImpl::doAutofill):
(WebKit::EditorClientImpl::doTextFieldCommandFromEvent):

  • src/WebInputElement.cpp:

(WebKit::WebInputElement::setAutofilled):

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::setAutofillClient):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::mouseDown):
(WebKit::WebViewImpl::autocompleteHandleKeyEvent):
(WebKit::WebViewImpl::hideAutofillPopup):
(WebKit::WebViewImpl::setFocus):
(WebKit::WebViewImpl::applyAutofillSuggestions):
(WebKit::WebViewImpl::hidePopups):
(WebKit::WebViewImpl::refreshAutofillPopup):

  • src/WebViewImpl.h:

(WebKit::WebViewImpl::autofillClient):
(WebKit::WebViewImpl::autofillPopupDidHide):

Location:
trunk/Source/WebKit/chromium
Files:
8 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r90999 r91004  
     12011-07-14  Ilya Sherman  <isherman@chromium.org>
     2
     3        Rename AutoFill -> Autofill and autoFill -> autofill
     4        https://bugs.webkit.org/show_bug.cgi?id=64333
     5        http://code.google.com/p/chromium/issues/detail?id=72758
     6
     7        Reviewed by Darin Fisher.
     8
     9        * WebKit.gyp:
     10        * public/WebAutofillClient.h:
     11        (WebKit::WebAutofillClient::didAcceptAutofillSuggestion):
     12        (WebKit::WebAutofillClient::didSelectAutofillSuggestion):
     13        (WebKit::WebAutofillClient::didClearAutofillSelection):
     14        (WebKit::WebAutofillClient::removeAutocompleteSuggestion):
     15        (WebKit::WebAutofillClient::textFieldDidBeginEditing):
     16        (WebKit::WebAutofillClient::textFieldDidEndEditing):
     17        (WebKit::WebAutofillClient::textFieldDidChange):
     18        (WebKit::WebAutofillClient::textFieldDidReceiveKeyDown):
     19        (WebKit::WebAutofillClient::~WebAutofillClient):
     20        * public/WebNode.h:
     21        * public/WebView.h:
     22        * src/AutofillPopupMenuClient.cpp:
     23        (WebKit::AutofillPopupMenuClient::AutofillPopupMenuClient):
     24        (WebKit::AutofillPopupMenuClient::~AutofillPopupMenuClient):
     25        (WebKit::AutofillPopupMenuClient::getSuggestionsCount):
     26        (WebKit::AutofillPopupMenuClient::getSuggestion):
     27        (WebKit::AutofillPopupMenuClient::getLabel):
     28        (WebKit::AutofillPopupMenuClient::getIcon):
     29        (WebKit::AutofillPopupMenuClient::removeSuggestionAtIndex):
     30        (WebKit::AutofillPopupMenuClient::canRemoveSuggestionAtIndex):
     31        (WebKit::AutofillPopupMenuClient::valueChanged):
     32        (WebKit::AutofillPopupMenuClient::selectionChanged):
     33        (WebKit::AutofillPopupMenuClient::selectionCleared):
     34        (WebKit::AutofillPopupMenuClient::itemText):
     35        (WebKit::AutofillPopupMenuClient::itemLabel):
     36        (WebKit::AutofillPopupMenuClient::itemIcon):
     37        (WebKit::AutofillPopupMenuClient::itemIsEnabled):
     38        (WebKit::AutofillPopupMenuClient::itemStyle):
     39        (WebKit::AutofillPopupMenuClient::menuStyle):
     40        (WebKit::AutofillPopupMenuClient::clientPaddingLeft):
     41        (WebKit::AutofillPopupMenuClient::clientPaddingRight):
     42        (WebKit::AutofillPopupMenuClient::popupDidHide):
     43        (WebKit::AutofillPopupMenuClient::itemIsSeparator):
     44        (WebKit::AutofillPopupMenuClient::itemIsWarning):
     45        (WebKit::AutofillPopupMenuClient::setTextFromItem):
     46        (WebKit::AutofillPopupMenuClient::fontSelector):
     47        (WebKit::AutofillPopupMenuClient::hostWindow):
     48        (WebKit::AutofillPopupMenuClient::createScrollbar):
     49        (WebKit::AutofillPopupMenuClient::initialize):
     50        (WebKit::AutofillPopupMenuClient::setSuggestions):
     51        (WebKit::AutofillPopupMenuClient::convertListIndexToInternalIndex):
     52        (WebKit::AutofillPopupMenuClient::getWebView):
     53        (WebKit::AutofillPopupMenuClient::textFieldStyle):
     54        * src/AutofillPopupMenuClient.h:
     55        (WebKit::AutofillPopupMenuClient::itemToolTip):
     56        (WebKit::AutofillPopupMenuClient::itemAccessibilityText):
     57        (WebKit::AutofillPopupMenuClient::clientInsetLeft):
     58        (WebKit::AutofillPopupMenuClient::clientInsetRight):
     59        (WebKit::AutofillPopupMenuClient::listSize):
     60        (WebKit::AutofillPopupMenuClient::selectedIndex):
     61        (WebKit::AutofillPopupMenuClient::itemIsLabel):
     62        (WebKit::AutofillPopupMenuClient::itemIsSelected):
     63        (WebKit::AutofillPopupMenuClient::shouldPopOver):
     64        (WebKit::AutofillPopupMenuClient::valueShouldChangeOnHotTrack):
     65        (WebKit::AutofillPopupMenuClient::getTextField):
     66        (WebKit::AutofillPopupMenuClient::getSelectedIndex):
     67        (WebKit::AutofillPopupMenuClient::setSelectedIndex):
     68        * src/EditorClientImpl.cpp:
     69        (WebKit::EditorClientImpl::textFieldDidBeginEditing):
     70        (WebKit::EditorClientImpl::textFieldDidEndEditing):
     71        (WebKit::EditorClientImpl::textDidChangeInTextField):
     72        (WebKit::EditorClientImpl::doAutofill):
     73        (WebKit::EditorClientImpl::doTextFieldCommandFromEvent):
     74        * src/WebInputElement.cpp:
     75        (WebKit::WebInputElement::setAutofilled):
     76        * src/WebViewImpl.cpp:
     77        (WebKit::WebViewImpl::setAutofillClient):
     78        (WebKit::WebViewImpl::WebViewImpl):
     79        (WebKit::WebViewImpl::mouseDown):
     80        (WebKit::WebViewImpl::autocompleteHandleKeyEvent):
     81        (WebKit::WebViewImpl::hideAutofillPopup):
     82        (WebKit::WebViewImpl::setFocus):
     83        (WebKit::WebViewImpl::applyAutofillSuggestions):
     84        (WebKit::WebViewImpl::hidePopups):
     85        (WebKit::WebViewImpl::refreshAutofillPopup):
     86        * src/WebViewImpl.h:
     87        (WebKit::WebViewImpl::autofillClient):
     88        (WebKit::WebViewImpl::autofillPopupDidHide):
     89
    1902011-07-14  Yury Semikhatsky  <yurys@chromium.org>
    291
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r90836 r91004  
    108108                'public/WebAudioBus.h',
    109109                'public/WebAudioDevice.h',
    110                 'public/WebAutoFillClient.h',
     110                'public/WebAutofillClient.h',
    111111                'public/WebBindings.h',
    112112                'public/WebBlobData.h',
     
    311311                'src/AudioDestinationChromium.cpp',
    312312                'src/AudioDestinationChromium.h',
    313                 'src/AutoFillPopupMenuClient.cpp',
    314                 'src/AutoFillPopupMenuClient.h',
     313                'src/AutofillPopupMenuClient.cpp',
     314                'src/AutofillPopupMenuClient.h',
    315315                'src/BackForwardListChromium.cpp',
    316316                'src/BackForwardListChromium.h',
  • trunk/Source/WebKit/chromium/public/WebAutofillClient.h

    r91003 r91004  
    2929 */
    3030
    31 #ifndef WebAutoFillClient_h
    32 #define WebAutoFillClient_h
     31#ifndef WebAutofillClient_h
     32#define WebAutofillClient_h
    3333
    3434namespace WebKit {
     
    3939class WebString;
    4040
    41 class WebAutoFillClient {
     41class WebAutofillClient {
    4242public:
    43     // Informs the browser that the user has accepted an AutoFill suggestion for
    44     // a WebNode.  |uniqueID| is used as a key into the set of AutoFill profiles,
     43    // Informs the browser that the user has accepted an Autofill suggestion for
     44    // a WebNode.  |uniqueID| is used as a key into the set of Autofill profiles,
    4545    // and should never be negative.  If it is 0, then the suggestion is an
    4646    // Autocomplete suggestion; and |value| stores the suggested text.  |index|
    4747    // is an index of the selected suggestion in the list of suggestions provided
    4848    // by the client.
    49     virtual void didAcceptAutoFillSuggestion(const WebNode&,
     49    virtual void didAcceptAutofillSuggestion(const WebNode&,
    5050                                             const WebString& value,
    5151                                             const WebString& label,
     
    5353                                             unsigned index) { }
    5454
    55     // Informs the browser that the user has selected an AutoFill suggestion for
     55    // Informs the browser that the user has selected an Autofill suggestion for
    5656    // a WebNode.  This happens when the user hovers over a suggestion or uses
    5757    // the arrow keys to navigate to a suggestion.
    58     virtual void didSelectAutoFillSuggestion(const WebNode&,
     58    virtual void didSelectAutofillSuggestion(const WebNode&,
    5959                                             const WebString& name,
    6060                                             const WebString& label,
     
    6262
    6363    // Informs the browser that the user has cleared the selection from the
    64     // AutoFill suggestions popup. This happens when a user uses the arrow
     64    // Autofill suggestions popup. This happens when a user uses the arrow
    6565    // keys to navigate outside the range of possible selections.
    66     virtual void didClearAutoFillSelection(const WebNode&) { }
     66    virtual void didClearAutofillSelection(const WebNode&) { }
    6767
    6868    // Instructs the browser to remove the Autocomplete entry specified from
     
    7878
    7979protected:
    80     ~WebAutoFillClient() { }
     80    ~WebAutofillClient() { }
    8181};
    8282
  • trunk/Source/WebKit/chromium/public/WebNode.h

    r84520 r91004  
    3535#include "WebPrivatePtr.h"
    3636#include "WebString.h"
     37
     38// TODO(isherman): Remove this once the Chromium side is updated.
     39#define CRBUG_72758_FIXED
    3740
    3841namespace WebCore { class Node; }
  • trunk/Source/WebKit/chromium/public/WebView.h

    r86047 r91004  
    4141
    4242class WebAccessibilityObject;
    43 class WebAutoFillClient;
     43class WebAutofillClient;
    4444class WebDevToolsAgent;
    4545class WebDevToolsAgentClient;
     
    9696
    9797    // Initializes the various client interfaces.
    98     virtual void setAutoFillClient(WebAutoFillClient*) = 0;
     98    virtual void setAutofillClient(WebAutofillClient*) = 0;
    9999    virtual void setDevToolsAgentClient(WebDevToolsAgentClient*) = 0;
    100100    virtual void setPermissionClient(WebPermissionClient*) = 0;
     
    278278
    279279
    280     // AutoFill  -----------------------------------------------------------
    281 
    282     // Notifies the WebView that AutoFill suggestions are available for a node.
     280    // Autofill  -----------------------------------------------------------
     281
     282    // Notifies the WebView that Autofill suggestions are available for a node.
    283283    // |uniqueIDs| is a vector of IDs that represent the unique ID of each
    284     // AutoFill profile in the suggestions popup. If a unique ID is 0, then the
    285     // corresponding suggestion comes from Autocomplete rather than AutoFill.
     284    // Autofill profile in the suggestions popup. If a unique ID is 0, then the
     285    // corresponding suggestion comes from Autocomplete rather than Autofill.
    286286    // If a unique ID is negative, then the corresponding "suggestion" is
    287     // actually a user-facing warning, e.g. explaining why AutoFill is
     287    // actually a user-facing warning, e.g. explaining why Autofill is
    288288    // unavailable for the current form.
    289     virtual void applyAutoFillSuggestions(
     289    virtual void applyAutofillSuggestions(
    290290        const WebNode&,
    291291        const WebVector<WebString>& names,
  • trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.cpp

    r91003 r91004  
    11/*
    2  * Copyright (C) 2010 Google Inc. All rights reserved.
     2 * Copyright (C) 2011 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3030
    3131#include "config.h"
    32 #include "AutoFillPopupMenuClient.h"
     32#include "AutofillPopupMenuClient.h"
    3333
    3434#include "CSSFontSelector.h"
     
    4141#include "Page.h"
    4242#include "RenderTheme.h"
    43 #include "WebAutoFillClient.h"
     43#include "WebAutofillClient.h"
    4444#include "WebNode.h"
    4545#include "WebString.h"
     
    5252namespace WebKit {
    5353
    54 AutoFillPopupMenuClient::AutoFillPopupMenuClient()
     54AutofillPopupMenuClient::AutofillPopupMenuClient()
    5555    : m_separatorIndex(-1)
    5656    , m_selectedIndex(-1)
     
    5959}
    6060
    61 AutoFillPopupMenuClient::~AutoFillPopupMenuClient()
    62 {
    63 }
    64 
    65 unsigned AutoFillPopupMenuClient::getSuggestionsCount() const
     61AutofillPopupMenuClient::~AutofillPopupMenuClient()
     62{
     63}
     64
     65unsigned AutofillPopupMenuClient::getSuggestionsCount() const
    6666{
    6767    return m_names.size() + ((m_separatorIndex == -1) ? 0 : 1);
    6868}
    6969
    70 WebString AutoFillPopupMenuClient::getSuggestion(unsigned listIndex) const
     70WebString AutofillPopupMenuClient::getSuggestion(unsigned listIndex) const
    7171{
    7272    int index = convertListIndexToInternalIndex(listIndex);
     
    7878}
    7979
    80 WebString AutoFillPopupMenuClient::getLabel(unsigned listIndex) const
     80WebString AutofillPopupMenuClient::getLabel(unsigned listIndex) const
    8181{
    8282    int index = convertListIndexToInternalIndex(listIndex);
     
    8888}
    8989
    90 WebString AutoFillPopupMenuClient::getIcon(unsigned listIndex) const
     90WebString AutofillPopupMenuClient::getIcon(unsigned listIndex) const
    9191{
    9292    int index = convertListIndexToInternalIndex(listIndex);
     
    9898}
    9999
    100 void AutoFillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
     100void AutofillPopupMenuClient::removeSuggestionAtIndex(unsigned listIndex)
    101101{
    102102    if (!canRemoveSuggestionAtIndex(listIndex))
     
    117117}
    118118
    119 bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
     119bool AutofillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
    120120{
    121121    // Only allow deletion of items before the separator that have unique id 0
     
    125125}
    126126
    127 void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
     127void AutofillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
    128128{
    129129    WebViewImpl* webView = getWebView();
     
    136136    ASSERT(listIndex < m_names.size());
    137137
    138     webView->autoFillClient()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
     138    webView->autofillClient()->didAcceptAutofillSuggestion(WebNode(getTextField()),
    139139                                                           m_names[listIndex],
    140140                                                           m_labels[listIndex],
     
    143143}
    144144
    145 void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
     145void AutofillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
    146146{
    147147    WebViewImpl* webView = getWebView();
     
    154154    ASSERT(listIndex < m_names.size());
    155155
    156     webView->autoFillClient()->didSelectAutoFillSuggestion(WebNode(getTextField()),
     156    webView->autofillClient()->didSelectAutofillSuggestion(WebNode(getTextField()),
    157157                                                           m_names[listIndex],
    158158                                                           m_labels[listIndex],
     
    160160}
    161161
    162 void AutoFillPopupMenuClient::selectionCleared()
     162void AutofillPopupMenuClient::selectionCleared()
    163163{
    164164    WebViewImpl* webView = getWebView();
    165165    if (webView)
    166         webView->autoFillClient()->didClearAutoFillSelection(WebNode(getTextField()));
    167 }
    168 
    169 String AutoFillPopupMenuClient::itemText(unsigned listIndex) const
     166        webView->autofillClient()->didClearAutofillSelection(WebNode(getTextField()));
     167}
     168
     169String AutofillPopupMenuClient::itemText(unsigned listIndex) const
    170170{
    171171    return getSuggestion(listIndex);
    172172}
    173173
    174 String AutoFillPopupMenuClient::itemLabel(unsigned listIndex) const
     174String AutofillPopupMenuClient::itemLabel(unsigned listIndex) const
    175175{
    176176    return getLabel(listIndex);
    177177}
    178178
    179 String AutoFillPopupMenuClient::itemIcon(unsigned listIndex) const
     179String AutofillPopupMenuClient::itemIcon(unsigned listIndex) const
    180180{
    181181    return getIcon(listIndex);
    182182}
    183183
    184 bool AutoFillPopupMenuClient::itemIsEnabled(unsigned listIndex) const
     184bool AutofillPopupMenuClient::itemIsEnabled(unsigned listIndex) const
    185185{
    186186    return !itemIsWarning(listIndex);
    187187}
    188188
    189 PopupMenuStyle AutoFillPopupMenuClient::itemStyle(unsigned listIndex) const
     189PopupMenuStyle AutofillPopupMenuClient::itemStyle(unsigned listIndex) const
    190190{
    191191    return itemIsWarning(listIndex) ? *m_warningStyle : *m_regularStyle;
    192192}
    193193
    194 PopupMenuStyle AutoFillPopupMenuClient::menuStyle() const
     194PopupMenuStyle AutofillPopupMenuClient::menuStyle() const
    195195{
    196196    return *m_regularStyle;
    197197}
    198198
    199 int AutoFillPopupMenuClient::clientPaddingLeft() const
     199int AutofillPopupMenuClient::clientPaddingLeft() const
    200200{
    201201    // Bug http://crbug.com/7708 seems to indicate the style can be 0.
     
    207207}
    208208
    209 int AutoFillPopupMenuClient::clientPaddingRight() const
     209int AutofillPopupMenuClient::clientPaddingRight() const
    210210{
    211211    // Bug http://crbug.com/7708 seems to indicate the style can be 0.
     
    217217}
    218218
    219 void AutoFillPopupMenuClient::popupDidHide()
     219void AutofillPopupMenuClient::popupDidHide()
    220220{
    221221    WebViewImpl* webView = getWebView();
     
    223223        return;
    224224
    225     webView->autoFillPopupDidHide();
    226     webView->autoFillClient()->didClearAutoFillSelection(WebNode(getTextField()));
    227 }
    228 
    229 bool AutoFillPopupMenuClient::itemIsSeparator(unsigned listIndex) const
     225    webView->autofillPopupDidHide();
     226    webView->autofillClient()->didClearAutofillSelection(WebNode(getTextField()));
     227}
     228
     229bool AutofillPopupMenuClient::itemIsSeparator(unsigned listIndex) const
    230230{
    231231    return (m_separatorIndex != -1 && static_cast<unsigned>(m_separatorIndex) == listIndex);
    232232}
    233233
    234 bool AutoFillPopupMenuClient::itemIsWarning(unsigned listIndex) const
     234bool AutofillPopupMenuClient::itemIsWarning(unsigned listIndex) const
    235235{
    236236    int index = convertListIndexToInternalIndex(listIndex);
     
    242242}
    243243
    244 void AutoFillPopupMenuClient::setTextFromItem(unsigned listIndex)
     244void AutofillPopupMenuClient::setTextFromItem(unsigned listIndex)
    245245{
    246246    m_textField->setValue(getSuggestion(listIndex));
    247247}
    248248
    249 FontSelector* AutoFillPopupMenuClient::fontSelector() const
     249FontSelector* AutofillPopupMenuClient::fontSelector() const
    250250{
    251251    return m_textField->document()->styleSelector()->fontSelector();
    252252}
    253253
    254 HostWindow* AutoFillPopupMenuClient::hostWindow() const
     254HostWindow* AutofillPopupMenuClient::hostWindow() const
    255255{
    256256    return m_textField->document()->view()->hostWindow();
    257257}
    258258
    259 PassRefPtr<Scrollbar> AutoFillPopupMenuClient::createScrollbar(
     259PassRefPtr<Scrollbar> AutofillPopupMenuClient::createScrollbar(
    260260    ScrollableArea* scrollableArea,
    261261    ScrollbarOrientation orientation,
     
    265265}
    266266
    267 void AutoFillPopupMenuClient::initialize(
     267void AutofillPopupMenuClient::initialize(
    268268    HTMLInputElement* textField,
    269269    const WebVector<WebString>& names,
     
    282282
    283283    // The suggestions must be set before initializing the
    284     // AutoFillPopupMenuClient.
     284    // AutofillPopupMenuClient.
    285285    setSuggestions(names, labels, icons, uniqueIDs, separatorIndex);
    286286
     
    311311}
    312312
    313 void AutoFillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
     313void AutofillPopupMenuClient::setSuggestions(const WebVector<WebString>& names,
    314314                                             const WebVector<WebString>& labels,
    315315                                             const WebVector<WebString>& icons,
     
    340340}
    341341
    342 int AutoFillPopupMenuClient::convertListIndexToInternalIndex(unsigned listIndex) const
     342int AutofillPopupMenuClient::convertListIndexToInternalIndex(unsigned listIndex) const
    343343{
    344344    if (listIndex == static_cast<unsigned>(m_separatorIndex))
     
    350350}
    351351
    352 WebViewImpl* AutoFillPopupMenuClient::getWebView() const
     352WebViewImpl* AutofillPopupMenuClient::getWebView() const
    353353{
    354354    Frame* frame = m_textField->document()->frame();
     
    363363}
    364364
    365 RenderStyle* AutoFillPopupMenuClient::textFieldStyle() const
     365RenderStyle* AutofillPopupMenuClient::textFieldStyle() const
    366366{
    367367    RenderStyle* style = m_textField->computedStyle();
  • trunk/Source/WebKit/chromium/src/AutofillPopupMenuClient.h

    r91003 r91004  
    2929 */
    3030
    31 #ifndef AutoFillPopupMenuClient_h
    32 #define AutoFillPopupMenuClient_h
     31#ifndef AutofillPopupMenuClient_h
     32#define AutofillPopupMenuClient_h
    3333
    3434#include "PopupMenuClient.h"
     
    4646template <typename T> class WebVector;
    4747
    48 // The AutoFill suggestions popup menu client, used to display name suggestions
     48// The Autofill suggestions popup menu client, used to display name suggestions
    4949// with right-justified labels.
    50 class AutoFillPopupMenuClient : public WebCore::PopupMenuClient {
     50class AutofillPopupMenuClient : public WebCore::PopupMenuClient {
    5151public:
    52     AutoFillPopupMenuClient();
    53     virtual ~AutoFillPopupMenuClient();
     52    AutofillPopupMenuClient();
     53    virtual ~AutofillPopupMenuClient();
    5454
    5555    // Returns the number of suggestions available.
  • trunk/Source/WebKit/chromium/src/EditorClientImpl.cpp

    r89991 r91004  
    4444
    4545#include "DOMUtilitiesPrivate.h"
    46 #include "WebAutoFillClient.h"
     46#include "WebAutofillClient.h"
    4747#include "WebEditingAction.h"
    4848#include "WebElement.h"
     
    665665{
    666666    HTMLInputElement* inputElement = toHTMLInputElement(element);
    667     if (m_webView->autoFillClient() && inputElement)
    668         m_webView->autoFillClient()->textFieldDidBeginEditing(WebInputElement(inputElement));
     667    if (m_webView->autofillClient() && inputElement)
     668        m_webView->autofillClient()->textFieldDidBeginEditing(WebInputElement(inputElement));
    669669}
    670670
     
    672672{
    673673    HTMLInputElement* inputElement = toHTMLInputElement(element);
    674     if (m_webView->autoFillClient() && inputElement)
    675         m_webView->autoFillClient()->textFieldDidEndEditing(WebInputElement(inputElement));
     674    if (m_webView->autofillClient() && inputElement)
     675        m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(inputElement));
    676676
    677677    // Notification that focus was lost.  Be careful with this, it's also sent
     
    683683
    684684    // Hide any showing popup.
    685     m_webView->hideAutoFillPopup();
     685    m_webView->hideAutofillPopup();
    686686
    687687    if (!m_webView->client())
     
    707707    ASSERT(element->hasLocalName(HTMLNames::inputTag));
    708708    HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(element);
    709     if (m_webView->autoFillClient())
    710         m_webView->autoFillClient()->textFieldDidChange(WebInputElement(inputElement));
     709    if (m_webView->autofillClient())
     710        m_webView->autofillClient()->textFieldDidChange(WebInputElement(inputElement));
    711711
    712712    // Note that we only show the autofill popup in this case if the caret is at
     
    779779
    780780    if ((!args->autofillOnEmptyValue && value.isEmpty()) || !isCaretAtEnd) {
    781         m_webView->hideAutoFillPopup();
     781        m_webView->hideAutofillPopup();
    782782        return;
    783783    }
     
    811811{
    812812    HTMLInputElement* inputElement = toHTMLInputElement(element);
    813     if (m_webView->autoFillClient() && inputElement) {
    814         m_webView->autoFillClient()->textFieldDidReceiveKeyDown(WebInputElement(inputElement),
     813    if (m_webView->autofillClient() && inputElement) {
     814        m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(inputElement),
    815815                                                                WebKeyboardEventBuilder(*event));
    816816    }
  • trunk/Source/WebKit/chromium/src/WebInputElement.cpp

    r89991 r91004  
    121121}
    122122
    123 void WebInputElement::setAutofilled(bool autoFilled)
     123void WebInputElement::setAutofilled(bool autofilled)
    124124{
    125     unwrap<HTMLInputElement>()->setAutofilled(autoFilled);
     125    unwrap<HTMLInputElement>()->setAutofilled(autofilled);
    126126}
    127127
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r90850 r91004  
    3232#include "WebViewImpl.h"
    3333
    34 #include "AutoFillPopupMenuClient.h"
     34#include "AutofillPopupMenuClient.h"
    3535#include "AXObjectCache.h"
    3636#include "BackForwardListChromium.h"
     
    100100#include "Vector.h"
    101101#include "WebAccessibilityObject.h"
    102 #include "WebAutoFillClient.h"
     102#include "WebAutofillClient.h"
    103103#include "WebDevToolsAgentImpl.h"
    104104#include "WebDevToolsAgentPrivate.h"
     
    206206COMPILE_ASSERT_MATCHING_ENUM(DragOperationEvery);
    207207
    208 static const PopupContainerSettings autoFillPopupSettings = {
     208static const PopupContainerSettings autofillPopupSettings = {
    209209    false, // setTextOnIndexChange
    210210    false, // acceptOnAbandon
     
    276276}
    277277
    278 void WebViewImpl::setAutoFillClient(WebAutoFillClient* autoFillClient)
    279 {
    280     m_autoFillClient = autoFillClient;
     278void WebViewImpl::setAutofillClient(WebAutofillClient* autofillClient)
     279{
     280    m_autofillClient = autofillClient;
    281281}
    282282
     
    301301WebViewImpl::WebViewImpl(WebViewClient* client)
    302302    : m_client(client)
    303     , m_autoFillClient(0)
     303    , m_autofillClient(0)
    304304    , m_permissionClient(0)
    305305    , m_spellCheckClient(0)
     
    324324    , m_operationsAllowed(WebDragOperationNone)
    325325    , m_dragOperation(WebDragOperationNone)
    326     , m_autoFillPopupShowing(false)
    327     , m_autoFillPopup(0)
     326    , m_autofillPopupShowing(false)
     327    , m_autofillPopup(0)
    328328    , m_isTransparent(false)
    329329    , m_tabsToLinks(false)
     
    461461
    462462        // If a text field that has focus is clicked again, we should display the
    463         // AutoFill popup.
     463        // Autofill popup.
    464464        RefPtr<Node> focusedNode = focusedWebCoreNode();
    465465        if (focusedNode.get() && toHTMLInputElement(focusedNode.get())) {
     
    479479
    480480    if (clickedNode.get() && clickedNode == focusedWebCoreNode()) {
    481         // Focus has not changed, show the AutoFill popup.
     481        // Focus has not changed, show the Autofill popup.
    482482        static_cast<EditorClientImpl*>(m_page->editorClient())->
    483483            showFormAutofillForNode(clickedNode.get());
     
    656656bool WebViewImpl::autocompleteHandleKeyEvent(const WebKeyboardEvent& event)
    657657{
    658     if (!m_autoFillPopupShowing
     658    if (!m_autofillPopupShowing
    659659        // Home and End should be left to the text field to process.
    660660        || event.windowsKeyCode == VKEY_HOME
     
    664664    // Pressing delete triggers the removal of the selected suggestion from the DB.
    665665    if (event.windowsKeyCode == VKEY_DELETE
    666         && m_autoFillPopup->selectedIndex() != -1) {
     666        && m_autofillPopup->selectedIndex() != -1) {
    667667        Node* node = focusedWebCoreNode();
    668668        if (!node || (node->nodeType() != Node::ELEMENT_NODE)) {
     
    676676        }
    677677
    678         int selectedIndex = m_autoFillPopup->selectedIndex();
    679 
    680         if (!m_autoFillPopupClient->canRemoveSuggestionAtIndex(selectedIndex))
     678        int selectedIndex = m_autofillPopup->selectedIndex();
     679
     680        if (!m_autofillPopupClient->canRemoveSuggestionAtIndex(selectedIndex))
    681681            return false;
    682682
    683683        WebString name = WebInputElement(static_cast<HTMLInputElement*>(element)).nameForAutofill();
    684         WebString value = m_autoFillPopupClient->itemText(selectedIndex);
    685         m_autoFillClient->removeAutocompleteSuggestion(name, value);
     684        WebString value = m_autofillPopupClient->itemText(selectedIndex);
     685        m_autofillClient->removeAutocompleteSuggestion(name, value);
    686686        // Update the entries in the currently showing popup to reflect the
    687687        // deletion.
    688         m_autoFillPopupClient->removeSuggestionAtIndex(selectedIndex);
    689         refreshAutoFillPopup();
     688        m_autofillPopupClient->removeSuggestionAtIndex(selectedIndex);
     689        refreshAutofillPopup();
    690690        return false;
    691691    }
    692692
    693     if (!m_autoFillPopup->isInterestedInEventForKey(event.windowsKeyCode))
     693    if (!m_autofillPopup->isInterestedInEventForKey(event.windowsKeyCode))
    694694        return false;
    695695
    696     if (m_autoFillPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event))) {
     696    if (m_autofillPopup->handleKeyEvent(PlatformKeyboardEventBuilder(event))) {
    697697        // We need to ignore the next Char event after this otherwise pressing
    698698        // enter when selecting an item in the menu will go to the page.
     
    927927}
    928928
    929 void WebViewImpl::hideAutoFillPopup()
    930 {
    931     if (m_autoFillPopupShowing) {
    932         m_autoFillPopup->hidePopup();
    933         m_autoFillPopupShowing = false;
     929void WebViewImpl::hideAutofillPopup()
     930{
     931    if (m_autofillPopupShowing) {
     932        m_autofillPopup->hidePopup();
     933        m_autofillPopupShowing = false;
    934934    }
    935935}
     
    13391339        m_imeAcceptEvents = true;
    13401340    } else {
    1341         hideAutoFillPopup();
     1341        hideAutofillPopup();
    13421342        hideSelectPopup();
    13431343
     
    20762076}
    20772077
    2078 void WebViewImpl::applyAutoFillSuggestions(
     2078void WebViewImpl::applyAutofillSuggestions(
    20792079    const WebNode& node,
    20802080    const WebVector<WebString>& names,
     
    20892089
    20902090    if (names.isEmpty()) {
    2091         hideAutoFillPopup();
     2091        hideAutofillPopup();
    20922092        return;
    20932093    }
    20942094
    20952095    RefPtr<Node> focusedNode = focusedWebCoreNode();
    2096     // If the node for which we queried the AutoFill suggestions is not the
     2096    // If the node for which we queried the Autofill suggestions is not the
    20972097    // focused node, then we have nothing to do.  FIXME: also check the
    20982098    // caret is at the end and that the text has not changed.
    20992099    if (!focusedNode || focusedNode != PassRefPtr<Node>(node)) {
    2100         hideAutoFillPopup();
     2100        hideAutofillPopup();
    21012101        return;
    21022102    }
     
    21052105        static_cast<HTMLInputElement*>(focusedNode.get());
    21062106
    2107     // The first time the AutoFill popup is shown we'll create the client and
     2107    // The first time the Autofill popup is shown we'll create the client and
    21082108    // the popup.
    2109     if (!m_autoFillPopupClient)
    2110         m_autoFillPopupClient = adoptPtr(new AutoFillPopupMenuClient);
    2111 
    2112     m_autoFillPopupClient->initialize(
     2109    if (!m_autofillPopupClient)
     2110        m_autofillPopupClient = adoptPtr(new AutofillPopupMenuClient);
     2111
     2112    m_autofillPopupClient->initialize(
    21132113        inputElem, names, labels, icons, uniqueIDs, separatorIndex);
    21142114
    2115     if (!m_autoFillPopup.get()) {
    2116         m_autoFillPopup = PopupContainer::create(m_autoFillPopupClient.get(),
     2115    if (!m_autofillPopup.get()) {
     2116        m_autofillPopup = PopupContainer::create(m_autofillPopupClient.get(),
    21172117                                                 PopupContainer::Suggestion,
    2118                                                  autoFillPopupSettings);
    2119     }
    2120 
    2121     if (m_autoFillPopupShowing) {
    2122         refreshAutoFillPopup();
     2118                                                 autofillPopupSettings);
     2119    }
     2120
     2121    if (m_autofillPopupShowing) {
     2122        refreshAutofillPopup();
    21232123    } else {
    2124         m_autoFillPopup->showInRect(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
    2125         m_autoFillPopupShowing = true;
     2124        m_autofillPopup->showInRect(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
     2125        m_autofillPopupShowing = true;
    21262126    }
    21272127}
     
    21302130{
    21312131    hideSelectPopup();
    2132     hideAutoFillPopup();
     2132    hideAutofillPopup();
    21332133}
    21342134
     
    23562356#endif
    23572357
    2358 void WebViewImpl::refreshAutoFillPopup()
    2359 {
    2360     ASSERT(m_autoFillPopupShowing);
     2358void WebViewImpl::refreshAutofillPopup()
     2359{
     2360    ASSERT(m_autofillPopupShowing);
    23612361
    23622362    // Hide the popup if it has become empty.
    2363     if (!m_autoFillPopupClient->listSize()) {
    2364         hideAutoFillPopup();
    2365         return;
    2366     }
    2367 
    2368     IntRect oldBounds = m_autoFillPopup->frameRect();
    2369     m_autoFillPopup->refresh(focusedWebCoreNode()->getRect());
    2370     IntRect newBounds = m_autoFillPopup->frameRect();
     2363    if (!m_autofillPopupClient->listSize()) {
     2364        hideAutofillPopup();
     2365        return;
     2366    }
     2367
     2368    IntRect oldBounds = m_autofillPopup->frameRect();
     2369    m_autofillPopup->refresh(focusedWebCoreNode()->getRect());
     2370    IntRect newBounds = m_autofillPopup->frameRect();
    23712371    // Let's resize the backing window if necessary.
    23722372    if (oldBounds != newBounds) {
    23732373        WebPopupMenuImpl* popupMenu =
    2374             static_cast<WebPopupMenuImpl*>(m_autoFillPopup->client());
     2374            static_cast<WebPopupMenuImpl*>(m_autofillPopup->client());
    23752375        if (popupMenu)
    23762376            popupMenu->client()->setWindowRect(m_chromeClientImpl.windowToScreen(newBounds));
  • trunk/Source/WebKit/chromium/src/WebViewImpl.h

    r90850 r91004  
    7272namespace WebKit {
    7373class AutocompletePopupMenuClient;
    74 class AutoFillPopupMenuClient;
     74class AutofillPopupMenuClient;
    7575class ContextMenuClientImpl;
    7676class DeviceOrientationClientProxy;
     
    122122    // WebView methods:
    123123    virtual void initializeMainFrame(WebFrameClient*);
    124     virtual void setAutoFillClient(WebAutoFillClient*);
     124    virtual void setAutofillClient(WebAutofillClient*);
    125125    virtual void setDevToolsAgentClient(WebDevToolsAgentClient*);
    126126    virtual void setPermissionClient(WebPermissionClient*);
     
    187187    virtual WebDevToolsAgent* devToolsAgent();
    188188    virtual WebAccessibilityObject accessibilityObject();
    189     virtual void applyAutoFillSuggestions(
     189    virtual void applyAutofillSuggestions(
    190190        const WebNode&,
    191191        const WebVector<WebString>& names,
     
    235235    }
    236236
    237     WebAutoFillClient* autoFillClient()
    238     {
    239         return m_autoFillClient;
     237    WebAutofillClient* autofillClient()
     238    {
     239        return m_autofillClient;
    240240    }
    241241
     
    327327        const WebPoint& dragImageOffset);
    328328
    329     void autoFillPopupDidHide()
    330     {
    331         m_autoFillPopupShowing = false;
     329    void autofillPopupDidHide()
     330    {
     331        m_autofillPopupShowing = false;
    332332    }
    333333
     
    345345    void popupClosed(WebCore::PopupContainer* popupContainer);
    346346
    347     void hideAutoFillPopup();
     347    void hideAutofillPopup();
    348348
    349349    // Returns the input event we're currently processing. This is used in some
     
    404404    bool autocompleteHandleKeyEvent(const WebKeyboardEvent&);
    405405
    406     // Repaints the AutoFill popup. Should be called when the suggestions
    407     // have changed. Note that this should only be called when the AutoFill
     406    // Repaints the Autofill popup. Should be called when the suggestions
     407    // have changed. Note that this should only be called when the Autofill
    408408    // popup is showing.
    409     void refreshAutoFillPopup();
     409    void refreshAutofillPopup();
    410410
    411411    // Returns true if the view was scrolled.
     
    436436
    437437    WebViewClient* m_client;
    438     WebAutoFillClient* m_autoFillClient;
     438    WebAutofillClient* m_autofillClient;
    439439    WebPermissionClient* m_permissionClient;
    440440    WebSpellCheckClient* m_spellCheckClient;
     
    511511    WebDragOperation m_dragOperation;
    512512
    513     // Whether an AutoFill popup is currently showing.
    514     bool m_autoFillPopupShowing;
    515 
    516     // The AutoFill popup client.
    517     OwnPtr<AutoFillPopupMenuClient> m_autoFillPopupClient;
    518 
    519     // The AutoFill popup.
    520     RefPtr<WebCore::PopupContainer> m_autoFillPopup;
     513    // Whether an Autofill popup is currently showing.
     514    bool m_autofillPopupShowing;
     515
     516    // The Autofill popup client.
     517    OwnPtr<AutofillPopupMenuClient> m_autofillPopupClient;
     518
     519    // The Autofill popup.
     520    RefPtr<WebCore::PopupContainer> m_autofillPopup;
    521521
    522522    // The popup associated with a select element.
Note: See TracChangeset for help on using the changeset viewer.