2011-08-29 Lucas Forschler Merged 92982 2011-08-12 Andy Estes Cancel in onbeforeunload dialog sometime causes a button to stop working. https://bugs.webkit.org/show_bug.cgi?id=26211 Reviewed by Alexey Proskuryakov. Implement a new LayoutTestController method that a test can call to set the return value of DumpRenderTree's beforeunload UI delegate. * DumpRenderTree/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): Initialize m_shouldStayOnPageAfterHandlingBeforeUnload. (setShouldStayOnPageAfterHandlingBeforeUnloadCallback): Call LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload(). (LayoutTestController::staticFunctions): Register 'setShouldStayOnPageAfterHandlingBeforeUnload' as a static function. * DumpRenderTree/LayoutTestController.h: (LayoutTestController::shouldStayOnPageAfterHandlingBeforeUnload): (LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload): * DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::LayoutTestController): Initialize m_shouldStayOnPageAfterHandlingBeforeUnload and bind 'setShouldStayOnPageAfterHandlingBeforeUnload' to its c++ setter. (LayoutTestController::reset): Reset m_shouldStayOnPageAfterHandlingBeforeUnload to false. (LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload): Set m_shouldStayOnPageAfterHandlingBeforeUnload to the value passed in from JavaScript. * DumpRenderTree/chromium/LayoutTestController.h: (LayoutTestController::shouldStayOnPageAfterHandlingBeforeUnload): * DumpRenderTree/chromium/WebViewHost.cpp: (WebViewHost::runModalBeforeUnloadDialog): Add the correct logging and return the inverse of LayoutTestController::shouldStayOnPageAfterHandlingBeforeUnload(). * DumpRenderTree/mac/UIDelegate.mm: (-[UIDelegate webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:]): Ditto. * DumpRenderTree/win/UIDelegate.cpp: (UIDelegate::runBeforeUnloadConfirmPanelWithMessage): Ditto. * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Define setShouldStayOnPageAfterHandlingBeforeUnload(). * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::postNewBeforeUnloadReturnValue): Post a message to the Test Controller telling it what value it should return in its onbeforeunload UI delegate. * WebKitTestRunner/InjectedBundle/InjectedBundle.h: * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: (WTR::LayoutTestController::setShouldStayOnPageAfterHandlingBeforeUnload): Call InjectedBundle::postNewBeforeUnloadReturnValue(). * WebKitTestRunner/InjectedBundle/LayoutTestController.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::TestController): Initialize m_beforeUnloadReturnValue to true. (WTR::runBeforeUnloadConfirmPanel): Add the correct logging and return the value of TestController::beforeUnloadReturnValue(). (WTR::TestController::resetStateToConsistentValues): Reset m_beforeUnloadReturnValue to true. * WebKitTestRunner/TestController.h: (WTR::TestController::beforeUnloadReturnValue): (WTR::TestController::setBeforeUnloadReturnValue): * WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Handle the message posted from the injected bundle by retrieving the message body as a WKBoolean and calling TestController::setBeforeUnloadReturnValue(). 2011-08-09 Gavin Barraclough Reviewed by nobody. Merged JavaScriptCore & JavaScriptGlue from 86722 to 92405. EXCEPT, Did not merge patches: 86837, 89283, 90643, 92068, 92254. ALSO, Did merge full patch (including non-JSC/JSG changes) for: 87346, 88587, 89069, 90383, 91095, 91194, 91195, 91790, 91903, 92224. 2011-07-29 Lucas Forschler Merged 91219. 2011-07-13 Jon Honeycutt Focus and selection events are not fired when a