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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:52:06 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5e5d9c485f89102632d5986e16631192843b657f
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 22 14:56:53 2004 +0000

    WebCore:
    
            Reviewed by Trey
    
            Remove handling of HTML editing key events from WebCore.
            This now happens in WebKit if an event passes all the
            way through WebCore without being handled by the DOM.
    
            In each case below, function were removed, as their
            only purpose was to handle editing key events.
    
            * khtml/xml/dom_elementimpl.cpp
            * khtml/xml/dom_elementimpl.h
            * kwq/KWQKHTMLPart.h
            * kwq/KWQKHTMLPart.mm
            * kwq/WebCoreBridge.h
    
    WebKit:
    
            Reviewed by Trey
    
            * WebCoreSupport.subproj/WebBridge.m: Remove interceptEditingKeyEvent
            bridge call over. This method of handling editing key events is now
            obsolete.
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView performKeyEquivalent:]): Send key event over to the
            DOM if this view is or contains the first responder. This now
            happens unconditionally.
            (-[WebHTMLView keyDown:]): Send key event to the DOM, then see if
            the web view wants to interpret it an an editing key event. This
            is the new place to intercept key events for editing.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7087 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a3dd88d..f93c85e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,22 @@
 2004-07-21  Ken Kocienda  <kocienda at apple.com>
 
+        Reviewed by Trey
+
+        Remove handling of HTML editing key events from WebCore.
+        This now happens in WebKit if an event passes all the
+        way through WebCore without being handled by the DOM.
+
+        In each case below, function were removed, as their
+        only purpose was to handle editing key events.
+
+        * khtml/xml/dom_elementimpl.cpp
+        * khtml/xml/dom_elementimpl.h
+        * kwq/KWQKHTMLPart.h
+        * kwq/KWQKHTMLPart.mm
+        * kwq/WebCoreBridge.h
+
+2004-07-21  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by John
 
         * khtml/xml/dom_selection.cpp:
diff --git a/WebCore/khtml/xml/dom_elementimpl.cpp b/WebCore/khtml/xml/dom_elementimpl.cpp
index 359ccfa..f4fbbde 100644
--- a/WebCore/khtml/xml/dom_elementimpl.cpp
+++ b/WebCore/khtml/xml/dom_elementimpl.cpp
@@ -373,18 +373,6 @@ bool ElementImpl::isURLAttribute(AttributeImpl *attr) const
     
 }
 
-void ElementImpl::defaultEventHandler(EventImpl *evt)
-{
-#if APPLE_CHANGES
-    if (evt->id() == EventImpl::KEYPRESS_EVENT && isContentEditable()) {
-        KHTMLPart *part = getDocument()->part();
-        if (part && KWQ(part)->interceptEditingKeyEvent())
-            evt->setDefaultHandled();
-    }
-#endif
-    NodeBaseImpl::defaultEventHandler(evt);
-}
-
 RenderStyle *ElementImpl::styleForRenderer(RenderObject *parentRenderer)
 {
     return getDocument()->styleSelector()->styleForElement(this);
diff --git a/WebCore/khtml/xml/dom_elementimpl.h b/WebCore/khtml/xml/dom_elementimpl.h
index 0d2b29e..dbb55dd 100644
--- a/WebCore/khtml/xml/dom_elementimpl.h
+++ b/WebCore/khtml/xml/dom_elementimpl.h
@@ -215,8 +215,6 @@ public:
 
     virtual DOMString toString() const;
 
-    virtual void defaultEventHandler(EventImpl *evt);
-    
     virtual bool isURLAttribute(AttributeImpl *attr) const;
     
 #ifndef NDEBUG
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index b2690e0..dae015c 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -299,7 +299,6 @@ public:
     void registerCommandForUndo(const khtml::EditCommand &);
     void registerCommandForRedo(const khtml::EditCommand &);
     void clearUndoRedoOperations();
-    bool interceptEditingKeyEvent();
     void issueUndoCommand();
     void issueRedoCommand();
     void issueCutCommand();
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 040fbe5..2a13757 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -3429,11 +3429,6 @@ void KWQKHTMLPart::clearUndoRedoOperations()
     }
 }
 
