[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:19:18 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d8d3bd9d8392ba962e1997d1b2f98af3dada9660
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Jan 12 18:41:51 2003 +0000

            Reviewed by Dave.
    
    	- minor cleanup of plug-in-related classes in ECMA directory
    
            * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
    	ref() and deref(). Instead just make Plugin and MimeType both derive from
    	PluginBase and remove APPLE_CHANGES.
            (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
    	Just return Undefined() for that case since we will never reach it anyway.
    
    	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher
    
            * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
    	identical if statements, the logic of this function becomes much clearer.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3305 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 5496e6d..f719919 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -2,6 +2,23 @@
 
         Reviewed by Dave.
 
+	- minor cleanup of plug-in-related classes in ECMA directory
+
+        * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
+	ref() and deref(). Instead just make Plugin and MimeType both derive from
+	PluginBase and remove APPLE_CHANGES.
+        (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
+	Just return Undefined() for that case since we will never reach it anyway.
+
+	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher
+
+        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
+	identical if statements, the logic of this function becomes much clearer.
+
+2003-01-12  Darin Adler  <darin at apple.com>
+
+        Reviewed by Dave.
+
 	- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.
 
         * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5496e6d..f719919 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,23 @@
 
         Reviewed by Dave.
 
+	- minor cleanup of plug-in-related classes in ECMA directory
+
+        * khtml/ecma/kjs_navigator.cpp: Remove unneeded PluginBase member functions
+	ref() and deref(). Instead just make Plugin and MimeType both derive from
+	PluginBase and remove APPLE_CHANGES.
+        (Navigator::getValueProperty): Don't use "Konqueror" for the fallback.
+	Just return Undefined() for that case since we will never reach it anyway.
+
+	- simplify the logic in khtmlMoveMouseEvent so it's easier to decipher
+
+        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::khtmlMouseMoveEvent): By merging two
+	identical if statements, the logic of this function becomes much clearer.
+
+2003-01-12  Darin Adler  <darin at apple.com>
+
+        Reviewed by Dave.
+
 	- fixed a bunch of places where KHTML did !x == y instead of !(x == y) or x != y.
 
         * khtml/css/cssstyleselector.cpp: (CSSStyleSelector::applyRule):
diff --git a/WebCore/khtml/ecma/kjs_navigator.cpp b/WebCore/khtml/ecma/kjs_navigator.cpp
index 9b3a64d..a0133b5 100644
--- a/WebCore/khtml/ecma/kjs_navigator.cpp
+++ b/WebCore/khtml/ecma/kjs_navigator.cpp
@@ -66,10 +66,6 @@ namespace KJS {
 
         static QPtrList<PluginInfo> *plugins;
         static QPtrList<MimeClassInfo> *mimes;
-#if APPLE_CHANGES
-        static void ref();
-        static void unref();
-#endif
 
     private:
         static int m_refCount;
@@ -98,44 +94,26 @@ namespace KJS {
     const ClassInfo MimeTypes::info = { "MimeTypeArray", 0, 0, 0 };
 
 
-    class Plugin : public ObjectImp {
+    class Plugin : public PluginBase {
     public:
-#if APPLE_CHANGES
-        Plugin( ExecState *exec, PluginBase::PluginInfo *info )
-          : ObjectImp(exec->interpreter()->builtinObjectPrototype() )
-        { m_info = info; PluginBase::ref(); };
-        virtual ~Plugin() { PluginBase::unref(); }
-#else
-        Plugin( ExecState *exec, PluginBase::PluginInfo *info )
-          : ObjectImp(exec->interpreter()->builtinObjectPrototype() )
-        { m_info = info; };
-#endif
+        Plugin( ExecState *exec, PluginInfo *info ) : PluginBase(exec), m_info(info) { }
         virtual Value get(ExecState *exec, const Identifier &propertyName) const;
         virtual const ClassInfo* classInfo() const { return &info; }
         static const ClassInfo info;
     private:
-        PluginBase::PluginInfo *m_info;
+        PluginInfo *m_info;
     };
     const ClassInfo Plugin::info = { "Plugin", 0, 0, 0 };
 
 
-    class MimeType : public ObjectImp {
+    class MimeType : public PluginBase {
     public:
-#if APPLE_CHANGES
-        MimeType( ExecState *exec, PluginBase::MimeClassInfo *info )
-          : ObjectImp(exec->interpreter()->builtinObjectPrototype() )
-        { m_info = info; PluginBase::ref(); };
-        virtual ~MimeType() { PluginBase::unref(); }
-#else
-        MimeType( ExecState *exec, PluginBase::MimeClassInfo *info )
-          : ObjectImp(exec->interpreter()->builtinObjectPrototype() )
-        { m_info = info; };
-#endif
+        MimeType( ExecState *exec, MimeClassInfo *info ) : PluginBase(exec), m_info(info) { }
         virtual Value get(ExecState *exec, const Identifier &propertyName) const;
         virtual const ClassInfo* classInfo() const { return &info; }
         static const ClassInfo info;
     private:
-        PluginBase::MimeClassInfo *m_info;
+        MimeClassInfo *m_info;
     };
     const ClassInfo MimeType::info = { "MimeType", 0, 0, 0 };
 
@@ -158,7 +136,7 @@ const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
   plugins	Navigator::_Plugins	DontDelete|ReadOnly
   mimeTypes	Navigator::_MimeTypes	DontDelete|ReadOnly
   product	Navigator::Product	DontDelete|ReadOnly
-  productSub Navigator::ProductSub DontDelete|ReadOnly
+  productSub	Navigator::ProductSub	DontDelete|ReadOnly
   vendor	Navigator::Vendor	DontDelete|ReadOnly
   cookieEnabled	Navigator::CookieEnabled DontDelete|ReadOnly
   javaEnabled	Navigator::JavaEnabled	DontDelete|Function 0
@@ -203,8 +181,8 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
       return String("Microsoft Internet Explorer");
     }
 #if APPLE_CHANGES
-    // FIXME: Define a fallback result here besides "Konqueror".
-    return String("Konqueror");
+    // FIXME: Should we define a fallback result here besides "Konqueror"?
+    return Undefined();
 #else
     //kdDebug() << "appName -> Konqueror" << endl;
     return String("Konqueror");
@@ -215,9 +193,7 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
   case Product:
 #if APPLE_CHANGES
     // If we find "Mozilla/5.0" but not "(compatible, ...)" we are a modern Netscape
-    if (userAgent.find(QString::fromLatin1("Mozilla/5.0")) >= 0 &&
-        userAgent.find(QString::fromLatin1("compatible")) == -1)
-    {
+    if (userAgent.find("Mozilla/5.0") >= 0 && userAgent.find("compatible") == -1) {
         return String("Gecko");
     }
     // FIXME: Should we define a fallback result here besides "Konqueror/khtml"?
@@ -229,10 +205,10 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
     return String("20021225");
   case Vendor:
 #if APPLE_CHANGES
-      // FIXME: Should we define a fallback result here besides "KDE"?  Perhaps "Apple"?
-      return Undefined();
+    // FIXME: Should we define a fallback result here besides "KDE"?  Perhaps "Apple"?
+    return Undefined();
 #else
-      return String("KDE");
+    return String("KDE");
 #endif
   case Language:
     return String(KGlobal::locale()->language() == "C" ?
@@ -346,26 +322,6 @@ PluginBase::~PluginBase()
     }
 }
 
-#if APPLE_CHANGES
-
-void PluginBase::ref()
-{
-  m_refCount++;
-}
-
-void PluginBase::unref()
-{
-    m_refCount--;
-    if ( m_refCount==0 ) {
-        delete plugins;
-        delete mimes;
-        plugins = 0;
-        mimes = 0;
-    }
-}
-
-#endif
-
 
 /*******************************************************************/
 IMPLEMENT_PROTOFUNC(PluginsFunc)
@@ -455,7 +411,7 @@ Value Plugin::get(ExecState *exec, const Identifier &propertyName) const
         }
 
         // plugin["name"]
-        for ( PluginBase::MimeClassInfo *m=m_info->mimes.first();
+        for ( MimeClassInfo *m=m_info->mimes.first();
               m!=0; m=m_info->mimes.next() ) {
             if ( m->type==propertyName.string() )
                 return Value(new MimeType(exec, m));
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 71d64ad..df0725b 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -894,21 +894,16 @@ NSView *KWQKHTMLPart::mouseDownViewIfStillGood()
 
 void KWQKHTMLPart::khtmlMouseMoveEvent(MouseMoveEvent *event)
 {
-    NSView *view;
-    if ([_currentEvent type] != NSLeftMouseDragged) {
-        view = nil;
-    } else {
-    	view = mouseDownViewIfStillGood();
-    }
+    if ([_currentEvent type] == NSLeftMouseDragged) {
+    	NSView *view = mouseDownViewIfStillGood();
 
-    if (view) {
-	_sendingEventToSubview = true;
-	[view mouseDragged:_currentEvent];
-	_sendingEventToSubview = false;
-	return;
-    }
+        if (view) {
+            _sendingEventToSubview = true;
+            [view mouseDragged:_currentEvent];
+            _sendingEventToSubview = false;
+            return;
+        }
 
-    if ([_currentEvent type] == NSLeftMouseDragged) {
 	if (_mouseDownMayStartDrag) {
 	    [_bridge handleMouseDragged:_currentEvent];
 	    return;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list