Bug 32481

Summary: [WML] Compilation error in wml enabled builds.
Product: WebKit Reporter: Nayan <nayankk>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, eric, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Proposed patch none

Description Nayan 2009-12-13 01:47:59 PST
WML enabled builds are now failing with following error,

DerivedSources/WMLElementFactory.cpp: In function ‘WTF::PassRefPtr<WebCore::WMLElement> WebCore::inputConstructor(const WebCore::QualifiedName&, WebCore::Document*, bool)’:
DerivedSources/WMLElementFactory.cpp:124: error: cannot allocate an object of abstract type ‘WebCore::WMLInputElement’
../../WebCore/wml/WMLInputElement.h:32: note:   because the following virtual functions are pure within ‘WebCore::WMLInputElement’:
../../WebCore/dom/InputElement.h:51: note: 	virtual void WebCore::InputElement::setValue(const WebCore::String&, bool)
../../WebCore/dom/InputElement.h:52: note: 	virtual void WebCore::InputElement::setValueForUser(const WebCore::String&)
make[1]: *** [DerivedSources/libWebCore_la-WMLElementFactory.lo] Error 1
make[1]: Leaving directory `/home/nayankk/Browsers/webkit/WebKitBuild/Release'
make: *** [all] Error 2

Failed to build WebKit using 'make'!


Version of WebKit used is,

nayankk@dreams:~/Browsers/webkit$ svn info
Path: .
URL: http://svn.webkit.org/repository/webkit/trunk
Repository Root: http://svn.webkit.org/repository/webkit
Repository UUID: 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revision: 52059
Node Kind: directory
Schedule: normal
Last Changed Author: eric.carlson@apple.com
Last Changed Rev: 52059
Last Changed Date: 2009-12-13 08:58:42 +0530 (Sun, 13 Dec 2009)
Comment 1 Nayan 2009-12-13 01:55:06 PST
This error is due to the changes committed with http://trac.webkit.org/changeset/51602. With this changeset, signature of 'WebCore::InputElement::setValue' is changed and 'WebCore::InputElement::setValueForUser' pure virtual function is added to 'InputElement' class.

'InputElement' class is the parent class for 'HTMLInputElement' and 'WMLInputElement' class. With 51602 changeset, changes in HTMLInputElement were done, but WMLInputElement wasn't changed to define these virtual functions and hence resulting in compilation errors.
Comment 2 Nayan 2009-12-13 02:08:10 PST
Created attachment 44751 [details]
Proposed patch

Proposed patch to resolve compilation error is attached for review. This simply changes the signature of 'setValue' function and defines 'setValueForUser' function in WMLInputElement class.
Comment 3 WebKit Review Bot 2009-12-13 02:11:41 PST
style-queue ran check-webkit-style on attachment 44751 [details] without any errors.
Comment 4 Eric Seidel (no email) 2009-12-13 02:43:26 PST
Comment on attachment 44751 [details]
Proposed patch

Should we just change setValueForUser to have a default implementation instead of being pure virtual?  Is it really only useful to HTML?  Otherwise this looks fine.
Comment 5 Nayan 2009-12-13 03:55:14 PST
(In reply to comment #4)
> (From update of attachment 44751 [details])
> Should we just change setValueForUser to have a default implementation instead
> of being pure virtual?  Is it really only useful to HTML?  Otherwise this looks
> fine.

Thanks Eric for the review comments. Looks like, changes in changeset 51602 were done to detect a login form AutoFill from JavaScript. Since WML with Javascript is a rare scenario, I doubt these changes are required in WML. I guess Darin/Timothy will have some inputs here.
Comment 6 WebKit Commit Bot 2009-12-14 12:13:58 PST
Comment on attachment 44751 [details]
Proposed patch

Clearing flags on attachment: 44751

Committed r52107: <http://trac.webkit.org/changeset/52107>
Comment 7 WebKit Commit Bot 2009-12-14 12:14:06 PST
All reviewed patches have been landed.  Closing bug.