Title: [110348] trunk/Source
Revision
110348
Author
[email protected]
Date
2012-03-09 16:36:29 -0800 (Fri, 09 Mar 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (110347 => 110348)


--- trunk/Source/WebCore/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebCore/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,18 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        No new tests.
+
+        * rendering/HitTestResult.h:
+        (WebCore::HitTestResult::roundedPoint):
+
 2012-03-09  Kentaro Hara  <[email protected]>
 
         [V8][Performance] Inline hot methods in V8Bindings.h

Modified: trunk/Source/WebCore/rendering/HitTestResult.h (110347 => 110348)


--- trunk/Source/WebCore/rendering/HitTestResult.h	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebCore/rendering/HitTestResult.h	2012-03-10 00:36:29 UTC (rev 110348)
@@ -57,6 +57,7 @@
     Node* innerNode() const { return m_innerNode.get(); }
     Node* innerNonSharedNode() const { return m_innerNonSharedNode.get(); }
     LayoutPoint point() const { return m_point; }
+    IntPoint roundedPoint() const { return roundedIntPoint(m_point); }
     LayoutPoint localPoint() const { return m_localPoint; }
     Element* URLElement() const { return m_innerURLElement.get(); }
     Scrollbar* scrollbar() const { return m_scrollbar.get(); }

Modified: trunk/Source/WebKit/chromium/ChangeLog (110347 => 110348)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,18 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::mouseDidMoveOverElement):
+        * src/ContextMenuClientImpl.cpp:
+        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+
 2012-03-09  W. James MacLean  <[email protected]>
 
         [chromium] Implement scroll physics architecture for impl/main thread

Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp (110347 => 110348)


--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-03-10 00:36:29 UTC (rev 110348)
@@ -618,7 +618,7 @@
             Widget* widget = toRenderWidget(object)->widget();
             if (widget && widget->isPluginContainer()) {
                 WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
-                url = ""
+                url = ""
             }
         }
     }

Modified: trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp (110347 => 110348)


--- trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/chromium/src/ContextMenuClientImpl.cpp	2012-03-10 00:36:29 UTC (rev 110348)
@@ -158,7 +158,7 @@
     Frame* selectedFrame = r.innerNonSharedNode()->document()->frame();
 
     WebContextMenuData data;
-    data.mousePosition = selectedFrame->view()->contentsToWindow(r.point());
+    data.mousePosition = selectedFrame->view()->contentsToWindow(r.roundedPoint());
 
     // Compute edit flags.
     data.editFlags = WebContextMenuData::CanDoNone;

Modified: trunk/Source/WebKit/mac/ChangeLog (110347 => 110348)


--- trunk/Source/WebKit/mac/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,16 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        * WebCoreSupport/WebContextMenuClient.mm:
+        (WebContextMenuClient::showContextMenu):
+
 2012-03-09  Jon Lee  <[email protected]>
 
         Add support for ENABLE(LEGACY_NOTIFICATIONS)

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm (110347 => 110348)


--- trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm	2012-03-10 00:36:29 UTC (rev 110348)
@@ -366,7 +366,7 @@
     if (!frameView)
         return;
 
-    IntPoint point = frameView->contentsToWindow(controller->hitTestResult().point());
+    IntPoint point = frameView->contentsToWindow(controller->hitTestResult().roundedPoint());
     NSView* view = frameView->documentView();
     NSPoint nsScreenPoint = [view convertPoint:point toView:nil];
     // Show the contextual menu for this event.

Modified: trunk/Source/WebKit/qt/Api/qwebframe.cpp (110347 => 110348)


--- trunk/Source/WebKit/qt/Api/qwebframe.cpp	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/qt/Api/qwebframe.cpp	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1750,7 +1750,7 @@
 {
     if (!hitTest.innerNode())
         return;
-    pos = hitTest.point();
+    pos = hitTest.roundedPoint();
     WebCore::TextDirection dir;
     title = hitTest.title(dir);
     linkText = hitTest.textContent();

Modified: trunk/Source/WebKit/qt/ChangeLog (110347 => 110348)


--- trunk/Source/WebKit/qt/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/qt/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,16 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        * Api/qwebframe.cpp:
+        (QWebHitTestResultPrivate::QWebHitTestResultPrivate):
+
 2012-03-09  Jon Lee  <[email protected]>
 
         Add support for ENABLE(LEGACY_NOTIFICATIONS)

Modified: trunk/Source/WebKit/win/ChangeLog (110347 => 110348)


--- trunk/Source/WebKit/win/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/win/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,16 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        * WebView.cpp:
+        (WebView::handleContextMenuEvent):
+
 2012-03-08  Steve Falkenburg  <[email protected]>
 
         Separate WTF parts of _javascript_CoreGenerated into WTFGenerated for Windows build

Modified: trunk/Source/WebKit/win/WebView.cpp (110347 => 110348)


--- trunk/Source/WebKit/win/WebView.cpp	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit/win/WebView.cpp	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1349,7 +1349,7 @@
     if (!view)
         return false;
 
-    POINT point(view->contentsToWindow(contextMenuController->hitTestResult().point()));
+    POINT point(view->contentsToWindow(contextMenuController->hitTestResult().roundedPoint()));
 
     // Translate the point to screen coordinates
     if (!::ClientToScreen(m_viewWindow, &point))

Modified: trunk/Source/WebKit2/ChangeLog (110347 => 110348)


--- trunk/Source/WebKit2/ChangeLog	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-10 00:36:29 UTC (rev 110348)
@@ -1,3 +1,16 @@
+2012-03-09  Emil A Eklund  <[email protected]>
+
+        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.
+
+        * WebProcess/WebPage/WebContextMenu.cpp:
+        (WebKit::WebContextMenu::show):
+
 2012-03-09  Alexey Proskuryakov  <[email protected]>
 
         [Mac] Pass sandbox profiles through preprocessor

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp (110347 => 110348)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp	2012-03-10 00:13:13 UTC (rev 110347)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp	2012-03-10 00:36:29 UTC (rev 110348)
@@ -83,7 +83,7 @@
 
     // Mark the WebPage has having a shown context menu then notify the UIProcess.
     m_page->contextMenuShowing();
-    m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().point()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
+    m_page->send(Messages::WebPageProxy::ShowContextMenu(view->contentsToWindow(controller->hitTestResult().roundedPoint()), webHitTestResultData, proposedMenu, InjectedBundleUserMessageEncoder(userData.get())));
 }
 
 void WebContextMenu::itemSelected(const WebContextMenuItemData& item)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to