2011-06-13 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2011 23:28:23 +0000 (23:28 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2011 23:28:23 +0000 (23:28 +0000)
commit21ee431ba1c5f6fd4fcc51924598cf204a52cd39
tree5c3a36a9cc14474ea75683bff281842ea9f52487
parenta98423869e1a5de9f0e10197762c82238b9ef151
2011-06-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Adler.

        anyPageIsProcessingUserGesture is not longer needed because user gesture state is static
        https://bugs.webkit.org/show_bug.cgi?id=62601

        Previously, our user-gesture state was per-frame.  Code needed to check
        the "global" user gesture state called anyPageIsProcessingUserGesture()
        to iterate through all the frames and look for one that was processing
        a user gesture.  Since we changed the user gesture state to be static,
        iterating over every frame in existence isn't needed.

        This patch also cleans up a couple other user-gesture callsites I saw
        while I was in this code.  Code should just call
        ScriptController::processingUserGesture directly instead of
        trampolining through other functions.

        * bindings/ScriptControllerBase.cpp:
        (WebCore::ScriptController::executeScript):
        * bindings/generic/BindingSecurity.h:
        (WebCore::::allowPopUp):
        * bindings/js/JSDOMBinding.cpp:
        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::setLocation):
        * bindings/js/ScriptController.cpp:
        * bindings/js/ScriptController.h:
        * bindings/scripts/CodeGeneratorJS.pm:
        * bindings/scripts/CodeGeneratorV8.pm:
        * bindings/v8/ScriptController.cpp:
        * bindings/v8/ScriptController.h:
        (WebCore::ScriptController::setProcessingTimerCallback):
        * bindings/v8/V8Utilities.cpp:
        * bindings/v8/V8Utilities.h:
        * bindings/v8/specialization/V8BindingState.cpp:
        * bindings/v8/specialization/V8BindingState.h:
        * html/HTMLFormElement.cpp:
        (WebCore::HTMLFormElement::submitFromJavaScript):
        (WebCore::HTMLFormElement::submit):
        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::setLocation):
        (WebCore::DOMWindow::createWindow):
        (WebCore::DOMWindow::open):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/bindings/generic/BindingSecurity.h
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDocumentCustom.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/bindings/js/ScriptController.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/v8/ScriptController.cpp
Source/WebCore/bindings/v8/ScriptController.h
Source/WebCore/bindings/v8/V8Utilities.cpp
Source/WebCore/bindings/v8/V8Utilities.h
Source/WebCore/bindings/v8/specialization/V8BindingState.cpp
Source/WebCore/bindings/v8/specialization/V8BindingState.h
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/page/DOMWindow.cpp