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

Issue 243173004: Make window.screen property non replaceable (Closed)

Created:
6 years, 8 months ago by Inactive
Modified:
6 years, 8 months ago
CC:
blink-reviews, arv+blink, watchdog-blink-watchlist_google.com, keishi
Visibility:
Public.

Description

Make window.screen property non replaceable Make window.screen property non replaceable for consistency with other browsers (tested with Firefox 28 and IE11). This CL also adds an internals.setOverrideScreenData() utility function for Layout tests as the fast/forms/page-popup/page-popup-adjust-rect.html test needs to be able to override the screen object. BUG=364937 TEST=fast/dom/Window/get-set-properties.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172134 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172495

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Fix clang error #

Total comments: 2

Patch Set 4 : Do not add a new Internals API #

Total comments: 3

Patch Set 5 : Fix delete statements #

Patch Set 6 : Fix indentation #

Patch Set 7 : Take arv's feedback into consideration #

Patch Set 8 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -16 lines) Patch
M LayoutTests/fast/dom/Window/get-set-properties.html View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/get-set-properties-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/Window/window-property-shadowing.html View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/dom/Window/window-property-shadowing-expected.txt View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html View 1 2 3 4 5 6 1 chunk +10 lines, -8 lines 0 comments Download
M LayoutTests/fast/js/var-declarations-shadowing.html View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/js/var-declarations-shadowing-expected.txt View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/frame/Window.idl View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (0 generated)
Inactive
6 years, 8 months ago (2014-04-18 20:42:46 UTC) #1
abarth-chromium
Why does that test need to override the screen data?
6 years, 8 months ago (2014-04-18 20:58:58 UTC) #2
Inactive
+keishi in cc. https://codereview.chromium.org/243173004/diff/40001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html File LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html (left): https://codereview.chromium.org/243173004/diff/40001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html#oldcode30 LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html:30: popupWindow.screen = { This test was ...
6 years, 8 months ago (2014-04-18 21:08:40 UTC) #3
abarth-chromium
On 2014/04/18 21:08:40, Chris Dumez wrote: > The test overrides the screen property here for ...
6 years, 8 months ago (2014-04-18 21:11:44 UTC) #4
abarth-chromium
I'd rather not add yet-another-internals API that's only going to be used by one test ...
6 years, 8 months ago (2014-04-18 21:12:38 UTC) #5
Inactive
On 2014/04/18 21:12:38, abarth wrote: > I'd rather not add yet-another-internals API that's only going ...
6 years, 8 months ago (2014-04-18 21:17:09 UTC) #6
Inactive
On 2014/04/18 21:11:44, abarth wrote: > On 2014/04/18 21:08:40, Chris Dumez wrote: > > The ...
6 years, 8 months ago (2014-04-18 21:18:30 UTC) #7
Inactive
For the record, here is what the diff looks like on my machine: http://pastebin.com/Cs3hTbMx 1920 ...
6 years, 8 months ago (2014-04-18 21:26:08 UTC) #8
abarth-chromium
Yeah, maybe content_shell should lie about the screen size when run with --dump-render-tree to make ...
6 years, 8 months ago (2014-04-18 21:46:37 UTC) #9
Inactive
keishi@, by any chance, would you be willing to help updating your layout test (fast/forms/page-popup/page-popup-adjust-rect.html) ...
6 years, 8 months ago (2014-04-21 18:15:23 UTC) #10
Inactive
I found a way to update fast/forms/page-popup/page-popup-adjust-rect.html so that is still works even if window.screen ...
6 years, 8 months ago (2014-04-21 18:32:07 UTC) #11
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html File LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html (right): https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html#newcode30 LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html:30: delete w.screen['width'] delete w.screen.width;
6 years, 8 months ago (2014-04-21 19:18:16 UTC) #12
arv (Not doing code reviews)
https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html File LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html (right): https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html#newcode29 LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html:29: function overridePopupWindowScreenObject(w) { You should also be able to ...
6 years, 8 months ago (2014-04-21 19:23:42 UTC) #13
Inactive
https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html File LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html (right): https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html#newcode29 LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html:29: function overridePopupWindowScreenObject(w) { On 2014/04/21 19:23:43, arv wrote: > ...
6 years, 8 months ago (2014-04-21 19:51:52 UTC) #14
arv (Not doing code reviews)
On 2014/04/21 19:51:52, Chris Dumez wrote: > https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html > File LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html (right): > > https://codereview.chromium.org/243173004/diff/60001/LayoutTests/fast/forms/page-popup/page-popup-adjust-rect.html#newcode29 ...
6 years, 8 months ago (2014-04-21 19:53:36 UTC) #15
Inactive
On 2014/04/21 19:53:36, arv wrote: > On 2014/04/21 19:51:52, Chris Dumez wrote: > > > ...
6 years, 8 months ago (2014-04-21 20:24:31 UTC) #16
arv (Not doing code reviews)
On 2014/04/21 20:24:31, Chris Dumez wrote: > On 2014/04/21 19:53:36, arv wrote: > > On ...
6 years, 8 months ago (2014-04-21 20:28:50 UTC) #17
Inactive
> I'm sorry for providing bad example code :'( > > The following works in ...
6 years, 8 months ago (2014-04-21 20:33:01 UTC) #18
tkent
public API change LGTM
6 years, 8 months ago (2014-04-22 04:49:34 UTC) #19
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-22 12:58:48 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/243173004/120001
6 years, 8 months ago (2014-04-22 12:58:58 UTC) #21
commit-bot: I haz the power
Change committed as 172134
6 years, 8 months ago (2014-04-22 13:06:41 UTC) #22
Inactive
The fix has landed on Chromium side (https://src.chromium.org/viewvc/chrome?view=rev&revision=265738), I am relanding this.
6 years, 8 months ago (2014-04-23 21:15:05 UTC) #23
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-23 21:15:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/243173004/140001
6 years, 8 months ago (2014-04-23 21:15:35 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-23 22:23:35 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 8 months ago (2014-04-23 22:23:35 UTC) #27
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 8 months ago (2014-04-24 12:06:21 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/243173004/140001
6 years, 8 months ago (2014-04-24 12:06:40 UTC) #29
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 13:12:39 UTC) #30
Message was sent while issue was closed.
Change committed as 172495

Powered by Google App Engine
This is Rietveld 408576698