• eae@chromium.org's avatar
    2011-03-29 Emil A Eklund <eae@chromium.org> · 198fc137
    eae@chromium.org authored
            Reviewed by Dimitri Glazkov.
    
            Relative mouse coordinates recalculated for target
            https://bugs.webkit.org/show_bug.cgi?id=57130
    
            Add mouse event performance test.
    
            * fast/events/mouse-relative-position-expected.txt: Added.
            * fast/events/mouse-relative-position.html: Added.
            * perf/mouse-event-expected.txt: Added.
            * perf/mouse-event.html: Added.
    2011-03-29  Emil A Eklund  <eae@chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Relative mouse coordinates recalculated for each target
            https://bugs.webkit.org/show_bug.cgi?id=57130
    
            Calculate relative coordinates lazily for mouse events instead of doing
            it for each target. Speeds up dispatching of mouse events in deep dom
            structures significantly, O(n^2) to O(n).
    
            Also fixes https://bugs.webkit.org/show_bug.cgi?id=34973
    
            Tests: fast/events/mouse-relative-position.html
                   perf/mouse-event.html
    
            * dom/Event.cpp:
            (WebCore::Event::setTarget):
            * dom/MouseRelatedEvent.cpp:
            (WebCore::MouseRelatedEvent::MouseRelatedEvent):
            (WebCore::MouseRelatedEvent::initCoordinates):
            (WebCore::pageZoomFactor):
            (WebCore::MouseRelatedEvent::receivedTarget):
            (WebCore::MouseRelatedEvent::computeRelativePosition):
            (WebCore::MouseRelatedEvent::layerX):
            (WebCore::MouseRelatedEvent::layerY):
            (WebCore::MouseRelatedEvent::offsetX):
            (WebCore::MouseRelatedEvent::offsetY):
            * dom/MouseRelatedEvent.h:
            * dom/UIEvent.cpp:
            (WebCore::UIEvent::layerX):
            (WebCore::UIEvent::layerY):
            * dom/UIEvent.h:
    2011-03-29  Emil A Eklund  <eae@chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Relative mouse coordinates recalculated for each target
            https://bugs.webkit.org/show_bug.cgi?id=57130
    
            * public/WebDOMMouseEvent.h:
            * src/WebDOMMouseEvent.cpp:
            (WebKit::WebDOMMouseEvent::layerX):
            (WebKit::WebDOMMouseEvent::layerY):
            (WebKit::WebDOMMouseEvent::offsetX):
            (WebKit::WebDOMMouseEvent::offsetY):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    198fc137