Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Issue 2379313002: Fix 'noopener' targeting and return value. (Closed)

Created:
4 years, 2 months ago by Mike West
Modified:
4 years, 2 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 'noopener' targeting and return value. Boris noted a few cases in which Chrome wasn't following the spec for 'noopener'. This patch addresses two of them by ensuring that the call to 'window.open' return 'null' (rather than 'undefined'), and that we don't reuse existing windows when processing a 'noopener' request. BUG=651578, 651579 Committed: https://crrev.com/2fde9de3e9ffe7794844ddf9ea3640c5b418b6e5 Cr-Commit-Position: refs/heads/master@{#423493}

Patch Set 1 #

Patch Set 2 : Test. #

Patch Set 3 : null. #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -29 lines) Patch
M content/test/data/click-noreferrer-links.html View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-different-frames.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-different-frames-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-button-click.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-button-click-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-focus.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-focus-expected.txt View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-user-gesture.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-fake-user-gesture-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-untrusted-click-event-on-anchor-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-wrong-event.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocked-from-wrong-event-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers3.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers3-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers4.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers4-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers6.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers6-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/html/marquee-without-frame-no-crash.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/html/marquee-without-frame-no-crash-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/security/rel-noopener/window-open.html View 1 chunk +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/CreateWindow.cpp View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (18 generated)
Mike West
WDYT, Jochen? I think this is a sane usage of `windowCount`, but, you know.. ugly.
4 years, 2 months ago (2016-09-30 09:44:57 UTC) #4
jochen (gone - plz use gerrit)
I'm not sure whether noopener should return a new window object, or the existing one ...
4 years, 2 months ago (2016-09-30 09:47:32 UTC) #5
jochen (gone - plz use gerrit)
wanna split out the return null fix while we discuss the other?
4 years, 2 months ago (2016-09-30 11:14:28 UTC) #10
Mike West
On 2016/09/30 at 11:14:28, jochen wrote: > wanna split out the return null fix while ...
4 years, 2 months ago (2016-09-30 12:36:35 UTC) #13
Mike West
Based on the discussion at https://github.com/whatwg/html/pull/1842 (https://github.com/whatwg/html/pull/1842#issuecomment-251273247 in particular), I think this reflects the behavior ...
4 years, 2 months ago (2016-10-05 12:24:44 UTC) #16
jochen (gone - plz use gerrit)
lgtm
4 years, 2 months ago (2016-10-05 12:26:40 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2379313002/40001
4 years, 2 months ago (2016-10-06 06:38:47 UTC) #21
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp: While running git apply --index -3 -p1; error: patch ...
4 years, 2 months ago (2016-10-06 06:51:01 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2379313002/60001
4 years, 2 months ago (2016-10-06 08:57:23 UTC) #26
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-06 10:15:13 UTC) #27
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 10:16:55 UTC) #29
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2fde9de3e9ffe7794844ddf9ea3640c5b418b6e5
Cr-Commit-Position: refs/heads/master@{#423493}

Powered by Google App Engine
This is Rietveld 408576698