[webkit-reviews] review denied: [Bug 56682] Opening link with unspecific hash in a new tab (except context menu) twice in a row results in hash for current window changing : [Attachment 87157] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 28 16:28:20 PDT 2011


Adam Barth <abarth at webkit.org> has denied ChangSeok Oh
<kevin.cs.oh at gmail.com>'s request for review:
Bug 56682: Opening link with unspecific hash in a new tab (except context menu)
twice in a row results in hash for current window changing
https://bugs.webkit.org/show_bug.cgi?id=56682

Attachment 87157: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=87157&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=87157&action=review

This patch lacks a test.  Generally speaking, every patch requires a test.

> Source/WebCore/loader/PolicyChecker.cpp:69
> +	   const UIEventWithKeyState* keyStateEvent =
findEventWithKeyState(const_cast<Event*>(action.event()));

const_cast ?  That doesn't seem right.

> Source/WebCore/loader/PolicyChecker.cpp:74
> +	   if (!(keyStateEvent && (keyStateEvent->ctrlKey() ||
keyStateEvent->metaKey()))) {
> +	       function(argument, request, 0, true);
> +	       loader->setLastCheckedRequest(request);
> +	       return;
> +	   }

PolicyChecker shouldn't know anything about ctrlKey or metaKey.  I think this
patch is improperly factored.


More information about the webkit-reviews mailing list