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 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
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
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
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 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
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
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
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 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
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.
(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.
2017-08-30 03:59 PDT, Javier Fernandez
2017-09-05 08:31 PDT, Javier Fernandez
2017-09-05 09:39 PDT, Build Bot
2017-09-05 09:43 PDT, Build Bot
2017-09-05 09:58 PDT, Build Bot
2017-09-05 10:07 PDT, Build Bot
2017-09-06 02:42 PDT, Javier Fernandez
2017-09-06 02:55 PDT, Javier Fernandez
2017-09-06 03:51 PDT, Build Bot
2017-09-06 04:03 PDT, Build Bot
2017-09-06 04:18 PDT, Build Bot
2017-09-06 04:33 PDT, Build Bot
2017-09-06 15:54 PDT, Javier Fernandez
2017-09-06 17:34 PDT, Build Bot
2017-09-18 00:43 PDT, Javier Fernandez
2017-09-18 02:22 PDT, Build Bot
2017-09-21 02:34 PDT, Javier Fernandez