Bug 24315 - WMLInputElement.cpp produces build-time error
Summary: WMLInputElement.cpp produces build-time error
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Major
Assignee: Nobody
URL:
Keywords:
: 24316 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-02 21:32 PST by journeyerhum
Modified: 2009-07-27 12:52 PDT (History)
1 user (show)

See Also:


Attachments
Fix build errors with WMLInputElement.cpp (835 bytes, patch)
2009-03-31 05:18 PDT, Sam Black
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description journeyerhum 2009-03-02 21:32:33 PST
Writing of function below has error.

void WMLInputElement::defaultEventHandler(Event* evt)
{
..............
        RenderObject* r = renderer();
        if (r /*&& r->isEdited()*//*JJH*/) {
            dispatchEventForType(eventNames().changeEvent, true, false);
            
            // Refetch the renderer since arbitrary JS code run during onchange can do anything, including destroying it.
            r = renderer();
        //    if (r)					/*JJH*/
        //        r->setEdited(false);	/*JJH*/
        }
..............
}

note blockings of code above commented with JJH.

Class RenderObject doesn't include function, isEdited(), setEdited()

To test WML page I only had to block out errornous code above.

I am testing with nightly build WebKit-r41348.
Comment 1 Mark Rowe (bdash) 2009-03-02 22:40:41 PST
*** Bug 24316 has been marked as a duplicate of this bug. ***
Comment 2 Mark Rowe (bdash) 2009-03-02 22:42:20 PST
This is probably a result of <http://trac.webkit.org/changeset/40983>.  That changeset should also make the fix for this WML failure relatively obvious if you'd care to contribute a patch.
Comment 3 Sam Black 2009-03-31 05:18:39 PDT
Created attachment 29112 [details]
Fix build errors with WMLInputElement.cpp

Fixes build errors with WMLInputElement.cpp, using commit #40983 as a basis.

Tested using WebKit r42075 on GNU/Linux (GCC 4.2.4, glibc 2.7, GTK+2 2.14.6)
Comment 4 Darin Adler 2009-03-31 10:12:05 PDT
Comment on attachment 29112 [details]
Fix build errors with WMLInputElement.cpp

Casts should use the new checked cast toRenderTextControl, not a direct static_cast.

It's not clear why you're calling isTextField in one case and not the other. It's not needed in either case since this class always creates a renderer derived from RenderTextControl.
Comment 5 Sam Black 2009-04-01 05:07:25 PDT
I based the patch on the edits to trunk/WebCore/html/HTMLInputElement.cpp made in changeset #40983 as directed in comment #2.
Comment 6 George Staikos 2009-07-27 12:52:54 PDT
Not a valid bug anymore.