Created attachment 319356 [details] Test case to reproduce the bug This bug is the first one of several issues we have with selection and out-of-flow elements. Attached a reduced case to reproduce the issue. Selecting from any point inside the float element and dragging outside its visible area will cause the selection to change it's visible boundaries, in a very weird and unpredictable way. This particular issue address the case of float elements children of an in-flow block-level box. In this scenario, we use the LayoutBlock hit testing logic to determine the position of the selection point. Since we exclude float elements from the valid candidates, we end up setting the parent node. This logic implies that original start/end selection points will be transposed.
Created attachment 319897 [details] Patch
Comment on attachment 319897 [details] Patch Attachment 319897 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4454792 New failing tests: fast/multicol/hit-test-above-or-below.html fast/writing-mode/positionForPoint.html fast/events/drag-and-drop-link-into-focused-contenteditable.html editing/selection/click-in-margins-inside-editable-div.html
Created attachment 319906 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319897 [details] Patch Attachment 319897 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4454798 New failing tests: fast/multicol/hit-test-above-or-below.html fast/writing-mode/positionForPoint.html editing/selection/click-in-margins-inside-editable-div.html
Created attachment 319909 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 319897 [details] Patch Attachment 319897 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4454826 New failing tests: fast/multicol/hit-test-above-or-below.html fast/writing-mode/positionForPoint.html fast/events/drag-and-drop-link-into-focused-contenteditable.html editing/selection/click-in-margins-inside-editable-div.html
Created attachment 319910 [details] Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319897 [details] Patch Attachment 319897 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4454825 New failing tests: editing/selection/select-out-of-floated-non-editable-05.html editing/selection/select-out-of-floated-non-editable-10.html editing/selection/select-out-of-floated-non-editable-01.html fast/writing-mode/positionForPoint.html editing/selection/select-out-of-floated-non-editable-12.html editing/selection/select-out-of-floated-non-editable-04.html editing/selection/select-out-of-floated-non-editable-09.html fast/multicol/hit-test-above-or-below.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/select-out-of-floated-non-editable-06.html editing/selection/select-out-of-floated-non-editable-02.html editing/selection/select-out-of-floated-non-editable-08.html editing/selection/select-out-of-floated-non-editable-11.html editing/selection/select-out-of-floated-non-editable-03.html
Created attachment 319912 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Created attachment 319994 [details] Patch
Created attachment 319996 [details] Patch
Comment on attachment 319996 [details] Patch Attachment 319996 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4461750 New failing tests: fast/multicol/hit-test-above-or-below.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/select-out-of-floated-non-editable-12.html editing/selection/click-in-margins-inside-editable-div.html editing/selection/select-out-of-floated-non-editable-09.html
Created attachment 320002 [details] Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 319996 [details] Patch Attachment 319996 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4461893 New failing tests: editing/selection/select-out-of-floated-non-editable-12.html fast/events/drag-and-drop-link-into-focused-contenteditable.html editing/selection/select-out-of-floated-non-editable-09.html fast/multicol/hit-test-above-or-below.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/click-in-margins-inside-editable-div.html
Created attachment 320003 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319996 [details] Patch Attachment 319996 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4461898 New failing tests: editing/selection/select-out-of-floated-non-editable-12.html fast/events/drag-and-drop-link-into-focused-contenteditable.html editing/selection/select-out-of-floated-non-editable-09.html fast/multicol/hit-test-above-or-below.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/click-in-margins-inside-editable-div.html
Created attachment 320004 [details] Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 319996 [details] Patch Attachment 319996 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4462000 New failing tests: editing/selection/select-out-of-floated-non-editable-05.html editing/selection/select-out-of-floated-non-editable-10.html editing/selection/select-out-of-floated-non-editable-01.html editing/selection/select-out-of-floated-non-editable-12.html editing/selection/select-out-of-floated-non-editable-04.html editing/selection/select-out-of-floated-non-editable-09.html fast/multicol/hit-test-above-or-below.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/select-out-of-floated-non-editable-06.html editing/selection/select-out-of-floated-non-editable-02.html editing/selection/select-out-of-floated-non-editable-08.html editing/selection/select-out-of-floated-non-editable-11.html editing/selection/select-out-of-floated-non-editable-03.html
Created attachment 320007 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Created attachment 320070 [details] Patch
Comment on attachment 320070 [details] Patch Attachment 320070 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4468830 New failing tests: editing/selection/select-out-of-floated-non-editable-05.html editing/selection/select-out-of-floated-non-editable-10.html editing/selection/select-out-of-floated-non-editable-01.html editing/selection/select-out-of-floated-non-editable-12.html editing/selection/select-out-of-floated-non-editable-04.html editing/selection/select-out-of-floated-non-editable-09.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/select-out-of-floated-non-editable-06.html editing/selection/select-out-of-floated-non-editable-02.html editing/selection/select-out-of-floated-non-editable-08.html editing/selection/select-out-of-floated-non-editable-11.html editing/selection/select-out-of-floated-non-editable-03.html
Created attachment 320082 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Comment on attachment 320070 [details] Patch r=me
Comment on attachment 320070 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320070&action=review > Source/WebCore/rendering/RenderBlock.cpp:2714 > + || (blocksAreFlipped && pointInLogicalContents.y() == childLogicalBottom))) { > return positionForPointRespectingEditingBoundaries(*this, *childBox, pointInContents); > + } Nit: This doesn't match our style guideline. PLEASE DON'T ADD curly braces.
Created attachment 321081 [details] Patch
Comment on attachment 321081 [details] Patch Attachment 321081 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4581447 New failing tests: editing/selection/select-out-of-floated-non-editable-05.html editing/selection/select-out-of-floated-non-editable-10.html editing/selection/select-out-of-floated-non-editable-01.html editing/selection/select-out-of-floated-non-editable-12.html editing/selection/select-out-of-floated-non-editable-04.html editing/selection/select-out-of-floated-non-editable-09.html editing/selection/select-out-of-floated-non-editable-07.html editing/selection/select-out-of-floated-non-editable-06.html editing/selection/select-out-of-floated-non-editable-02.html editing/selection/select-out-of-floated-non-editable-08.html editing/selection/select-out-of-floated-non-editable-11.html editing/selection/select-out-of-floated-non-editable-03.html
Created attachment 321085 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Could anybody give any hint about the reason of this io-simulator specific failures ? It looks like the eventSender based selection is not working at all in the simulator. Is that the case ?
(In reply to Javier Fernandez from comment #28) > Could anybody give any hint about the reason of this io-simulator specific > failures ? It looks like the eventSender based selection is not working at > all in the simulator. Is that the case ? Unfortunately, the EventSender.mouseDown() and friends are empty stubs on iOS WebKit2 (see Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm); there are a few existing selection-related LayoutTests that use UIScriptController to synthesize text selection gestures instead, but those don't run in OpenSource. I think you'll need to mark these as [ Fail ] or [ Skip ] in LayoutTests/platform/ios-wk2/TestExpectations.
Right, EventSender does not simulate mouse events on iOS. You should probably skip the tests on iOS.
(In reply to Wenson Hsieh from comment #29) > (In reply to Javier Fernandez from comment #28) > > Could anybody give any hint about the reason of this io-simulator specific > > failures ? It looks like the eventSender based selection is not working at > > all in the simulator. Is that the case ? > > Unfortunately, the EventSender.mouseDown() and friends are empty stubs on > iOS WebKit2 (see > Tools/WebKitTestRunner/InjectedBundle/ios/EventSenderProxyIOS.mm); there are > a few existing selection-related LayoutTests that use UIScriptController to > synthesize text selection gestures instead, but those don't run in > OpenSource. For some examples, see: editing/selection/character-granularity-rect.html, long-press-then-drag-down-to-change-selected-text.html. UIScriptController.longPressAtPoint() is supported in OpenSource and can be used to select text, but any tests that additionally depend on tap gestures (e.g. to begin editing text fields) are skipped.
Created attachment 321417 [details] Patch Skip tests on the iOS simulator
Comment on attachment 321417 [details] Patch Clearing flags on attachment: 321417 Committed r222317: <http://trac.webkit.org/changeset/222317>
All reviewed patches have been landed. Closing bug.
<rdar://problem/34694233>
The iOS Simulator expectations committed in <https://trac.webkit.org/changeset/222317/webkit> should have been placed in the iOS expectations directory. Move them in <https://trac.webkit.org/changeset/227202/webkit>.