- fixed problems preventing us from compiling with gcc 4.0
* WebKit.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
* History.subproj/WebHistoryItem.m: (-[WebHistoryItem pageCache]): Changed return type
to match the declaration.
* WebCoreSupport.subproj/WebBridge.m: (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
Fixed a BOOL that should have been a Boolean.
* WebCoreSupport.subproj/WebTextRenderer.m: Removed redundant copy of ROUND_TO_INT, also in
a WebCore header.
(-[WebTextRenderer _computeWidthForSpace]): Had to add cast because of difference in type of
ROUND_TO_INT vs. CEIL_TO_INT.
(pathFromFont): Added a cast to convert UInt8 * to char *.
* WebView.subproj/WebFrameView.m:
(-[WebFrameView _setDocumentView:]): Fixed parameter type to match the declaration.
(-[WebFrameView documentView]): Fixed return type to match the declaration.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
Initialized a variable to quiet an incorrect gcc 4.0 uninitialized variable warning.
(-[WebHTMLView deleteToMark:]): Switched from @try style to NS_DURING style of exception handler
because we can't pass -fobjc-exceptions just to Objective-C at the moment (see above).
(-[WebHTMLView selectToMark:]): Ditto.
(-[WebHTMLView swapWithMark:]): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9080
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-04-28 Darin Adler <darin@apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed problems preventing us from compiling with gcc 4.0
+
+ * WebKit.pbproj/project.pbxproj: Removed -fobjc-exceptions because I can't figure out an easy
+ way to pass it only when compiling Objective-C/C++. Removed -Wmissing-prototypes from
+ WARNING_CPLUSPLUSFLAGS since it's now a C-only warning.
+
+ * History.subproj/WebHistoryItem.m: (-[WebHistoryItem pageCache]): Changed return type
+ to match the declaration.
+ * WebCoreSupport.subproj/WebBridge.m: (-[WebBridge _retrieveKeyboardUIModeFromPreferences:]):
+ Fixed a BOOL that should have been a Boolean.
+ * WebCoreSupport.subproj/WebTextRenderer.m: Removed redundant copy of ROUND_TO_INT, also in
+ a WebCore header.
+ (-[WebTextRenderer _computeWidthForSpace]): Had to add cast because of difference in type of
+ ROUND_TO_INT vs. CEIL_TO_INT.
+ (pathFromFont): Added a cast to convert UInt8 * to char *.
+ * WebView.subproj/WebFrameView.m:
+ (-[WebFrameView _setDocumentView:]): Fixed parameter type to match the declaration.
+ (-[WebFrameView documentView]): Fixed return type to match the declaration.
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView _startDraggingImage:at:operation:event:sourceIsDHTML:DHTMLWroteData:]):
+ Initialized a variable to quiet an incorrect gcc 4.0 uninitialized variable warning.
+ (-[WebHTMLView deleteToMark:]): Switched from @try style to NS_DURING style of exception handler
+ because we can't pass -fobjc-exceptions just to Objective-C at the moment (see above).
+ (-[WebHTMLView selectToMark:]): Ditto.
+ (-[WebHTMLView swapWithMark:]): Ditto.
+
2005-04-27 John Sullivan <sullivan@apple.com>
Reviewed by Dave Harrison.
}
}
-- pageCache
+- (NSMutableDictionary *)pageCache
{
return _private->pageCache;
}
{
CFPreferencesAppSynchronize(UniversalAccessDomain);
- BOOL keyExistsAndHasValidFormat;
+ Boolean keyExistsAndHasValidFormat;
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
// The keyboard access mode is reported by two bits:
#define NO_BREAK_SPACE 0x00A0
#define ZERO_WIDTH_SPACE 0x200B
-#define ROUND_TO_INT(x) (int)((x)+.5)
-
// Lose precision beyond 1000ths place. This is to work around an apparent
// bug in CoreGraphics where there seem to be small errors to some metrics.
#define CEIL_TO_INT(x) ((int)(x + 0.999)) /* ((int)(x + 1.0 - FLT_EPSILON)) */
spaceWidth = width;
treatAsFixedPitch = [[WebTextRendererFactory sharedFactory] isFontFixedPitch:font];
- adjustedSpaceWidth = treatAsFixedPitch ? CEIL_TO_INT(width) : ROUND_TO_INT(width);
+ adjustedSpaceWidth = treatAsFixedPitch ? CEIL_TO_INT(width) : (int)ROUND_TO_INT(width);
return YES;
}
if (err == noErr){
status = FSRefMakePath(&fileRef,_filePathBuffer, PATH_MAX);
if (status == noErr){
- filePath = [NSString stringWithUTF8String:&_filePathBuffer[0]];
+ filePath = [NSString stringWithUTF8String:(const char *)&_filePathBuffer[0]];
}
}
}
LOCAL_SEG1_ADDR = 0x7000000;
MACOSX_DEPLOYMENT_TARGET = 10.3;
OPTIMIZATION_CFLAGS = "-Os";
- OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DFRAMEWORK_NAME=WebKit -fobjc-exceptions";
+ OTHER_CFLAGS = "$(DEBUG_CFLAGS) -DFRAMEWORK_NAME=WebKit";
OTHER_LDFLAGS = "$(COMMON_LDFLAGS) -sub_umbrella WebCore -sub_umbrella JavaScriptCore";
PRECOMPILE_PREFIX_HEADER = YES;
PREFIX_HEADER = WebKitPrefix.h;
TIGER_FRAMEWORKS_LDFLAGS = "-framework \"`if [ -f /usr/local/SecurityPieces/Frameworks/security_cdsa_utils.framework/security_cdsa_utils ]; then echo \\\"security_cdsa_utils\\\"; else echo \\\"System\\\"; fi`\"";
USE_GCC3_PFE_SUPPORT = YES;
WARNING_CFLAGS = "-Werror -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wbad-function-cast -Wmissing-declarations -Wnested-externs";
- WARNING_CPLUSPLUSFLAGS = "-Werror -Wall -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wmissing-prototypes -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter";
+ WARNING_CPLUSPLUSFLAGS = "-Werror -Wall -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter";
WRAPPER_EXTENSION = framework;
};
dependencies = (
return _private->marginHeight;
}
-- (void)_setDocumentView:(NSView *)view
+- (void)_setDocumentView:(NSView <WebDocumentView> *)view
{
WebDynamicScrollBarsView *sv = (WebDynamicScrollBarsView *)[self _scrollView];
return [(WebDynamicScrollBarsView *)[self _scrollView] allowsScrolling];
}
-- documentView
+- (NSView <WebDocumentView> *)documentView
{
return [[self _scrollView] documentView];
}
NSPoint mouseDraggedPoint = [self convertPoint:[mouseDraggedEvent locationInWindow] fromView:nil];
_private->webCoreDragOp = op; // will be DragNone if WebCore doesn't care
NSImage *dragImage = nil;
- NSPoint dragLoc;
+ NSPoint dragLoc = { 0, 0 }; // quiet gcc 4.0 warning
// We allow WebCore to override the drag image, even if its a link, image or text we're dragging.
// This is in the spirit of the IE API, which allows overriding of pasteboard data and DragOp.
} else {
DOMRange *selection = [self _selectedRange];
DOMRange *r;
- @try {
+ NS_DURING
r = unionDOMRanges(mark, selection);
- } @catch (NSException *exception) {
+ NS_HANDLER
r = selection;
- }
+ NS_ENDHANDLER
[self _deleteRange:r killRing:YES prepend:YES smartDeleteOK:NO deletionAction:deleteSelectionAction];
}
[self setMark:sender];
return;
}
DOMRange *selection = [self _selectedRange];
- @try {
+ NS_DURING
[bridge setSelectedDOMRange:unionDOMRanges(mark, selection) affinity:NSSelectionAffinityDownstream closeTyping:YES];
- } @catch (NSException *exception) {
+ NS_HANDLER
NSBeep();
- }
+ NS_ENDHANDLER
}
- (void)swapWithMark:(id)sender
return;
}
DOMRange *selection = [self _selectedRange];
- @try {
+ NS_DURING
[bridge setSelectedDOMRange:mark affinity:NSSelectionAffinityDownstream closeTyping:YES];
- } @catch (NSException *exception) {
+ NS_HANDLER
NSBeep();
return;
- }
+ NS_ENDHANDLER
[bridge setMarkDOMRange:selection];
}