Changeset 53069 in webkit


Ignore:
Timestamp:
Jan 11, 2010 1:44:58 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-11 Kim Grönholm <kim.gronholm@nomovok.com>

Reviewed by Antti Koivisto.

Touchevent coordinates are incorrect after page zoom and page scroll
https://bugs.webkit.org/show_bug.cgi?id=32899

  • fast/events/touch-coords-in-zoom-and-scroll-expected.txt: Added.
  • fast/events/touch-coords-in-zoom-and-scroll.html: Added.
  • platform/gtk/Skipped:
  • platform/mac/Skipped:
  • platform/win/Skipped:

2010-01-11 Kim Grönholm <kim.gronholm@nomovok.com>

Reviewed by Antti Koivisto.

Touchevent coordinates are incorrect after page zoom and page scroll
https://bugs.webkit.org/show_bug.cgi?id=32899

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

  • dom/Touch.cpp: (WebCore::contentsX): (WebCore::contentsY):
  • page/EventHandler.cpp: (WebCore::EventHandler::handleTouchEvent):
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53068 r53069  
     12010-01-11  Kim Grönholm  <kim.gronholm@nomovok.com>
     2
     3        Reviewed by Antti Koivisto.
     4
     5        Touchevent coordinates are incorrect after page zoom and page scroll
     6        https://bugs.webkit.org/show_bug.cgi?id=32899
     7
     8        * fast/events/touch-coords-in-zoom-and-scroll-expected.txt: Added.
     9        * fast/events/touch-coords-in-zoom-and-scroll.html: Added.
     10        * platform/gtk/Skipped:
     11        * platform/mac/Skipped:
     12        * platform/win/Skipped:
     13
    1142010-01-11  Tony Chang  <tony@chromium.org>
    215
  • trunk/LayoutTests/platform/gtk/Skipped

    r52988 r53069  
    57055705fast/cookies/local-file-can-set-cookies.html
    57065706
    5707 # This test requires touch support
     5707# These tests require touch support
    57085708fast/events/basic-touch-events.html
     5709fast/events/touch-coords-in-zoom-and-scroll.html
    57095710
    57105711# Javascript execution/mainloop problem
  • trunk/LayoutTests/platform/mac/Skipped

    r53019 r53069  
    9494media/media-can-play-ogg.html
    9595
    96 # This test requires touch support
     96# These tests require touch support
    9797fast/events/basic-touch-events.html
     98fast/events/touch-coords-in-zoom-and-scroll.html
  • trunk/LayoutTests/platform/win/Skipped

    r53002 r53069  
    718718media/media-can-play-ogg.html
    719719
    720 # This test requires touch support
     720# These tests require touch support
    721721fast/events/basic-touch-events.html
     722fast/events/touch-coords-in-zoom-and-scroll.html
    722723
    723724# XSS auditor tests intermittently time out <http://webkit.org/b/32528>
  • trunk/WebCore/ChangeLog

    r53068 r53069  
     12010-01-11  Kim Grönholm  <kim.gronholm@nomovok.com>
     2
     3        Reviewed by Antti Koivisto.
     4
     5        Touchevent coordinates are incorrect after page zoom and page scroll
     6        https://bugs.webkit.org/show_bug.cgi?id=32899
     7
     8        Test: fast/events/touch-coords-in-zoom-and-scroll.html
     9
     10        * dom/Touch.cpp:
     11        (WebCore::contentsX):
     12        (WebCore::contentsY):
     13        * page/EventHandler.cpp:
     14        (WebCore::EventHandler::handleTouchEvent):
     15
    1162010-01-11  Tony Chang  <tony@chromium.org>
    217
  • trunk/WebCore/dom/Touch.cpp

    r51981 r53069  
    4141    if (!frameView)
    4242        return 0;
    43     return frameView->scrollX();
     43    return frameView->scrollX() / frame->pageZoomFactor();
    4444}
    4545
     
    5151    if (!frameView)
    5252        return 0;
    53     return frameView->scrollY();
     53    return frameView->scrollY() / frame->pageZoomFactor();
    5454}
    5555
  • trunk/WebCore/page/EventHandler.cpp

    r52922 r53069  
    25642564            target = target->parentNode();
    25652565
     2566        int adjustedPageX = lroundf(framePoint.x() / m_frame->pageZoomFactor());
     2567        int adjustedPageY = lroundf(framePoint.y() / m_frame->pageZoomFactor());
     2568
    25662569        RefPtr<Touch> touch = Touch::create(m_frame, target, point.id(),
    25672570                                            point.screenPos().x(), point.screenPos().y(),
    2568                                             framePoint.x(), framePoint.y());
     2571                                            adjustedPageX, adjustedPageY);
    25692572
    25702573        if (event.type() == TouchStart && !i) {
Note: See TracChangeset for help on using the changeset viewer.