-bool KWQKHTMLPart::interceptEditingKeyEvent()
-{
-    return [_bridge interceptEditingKeyEvent:_currentEvent];
-}
-
 void KWQKHTMLPart::issueUndoCommand()
 {
     if (canUndo())
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 0ea3b3d..f0e86ed 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -482,7 +482,6 @@ typedef enum {
 - (void)issuePasteCommand;
 - (void)respondToChangedSelection;
 - (void)respondToChangedContents;
-- (BOOL)interceptEditingKeyEvent:(NSEvent *)event;
 - (void)setIsSelected:(BOOL)isSelected forView:(NSView *)view;
 - (BOOL)isEditable;
 - (BOOL)shouldBeginEditing:(DOMRange *)range;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ff06b8d..335c3e6 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,20 @@
 2004-07-21  Ken Kocienda  <kocienda at apple.com>
 
+        Reviewed by Trey
+
+        * WebCoreSupport.subproj/WebBridge.m: Remove interceptEditingKeyEvent
+        bridge call over. This method of handling editing key events is now
+        obsolete.
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView performKeyEquivalent:]): Send key event over to the 
+        DOM if this view is or contains the first responder. This now
+        happens unconditionally.
+        (-[WebHTMLView keyDown:]): Send key event to the DOM, then see if
+        the web view wants to interpret it an an editing key event. This
+        is the new place to intercept key events for editing.
+
+2004-07-21  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by John
 
         Add implementations for these methods. Formerly, they logged an error.
diff --git a/WebKit/Plugins.subproj/npruntime.h b/WebKit/Plugins.subproj/npruntime.h
index 461f3f0..9cc7a08 100644
--- a/WebKit/Plugins.subproj/npruntime.h
+++ b/WebKit/Plugins.subproj/npruntime.h
@@ -171,11 +171,7 @@ void NPN_InitializeVariantWithVariant (NPVariant *destination, const NPVariant *
 	NPVariant (with type NPVariantUndefinedType)          Undefined
 	NPVariant (with type NPVariantNullType)               Null
 	NPArray                                               Array (restricted)
-<<<<<<< npruntime.h
-	NPObject                                               Object or (NPObject wrapper)
-=======
 	NObject                                               Object or (NPObject wrapper)
->>>>>>> 1.18
 
 */
 
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index 32b0b00..124bd0c 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -1286,11 +1286,6 @@ static id <WebFormDelegate> formDelegate(WebBridge *self)
     return [[_frame webView] undoManager];
 }
 
-- (BOOL)interceptEditingKeyEvent:(NSEvent *)event
-{
-    return [[_frame webView] _interceptEditingKeyEvent:event];
-}
-
 - (void)issueCutCommand
 {
     [[_frame webView] cut:nil];
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 4dae157..3eae730 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -40,6 +40,7 @@
 #import <WebKit/WebTextRendererFactory.h>
 #import <WebKit/WebUIDelegatePrivate.h>
 #import <WebKit/WebUnicode.h>
+#import <WebKit/WebViewInternal.h>
 #import <WebKit/WebViewPrivate.h>
 
 #import <AppKit/NSAccessibility.h>
@@ -2273,8 +2274,7 @@ static WebHTMLView *lastHitView = nil;
 {
     // Pass command-key combos through WebCore if there is a key binding available for
     // this event. This lets web pages have a crack at intercepting command-modified keypresses.
-    if ([self firstResponderIsSelfOrDescendantView] && [event _web_keyBindingManagerHasBinding]) {
-        [[self _bridge] interceptKeyEvent:event toView:self];
+    if ([self firstResponderIsSelfOrDescendantView] && [[self _bridge] interceptKeyEvent:event toView:self]) {
         return YES;
     }
     return [super performKeyEquivalent:event];
@@ -2282,10 +2282,15 @@ static WebHTMLView *lastHitView = nil;
 
 - (void)keyDown:(NSEvent *)event
 {
-    BOOL intercepted = [[self _bridge] interceptKeyEvent:event toView:self];
-    if (!intercepted || [event _web_isTabKeyEvent]) {
-        [super keyDown:event];
-    }
+    WebBridge *bridge = [self _bridge];
+    if ([bridge interceptKeyEvent:event toView:self])
+        return;
+        
+    WebView *webView = [self _webView];
+    if (([webView isEditable] || [bridge isSelectionEditable]) && [webView _interceptEditingKeyEvent:event]) 
+        return;
+    
+    [super keyDown:event];
 }
 
 - (void)keyUp:(NSEvent *)event

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list