* Carbon.subproj/CarbonUtils.m:
(WebInitForCarbon):
(PoolCleaner):
* WebView.subproj/WebHTMLView.m:
(+[WebHTMLView _postFlagsChangedEvent:]):
(-[WebHTMLView _autoscroll]):
(-[WebHTMLView addMouseMovedObserver]):
(-[WebHTMLView removeMouseMovedObserver]):
(-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
(-[WebHTMLView _interceptEditingKeyEvent:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9301
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import <AppKit/NSBitmapImageRep_Private.h>
-#import <Foundation/NSPrivateDecls.h>
-
#include "CarbonUtils.h"
+#import <WebKitSystemInterface.h>
extern CGImageRef _NSCreateImageRef( unsigned char *const bitmapData[5], int pixelsWide, int pixelsHigh, int bitsPerSample, int samplesPerPixel, int bitsPerPixel, int bytesPerRow, BOOL isPlanar, BOOL hasAlpha, NSString *colorSpaceName, CGColorSpaceRef customColorSpace, id sourceObj);
static unsigned numPools;
static EventLoopRef poolLoop;
-static unsigned getNumPools()
-{
- void *v = NSPushAutoreleasePool(0);
- unsigned numPools = (unsigned)(v);
- NSPopAutoreleasePool (v);
- return numPools;
-}
void HIWebViewRegisterClass( void );
NSApplicationLoad();
sPool = [[NSAutoreleasePool allocWithZone:NULL] init];
- numPools = getNumPools();
+ numPools = WKGetNSAutoreleasePoolCount();
poolLoop = GetCurrentEventLoop ();
InstallEventLoopIdleTimer( GetMainEventLoop(), 1.0, 0, PoolCleaner, 0, NULL );
- sAppKitLoaded = true;
-
- [NSBitmapImageRep _setEnableFlippedImageFix:YES];
-
+ sAppKitLoaded = true;
+
HIWebViewRegisterClass();
}
}
CFStringRef mode = CFRunLoopCopyCurrentMode( (CFRunLoopRef)GetCFRunLoopFromEventLoop( GetCurrentEventLoop() ));
EventLoopRef thisLoop = GetCurrentEventLoop ();
if ( CFEqual( mode, kCFRunLoopDefaultMode ) && thisLoop == poolLoop) {
- unsigned currentNumPools = getNumPools()-1;
+ unsigned currentNumPools = WKGetNSAutoreleasePoolCount()-1;
if (currentNumPools == numPools){
[sPool release];
sPool = [[NSAutoreleasePool allocWithZone:NULL] init];
- numPools = getNumPools();
+ numPools = WKGetNSAutoreleasePoolCount();
}
}
CFRelease( mode );
+2005-06-06 Maciej Stachowiak <mjs@apple.com>
+
+ - removed more SPI
+
+ * Carbon.subproj/CarbonUtils.m:
+ (WebInitForCarbon):
+ (PoolCleaner):
+ * WebView.subproj/WebHTMLView.m:
+ (+[WebHTMLView _postFlagsChangedEvent:]):
+ (-[WebHTMLView _autoscroll]):
+ (-[WebHTMLView addMouseMovedObserver]):
+ (-[WebHTMLView removeMouseMovedObserver]):
+ (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
+ (-[WebHTMLView _interceptEditingKeyEvent:]):
+
2005-06-06 Maciej Stachowiak <mjs@apple.com>
- more SPI use removal
#import <WebKitSystemInterface.h>
#import <AppKit/NSAccessibility.h>
-#import <AppKit/NSGraphicsContextPrivate.h>
-#import <AppKit/NSResponder_Private.h>
-
-#import <CoreGraphics/CGContextGState.h>
-
-// Included to help work around this bug:
-// <rdar://problem/3630640>: "Calling interpretKeyEvents: in a custom text view can fail to process keys right after app startup"
-#import <AppKit/NSKeyBindingManager.h>
// Included so usage of _NSSoftLinkingGetFrameworkFuncPtr will compile
#import <mach-o/dyld.h>
// Pretend it's a mouse move.
[[NSNotificationCenter defaultCenter]
- postNotificationName:NSMouseMovedNotification object:self
+ postNotificationName:WKMouseMovedNotification() object:self
userInfo:[NSDictionary dictionaryWithObject:fakeEvent forKey:@"NSEvent"]];
}
- (void)_autoscroll
{
- int isStillDown;
-
// Guarantee that the autoscroll timer is invalidated, even if we don't receive
// a mouse up event.
- PSstilldown([_private->autoscrollTriggerEvent eventNumber], &isStillDown);
+ BOOL isStillDown = WKMouseIsDown();
if (!isStillDown){
[self _stopAutoscrollTimer];
return;
if (([[self window] isKeyWindow] && ![self _insideAnotherHTMLView]) ||
[[self _webView] _dashboardBehavior:WebDashboardBehaviorAlwaysSendMouseEventsToAllWindows]){
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mouseMovedNotification:)
- name:NSMouseMovedNotification object:nil];
+ name:WKMouseMovedNotification() object:nil];
[self _frameOrBoundsChanged];
}
}
[[self _webView] _mouseDidMoveOverElement:nil modifierFlags:0];
[[NSNotificationCenter defaultCenter] removeObserver:self
- name:NSMouseMovedNotification object:nil];
+ name:WKMouseMovedNotification() object:nil];
}
- (void)updateFocusState
// Ensure that we will receive mouse move events. Is this the best place to put this?
[[self window] setAcceptsMouseMovedEvents: YES];
- [[self window] _setShouldPostEventNotifications: YES];
+ WKSetNSWindowShouldPostEventNotifications([self window], YES);
if (!_private->needsLayout) {
return;
- (BOOL)_interceptEditingKeyEvent:(NSEvent *)event
{
- // Work around this bug:
- // <rdar://problem/3630640>: "Calling interpretKeyEvents: in a custom text view can fail to process keys right after app startup"
- [NSKeyBindingManager sharedKeyBindingManager];
-
// Use the isEditable state to determine whether or not to process tab key events.
// The idea here is that isEditable will be NO when this WebView is being used
// in a browser, and we desire the behavior where tab moves to the next element