[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 15:34:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 242166480cb90e4f5a43bbc6acae23b0eb811607
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Nov 8 18:16:38 2010 +0000
Remove use of HIGetScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=49186
<rdar://problem/8618410>
Reviewed by Adam Roben.
Scale factors can vary on a display-by-display basis and it doesn't make sense
to compute scale factor event coordinates like this.
WebCore:
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::globalMousePosForPlugin):
WebKit/mac:
* Plugins/WebNetscapePluginEventHandlerCarbon.mm:
(getCarbonEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9c4dab4..a2ff6ad 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-08 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Remove use of HIGetScaleFactor
+ https://bugs.webkit.org/show_bug.cgi?id=49186
+ <rdar://problem/8618410>
+
+ Scale factors can vary on a display-by-display basis and it doesn't make sense
+ to compute scale factor event coordinates like this.
+
+ * plugins/mac/PluginViewMac.mm:
+ (WebCore::PluginView::globalMousePosForPlugin):
+
2010-11-08 Noam Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/plugins/mac/PluginViewMac.mm b/WebCore/plugins/mac/PluginViewMac.mm
index aef9420..7119f0d 100644
--- a/WebCore/plugins/mac/PluginViewMac.mm
+++ b/WebCore/plugins/mac/PluginViewMac.mm
@@ -725,30 +725,11 @@ static int modifiersForEvent(UIEventWithKeyState* event)
#endif
#ifndef NP_NO_CARBON
-static bool tigerOrBetter()
-{
- static SInt32 systemVersion = 0;
-
- if (!systemVersion) {
- if (Gestalt(gestaltSystemVersion, &systemVersion) != noErr)
- return false;
- }
-
- return systemVersion >= 0x1040;
-}
-#endif
-
-#ifndef NP_NO_CARBON
Point PluginView::globalMousePosForPlugin() const
{
Point pos;
GetGlobalMouse(&pos);
- float scaleFactor = tigerOrBetter() ? HIGetScaleFactor() : 1;
-
- pos.h = short(pos.h * scaleFactor);
- pos.v = short(pos.v * scaleFactor);
-
#if PLATFORM(WX)
// make sure the titlebar/toolbar size is included
WindowRef windowRef = nativeWindowFor(platformPluginWidget());
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 9626c58..dca58d5 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-08 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Remove use of HIGetScaleFactor
+ https://bugs.webkit.org/show_bug.cgi?id=49186
+ <rdar://problem/8618410>
+
+ Scale factors can vary on a display-by-display basis and it doesn't make sense
+ to compute scale factor event coordinates like this.
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (getCarbonEvent):
+
2010-11-08 Simon Fraser <simon.fraser at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
index 3d2b68e..a3aca1f 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
@@ -49,8 +49,6 @@ static void getCarbonEvent(EventRecord* carbonEvent)
carbonEvent->when = TickCount();
GetGlobalMouse(&carbonEvent->where);
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
carbonEvent->modifiers = GetCurrentKeyModifiers();
if (!Button())
carbonEvent->modifiers |= btnState;
@@ -87,11 +85,8 @@ static EventModifiers modifiersForEvent(NSEvent *event)
static void getCarbonEvent(EventRecord *carbonEvent, NSEvent *cocoaEvent)
{
- if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent)) {
- carbonEvent->where.h = static_cast<short>(carbonEvent->where.h * HIGetScaleFactor());
- carbonEvent->where.v = static_cast<short>(carbonEvent->where.v * HIGetScaleFactor());
+ if (WKConvertNSEventToCarbonEvent(carbonEvent, cocoaEvent))
return;
- }
NSPoint where = [[cocoaEvent window] convertBaseToScreen:[cocoaEvent locationInWindow]];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list