Changeset 110348 in webkit


Ignore:
Timestamp:
Mar 9, 2012 4:36:29 PM (12 years ago)
Author:
eae@chromium.org
Message:

Add roundedPoint to HitTestResult and change platform code to use it
https://bugs.webkit.org/show_bug.cgi?id=80715

Reviewed by James Robinson.

Change ports to use roundedPoint to avoid exposing subpixel types to
platform code.

Source/WebCore:

No new tests.

  • rendering/HitTestResult.h:

(WebCore::HitTestResult::roundedPoint):

Source/WebKit/chromium:

  • src/ChromeClientImpl.cpp:

(WebKit::ChromeClientImpl::mouseDidMoveOverElement):

  • src/ContextMenuClientImpl.cpp:

(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):

Source/WebKit/mac:

  • WebCoreSupport/WebContextMenuClient.mm:

(WebContextMenuClient::showContextMenu):

Source/WebKit/qt:

  • Api/qwebframe.cpp:

(QWebHitTestResultPrivate::QWebHitTestResultPrivate):

Source/WebKit/win:

  • WebView.cpp:

(WebView::handleContextMenuEvent):

Source/WebKit2:

  • WebProcess/WebPage/WebContextMenu.cpp:

(WebKit::WebContextMenu::show):

Location:
trunk/Source
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110347 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        No new tests.
     12
     13        * rendering/HitTestResult.h:
     14        (WebCore::HitTestResult::roundedPoint):
     15
    1162012-03-09  Kentaro Hara  <haraken@chromium.org>
    217
  • trunk/Source/WebCore/rendering/HitTestResult.h

    r97823 r110348  
    5858    Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); }
    5959    LayoutPoint point() const { return m_point; }
     60    IntPoint roundedPoint() const { return roundedIntPoint(m_point); }
    6061    LayoutPoint localPoint() const { return m_localPoint; }
    6162    Element* URLElement() const { return m_innerURLElement.get(); }
  • trunk/Source/WebKit/chromium/ChangeLog

    r110344 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        * src/ChromeClientImpl.cpp:
     12        (WebKit::ChromeClientImpl::mouseDidMoveOverElement):
     13        * src/ContextMenuClientImpl.cpp:
     14        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
     15
    1162012-03-09  W. James MacLean  <wjmaclean@chromium.org>
    217
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp

    r109778 r110348  
    619619            if (widget && widget->isPluginContainer()) {
    620620                WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
    621                 url = plugin->plugin()->linkAtPosition(result.point());
     621                url = plugin->plugin()->linkAtPosition(result.roundedPoint());
    622622            }
    623623        }
  • trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r107115 r110348  
    159159
    160160    WebContextMenuData data;
    161     data.mousePosition = selectedFrame->view()->contentsToWindow(r.point());
     161    data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint());
    162162
    163163    // Compute edit flags.
  • trunk/Source/WebKit/mac/ChangeLog

    r110311 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        * WebCoreSupport/WebContextMenuClient.mm:
     12        (WebContextMenuClient::showContextMenu):
     13
    1142012-03-09  Jon Lee  <jonlee@apple.com>
    215
  • trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm

    r108957 r110348  
    367367        return;
    368368
    369     IntPoint point = frameView->contentsToWindow(controller->hitTestResult().point());
     369    IntPoint point = frameView->contentsToWindow(controller->hitTestResult().roundedPoint());
    370370    NSView* view = frameView->documentView();
    371371    NSPoint nsScreenPoint = [view convertPoint:point toView:nil];
  • trunk/Source/WebKit/qt/Api/qwebframe.cpp

    r109572 r110348  
    17511751    if (!hitTest.innerNode())
    17521752        return;
    1753     pos = hitTest.point();
     1753    pos = hitTest.roundedPoint();
    17541754    WebCore::TextDirection dir;
    17551755    title = hitTest.title(dir);
  • trunk/Source/WebKit/qt/ChangeLog

    r110311 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        * Api/qwebframe.cpp:
     12        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
     13
    1142012-03-09  Jon Lee  <jonlee@apple.com>
    215
  • trunk/Source/WebKit/win/ChangeLog

    r110264 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        * WebView.cpp:
     12        (WebView::handleContextMenuEvent):
     13
    1142012-03-08  Steve Falkenburg  <sfalken@apple.com>
    215
  • trunk/Source/WebKit/win/WebView.cpp

    r107603 r110348  
    13501350        return false;
    13511351
    1352     POINT point(view->contentsToWindow(contextMenuController->hitTestResult().point()));
     1352    POINT point(view->contentsToWindow(contextMenuController->hitTestResult().roundedPoint()));
    13531353
    13541354    // Translate the point to screen coordinates
  • trunk/Source/WebKit2/ChangeLog

    r110346 r110348  
     12012-03-09  Emil A Eklund  <eae@chromium.org>
     2
     3        Add roundedPoint to HitTestResult and change platform code to use it
     4        https://bugs.webkit.org/show_bug.cgi?id=80715
     5
     6        Reviewed by James Robinson.
     7
     8        Change ports to use roundedPoint to avoid exposing subpixel types to
     9        platform code.
     10
     11        * WebProcess/WebPage/WebContextMenu.cpp:
     12        (WebKit::WebContextMenu::show):
     13
    1142012-03-09  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp

    r109750 r110348  
    8484    // Mark the WebPage has having a shown context menu then notify the UIProcess.
    8585    m_page->contextMenuShowing();
    86     m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().point()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
     86    m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().roundedPoint()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
    8787}
    8888
Note: See TracChangeset for help on using the changeset viewer.