[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 14:35:35 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b72d015df68e26e70da4479a693cd17bcddffcb9
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 13 20:40:57 2010 +0000
Use WKSI to get wheel event deltas
https://bugs.webkit.org/show_bug.cgi?id=47617
Reviewed by Darin Adler.
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebWheelEvent):
Call WKGetWheelEventDeltas.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:pageNamespaceRef:]):
Call InitWebCoreSystemInterface.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
Use dispatch_once.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index a7b8721..3269fb6 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-13 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Darin Adler.
+
+ Use WKSI to get wheel event deltas
+ https://bugs.webkit.org/show_bug.cgi?id=47617
+
+ * Shared/mac/WebEventFactory.mm:
+ (WebKit::WebEventFactory::createWebWheelEvent):
+ Call WKGetWheelEventDeltas.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView initWithFrame:pageNamespaceRef:]):
+ Call InitWebCoreSystemInterface.
+
+ * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
+ (InitWebCoreSystemInterface):
+ Use dispatch_once.
+
2010-10-13 Adam Roben <aroben at apple.com>
Fix the Cairo build
diff --git a/WebKit2/Shared/mac/WebEventFactory.mm b/WebKit2/Shared/mac/WebEventFactory.mm
index ddc0a68..4b0443a 100644
--- a/WebKit2/Shared/mac/WebEventFactory.mm
+++ b/WebKit2/Shared/mac/WebEventFactory.mm
@@ -24,16 +24,13 @@
*/
#import "WebEventFactory.h"
+
+#import "WebKitSystemInterface.h"
#import <wtf/ASCIICType.h>
+#import <WebCore/Scrollbar.h>
using namespace WebCore;
- at interface NSEvent (Details)
-- (CGFloat)deviceDeltaX;
-- (CGFloat)deviceDeltaY;
-- (BOOL)_continuousScroll;
- at end
-
namespace WebKit {
static WebMouseEvent::Button mouseButtonForEvent(NSEvent *event)
@@ -975,9 +972,6 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(NSEvent *event, NSView *windo
WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windowView)
{
- // Taken from WebCore
- const int cScrollbarPixelsPerLineStep = 40;
-
NSPoint position = pointForEvent(event, windowView);
NSPoint globalPosition = globalPointForEvent(event);
@@ -987,24 +981,24 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windo
int globalPositionY = globalPosition.y;
WebWheelEvent::Granularity granularity = WebWheelEvent::ScrollByPixelWheelEvent;
+ BOOL continuous;
float deltaX = 0;
float deltaY = 0;
float wheelTicksX = 0;
float wheelTicksY = 0;
- if ([event _continuousScroll]) {
+
+ WKGetWheelEventDeltas(event, &deltaX, &deltaY, &continuous);
+
+ if (continuous) {
// smooth scroll events
- deltaX = [event deviceDeltaX];
- deltaY = [event deviceDeltaY];
- wheelTicksX = deltaX / static_cast<float>(cScrollbarPixelsPerLineStep);
- wheelTicksY = deltaY / static_cast<float>(cScrollbarPixelsPerLineStep);
+ wheelTicksX = deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep());
+ wheelTicksY = deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep());
} else {
// plain old wheel events
- deltaX = [event deltaX];
- deltaY = [event deltaY];
wheelTicksX = deltaX;
wheelTicksY = deltaY;
- deltaX *= static_cast<float>(cScrollbarPixelsPerLineStep);
- deltaY *= static_cast<float>(cScrollbarPixelsPerLineStep);
+ deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep());
+ deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep());
}
WebEvent::Modifiers modifiers = modifiersForEvent(event);
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 9b8d440..55f0ab8 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -41,6 +41,7 @@
#import "WebPageProxy.h"
#import "WebProcessManager.h"
#import "WebProcessProxy.h"
+#import "WebSystemInterface.h"
#import <QuartzCore/QuartzCore.h>
#import <WebCore/FloatRect.h>
#import <WebCore/IntRect.h>
@@ -96,6 +97,7 @@ struct EditCommandState {
if (!self)
return nil;
+ InitWebCoreSystemInterface();
RunLoop::initializeMainRunLoop();
NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:frame
diff --git a/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm b/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
index 6dc3739..d72f378 100644
--- a/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
+++ b/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm
@@ -32,87 +32,68 @@
void InitWebCoreSystemInterface(void)
{
- static bool didInit;
- if (didInit)
- return;
+ static dispatch_once_t initOnce;
+
+ dispatch_once(&initOnce, ^{
+ INIT(AdvanceDefaultButtonPulseAnimation);
+ INIT(CGContextGetShouldSmoothFonts);
+ INIT(CopyCONNECTProxyResponse);
+ INIT(CopyNSURLResponseStatusLine);
+ INIT(CreateCustomCFReadStream);
+ INIT(CreateNSURLConnectionDelegateProxy);
+ INIT(DrawBezeledTextArea);
+ INIT(DrawBezeledTextFieldCell);
+ INIT(DrawCapsLockIndicator);
+ INIT(DrawFocusRing);
+ INIT(DrawMediaSliderTrack);
+ INIT(DrawMediaUIPart);
+ INIT(DrawTextFieldCellFocusRing);
+ INIT(GetExtensionsForMIMEType);
+ INIT(GetFontInLanguageForCharacter);
+ INIT(GetFontInLanguageForRange);
+ INIT(GetGlyphTransformedAdvances);
+ INIT(GetGlyphsForCharacters);
+ INIT(GetMIMETypeForExtension);
+ INIT(GetNSURLResponseLastModifiedDate);
+ INIT(GetPreferredExtensionForMIMEType);
+ INIT(GetUserToBaseCTM);
+ INIT(GetWheelEventDeltas);
+ INIT(HitTestMediaUIPart);
+ INIT(InitializeMaximumHTTPConnectionCountPerHost);
+ INIT(IsLatchingWheelEvent);
+ INIT(MeasureMediaUIPart);
+ INIT(MediaControllerThemeAvailable);
+ INIT(PopupMenu);
+ INIT(QTIncludeOnlyModernMediaFileTypes);
+ INIT(QTMovieDataRate);
+ INIT(QTMovieDisableComponent);
+ INIT(QTMovieGetType);
+ INIT(QTMovieHasClosedCaptions);
+ INIT(QTMovieMaxTimeLoaded);
+ INIT(QTMovieMaxTimeLoadedChangeNotification);
+ INIT(QTMovieMaxTimeSeekable);
+ INIT(QTMovieSelectPreferredAlternates);
+ INIT(QTMovieSetShowClosedCaptions);
+ INIT(QTMovieViewSetDrawSynchronously);
+ INIT(SetCGFontRenderingMode);
+ INIT(SetCONNECTProxyAuthorizationForStream);
+ INIT(SetCONNECTProxyForStream);
+ INIT(SetDragImage);
+ INIT(SetNSURLConnectionDefersCallbacks);
+ INIT(SetNSURLRequestShouldContentSniff);
+ INIT(SetPatternBaseCTM);
+ INIT(SetPatternPhaseInUserSpace);
+ INIT(SetUpFontCache);
+ INIT(SignalCFReadStreamEnd);
+ INIT(SignalCFReadStreamError);
+ INIT(SignalCFReadStreamHasBytes);
- INIT(AdvanceDefaultButtonPulseAnimation);
- INIT(CGContextGetShouldSmoothFonts);
- INIT(CopyCONNECTProxyResponse);
- INIT(CopyNSURLResponseStatusLine);
- INIT(CreateCustomCFReadStream);
- INIT(CreateNSURLConnectionDelegateProxy);
- INIT(DrawCapsLockIndicator);
- INIT(DrawBezeledTextArea);
- INIT(DrawBezeledTextFieldCell);
- INIT(DrawFocusRing);
- INIT(DrawMediaUIPart);
- INIT(DrawMediaSliderTrack);
- INIT(DrawTextFieldCellFocusRing);
- INIT(GetExtensionsForMIMEType);
- INIT(GetFontInLanguageForCharacter);
- INIT(GetFontInLanguageForRange);
- INIT(GetGlyphTransformedAdvances);
- INIT(GetMIMETypeForExtension);
- INIT(GetNSURLResponseLastModifiedDate);
- INIT(GetPreferredExtensionForMIMEType);
- INIT(GetWheelEventDeltas);
- INIT(HitTestMediaUIPart);
- INIT(InitializeMaximumHTTPConnectionCountPerHost);
- INIT(IsLatchingWheelEvent);
- INIT(MeasureMediaUIPart);
- INIT(MediaControllerThemeAvailable);
- INIT(PopupMenu);
- INIT(SetCGFontRenderingMode);
- INIT(SetCONNECTProxyAuthorizationForStream);
- INIT(SetCONNECTProxyForStream);
- INIT(SetDragImage);
- INIT(SetNSURLConnectionDefersCallbacks);
- INIT(SetNSURLRequestShouldContentSniff);
- INIT(SetPatternBaseCTM);
- INIT(SetPatternPhaseInUserSpace);
- INIT(GetUserToBaseCTM);
- INIT(SetUpFontCache);
- INIT(SignalCFReadStreamEnd);
- INIT(SignalCFReadStreamError);
- INIT(SignalCFReadStreamHasBytes);
- INIT(QTIncludeOnlyModernMediaFileTypes);
- INIT(QTMovieDataRate);
- INIT(QTMovieDisableComponent);
- INIT(QTMovieMaxTimeLoaded);
- INIT(QTMovieMaxTimeLoadedChangeNotification);
- INIT(QTMovieMaxTimeSeekable);
- INIT(QTMovieGetType);
- INIT(QTMovieHasClosedCaptions);
- INIT(QTMovieSetShowClosedCaptions);
- INIT(QTMovieSelectPreferredAlternates);
- INIT(QTMovieViewSetDrawSynchronously);
+ #if !defined(BUILDING_ON_SNOW_LEOPARD)
+ INIT(NoteOpenPanelFiles);
+ #endif
-#ifndef BUILDING_ON_TIGER
- INIT(GetGlyphsForCharacters);
-#else
- INIT(ClearGlyphVector);
- INIT(ConvertCharToGlyphs);
- INIT(CopyFullFontName);
- INIT(GetATSStyleGroup);
- INIT(GetCGFontFromNSFont);
- INIT(GetFontMetrics);
- INIT(GetGlyphVectorFirstRecord);
- INIT(GetGlyphVectorNumGlyphs);
- INIT(GetGlyphVectorRecordSize);
- INIT(GetNSFontATSUFontId);
- INIT(InitializeGlyphVector);
- INIT(ReleaseStyleGroup);
- INIT(SupportsMultipartXMixedReplace);
-#endif
-
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
- INIT(NoteOpenPanelFiles);
-#endif
-
-#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
- INIT(GetHyphenationLocationBeforeIndex);
-#endif
-
- didInit = true;
+ #if defined(BUILDING_ON_SNOW_LEOPARD)
+ INIT(GetHyphenationLocationBeforeIndex);
+ #endif
+ });
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list