| Differences between
and this patch
- a/WebCore/ChangeLog +15 lines
Lines 1-3 a/WebCore/ChangeLog_sec1
1
2010-12-27  Noam Rosenthal  <noam.rosenthal@nokia.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        Text selection code shouldn't be invoked when -webkit-user-select is none.
6
        https://bugs.webkit.org/show_bug.cgi?id=51653
7
8
        Check the style for the target node renderer before starting the user selection.
9
        Only perform the user selection tests if -webkit-user-select is set to "text".
10
11
        No new tests. This is an optimization to functionality that's covered by existing tests.
12
13
        * page/EventHandler.cpp:
14
        (WebCore::EventHandler::updateSelectionForMouseDrag):
15
1
2010-12-24  Dan Bernstein  <mitz@apple.com>
16
2010-12-24  Dan Bernstein  <mitz@apple.com>
2
17
3
        Reviewed by Alexey Proskuryakov.
18
        Reviewed by Alexey Proskuryakov.
- a/WebCore/page/EventHandler.cpp +9 lines
Lines 607-612 void EventHandler::updateSelectionForMouseDrag(Node* targetNode, const IntPoint& a/WebCore/page/EventHandler.cpp_sec1
607
    if (!targetRenderer)
607
    if (!targetRenderer)
608
        return;
608
        return;
609
609
610
    // Don't modify the selection for nodes with -webkit-user-select: none.
611
    const RenderStyle* style = targetRenderer->style();
612
    const EUserSelect userSelect = style->userSelect();
613
    if (userSelect == SELECT_NONE) {
614
        const RenderStyle* styleForFirstLine = targetRenderer->firstLineStyle();
615
        if (styleForFirstLine == style || styleForFirstLine->userSelect() == SELECT_NONE)
616
            return;
617
    }
618
610
    VisiblePosition targetPosition(targetRenderer->positionForPoint(localPoint));
619
    VisiblePosition targetPosition(targetRenderer->positionForPoint(localPoint));
611
620
612
    // Don't modify the selection if we're not on a node.
621
    // Don't modify the selection if we're not on a node.

Return to Bug 51653