Bug 165299 - Can not select whole line when using flexbox
Summary: Can not select whole line when using flexbox
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Safari 10
Hardware: Macintosh macOS 10.12
: P2 Normal
Assignee: zalan
Depends on:
Reported: 2016-12-02 03:14 PST by Samuel Williams
Modified: 2016-12-06 15:07 PST (History)
9 users (show)

See Also:

Working example. (569 bytes, text/html)
2016-12-02 03:14 PST, Samuel Williams
no flags Details
Failing example (568 bytes, text/html)
2016-12-02 03:16 PST, Samuel Williams
no flags Details
Patch (10.30 KB, patch)
2016-12-06 14:26 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Williams 2016-12-02 03:14:04 PST
Created attachment 295938 [details]
Working example.

Cannot select both "xxx" and "foo = bar" in the attached example by clicking mouse cursor and dragging along line. Removing display: flexbox makes it possible, as expected.
Comment 1 Samuel Williams 2016-12-02 03:16:07 PST
Created attachment 295939 [details]
Failing example
Comment 2 zalan 2016-12-06 13:26:21 PST
It's because RootInlineBox::selectionTopAdjustedForPrecedingBlock() assumes preceding block is always above the current line (while in flex layout, they could very well share the same line).
Comment 3 zalan 2016-12-06 14:26:24 PST
Created attachment 296322 [details]
Comment 4 Dave Hyatt 2016-12-06 14:34:09 PST
Comment on attachment 296322 [details]

Comment 5 WebKit Commit Bot 2016-12-06 15:07:09 PST
Comment on attachment 296322 [details]

Clearing flags on attachment: 296322

Committed r209427: <http://trac.webkit.org/changeset/209427>
Comment 6 WebKit Commit Bot 2016-12-06 15:07:14 PST
All reviewed patches have been landed.  Closing bug.