Changeset 62770 in webkit


Ignore:
Timestamp:
Jul 8, 2010 1:49:01 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-07-08 David Holloway <dhollowa@chromium.org>

Reviewed by Darin Fisher.

[chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for
use by other code in WebKit/chromium/src.

Specific use of these methods is made in WebFrameImpl.cpp. This is
preferred to the cast operator call that was happening prior to this
change.

https://bugs.webkit.org/show_bug.cgi?id=41477

  • public/WebNode.h:
  • src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::registerPasswordListener): (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete): (WebKit::WebFrameImpl::getPasswordListener):
  • src/WebFrameImpl.h:
Location:
trunk/WebKit/chromium
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r62754 r62770  
     12010-07-08  David Holloway  <dhollowa@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [chromium] Exposes WebNode::unwrap() and WebNode::constUnwrap() for
     6        use by other code in WebKit/chromium/src.
     7
     8        Specific use of these methods is made in WebFrameImpl.cpp.  This is
     9        preferred to the cast operator call that was happening prior to this
     10        change.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=41477
     13
     14        * public/WebNode.h:
     15        * src/WebFrameImpl.cpp:
     16        (WebKit::WebFrameImpl::registerPasswordListener):
     17        (WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete):
     18        (WebKit::WebFrameImpl::getPasswordListener):
     19        * src/WebFrameImpl.h:
     20
    1212010-07-07  Pavel Podivilov  <podivilov@chromium.org>
    222
  • trunk/WebKit/chromium/public/WebNode.h

    r62351 r62770  
    125125#endif
    126126
    127 protected:
    128127#if WEBKIT_IMPLEMENTATION
    129128    template<typename T> T* unwrap()
     
    138137#endif
    139138
     139protected:
    140140    WebPrivatePtr<WebCore::Node> m_private;
    141141};
  • trunk/WebKit/chromium/src/WebFrameImpl.cpp

    r62743 r62770  
    19801980    WebPasswordAutocompleteListener* listener)
    19811981{
    1982     RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>();
     1982    RefPtr<HTMLInputElement> element(inputElement.unwrap<HTMLInputElement>());
    19831983    if (!m_passwordListeners.add(element, listener).second) {
    19841984        delete listener;
     
    19911991    const WebInputElement& inputElement)
    19921992{
    1993     RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>();
    1994     WebPasswordAutocompleteListener* listener = getPasswordListener(element.get());
     1993    const HTMLInputElement* element = inputElement.constUnwrap<HTMLInputElement>();
     1994    WebPasswordAutocompleteListener* listener = getPasswordListener(element);
    19951995    // Password listeners need to autocomplete other fields that depend on the
    19961996    // input element with autofill suggestions.
     
    20002000
    20012001WebPasswordAutocompleteListener* WebFrameImpl::getPasswordListener(
    2002     HTMLInputElement* inputElement)
    2003 {
    2004     return m_passwordListeners.get(RefPtr<HTMLInputElement>(inputElement));
     2002    const HTMLInputElement* inputElement)
     2003{
     2004    return m_passwordListeners.get(RefPtr<HTMLInputElement>(const_cast<HTMLInputElement*>(inputElement)));
    20052005}
    20062006
  • trunk/WebKit/chromium/src/WebFrameImpl.h

    r62743 r62770  
    237237    // Note that the returned listener is owner by the WebFrameImpl and should not
    238238    // be kept around as it is deleted when the page goes away.
    239     WebPasswordAutocompleteListener* getPasswordListener(WebCore::HTMLInputElement*);
     239    WebPasswordAutocompleteListener* getPasswordListener(const WebCore::HTMLInputElement*);
    240240
    241241    WebFrameClient* client() const { return m_client; }
Note: See TracChangeset for help on using the changeset viewer.