[Webkit-unassigned] [Bug 41477] New: Direct calls to cast operator in WebFrameImpl.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 1 11:57:56 PDT 2010


           Summary: Direct calls to cast operator in WebFrameImpl.cpp
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dhollowa at chromium.org

Overview: Poor C++ style with direct calls to cast operator in WebFrameImpl.cpp.

Steps to Reproduce:

1) Open WebFrameImpl.cpp

2) Inspect WebKit::WebFrameImpl::registerPasswordListener and WebKit::WebFrameImpl::notifiyPasswordListenerOfAutocomplete

Actual Results: Notice the calls to:

   RefPtr<HTMLInputElement> element = inputElement.operator PassRefPtr<HTMLInputElement>();

   This is using an explicit call to a PassRefPtr cast operator to bridge from a WebInputElement back to an HTMLInputElement.

Expected Results:  Better style is to "unwrap" the WebInputElement explicitly, eg.:

   RefPtr<HTMLInputElement> element(inputElement.unwrap<HTMLInputElement>());

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list