WebKit Bugzilla
Attachment 346392 Details for
Bug 188263
: Reformat editable selection tests to remove potential flakeyness due to autoscroll
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188263-20180802105927.patch (text/plain), 29.46 KB, created by
Megan Gardner
on 2018-08-02 10:59:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Megan Gardner
Created:
2018-08-02 10:59:28 PDT
Size:
29.46 KB
patch
obsolete
>Subversion Revision: 234439 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index ca20d1559eac38794790f81d77a6cfa14035ab41..dc4e923fb870b44fdb29001951090387f2ef8e21 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,24 @@ >+2018-08-02 Megan Gardner <megan_gardner@apple.com> >+ >+ Reformat editable selection tests to remove potential flakeyness due to autoscroll >+ https://bugs.webkit.org/show_bug.cgi?id=188263 >+ <rdar://problem/40565375> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Change the format of these editable selection tests to put the editable content at the top of the page so >+ that when selecting we do not run into the page trying to autoscroll while selecting, which makes the tests more >+ flakey are more difficult to get accurate and consistent answers. >+ >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html: >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html: >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html: >+ * fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html: >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html: >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html: >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html: >+ * fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html: >+ > 2018-07-31 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Spelling suggestions cannot be selected in focused form controls when zoomed in >diff --git a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >index dbbdc6e4940fbc5880dc4b86a6648084c913a6a7..fb3cd03aaaafbb64fe7d9e720bd3968bedb9221d 100644 >--- a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-down-to-change-selected-text.html >@@ -19,17 +19,17 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; > var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; > var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > var dragX = firstTargetRect.x + firstTargetRect.width; >- var dragY2 = secondTargetRect.y + secondTargetRect.height + noneditableToEditableOffset; >- var dragY3 = thirdTargetRect.y + thirdTargetRect.height + noneditableToEditableOffset; >- var dragY4 = firstTargetRect.y - firstTargetRect.height + noneditableToEditableOffset; >+ var dragY2 = secondTargetRect.y + secondTargetRect.height - editableToNoneditableOffset; >+ var dragY3 = thirdTargetRect.y + thirdTargetRect.height - editableToNoneditableOffset; >+ var dragY4 = firstTargetRect.y - firstTargetRect.height - editableToNoneditableOffset; > > await tapAtPoint(tapPointX, tapPointY); > if (document.getSelection().type == "Caret") >@@ -119,12 +119,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html >index e4385d66521f7151b81a3ba9a6d541aa7332fdd8..7d524f58c0ebcdae8349cc2a1b44d3c37716d02a 100644 >--- a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-left-to-change-selected-text.html >@@ -19,13 +19,13 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; > var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; > var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y - editableToNoneditableOffset; > var dragX = firstTargetRect.x; > var dragX2 = secondTargetRect.x; > var dragX3 = thirdTargetRect.x; >@@ -119,12 +119,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore aliqua magna. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="noneditable"> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et <span id="thirdSelection"></span>dolore <span id="secondSelection"></span>aliqua <span id="firstSelection">magna</span>. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >- <div id="editable" contenteditable> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore aliqua magna. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html >index 320190c78a2903dd3d644b8f4f8650003a9288cd..2f7039d5343c01219cb680085009c8c600bfbc15 100644 >--- a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-right-to-change-selected-text.html >@@ -19,13 +19,13 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; > var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; > var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > var dragX = firstTargetRect.x + firstTargetRect.width; > var dragX2 = secondTargetRect.x; > var dragX3 = thirdTargetRect.x; >@@ -119,12 +119,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <span id="firstSelection">magna</span> aliqua.<span id="secondSelection"></span> Ut<span id="thirdSelection"></span> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <span id="firstSelection">magna</span> aliqua.<span id="secondSelection"></span> Ut<span id="thirdSelection"></span> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html >index b9d2d0cdd04b5d3a61ba1507b10b1912db2587ad..d66acd460f6241397c8a3ccceaa1fe1ed0aa7aa1 100644 >--- a/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/double-tap-on-editable-content-for-selection-then-drag-up-to-change-selected-text.html >@@ -19,17 +19,17 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var tapPointX = editableTargetRect.x + editableTargetRect.width / 2; > var tapPointY = editableTargetRect.y + editableTargetRect.height / 2; > var doubleTapPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var doubleTapPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y - editableToNoneditableOffset; > var dragX = firstTargetRect.x; >- var dragY2 = secondTargetRect.y + noneditableToEditableOffset; >- var dragY3 = thirdTargetRect.y + noneditableToEditableOffset; >- var dragY4 = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var dragY2 = secondTargetRect.y - editableToNoneditableOffset; >+ var dragY3 = thirdTargetRect.y - editableToNoneditableOffset; >+ var dragY4 = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > > await tapAtPoint(tapPointX, tapPointY); > if (document.getSelection().type == "Caret") >@@ -119,12 +119,12 @@ > <meta name="viewport" content="initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">at</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt at labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">at</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html >index d3df939a4be73bd6dcc3e0c80ba13845ac0d17a2..27460b22541c0c68fea7e825813b9250abf267e7 100644 >--- a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-down-to-change-selected-text.html >@@ -19,15 +19,15 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > var dragX = firstTargetRect.x + firstTargetRect.width; >- var dragY2 = secondTargetRect.y + secondTargetRect.height + noneditableToEditableOffset; >- var dragY3 = thirdTargetRect.y + thirdTargetRect.height + noneditableToEditableOffset; >- var dragY4 = firstTargetRect.y - firstTargetRect.height + noneditableToEditableOffset; >+ var dragY2 = secondTargetRect.y + secondTargetRect.height - editableToNoneditableOffset; >+ var dragY3 = thirdTargetRect.y + thirdTargetRect.height - editableToNoneditableOffset; >+ var dragY4 = firstTargetRect.y - firstTargetRect.height - editableToNoneditableOffset; > > await longPressAtPoint(pressPointX, pressPointY); > if (document.getSelection().toString() == "sed") >@@ -108,12 +108,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, <span id="firstSelection">sed</span> do eiusmod tempor incididun<span id="secondSelection"></span>t ut labore et dolore mag<span id="thirdSelection"></span>na aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html >index dafaed69f11659905cddc84dfd13647c21bc4dbe..4e97dee19ab54510f6fc3d972d66a1a0c918889f 100644 >--- a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-left-to-change-selected-text.html >@@ -19,11 +19,11 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y - editableToNoneditableOffset; > var dragX = firstTargetRect.x; > var dragX2 = secondTargetRect.x; > var dragX3 = thirdTargetRect.x; >@@ -108,12 +108,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >+ <div id="editable" contenteditable> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="noneditable"> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et <span id="thirdSelection"></span>dolore <span id="secondSelection"></span>magna <span id="firstSelection">aliqua</span>. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >- <div id="editable" contenteditable> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html >index 310f7aed8a0f3ba09c50cdf19cbe7e253a38b7cd..cc5d384eed56105b48a7921a3e9839dbcce3ed0f 100644 >--- a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-right-to-change-selected-text.html >@@ -19,11 +19,11 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > var dragX = firstTargetRect.x + firstTargetRect.width; > var dragX2 = secondTargetRect.x; > var dragX3 = thirdTargetRect.x; >@@ -108,12 +108,12 @@ > <meta name="viewport" content="width=device-width, initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <span id="firstSelection">magna</span> aliqua.<span id="secondSelection"></span> Ut<span id="thirdSelection"></span> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <span id="firstSelection">magna</span> aliqua.<span id="secondSelection"></span> Ut<span id="thirdSelection"></span> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div> >diff --git a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html >index eec34cccc0c649fa9e515687a8e42e8a80a7a589..893a4c720ff44fb770306752cc2e97f9030f03a3 100644 >--- a/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html >+++ b/LayoutTests/fast/events/touch/ios/long-press-on-editable-content-then-drag-up-to-change-selected-text.html >@@ -19,15 +19,15 @@ > var firstTargetRect = document.getElementById('firstSelection').getBoundingClientRect(); > var secondTargetRect = document.getElementById('secondSelection').getBoundingClientRect(); > var thirdTargetRect = document.getElementById('thirdSelection').getBoundingClientRect(); >- var noneditableToEditableOffset = document.getElementById('editable').getBoundingClientRect().y - document.getElementById('noneditable').getBoundingClientRect().y; >+ var editableToNoneditableOffset = document.getElementById('noneditable').getBoundingClientRect().y - document.getElementById('editable').getBoundingClientRect().y; > > var pressPointX = firstTargetRect.x + firstTargetRect.width / 2; >- var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 + noneditableToEditableOffset; >- var dragY = firstTargetRect.y + noneditableToEditableOffset; >+ var pressPointY = firstTargetRect.y + firstTargetRect.height / 2 - editableToNoneditableOffset; >+ var dragY = firstTargetRect.y - editableToNoneditableOffset; > var dragX = firstTargetRect.x; >- var dragY2 = secondTargetRect.y + noneditableToEditableOffset; >- var dragY3 = thirdTargetRect.y + noneditableToEditableOffset; >- var dragY4 = firstTargetRect.y + firstTargetRect.height + noneditableToEditableOffset; >+ var dragY2 = secondTargetRect.y - editableToNoneditableOffset; >+ var dragY3 = thirdTargetRect.y - editableToNoneditableOffset; >+ var dragY4 = firstTargetRect.y + firstTargetRect.height - editableToNoneditableOffset; > > await longPressAtPoint(pressPointX, pressPointY); > if (document.getSelection().toString() == "ut") >@@ -108,12 +108,12 @@ > <meta name="viewport" content="initial-scale=1"> > </head> > <body> >- <div id="noneditable"> >- <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">ut</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >- </div> > <div id="editable" contenteditable> > <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> > </div> >+ <div id="noneditable"> >+ <p>Lorem ipsum dolor sit amet, consectetur<span id="thirdSelection"></span> adipiscing elit, sed d<span id="secondSelection"></span>o eiusmod tempor incididunt <span id="firstSelection">ut</span> labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> >+ </div> > <div id="target"> > This test requires UIScriptController to run. > </div>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188263
:
346392
|
346413
|
346414