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

Issue 879423003: Move Location to DOMWindow (Closed)

Created:
5 years, 10 months ago by Nate Chapin
Modified:
5 years, 10 months ago
Reviewers:
haraken, sof, dcheng
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, cmumford, dglazkov+blink, dgrogan, eae+blinkwatch, ed+blinkwatch_opera.com, gavinp+loader_chromium.org, gyuyoung.kim_webkit.org, jsbell+idb_chromium.org, kinuko+fileapi, mlamouri+watch-blink_chromium.org, mvanouwerkerk+watch_chromium.org, nhiroki, rwlbuis, timvolodine, tommyw+watchlist_chromium.org, tyoshino+watch_chromium.org, tzik
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move Location to DOMWindow This allows a RemoteFrame to be navigated via the location API. * Make DOMWindowProperty RemoteFrame-friendly. Add a localFrame() accessor that returns null if the frame is remote, and use that instead of Frame in many callsites. * Move DOMWindowProperty registration from LocalDOMWindow to DOMWindow * Move Location from LocalDOMWindow to DOMWindow. * Add a bunch of ASSERTs to ensure that a Location attached to a RemoteFrame is not used in a way that allows observation of the current URL. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189946

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : +test #

Patch Set 4 : #

Total comments: 10

Patch Set 5 : Remove DOMWindowProperty changes #

Total comments: 15

Patch Set 6 : Address comments #

Total comments: 9

Patch Set 7 : reset during willDetachFrameHost #

Total comments: 7

Patch Set 8 : resetLocation call to Frame::detach #

Total comments: 7

Patch Set 9 : Rebase, #include cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -46 lines) Patch
M Source/core/frame/DOMWindow.h View 1 2 3 4 5 6 7 8 6 chunks +10 lines, -7 lines 0 comments Download
M Source/core/frame/DOMWindow.cpp View 1 2 3 4 5 6 2 chunks +28 lines, -0 lines 0 comments Download
M Source/core/frame/Frame.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 3 4 5 6 7 3 chunks +2 lines, -9 lines 0 comments Download
M Source/core/frame/Location.h View 1 2 3 4 5 6 7 2 chunks +14 lines, -6 lines 0 comments Download
M Source/core/frame/Location.cpp View 1 2 3 4 5 9 chunks +12 lines, -14 lines 0 comments Download
M Source/core/frame/RemoteDOMWindow.h View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/frame/RemoteDOMWindow.cpp View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 2 chunks +36 lines, -1 line 0 comments Download

Messages

