Web Inspector: Add support for handling modal dialogs
https://bugs.webkit.org/show_bug.cgi?id=107883

Patch by Ken Kania <kkania@chromium.org> on 2013-02-01
Reviewed by Pavel Feldman.

Introduce support for being notified when a JavaScript modal dialog
is opening and closing, as well as a new command for accepting or
dismissing the dialog.

Source/WebCore:

Test: inspector-protocol/page/willRunJavaScriptDialog.html

* inspector/Inspector.json:
* inspector/InspectorClient.h:
(WebCore::InspectorClient::handleJavaScriptDialog):
(InspectorClient):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl):
(WebCore::InspectorInstrumentation::didRunJavaScriptDialogImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willRunJavaScriptDialog):
(WebCore):
(WebCore::InspectorInstrumentation::didRunJavaScriptDialog):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::willRunJavaScriptDialog):
(WebCore):
(WebCore::InspectorPageAgent::didRunJavaScriptDialog):
(WebCore::InspectorPageAgent::handleJavaScriptDialog):
* inspector/InspectorPageAgent.h:
* inspector/front-end/ResourceTreeModel.js:
(WebInspector.PageDispatcher.prototype.frameStartedLoading):
(WebInspector.PageDispatcher.prototype.frameStoppedLoading):
(WebInspector.PageDispatcher.prototype.frameScheduledNavigation):
(WebInspector.PageDispatcher.prototype.frameClearedScheduledNavigation):
(WebInspector.PageDispatcher.prototype.javascriptDialogOpening):
(WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
* page/Chrome.cpp:
(WebCore::Chrome::runBeforeUnloadConfirmPanel):
(WebCore::Chrome::runJavaScriptAlert):
(WebCore::Chrome::runJavaScriptConfirm):
(WebCore::Chrome::runJavaScriptPrompt):

Source/WebKit/chromium:

* public/WebDevToolsAgent.h:
* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::handleJavaScriptDialog):
(WebKit):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebDevToolsAgentImpl.cpp:
(BrowserDataHintStringValues):
(WebKit::WebDevToolsAgentImpl::captureScreenshot):
(WebKit::WebDevToolsAgentImpl::handleJavaScriptDialog):
(WebKit):
(WebKit::browserHintToString):
(WebKit::browserHintFromString):
(WebKit::WebDevToolsAgent::patchWithBrowserData):
* src/WebDevToolsAgentImpl.h:
(WebDevToolsAgentImpl):

LayoutTests:

* inspector-protocol/page/javascriptDialogEvents-expected.txt: Added.
* inspector-protocol/page/javascriptDialogEvents.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Dubious cast from HTMLCollection to HTMLAllCollection
https://bugs.webkit.org/show_bug.cgi?id=108538

Reviewed by Adam Barth.

Patch is tested by enabling V8 binding integrity on HTMLAllCollection and
running the existing tests without introducing new crashes.

* dom/Document.cpp:
(WebCore::Document::all):
Pass correct type to template.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::create):
(WebCore::HTMLAllCollection::HTMLAllCollection):
* html/HTMLAllCollection.h:
(HTMLAllCollection):
Make create() method arguments compatible with template above.

* html/HTMLAllCollection.idl:
Enable binding integrity.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: File system pending requests list is not cleared after processing.
https://bugs.webkit.org/show_bug.cgi?id=108573

Reviewed by Pavel Feldman.

* inspector/front-end/IsolatedFileSystemModel.js:
(WebInspector.IsolatedFileSystemModel.prototype._processPendingFileSystemRequests):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141557 268f45cc-cd09-0410-ab3c-d52691b4dbfc