[Webkit-unassigned] [Bug 51653] Text selection code shouldn't be invoked when -webkit-user-select is none

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 28 13:58:47 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=51653


Eric Seidel <eric at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77519|review?                     |review-
               Flag|                            |




--- Comment #5 from Eric Seidel <eric at webkit.org>  2010-12-28 13:58:47 PST ---
(From update of attachment 77519)
View in context: https://bugs.webkit.org/attachment.cgi?id=77519&action=review

Good idea, we should just clean this up slightly.

> WebCore/page/EventHandler.cpp:617
> +    // Don't modify the selection for nodes with -webkit-user-select: none.
> +    const RenderStyle* style = targetRenderer->style();
> +    const EUserSelect userSelect = style->userSelect();
> +    if (userSelect == SELECT_NONE) {
> +        const RenderStyle* styleForFirstLine = targetRenderer->firstLineStyle();
> +        if (styleForFirstLine == style || styleForFirstLine->userSelect() == SELECT_NONE)
> +            return;
> +    }

This feels like a separate (private or static) function.

if (!selectionEnabled())
    return;

or something like that, no?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list