[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:50:34 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5b7f51bc6b142751ace457e7d4dc352b1cff95aa
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 7 20:27:10 2003 +0000

    WebCore:
    
            Reviewed by Richard.
    
            - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
    
            * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Remove check for old
            versions of AppKit that let the WebKit posing handle key down events.
            * kwq/KWQTextField.mm: Removed fieldEditorDidMouseDown: methods.
    
            * WebCore.pbproj/project.pbxproj: Removed WebCoreFirstResponderChanges.h.
            * kwq/WebCoreFirstResponderChanges.h: Removed.
    
    WebKit:
    
            Reviewed by Richard.
    
            - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
    
            * WebView.subproj/WebHTMLViewPrivate.m: Removed WebNSTextView, WebNSView, and WebNSWindow,
            removed the code to have them pose as NSTextView, NSView, and NSWindow, and removed excess
            imports that are no longer needed.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4784 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 274eee4..bac2dfc 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2003-08-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by Richard.
+
+        - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
+
+        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Remove check for old
+        versions of AppKit that let the WebKit posing handle key down events.
+        * kwq/KWQTextField.mm: Removed fieldEditorDidMouseDown: methods.
+
+        * WebCore.pbproj/project.pbxproj: Removed WebCoreFirstResponderChanges.h.
+        * kwq/WebCoreFirstResponderChanges.h: Removed.
+
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
 	Fixed development build problem.  WebCore.exp needed a newline at EOF.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 274eee4..bac2dfc 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2003-08-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by Richard.
+
+        - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
+
+        * kwq/KWQTextArea.mm: (-[KWQTextAreaTextView keyDown:]): Remove check for old
+        versions of AppKit that let the WebKit posing handle key down events.
+        * kwq/KWQTextField.mm: Removed fieldEditorDidMouseDown: methods.
+
+        * WebCore.pbproj/project.pbxproj: Removed WebCoreFirstResponderChanges.h.
+        * kwq/WebCoreFirstResponderChanges.h: Removed.
+
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
 	Fixed development build problem.  WebCore.exp needed a newline at EOF.
diff --git a/WebCore/WebCore.pbproj/project.pbxproj b/WebCore/WebCore.pbproj/project.pbxproj
index 525a82b..a885947 100644
--- a/WebCore/WebCore.pbproj/project.pbxproj
+++ b/WebCore/WebCore.pbproj/project.pbxproj
@@ -482,7 +482,6 @@
 				F565A2740352509B01A80180,
 				F565A27D035284E301A80180,
 				F56234E103026D7301629B47,
-				6504A7BF03DCE19800000124,
 				F58785DE02DE375901EA4122,
 				F5517DC4031AB56301A80180,
 				F58785DF02DE375901EA4122,
@@ -910,33 +909,6 @@
 //512
 //513
 //514
-//650
-//651
-//652
-//653
-//654
-		6504A7BE03DCE19800000124 = {
-			expectedFileType = sourcecode.c.h;
-			fileEncoding = 30;
-			isa = PBXFileReference;
-			path = WebCoreFirstResponderChanges.h;
-			refType = 4;
-			sourceTree = "<group>";
-		};
-		6504A7BF03DCE19800000124 = {
-			fileRef = 6504A7BE03DCE19800000124;
-			isa = PBXBuildFile;
-			settings = {
-				ATTRIBUTES = (
-					Private,
-				);
-			};
-		};
-//650
-//651
-//652
-//653
-//654
 //930
 //931
 //932
@@ -7294,7 +7266,6 @@
 		F58785E902DE378A01EA4122 = {
 			children = (
 				F587854702DE375901EA4122,
-				6504A7BE03DCE19800000124,
 				F587854802DE375901EA4122,
 				F5B2A4FC02E2220F018635CB,
 				F5B2A4FD02E2220F018635CB,
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index a75c337..07e945e 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -597,17 +597,11 @@ static NSString *WebContinuousSpellCheckingEnabled = @"WebContinuousSpellCheckin
 
 - (void)keyDown:(NSEvent *)event
 {
-    // FIXME: We only want this code when we are not posing in WebKit,
-    // so we do the same version number check here that we had there.
-    // Once we remove the posing from WebKit entirely, we can remove
-    // this version check as well.
-    if (NSAppKitVersionNumber >= 705) {
-        WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
-        [bridge interceptKeyEvent:event toView:self];
-        // FIXME: In theory, if the bridge intercepted the event we should return not call super.
-        // But the code in the Web Kit that this replaces did not do that, so lets not do it until
-        // we can do more testing to see if it works well.
-    }
+    WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
+    [bridge interceptKeyEvent:event toView:self];
+    // FIXME: In theory, if the bridge intercepted the event we should return not call super.
+    // But the code in the Web Kit that this replaces did not do that, so lets not do it until
+    // we can do more testing to see if it works well.
     [super keyDown:event];
 }
 
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index a19c99a..efc660d 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -31,7 +31,6 @@
 #import "KWQNSViewExtras.h"
 #import "KWQView.h"
 #import "WebCoreBridge.h"
-#import "WebCoreFirstResponderChanges.h"
 
 @interface KWQTextField (KWQInternal)
 - (void)setHasFocus:(BOOL)hasFocus;
@@ -412,16 +411,6 @@
     return widget;
 }
 
-// FIXME: We can remove this once we require AppKit-705 or newer.
-- (void)fieldEditorDidMouseDown:(NSEvent *)event
-{
-    if (!widget) {
-	return;
-    }
-    widget->sendConsumedMouseUp();
-    widget->clicked();
-}
-
 - (void)setAlignment:(NSTextAlignment)alignment
 {
     [secureField setAlignment:alignment];
@@ -734,13 +723,6 @@
     return [(KWQTextField *)[self delegate] widget];
 }
 
-// FIXME: We can remove this once we require AppKit-705 or newer.
-- (void)fieldEditorDidMouseDown:(NSEvent *)event
-{
-    ASSERT([[self delegate] isKindOfClass:[KWQTextField class]]);
-    [[self delegate] fieldEditorDidMouseDown:event];
-}
-
 - (void)textDidEndEditing:(NSNotification *)notification
 {
     [super textDidEndEditing:notification];
diff --git a/WebCore/kwq/WebCoreFirstResponderChanges.h b/WebCore/kwq/WebCoreFirstResponderChanges.h
deleted file mode 100644
index b9d2266..0000000
--- a/WebCore/kwq/WebCoreFirstResponderChanges.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2003 Apple Computer, Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-// FIXME: Remove this entire file once we require AppKit-705 or newer.
-
-#import <Foundation/Foundation.h>
-
-// The WebCore client must arrange to call these methods after a text
-// field's field editor process a mouseDown: event.
-
- at interface NSObject (WebCoreFieldDelegate)
-- (void)fieldEditorDidMouseDown:(NSEvent *)event;
- at end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 664b789..18fed22 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2003-08-06  Darin Adler  <darin at apple.com>
+
+        Reviewed by Richard.
+
+        - fixed 3347114 -- remove vestiges of posing, including init routine, from WebKit
+
+        * WebView.subproj/WebHTMLViewPrivate.m: Removed WebNSTextView, WebNSView, and WebNSWindow,
+        removed the code to have them pose as NSTextView, NSView, and NSWindow, and removed excess
+        imports that are no longer needed.
+
 2003-08-06  Richard Williamson   <rjw at apple.com>
 
 	Fixed 3365378.  Edge case text run > 1024 hit by JS generated string.  We weren't correctly checking size of string length.  Used /2 instead of *2.
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 58a13f5..7b03ea3 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -5,37 +5,23 @@
 
 #import <WebKit/WebHTMLViewPrivate.h>
 
-#import <AppKit/NSGraphicsContextPrivate.h> // for PSbuttondown
 #import <AppKit/NSResponder_Private.h>
 
 #import <WebKit/WebAssertions.h>
-
-#import <WebCore/WebCoreFirstResponderChanges.h>
-
 #import <WebKit/WebBridge.h>
-#import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebFrameViewPrivate.h>
-#import <WebKit/WebHTMLView.h>
 #import <WebKit/WebImageRenderer.h>
 #import <WebKit/WebKitNSStringExtras.h>
 #import <WebKit/WebNSImageExtras.h>
 #import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebNSURLExtras.h>
 #import <WebKit/WebNSViewExtras.h>
-#import <WebKit/WebNetscapePluginEmbeddedView.h>
 #import <WebKit/WebPluginController.h>
-#import <WebKit/WebPolicyDelegate.h>
 #import <WebKit/WebPreferences.h>
 #import <WebKit/WebStringTruncator.h>
-#import <WebKit/WebUIDelegate.h>
 #import <WebKit/WebViewPrivate.h>
 
-// Imported for direct call to class_poseAs.  Should be removed
-// if we ever drop posing hacks.
-#import <objc/objc-class.h>
-#import <objc/objc-runtime.h>
-
 // These are a little larger than typical because dragging links is a fairly
 // advanced feature that can confuse non-power-users
 #define DragHysteresis  		10.0
@@ -53,41 +39,19 @@
 #define DRAG_LINK_LABEL_FONT_SIZE   11.0
 #define DRAG_LINK_URL_FONT_SIZE   10.0
 
-#import <CoreGraphics/CGStyle.h>
-#import <CoreGraphics/CGSTypes.h>
-#import <CoreGraphics/CGContextGState.h>
-
-
 static BOOL forceRealHitTest = NO;
 
 @interface NSView (AppKitSecretsIKnowAbout)
 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView;
 - (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect;
 - (NSRect)_dirtyRect;
-- (void)_drawRect:(NSRect)rect clip:(BOOL)clip;
 @end
 
- at interface NSView (WebNSViewDisplayExtras)
+ at interface NSView (WebHTMLViewPrivate)
 - (void)_web_propagateDirtyRectToAncestor;
-- (void)_web_dumpDirtyRects;
- at end
-
- at interface WebNSTextView : NSTextView
-{
-}
- at end
-
- at interface WebNSView : NSView
-{
-}
- at end
-
- at interface WebNSWindow : NSWindow
-{
-}
 @end
 
- at interface NSMutableDictionary (WebHTMLViewExtras)
+ at interface NSMutableDictionary (WebHTMLViewPrivate)
 - (void)_web_setObjectIfNotNil:(id)object forKey:(id)key;
 @end
 
@@ -109,34 +73,6 @@ static BOOL forceRealHitTest = NO;
 
 @implementation WebHTMLView (WebPrivate)
 
-// Danger Will Robinson. We have to poseAsClass: as early as possible
-// so that any NSViews and NSWindows will be created with the
-// appropriate poser.
-+ (void)load
-{
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    
-    // Avoid indirect invocation of any class initializers by using function
-    // calls instead of methods here. This is a work-around to prevent
-    // the +initializers being called before the REQUIRED AppKit initialization
-    // that's done in +[NSApplication load].
-
-    // If AppKit is 705 or newer, this is handled over on the WebCore side,
-    // using the new NSTextView SPI.
-    if (NSAppKitVersionNumber < 705) {
-        class_poseAs(objc_getClass("WebNSTextView"), objc_getClass("NSTextView"));
-        class_poseAs(objc_getClass("WebNSWindow"), objc_getClass("NSWindow"));
-    }
-
-    // If AppKit is 711 or newer, this is handled using _setDrawsOwnDescendants.
-    if (NSAppKitVersionNumber < 711) {
-        class_poseAs(objc_getClass("WebNSView"), objc_getClass("NSView"));
-    }
-
-    [pool release];
-}
-
-
 - (void)_adjustFrames
 {
     // Ick!  khtml set the frame size during layout and
@@ -624,142 +560,7 @@ static WebHTMLView *lastHitView = nil;
 
 @end
 
- at implementation WebNSTextView
-
-static BOOL inNSTextViewDrawRect;
-
-// This code is here to make insertion point drawing work in a way that respects the
-// HTML view layering. If we can find a way to make it work without poseAsClass, we
-// should do that.
-
-- (BOOL)_web_inHTMLView
-{
-    NSView *view = self;
-    for (;;) {
-        NSView *superview = [view superview];
-        if (!superview) {
-            return NO;
-        }
-        view = superview;
-        if ([view isKindOfClass:[WebHTMLView class]]) {
-            return YES;
-        }
-    }
-}
-
-- (BOOL)isOpaque
-{
-    if (![self _web_inHTMLView]) {
-        return [super isOpaque];
-    }
-
-    // Text views in the HTML view all say they are not opaque.
-    // This prevents the insertion point rect cache from being used,
-    // and all the side effects are good since we want the view to act
-    // opaque anyway. This could go in NSView instead of NSTextView,
-    // but we need to pose as NSTextView anyway for the other override.
-    // If we did this in NSView, we wouldn't need to call _web_propagateDirtyRectToAncestor.
-    return NO;
-}
-
-- (void)drawInsertionPointInRect:(NSRect)rect color:(NSColor *)color turnedOn:(BOOL)turnedOn
-{
-    if (![self _web_inHTMLView]) {
-        [super drawInsertionPointInRect:rect color:color turnedOn:turnedOn];
-        return;
-    }
-    
-    // Use the display mechanism to do all insertion point drawing in the web view.
-    if (inNSTextViewDrawRect) {
-        [super drawInsertionPointInRect:rect color:color turnedOn:turnedOn];
-        return;
-    }
-    [super drawInsertionPointInRect:rect color:color turnedOn:NO];
-    if (turnedOn) {
-        rect.size.width = 1;
-        
-        // Call the setNeedsDisplayInRect function in NSView.
-        // If we call the one in NSTextView through the normal Objective-C dispatch
-        // we will reenter the caret blinking code and end up with a nasty crash
-        // (see Radar 3250608).
-        SEL selector = @selector(setNeedsDisplayInRect:);
-        typedef void (*IMPWithNSRect)(id, SEL, NSRect);
-        IMPWithNSRect implementation = (IMPWithNSRect)[NSView instanceMethodForSelector:selector];
-        implementation(self, selector, rect);
-    }
-}
-
-- (void)_drawRect:(NSRect)rect clip:(BOOL)clip
-{
-    ASSERT(!inNSTextViewDrawRect);
-    inNSTextViewDrawRect = YES;
-    [super _drawRect:rect clip:clip];
-    inNSTextViewDrawRect = NO;
-}
-
--(void)mouseDown:(NSEvent *)event
-{
-    NSView *possibleContainingField = [self delegate];
-
-    [super mouseDown:event];
-    if ([possibleContainingField respondsToSelector:@selector(fieldEditorDidMouseDown:)]) {
-	[possibleContainingField fieldEditorDidMouseDown:event];
-    }
-}
-
- at end
-
- at implementation WebNSView
-
-- (NSView *)opaqueAncestor
-{
-    if (![self isOpaque]) {
-        return [super opaqueAncestor];
-    }
-    NSView *opaqueAncestor = self;
-    NSView *superview = self;
-    while ((superview = [superview superview])) {
-        if ([superview isKindOfClass:[WebHTMLView class]]) {
-            opaqueAncestor = superview;
-        }
-    }
-    return opaqueAncestor;
-}
-
- at end
-
- at implementation WebNSWindow
-
-- (void)sendEvent:(NSEvent *)event
-{
-    if ([event type] == NSKeyDown || [event type] == NSKeyUp) {
-	NSResponder *responder = [self firstResponder];
-
-	NSView *view;
-	while (responder != nil && ![responder isKindOfClass:[WebNSView class]]) {
-	    responder = [responder nextResponder];
-	}
-
-	view = (NSView *)responder;
-
-	NSView *ancestorHTMLView = view;
-	while (ancestorHTMLView != nil && ![ancestorHTMLView isKindOfClass:[WebHTMLView class]]) {
-	    ancestorHTMLView = [ancestorHTMLView superview];
-	}
-	    
-	if (ancestorHTMLView != nil) {
-	    if ([(WebHTMLView *)ancestorHTMLView _interceptKeyEvent:event toView:view]) {
-
-	    }
-	}
-    }
-
-    [super sendEvent:event];
-}
-
- at end
-
- at implementation NSMutableDictionary (WebHTMLViewExtras)
+ at implementation NSMutableDictionary (WebHTMLViewPrivate)
 
 - (void)_web_setObjectIfNotNil:(id)object forKey:(id)key
 {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list