Changeset 200274 in webkit


Ignore:
Timestamp:
Apr 29, 2016, 6:14:39 PM (9 years ago)
Author:
BJ Burg
Message:

Web Automation: performMouseInteraction command computes mouse event coordinates incorrectly
https://bugs.webkit.org/show_bug.cgi?id=157218
<rdar://problem/26018230>

Reviewed by Timothy Hatcher.

This patch fixes two issues: the min/max clamp was in the wrong order,
and the y-value did not account for the window's top content inset.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::performMouseInteraction):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r200268 r200274  
     12016-04-29  Brian Burg  <bburg@apple.com>
     2
     3        Web Automation: performMouseInteraction command computes mouse event coordinates incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=157218
     5        <rdar://problem/26018230>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        This patch fixes two issues: the min/max clamp was in the wrong order,
     10        and the y-value did not account for the window's top content inset.
     11
     12        * UIProcess/Automation/WebAutomationSession.cpp:
     13        (WebKit::WebAutomationSession::performMouseInteraction):
     14
    1152016-04-29  Dean Jackson  <dino@apple.com>
    216
  • trunk/Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp

    r199680 r200274  
    867867    page->getWindowFrame(windowFrame);
    868868
    869     x = std::max(std::min(0.0f, x), windowFrame.size().width());
    870     y = std::max(std::min(0.0f, y), windowFrame.size().height());
     869    x = std::min(std::max(0.0f, x), windowFrame.size().width());
     870    y = std::min(std::max(0.0f, y + page->topContentInset()), windowFrame.size().height());
    871871
    872872    WebCore::IntPoint viewPosition = WebCore::IntPoint(static_cast<int>(x), static_cast<int>(y));
Note: See TracChangeset for help on using the changeset viewer.