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

Issue 272703007: Call setPosition with valid offset in another layout test. (Closed)

Created:
6 years, 7 months ago by yoichio
Modified:
6 years, 7 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Call setPosition with valid offset in another layout test. Some layout tests call setPosition(node, offset) with large |offset| which is larger than |node|'s length but it is invalid in the standard: https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#dom-selection-collapse A typically case is that, image following HTML: <div>text</div> if you want to set a caret to between 'x' and 't', you should call Selection.setPostion(div.firstChild, 3). However, many layout tests call Selection.setPosition(div, 3), which is invalid. Many of those tests want to just set a caret to a last position of the node so this CL changes to call setPosition(node, node.childNodes.length). I'm going to change Selection.setPosition to throw an exception for such a invalid call through Range.setStart/End. This CL is similar to previous one: https://src.chromium.org/viewvc/blink?revision=173167&view=revision BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173629

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M LayoutTests/editing/input/select-all-clear-input-method.html View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
yoichio
6 years, 7 months ago (2014-05-08 08:38:48 UTC) #1
Yuta Kitamura
lgtm
6 years, 7 months ago (2014-05-08 08:47:07 UTC) #2
yoichio
The CQ bit was checked by yoichio@chromium.org
6 years, 7 months ago (2014-05-08 08:49:14 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoichio@chromium.org/272703007/1
6 years, 7 months ago (2014-05-08 08:49:59 UTC) #4
commit-bot: I haz the power
6 years, 7 months ago (2014-05-08 10:00:03 UTC) #5
Message was sent while issue was closed.
Change committed as 173629

Powered by Google App Engine
This is Rietveld 408576698