Total messages: 33 (4 generated)
Nate Chapin
The interesting changes are in Location, DOMWindowProperty, and moving stuff from LocalDOMWindow to DOMWindow. Everything ...
5 years, 10 months ago (2015-01-29 00:08:36 UTC) #2
dcheng
After thinking about this more, I think there's a third option to reduce the amount ...
5 years, 10 months ago (2015-02-02 19:27:52 UTC) #3
dcheng
(actually adding haraken this time)
5 years, 10 months ago (2015-02-02 19:49:19 UTC) #4
Nate Chapin
PTAL https://codereview.chromium.org/879423003/diff/60001/Source/web/tests/WebFrameTest.cpp File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/879423003/diff/60001/Source/web/tests/WebFrameTest.cpp#newcode6918 Source/web/tests/WebFrameTest.cpp:6918: RemoteNavigationClient() { } On 2015/02/02 19:27:52, dcheng wrote: ...
5 years, 10 months ago (2015-02-02 21:02:00 UTC) #5
dcheng
lgtm modulo question about oilpan https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/Location.h File Source/core/frame/Location.h (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/Location.h#newcode49 Source/core/frame/Location.h:49: // it needs a ...
5 years, 10 months ago (2015-02-02 21:50:36 UTC) #6
sof
https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/Location.h File Source/core/frame/Location.h (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/Location.h#newcode49 Source/core/frame/Location.h:49: // it needs a manual call to reset() from ...
5 years, 10 months ago (2015-02-02 22:53:05 UTC) #8
haraken
https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp#newcode109 Source/core/frame/DOMWindow.cpp:109: // Location needs to be reset manually because it ...
5 years, 10 months ago (2015-02-03 00:56:09 UTC) #10
dcheng
https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp#newcode109 Source/core/frame/DOMWindow.cpp:109: // Location needs to be reset manually because it ...
5 years, 10 months ago (2015-02-03 08:22:54 UTC) #11
haraken
https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.cpp#newcode109 Source/core/frame/DOMWindow.cpp:109: // Location needs to be reset manually because it ...
5 years, 10 months ago (2015-02-03 08:24:09 UTC) #12
Nate Chapin
https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.h File Source/core/frame/DOMWindow.h (right): https://codereview.chromium.org/879423003/diff/80001/Source/core/frame/DOMWindow.h#newcode51 Source/core/frame/DOMWindow.h:51: EventTargetWithInlineData::trace(visitor); On 2015/02/03 00:56:09, haraken wrote: > > Nit: ...
5 years, 10 months ago (2015-02-03 19:17:21 UTC) #13
sof
https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp#newcode19 Source/core/frame/DOMWindow.cpp:19: reset(); This is problematic in an Oilpan setting, as ...
5 years, 10 months ago (2015-02-03 21:25:10 UTC) #14
sof
https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp#newcode19 Source/core/frame/DOMWindow.cpp:19: reset(); On 2015/02/03 21:25:10, sof wrote: > This is ...
5 years, 10 months ago (2015-02-03 21:28:06 UTC) #15
Nate Chapin
https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp#newcode19 Source/core/frame/DOMWindow.cpp:19: reset(); On 2015/02/03 21:25:10, sof wrote: > This is ...
5 years, 10 months ago (2015-02-06 19:39:58 UTC) #16
sof
Looks good, about ready. Could you trigger some trybot runs? https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp#newcode19 ...
5 years, 10 months ago (2015-02-07 17:09:32 UTC) #17
haraken
https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h File Source/core/frame/Location.h (right): https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h#newcode97 Source/core/frame/Location.h:97: RawPtrWillBeWeakMember<Frame> m_frame; On 2015/02/07 17:09:32, sof wrote: > Don't ...
5 years, 10 months ago (2015-02-08 01:19:40 UTC) #18
sof
https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h File Source/core/frame/Location.h (right): https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h#newcode97 Source/core/frame/Location.h:97: RawPtrWillBeWeakMember<Frame> m_frame; On 2015/02/08 01:19:40, haraken wrote: > On ...
5 years, 10 months ago (2015-02-08 06:42:13 UTC) #19
sof
On 2015/02/08 06:42:13, sof wrote: > https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h > File Source/core/frame/Location.h (right): > > https://codereview.chromium.org/879423003/diff/120001/Source/core/frame/Location.h#newcode97 > ...
5 years, 10 months ago (2015-02-09 18:57:17 UTC) #20
Nate Chapin
https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp File Source/core/frame/DOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/100001/Source/core/frame/DOMWindow.cpp#newcode19 Source/core/frame/DOMWindow.cpp:19: reset(); On 2015/02/07 17:09:32, sof wrote: > On 2015/02/06 ...
5 years, 10 months ago (2015-02-09 19:05:57 UTC) #21
dcheng
It looks like window.location is also still accessible on a detached Window in IE. That ...
5 years, 10 months ago (2015-02-09 23:29:58 UTC) #22
sof
On 2015/02/09 23:29:58, dcheng wrote: > It looks like window.location is also still accessible on ...
5 years, 10 months ago (2015-02-10 08:47:54 UTC) #23
Nate Chapin
https://codereview.chromium.org/881683003/ updated the test expectations for the test that was failing with this patch, so ...
5 years, 10 months ago (2015-02-10 19:45:27 UTC) #24
dcheng
https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp#newcode652 Source/core/frame/LocalDOMWindow.cpp:652: resetLocation(); Is it still necessary to call this here? ...
5 years, 10 months ago (2015-02-10 23:02:18 UTC) #25
Nate Chapin
lgtm https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/RemoteFrame.cpp File Source/core/frame/RemoteFrame.cpp (right): https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/RemoteFrame.cpp#newcode52 Source/core/frame/RemoteFrame.cpp:52: WindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); On 2015/02/10 23:02:18, dcheng ...
5 years, 10 months ago (2015-02-10 23:22:02 UTC) #26
Nate Chapin
On 2015/02/10 23:22:02, Nate Chapin wrote: > lgtm > > https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/RemoteFrame.cpp > File Source/core/frame/RemoteFrame.cpp (right): ...
5 years, 10 months ago (2015-02-10 23:23:40 UTC) #27
Nate Chapin
https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp#newcode652 Source/core/frame/LocalDOMWindow.cpp:652: resetLocation(); On 2015/02/10 23:02:18, dcheng wrote: > Is it ...
5 years, 10 months ago (2015-02-10 23:30:18 UTC) #28
haraken
LGTM
5 years, 10 months ago (2015-02-11 00:05:49 UTC) #29
dcheng
lgtm https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (right): https://codereview.chromium.org/879423003/diff/140001/Source/core/frame/LocalDOMWindow.cpp#newcode652 Source/core/frame/LocalDOMWindow.cpp:652: resetLocation(); On 2015/02/10 23:30:18, Nate Chapin wrote: > ...
5 years, 10 months ago (2015-02-11 00:16:14 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/879423003/160001
5 years, 10 months ago (2015-02-11 00:32:03 UTC) #32
commit-bot: I haz the power
5 years, 10 months ago (2015-02-11 03:05:02 UTC) #33
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189946

Powered by Google App Engine
This is Rietveld 408576698