Changeset 102425 in webkit


Ignore:
Timestamp:
Dec 8, 2011 8:22:14 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r101619.
http://trac.webkit.org/changeset/101619
https://bugs.webkit.org/show_bug.cgi?id=74158

this patch produces bad behaviour on mac (Requested by
jeremya_ on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-12-08

Source/WebCore:

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::dragSourceEndedAt):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateHoverActiveState):

LayoutTests:

  • fast/css/hover-active-drag-expected.txt: Removed.
  • fast/css/hover-active-drag.html: Removed.
Location:
trunk
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r102424 r102425  
     12011-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r101619.
     4        http://trac.webkit.org/changeset/101619
     5        https://bugs.webkit.org/show_bug.cgi?id=74158
     6
     7        this patch produces bad behaviour on mac (Requested by
     8        jeremya_ on #webkit).
     9
     10        * fast/css/hover-active-drag-expected.txt: Removed.
     11        * fast/css/hover-active-drag.html: Removed.
     12
    1132011-12-08  Adam Klein  <adamk@chromium.org>
    214
  • trunk/Source/WebCore/ChangeLog

    r102424 r102425  
     12011-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r101619.
     4        http://trac.webkit.org/changeset/101619
     5        https://bugs.webkit.org/show_bug.cgi?id=74158
     6
     7        this patch produces bad behaviour on mac (Requested by
     8        jeremya_ on #webkit).
     9
     10        * page/EventHandler.cpp:
     11        (WebCore::EventHandler::handleMouseMoveEvent):
     12        (WebCore::EventHandler::dragSourceEndedAt):
     13        * rendering/RenderLayer.cpp:
     14        (WebCore::RenderLayer::updateHoverActiveState):
     15
    1162011-12-08  Adam Klein  <adamk@chromium.org>
    217
  • trunk/Source/WebCore/page/EventHandler.cpp

    r102408 r102425  
    16131613        return m_lastScrollbarUnderMouse->mouseMoved(mouseEvent);
    16141614
     1615    // Mouse events should be treated as "read-only" in prepareMouseEvent if the mouse is
     1616    // pressed and we are allowed to select OR if we're updating only scrollbars. This
     1617    // means that :hover and :active freeze in the state they were in, rather than updating
     1618    // for nodes the mouse moves over while you hold the mouse down (in the mouse pressed case)
     1619    // or while the window is not key (as in the onlyUpdateScrollbars case).
    16151620    HitTestRequest::HitTestRequestType hitType = HitTestRequest::MouseMove;
     1621    if ((m_mousePressed && m_mouseDownMayStartSelect) || onlyUpdateScrollbars)
     1622        hitType |= HitTestRequest::ReadOnly;
    16161623    if (m_mousePressed)
    16171624        hitType |= HitTestRequest::Active;
     
    27552762void EventHandler::dragSourceEndedAt(const PlatformMouseEvent& event, DragOperation operation)
    27562763{
    2757     // Send a hit test request so that RenderLayer gets a chance to update the :hover and :active pseudoclasses.
    2758     HitTestRequest request(HitTestRequest::MouseUp);
    2759     prepareMouseEvent(request, event);
    2760 
    27612764    if (dragState().m_dragSrc && dragState().shouldDispatchEvents()) {
    27622765        dragState().m_dragClipboard->setDestinationOperation(operation);
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r102266 r102425  
    39793979        // We are clearing the :active chain because the mouse has been released.
    39803980        for (RenderObject* curr = activeNode->renderer(); curr; curr = curr->parent()) {
    3981             if (curr->node() && !curr->isText()) {
    3982                 curr->node()->setActive(false);
     3981            if (curr->node() && !curr->isText())
    39833982                curr->node()->clearInActiveChain();
    3984             }
    39853983        }
    39863984        doc->setActiveNode(0);
     
    39983996        }
    39993997    }
    4000     // If the mouse has just been pressed, set :active on the chain. Those (and only those)
    4001     // nodes should remain :active until the mouse is released.
    4002     bool allowActiveChanges = !activeNode && doc->activeNode();
    40033998
    40043999    // If the mouse is down and if this is a mouse move event, we want to restrict changes in
     
    40434038    size_t removeCount = nodesToRemoveFromChain.size();
    40444039    for (size_t i = 0; i < removeCount; ++i) {
     4040        nodesToRemoveFromChain[i]->setActive(false);
    40454041        nodesToRemoveFromChain[i]->setHovered(false);
    40464042    }
     
    40484044    size_t addCount = nodesToAddToChain.size();
    40494045    for (size_t i = 0; i < addCount; ++i) {
    4050         if (allowActiveChanges)
    4051             nodesToAddToChain[i]->setActive(true);
     4046        nodesToAddToChain[i]->setActive(request.active());
    40524047        nodesToAddToChain[i]->setHovered(true);
    40534048    }
Note: See TracChangeset for help on using the changeset viewer.