The result of the showModalDialog call is the value of the returnValue variable. Current webkit builds report "undefined" as the result of the showModalDialog call regardless of the returnValue's value.
Works in 10.4.7.
The problem is that Window::clear() is not being called at all. This is presumably having many bad symptoms, not just this one!
The change that broke this was the one for bug 6818.
Created attachment 9092 [details] patch, including change log and a manual test Not the most elegant solution to the problem, but does fix it.
Created attachment 9095 [details] patch, including change log and a manual test
Comment on attachment 9095 [details] patch, including change log and a manual test r=me
Committed revision 15097.
<rdar://problem/4604701>
Comment on attachment 9095 [details] patch, including change log and a manual test Further testing show this not working in some cases. New patch forthcoming.
Created attachment 9269 [details] better patch with change log, can still use the old test case
Created attachment 9271 [details] better patch with change log, can still use the old test case
Comment on attachment 9271 [details] better patch with change log, can still use the old test case r=me I think kjs_window.cpp could use a comment explaining why you need to do this: + if (!returnValue) + returnValue = dialogWindow->getDirect("returnValue"); Also, it looks like you changed the indenting in KJSProxy::clear from 4 spaces to 2.
(In reply to comment #12) > I think kjs_window.cpp could use a comment explaining why you need to do this: > > + if (!returnValue) > + returnValue = dialogWindow->getDirect("returnValue"); OK. Will do. > Also, it looks like you changed the indenting in KJSProxy::clear from 4 spaces > to 2. Actually, my previous fix changed the indenting in KJSProxy::clear from 2 spaces to 4, and I rolled it out. My new change was small enough that I did not feel comfortable reindenting the function at the same time.
Committed revision 15239.