[webkit-reviews] review granted: [Bug 62601] anyPageIsProcessingUserGesture is not longer needed because user gesture state is static : [Attachment 97018] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 13 15:35:11 PDT 2011


Darin Adler <darin at apple.com> has granted Adam Barth <abarth at webkit.org>'s
request for review:
Bug 62601: anyPageIsProcessingUserGesture is not longer needed because user
gesture state is static
https://bugs.webkit.org/show_bug.cgi?id=62601

Attachment 97018: Patch
https://bugs.webkit.org/attachment.cgi?id=97018&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=97018&action=review

> Source/WebCore/bindings/ScriptControllerBase.cpp:59
> +    // FIXME: Why does the URL of the script depend on forceUserGesture?
> +    // This looks suspiciously like an old user-gesture back-channel.
>      return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL()
: m_frame->document()->url()));

Fix me indeed! WTF?

> Source/WebCore/bindings/js/JSDocumentCustom.cpp:81
> +    bool lockHistory = !ScriptController::processingUserGesture();

I am no fan of this “lock history” name. You are not the first to use it, nor
will you be the last. But I am not interested in the history of locks!

> Source/WebCore/page/DOMWindow.cpp:1823
>	  
targetFrame->navigationScheduler()->scheduleLocationChange(activeFrame->documen
t()->securityOrigin(),
> -	       firstFrame->document()->completeURL(urlString).string(),
> -	       firstFrame->loader()->outgoingReferrer(),
> -	       !activeFrame->script()->anyPageIsProcessingUserGesture(),
false);
> -
> +								     
firstFrame->document()->completeURL(urlString).string(),
> +								     
firstFrame->loader()->outgoingReferrer(),
> +								     
lockHistory,
> +								      false);
>	   return targetFrame->domWindow();

Our coding style guidelines tell us to line things up the way this was before,
not the way it is after. I’m guessing your editor wanted to help you do it this
way. I would be happier with a style that does not require re-indenting when we
rename something.


More information about the webkit-reviews mailing list