Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/assert_selection.js |
| diff --git a/third_party/WebKit/LayoutTests/editing/assert_selection.js b/third_party/WebKit/LayoutTests/editing/assert_selection.js |
| index c615527057615aa8bb120fe1d2f4e71d7a901b91..836a8e5595e02e75f3a8305147171f746a44cd5c 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/assert_selection.js |
| +++ b/third_party/WebKit/LayoutTests/editing/assert_selection.js |
| @@ -517,6 +517,8 @@ class Sample { |
| /** @const @type {!Selection} */ |
| this.selection_ = this.iframe_.contentWindow.getSelection(); |
| this.selection_.document = this.document_; |
| + this.selection_.document.offsetLeft = this.iframe_.offsetLeft; |
|
yosin_UTC9
2016/06/30 03:47:37
Not sure about these changes.
Document doesn't hav
yoichio
2016/07/04 06:28:17
That's because we need iframe offset to use eventS
|
| + this.selection_.document.offsetTop = this.iframe_.offsetTop; |
| this.load(sampleText); |
| } |
| @@ -534,7 +536,7 @@ class Sample { |
| load(sampleText) { |
| const anchorMarker = sampleText.indexOf('^'); |
| const focusMarker = sampleText.indexOf('|'); |
| - if (focusMarker < 0) { |
| + if (focusMarker < 0 && anchorMarker >= 0) { |
|
yosin_UTC9
2016/06/30 03:47:37
We should have another CL for this change to expli
|
| throw new Error(`You should specify caret position in "${sampleText}".`); |
| } |
| if (focusMarker != sampleText.lastIndexOf('|')) { |