Changeset 49551 in webkit


Ignore:
Timestamp:
Oct 13, 2009 8:16:03 PM (15 years ago)
Author:
weinig@apple.com
Message:

WebCore: Fix issue where clientX and clientY on MouseEvents were wrong when
the page was zoomed and scrolled.

Reviewed by David Hyatt.

Test: fast/events/clientXY-in-zoom-and-scroll.html

  • dom/MouseRelatedEvent.cpp:

(WebCore::contentsX): Take page zoom into account.
(WebCore::contentsY): Ditto.

LayoutTests: Test issue where clientX and clientY on MouseEvents were wrong when
the page was zoomed and scrolled.

Reviewed by David Hyatt.

  • fast/events/clientXY-in-zoom-and-scroll-expected.txt: Added.
  • fast/events/clientXY-in-zoom-and-scroll.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49539 r49551  
     12009-10-13  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        Test issue where clientX and clientY on MouseEvents were wrong when
     6        the page was zoomed and scrolled.
     7
     8        * fast/events/clientXY-in-zoom-and-scroll-expected.txt: Added.
     9        * fast/events/clientXY-in-zoom-and-scroll.html: Added.
     10
    1112009-10-13  Dmitry Titov  <dimich@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r49541 r49551  
     12009-10-13  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by David Hyatt.
     4
     5        Fix issue where clientX and clientY on MouseEvents were wrong when
     6        the page was zoomed and scrolled.
     7
     8        Test: fast/events/clientXY-in-zoom-and-scroll.html
     9
     10        * dom/MouseRelatedEvent.cpp:
     11        (WebCore::contentsX): Take page zoom into account.
     12        (WebCore::contentsY): Ditto.
     13
    1142009-10-13  Dave Hyatt  <hyatt@apple.com>
    215
  • trunk/WebCore/dom/MouseRelatedEvent.cpp

    r42377 r49551  
    5858    if (!frameView)
    5959        return 0;
    60     return frameView->scrollX();
     60    return frameView->scrollX() / frame->pageZoomFactor();
    6161}
    6262
     
    7171    if (!frameView)
    7272        return 0;
    73     return frameView->scrollY();
     73    return frameView->scrollY() / frame->pageZoomFactor();
    7474}
    7575
Note: See TracChangeset for help on using the changeset viewer.