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

Issue 886463010: Make arguments to window.{move,resize}{To,By} non-optional (Closed)

Created:
5 years, 10 months ago by Jens Widell
Modified:
5 years, 6 months ago
Reviewers:
philipj_slow, Mike West
CC:
blink-reviews, arv+blink, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make arguments to window.{move,resize}{To,By} non-optional When missing these arguments used to default to "the current value" so calling the functions without arguments was a no-op. This is not compatible with other implementations. In Firefox (35), the arguments are not optional, so calling the functions with fewer than two arguments throws a TypeError. In IE (11), the arguments are optional with zero default value. This patch aligns with Firefox's behavior, and also simplifies the implementation by not dealing with missing arguments. BUG=453421 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197024

Patch Set 1 #

Total comments: 1

Patch Set 2 : adjust additional tests #

Patch Set 3 : rebased #

Patch Set 4 : rebased #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -76 lines) Patch
M LayoutTests/fast/dom/Window/window-resize-and-move-arguments.html View 4 chunks +12 lines, -12 lines 0 comments Download
M LayoutTests/fast/dom/Window/window-resize-and-move-arguments-expected.txt View 4 chunks +12 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt View 1 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/forms/resources/picker-common.js View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M LayoutTests/fast/text/line-break-between-text-nodes-with-inline-blocks.html View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/DOMWindow.h View 1 2 3 1 chunk +5 lines, -13 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/frame/LocalDOMWindow.cpp View 1 2 3 5 chunks +6 lines, -18 lines 2 comments Download
M Source/core/frame/RemoteDOMWindow.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/frame/RemoteDOMWindow.cpp View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/frame/Window.idl View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (6 generated)
Jens Widell
Any comments before I run this by blink-dev@? https://codereview.chromium.org/886463010/diff/1/LayoutTests/fast/forms/resources/picker-common.js File LayoutTests/fast/forms/resources/picker-common.js (right): https://codereview.chromium.org/886463010/diff/1/LayoutTests/fast/forms/resources/picker-common.js#newcode23 LayoutTests/fast/forms/resources/picker-common.js:23: window.moveTo(window.screenX, ...
5 years, 10 months ago (2015-01-29 13:53:44 UTC) #2
Mike West
On 2015/01/29 13:53:44, Jens Widell wrote: > Any comments before I run this by blink-dev@? ...
5 years, 10 months ago (2015-01-29 14:01:51 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/886463010/60001
5 years, 6 months ago (2015-06-11 12:27:13 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-11 13:24:59 UTC) #8
Jens Widell
According to the counter[1], these methods are hardly ever called with too few arguments; it ...
5 years, 6 months ago (2015-06-12 09:00:44 UTC) #10
philipj_slow
Found the blink-dev thread again: https://groups.google.com/a/chromium.org/d/msg/blink-dev/-qvbisAzaPc/x1c_ndpjxYAJ Given the usage I definitely think there's no reason ...
5 years, 6 months ago (2015-06-12 09:04:01 UTC) #11
philipj_slow
lgtm
5 years, 6 months ago (2015-06-12 09:15:16 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/886463010/60001
5 years, 6 months ago (2015-06-12 09:15:30 UTC) #14
philipj_slow
https://codereview.chromium.org/886463010/diff/60001/Source/core/frame/LocalDOMWindow.cpp File Source/core/frame/LocalDOMWindow.cpp (left): https://codereview.chromium.org/886463010/diff/60001/Source/core/frame/LocalDOMWindow.cpp#oldcode1234 Source/core/frame/LocalDOMWindow.cpp:1234: UseCounter::count(document(), UseCounter::WindowMoveResizeMissingArguments); Oh wait, can you remove the now-unused ...
5 years, 6 months ago (2015-06-12 09:16:04 UTC) #15
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=197024
5 years, 6 months ago (2015-06-12 09:19:46 UTC) #16
philipj_slow
5 years, 6 months ago (2015-06-12 09:23:13 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/886463010/diff/60001/Source/core/frame/LocalD...
File Source/core/frame/LocalDOMWindow.cpp (left):

https://codereview.chromium.org/886463010/diff/60001/Source/core/frame/LocalD...
Source/core/frame/LocalDOMWindow.cpp:1234: UseCounter::count(document(),
UseCounter::WindowMoveResizeMissingArguments);
On 2015/06/12 09:16:04, philipj wrote:
> Oh wait, can you remove the now-unused counters?

Too late, but no need for a follow-up if you don't feel like it, I clean out
unused ones from time to time.

Powered by Google App Engine
This is Rietveld 408576698