Commit 1ea4341c authored by darin's avatar darin
Browse files

- fix Tiger build

        * Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
        NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
        present, but they are used in public and private headers only.

        * Carbon/CarbonWindowAdapter.m:
        * Carbon/CarbonWindowFrame.m:
        * DefaultDelegates/WebScriptDebugServer.m:
        * History/WebBackForwardList.mm:
        * Misc/WebDownload.m:
        * Misc/WebSearchableTextView.m:
        * Plugins/WebBaseNetscapePluginView.mm:
        * WebCoreSupport/WebFrameLoaderClient.mm:
        * WebView/WebHTMLView.mm:
        * WebView/WebPDFView.mm:
        * WebView/WebView.mm:
        * WebView/WebViewInternal.h:
        Update all implementation files and internal headers to use NSInteger and
        NSUInteger rather than WebNSInteger and WebNSUInteger.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@24666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent f8d1b24d
......@@ -82,7 +82,7 @@ @interface NSWindow(HIWebFrameView)
- _initContent:(const NSRect *)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag contentView:aView;
- (void)_oldPlaceWindow:(NSRect)frameRect;
- (void)_windowMovedToRect:(NSRect)actualFrame;
- (void)_setWindowNumber:(WebNSInteger)nativeWindow;
- (void)_setWindowNumber:(NSInteger)nativeWindow;
- (NSGraphicsContext *)_threadContext;
- (void)_setFrame:(NSRect)newWindowFrameRect;
- (void)_setVisible:(BOOL)flag;
......@@ -193,7 +193,7 @@ - (id)initWithCarbonWindowRef:(WindowRef)inWindowRef takingOwnership:(BOOL)inWin
// _auxiliaryStorage->_auxWFlags.hasShadow = (windowAttributes & kWindowNoShadowAttribute) ? NO : YES;
// Record the window number.
[self _setWindowNumber:(WebNSInteger)nativeWindow];
[self _setWindowNumber:(NSInteger)nativeWindow];
// Set up from the frame rectangle.
// We didn't even really try to get it right at _initContent:... time, because it's more trouble that it's worth to write a real +[NSCarbonWindow frameRectForContentRect:styleMask:]. M.P. Notice - 10/10/00
......
......@@ -76,32 +76,32 @@ - (NSRect)titlebarRect
}
// Given a content rectangle and style mask, return a corresponding frame rectangle.
+ (NSRect)frameRectForContentRect:(NSRect)contentRect styleMask:(WebNSUInteger)style {
+ (NSRect)frameRectForContentRect:(NSRect)contentRect styleMask:(NSUInteger)style {
// We don't bother figuring out a good value, because content rects weren't so meaningful for NSCarbonWindows in the past, but this might not be a good assumption anymore. M.P. Warning - 12/5/00
return contentRect;
}
+ (NSRect)contentRectForFrameRect:(NSRect)frameRect styleMask:(WebNSUInteger)style {
+ (NSRect)contentRectForFrameRect:(NSRect)frameRect styleMask:(NSUInteger)style {
// We don't bother figuring out a good value, because content rects weren't so meaningful for NSCarbonWindows in the past, but this might not be a good assumption anymore. KW - copied from +frameRectForContentRect:styleMask
return frameRect;
}
+ (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(WebNSUInteger)style {
+ (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(NSUInteger)style {
// See comments above. We don't make any assumptions about the relationship between content rects and frame rects
return cSize;
}
- (NSRect)frameRectForContentRect:(NSRect)cRect styleMask:(WebNSUInteger)style {
- (NSRect)frameRectForContentRect:(NSRect)cRect styleMask:(NSUInteger)style {
return [[self class] frameRectForContentRect: cRect styleMask:style];
}
- (NSRect)contentRectForFrameRect:(NSRect)fRect styleMask:(WebNSUInteger)style {
- (NSRect)contentRectForFrameRect:(NSRect)fRect styleMask:(NSUInteger)style {
return [[self class] contentRectForFrameRect: fRect styleMask:style];
}
- (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(WebNSUInteger)style {
- (NSSize)minFrameSizeForMinContentSize:(NSSize)cSize styleMask:(NSUInteger)style {
return [[self class] minFrameSizeForMinContentSize:cSize styleMask: style];
}
......
2007-07-26 Darin Adler <darin@apple.com>
- fix Tiger build
* Misc/WebTypesInternal.h: For use inside the library, use NSInteger and
NSUInteger, just like on Leopard. WebNSInteger and WebNSUInteger are still
present, but they are used in public and private headers only.
* Carbon/CarbonWindowAdapter.m:
* Carbon/CarbonWindowFrame.m:
* DefaultDelegates/WebScriptDebugServer.m:
* History/WebBackForwardList.mm:
* Misc/WebDownload.m:
* Misc/WebSearchableTextView.m:
* Plugins/WebBaseNetscapePluginView.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebHTMLView.mm:
* WebView/WebPDFView.mm:
* WebView/WebView.mm:
* WebView/WebViewInternal.h:
Update all implementation files and internal headers to use NSInteger and
NSUInteger rather than WebNSInteger and WebNSUInteger.
2007-07-26 John Sullivan <sullivan@apple.com>
 
Reviewed by Kevin Decker
......
......@@ -234,7 +234,7 @@ - (void)webView:(WebView *)webView didLoadMainResourceForDataSource:(WebDataSour
}
- (void)webView:(WebView *)webView didParseSource:(NSString *)source
baseLineNumber:(WebNSUInteger)lineNumber
baseLineNumber:(NSUInteger)lineNumber
fromURL:(NSURL *)url
sourceId:(int)sid
forWebFrame:(WebFrame *)webFrame
......@@ -256,7 +256,7 @@ - (void)webView:(WebView *)webView didParseSource:(NSString *)source
}
- (void)webView:(WebView *)webView failedToParseSource:(NSString *)source
baseLineNumber:(WebNSUInteger)lineNumber
baseLineNumber:(NSUInteger)lineNumber
fromURL:(NSURL *)url
withError:(NSError *)error
forWebFrame:(WebFrame *)webFrame
......
......@@ -252,12 +252,12 @@ static NSArray* vectorToNSArray(HistoryItemVector& list)
return result;
}
- (void)setPageCacheSize:(WebNSUInteger)size
- (void)setPageCacheSize:(NSUInteger)size
{
[kit(core(self)->page()) setUsesPageCache:size != 0];
}
- (WebNSUInteger)pageCacheSize
- (NSUInteger)pageCacheSize
{
return [kit(core(self)->page()) usesPageCache] ? pageCache()->capacity() : 0;
}
......
......@@ -132,7 +132,7 @@ - (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)r
[realDelegate download:download didReceiveResponse:response];
}
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(WebNSUInteger)length
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length
{
[realDelegate download:download didReceiveDataOfLength:length];
}
......
......@@ -92,7 +92,7 @@ - (NSRect)selectionRect
NSValue *rangeAsValue;
while ((rangeAsValue = [rangeEnumerator nextObject]) != nil) {
NSRange range = [rangeAsValue rangeValue];
WebNSUInteger rectCount;
NSUInteger rectCount;
NSRectArray rectArray = [[self layoutManager] rectArrayForCharacterRange:range
withinSelectedCharacterRange:range
inTextContainer:[self textContainer]
......
/*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -27,11 +27,8 @@
*/
#ifdef BUILDING_ON_TIGER
typedef int WebNSInteger;
typedef unsigned int WebNSUInteger;
#else
typedef NSInteger WebNSInteger;
typedef NSUInteger WebNSUInteger;
typedef int NSInteger;
typedef unsigned int NSUInteger;
#endif
#ifndef CGFLOAT_DEFINED
......
......@@ -138,7 +138,7 @@ typedef struct {
@interface NSData (WebPluginDataExtras)
- (BOOL)_web_startsWithBlankLine;
- (WebNSInteger)_web_locationAfterFirstBlankLine;
- (NSInteger)_web_locationAfterFirstBlankLine;
@end
static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *pluginView);
......@@ -496,7 +496,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// knows about the true set of dirty rects.
NSView *opaqueAncestor = [self opaqueAncestor];
const NSRect *dirtyRects;
WebNSInteger dirtyRectCount, dirtyRectIndex;
NSInteger dirtyRectCount, dirtyRectIndex;
[opaqueAncestor getRectsBeingDrawn:&dirtyRects count:&dirtyRectCount];
for (dirtyRectIndex = 0; dirtyRectIndex < dirtyRectCount; dirtyRectIndex++) {
......@@ -561,7 +561,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
// knows about the true set of dirty rects.
NSView *opaqueAncestor = [self opaqueAncestor];
const NSRect *dirtyRects;
WebNSInteger count;
NSInteger count;
[opaqueAncestor getRectsBeingDrawn:&dirtyRects count:&count];
Vector<CGRect, 16> convertedDirtyRects;
convertedDirtyRects.resize(count);
......@@ -2291,7 +2291,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
if ([postData _web_startsWithBlankLine]) {
postData = [postData subdataWithRange:NSMakeRange(1, [postData length] - 1)];
} else {
WebNSInteger location = [postData _web_locationAfterFirstBlankLine];
NSInteger location = [postData _web_locationAfterFirstBlankLine];
if (location != NSNotFound) {
// If the blank line is somewhere in the middle of postData, everything before is the header.
NSData *headerData = [postData subdataWithRange:NSMakeRange(0, location)];
......@@ -3160,7 +3160,7 @@ static OSStatus TSMEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEve
}
- (WebNSInteger)_web_locationAfterFirstBlankLine
- (NSInteger)_web_locationAfterFirstBlankLine
{
const char *bytes = (const char *)[self bytes];
unsigned length = [self length];
......
......@@ -400,7 +400,7 @@ void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loade
if (implementations.delegateImplementsDidReceiveContentLength) {
if (id resource = [webView _objectForIdentifier:identifier])
implementations.didReceiveContentLengthFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:), webView, resource, (WebNSUInteger)lengthReceived, dataSource(loader));
implementations.didReceiveContentLengthFunc(resourceLoadDelegate, @selector(webView:resource:didReceiveContentLength:fromDataSource:), webView, resource, (NSUInteger)lengthReceived, dataSource(loader));
}
}
......
......@@ -2642,7 +2642,7 @@ static void _updateActiveStateTimerCallback(CFRunLoopTimerRef timer, void *info)
LOG(View, "%@ drawing", self);
const NSRect *rects;
WebNSInteger count;
NSInteger count;
[self getRectsBeingDrawn:&rects count:&count];
BOOL subviewsWereSetAside = _private->subviewsSetAside;
......@@ -5251,7 +5251,7 @@ BOOL isTextInput(Frame *coreFrame)
return result ? result : [[[NSAttributedString alloc] initWithString:@""] autorelease];
}
- (WebNSUInteger)characterIndexForPoint:(NSPoint)thePoint
- (NSUInteger)characterIndexForPoint:(NSPoint)thePoint
{
NSWindow *window = [self window];
WebFrameBridge *bridge = [self _bridge];
......@@ -6022,7 +6022,7 @@ BOOL isTextInput(Frame *coreFrame)
return nil;
}
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
return [[self _bridge] markAllMatchesForText:string caseSensitive:caseFlag limit:limit];
}
......
......@@ -614,7 +614,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
return NO;
}
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(WebNSUInteger)limit
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag limit:(NSUInteger)limit
{
PDFSelection *previousMatch = nil;
PDFSelection *nextMatch = nil;
......
......@@ -314,7 +314,7 @@ static int pluginDatabaseClientCount = 0;
NSString *mediaStyle;
BOOL hasSpellCheckerDocumentTag;
WebNSInteger spellCheckerDocumentTag;
NSInteger spellCheckerDocumentTag;
BOOL smartInsertDeleteEnabled;
......@@ -789,7 +789,7 @@ static bool debugWidget = true;
return menu;
}
- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInteger)modifierFlags
- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(NSUInteger)modifierFlags
{
// When the mouse isn't over this view at all, we'll get called with a dictionary of nil over
// and over again. So it's a good idea to catch that here and not send multiple calls to the delegate
......@@ -2938,7 +2938,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return YES;
}
- (WebNSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(WebNSUInteger)limit
- (NSUInteger)markAllMatchesForText:(NSString *)string caseSensitive:(BOOL)caseFlag highlight:(BOOL)highlight limit:(NSUInteger)limit
{
WebFrame *frame = [self mainFrame];
unsigned matchCount = 0;
......@@ -3302,7 +3302,7 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return (continuousSpellCheckingEnabled && [self _continuousCheckingAllowed]);
}
- (WebNSInteger)spellCheckerDocumentTag
- (NSInteger)spellCheckerDocumentTag
{
if (!_private->hasSpellCheckerDocumentTag) {
_private->spellCheckerDocumentTag = [NSSpellChecker uniqueSpellDocumentTag];
......
......@@ -93,7 +93,7 @@ WebFrameLoadDelegateImplementationCache WebViewGetFrameLoadDelegateImplementatio
+ (NSString *)_generatedMIMETypeForURLScheme:(NSString *)URLScheme;
+ (BOOL)_representationExistsForURLScheme:(NSString *)URLScheme;
- (BOOL)_isPerformingProgrammaticFocus;
- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(WebNSUInteger)modifierFlags;
- (void)_mouseDidMoveOverElement:(NSDictionary *)dictionary modifierFlags:(NSUInteger)modifierFlags;
- (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request;
- (void)_writeImageForElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
- (void)_writeLinkElement:(NSDictionary *)element withPasteboardTypes:(NSArray *)types toPasteboard:(NSPasteboard *)pasteboard;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment