[webkit-dev] Improve selection with floats
Javier Fernandez
jfernandez at igalia.com
Wed Sep 13 13:05:29 PDT 2017
I'd really appreciate any feedback on this thread from layout experts. I
have a few ideas and some time to work on them, but I'd need to know if
WebKit is interested on exploring them. I know it's a complex logic and
the lack of specification does not help at all.
Thanks.
On 07/09/17 16:40, Javier Fernandez wrote:
> Hi,
>
> I've been working lately on some cases where selection shows an
> unpredictable behavior when applied to cases with float elements;
> basically, selection boundaries jump when dragging over floats. I've
> found this old bug (https://webkit.org/b/101771) which described some of
> these cases. I've attached another case with the same problem.
>
> This weird Selection's behavior is also present in Blink and Gecko:
> - https://crbug.com/758526
> - https://bugzilla.mozilla.org/show_bug.cgi?id=1397514
>
> I'm aware of the issues we have with Selection when the Render Tree
> differs from the DOM Tree's structure, but that's not the case of the
> examples I've been evaluating so far; I think for these cases we can do
> better.
>
> My theory is that the root cause of this issue in most, if not all, the
> cases is that we are not considering floats as valid HitTest candidates.
> Additionally, we exclude floats from the positionForPoint logic,
> implemented in the different render objects.
>
> I'm evaluating a preliminary approach based on considering floats as
> valid HitTest candidates. I started to address a very specific case in
> https://webkit.org/b/176096 and, if it gets enough support, I have plans
> to continue addressing as many cases as possible.
>
> I think we have to assume that we will have issues with floats when they
> create complex render trees, like it happens with other layout models,
> but at least we can improve the simplest cases.
>
> I appreciate any feedback on my current approach and reviews of my
> patches, if we finally want to give this proposal a shot.
>
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
More information about the webkit-dev
mailing list