[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

mitz at apple.com mitz at apple.com
Thu Oct 29 20:48:01 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit e8af94fd9476a4e9bea977f8dba6040cf3340770
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 19 20:30:27 2009 +0000

    Split assertions of conjunctions into separate statements or remove
    redundant assertions.
    
    Reviewed by Anders Carlsson.
    
    * Plugins/Hosted/NetscapePluginHostProxy.mm:
    (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
    * Plugins/Hosted/WebHostedNetscapePluginView.mm:
    (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
    (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
    * Plugins/WebBaseNetscapePluginView.mm:
    (-[WebBaseNetscapePluginView halt]):
    (-[WebBaseNetscapePluginView resumeFromHalt]):
    * Plugins/WebNetscapePluginView.mm:
    (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
    (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
    * WebCoreSupport/WebContextMenuClient.mm:
    (WebContextMenuClient::getCustomMenuFromDefaultItems):
    * WebCoreSupport/WebEditorClient.mm:
    (WebEditorClient::checkGrammarOfString):
    (WebEditorClient::checkTextOfParagraph):
    * WebView/WebTextCompletionController.mm:
    (-[WebTextCompletionController _reflectSelection]):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49806 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 75f325d..697efdd 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,29 @@
+2009-10-19  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        Split assertions of conjunctions into separate statements or remove
+        redundant assertions.
+
+        * Plugins/Hosted/NetscapePluginHostProxy.mm:
+        (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
+        (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView halt]):
+        (-[WebBaseNetscapePluginView resumeFromHalt]):
+        * Plugins/WebNetscapePluginView.mm:
+        (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
+        (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
+        * WebCoreSupport/WebContextMenuClient.mm:
+        (WebContextMenuClient::getCustomMenuFromDefaultItems):
+        * WebCoreSupport/WebEditorClient.mm:
+        (WebEditorClient::checkGrammarOfString):
+        (WebEditorClient::checkTextOfParagraph):
+        * WebView/WebTextCompletionController.mm:
+        (-[WebTextCompletionController _reflectSelection]):
+
 2009-10-18  Mark Rowe  <mrowe at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index e8874cd..970f5f5 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -187,7 +187,8 @@ NetscapePluginInstanceProxy* NetscapePluginHostProxy::pluginInstance(uint32_t pl
 
 void NetscapePluginHostProxy::deadNameNotificationCallback(CFMachPortRef port, void *msg, CFIndex size, void *info)
 {
-    ASSERT(msg && static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
+    ASSERT(msg);
+    ASSERT(static_cast<mach_msg_header_t*>(msg)->msgh_id == MACH_NOTIFY_DEAD_NAME);
     
     static_cast<NetscapePluginHostProxy*>(info)->pluginHostDied();
 }
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 356d141..8de2aa6 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -90,7 +90,8 @@ extern "C" {
 
 - (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values
 {
-    ASSERT(!_attributeKeys && !_attributeValues);
+    ASSERT(!_attributeKeys);
+    ASSERT(!_attributeValues);
     
     _attributeKeys.adoptNS([keys copy]);
     _attributeValues.adoptNS([values copy]);
@@ -421,7 +422,7 @@ extern "C" {
     ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
     
     id contextInfo = [webPluginContainerCheck contextInfo];
-    ASSERT(contextInfo && [contextInfo isKindOfClass:[NSNumber class]]);
+    ASSERT([contextInfo isKindOfClass:[NSNumber class]]);
 
     if (!_proxy)
         return;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 18e2824..0b4d56a 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -478,7 +478,8 @@ Node* WebHaltablePlugin::node() const
 
 - (void)halt
 {
-    ASSERT(!_isHalted && _isStarted);
+    ASSERT(!_isHalted);
+    ASSERT(_isStarted);
     Element *element = [self element];
 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element) CGImageForProposedRect:nil context:nil hints:nil]);
@@ -499,7 +500,8 @@ Node* WebHaltablePlugin::node() const
 
 - (void)resumeFromHalt
 {
-    ASSERT(_isHalted && !_isStarted);
+    ASSERT(_isHalted);
+    ASSERT(!_isStarted);
     [self start];
     
     if (_isStarted)
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index 5ecfba3..e581c2c 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -402,7 +402,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
                     QDErr err = NewGWorldFromPtr(&newOffscreenGWorld,
                         getQDPixelFormatForBitmapContext(currentContext), &offscreenBounds, 0, 0, 0,
                         static_cast<char*>(offscreenData), CGBitmapContextGetBytesPerRow(currentContext));
-                    ASSERT(newOffscreenGWorld && !err);
+                    ASSERT(newOffscreenGWorld)
+                    ASSERT(!err);
                     if (!err) {
                         if (offscreenGWorld)
                             DisposeGWorld(offscreenGWorld);
@@ -1286,7 +1287,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
 {
     ASSERT([webPluginContainerCheck isKindOfClass:[WebPluginContainerCheck class]]);
     WebPluginContainerCheck *check = (WebPluginContainerCheck *)webPluginContainerCheck;
-    ASSERT([check contextInfo] && [[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
+    ASSERT([[check contextInfo] isKindOfClass:[WebNetscapeContainerCheckContextInfo class]]);
     
     [self cancelCheckIfAllowedToLoadURL:[[check contextInfo] checkRequestID]];
 }
diff --git a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
index 639f3c1..afe3cc2 100644
--- a/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
@@ -270,6 +270,7 @@ static void fixMenusReceivedFromOldClients(NSMutableArray *newMenuItems, NSMutab
 
 NSMutableArray* WebContextMenuClient::getCustomMenuFromDefaultItems(ContextMenu* defaultMenu)
 {
+    return defaultMenu->platformDescription();
     id delegate = [m_webView UIDelegate];
     SEL selector = @selector(webView:contextMenuItemsForElement:defaultMenuItems:);
     if (![delegate respondsToSelector:selector])
diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
index e8c37d5..1e03d88 100644
--- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm
@@ -675,7 +675,8 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector
         NSValue *detailRangeAsNSValue = [detail objectForKey:NSGrammarRange];
         ASSERT(detailRangeAsNSValue);
         NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
-        ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
+        ASSERT(detailNSRange.location != NSNotFound);
+        ASSERT(detailNSRange.length > 0);
         grammarDetail.location = detailNSRange.location;
         grammarDetail.length = detailNSRange.length;
         grammarDetail.userDescription = [detail objectForKey:NSGrammarUserDescription];
@@ -696,7 +697,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64
     for (NSTextCheckingResult *incomingResult in incomingResults) {
         NSRange resultRange = [incomingResult range];
         NSTextCheckingType resultType = [incomingResult resultType];
-        ASSERT(resultRange.location != NSNotFound && resultRange.length > 0);
+        ASSERT(resultRange.location != NSNotFound);
+        ASSERT(resultRange.length > 0);
         if (NSTextCheckingTypeSpelling == resultType && 0 != (checkingTypes & NSTextCheckingTypeSpelling)) {
             TextCheckingResult result;
             result.type = TextCheckingTypeSpelling;
@@ -715,7 +717,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64
                 NSValue *detailRangeAsNSValue = [incomingDetail objectForKey:NSGrammarRange];
                 ASSERT(detailRangeAsNSValue);
                 NSRange detailNSRange = [detailRangeAsNSValue rangeValue];
-                ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0);
+                ASSERT(detailNSRange.location != NSNotFound);
+                ASSERT(detailNSRange.length > 0);
                 detail.location = detailNSRange.location;
                 detail.length = detailNSRange.length;
                 detail.userDescription = [incomingDetail objectForKey:NSGrammarUserDescription];
diff --git a/WebKit/mac/WebView/WebTextCompletionController.mm b/WebKit/mac/WebView/WebTextCompletionController.mm
index 6c37b98..4f8e6e0 100644
--- a/WebKit/mac/WebView/WebTextCompletionController.mm
+++ b/WebKit/mac/WebView/WebTextCompletionController.mm
@@ -298,7 +298,8 @@ using namespace std;
 - (void)_reflectSelection
 {
     int selectedRow = [_tableView selectedRow];
-    ASSERT(selectedRow >= 0 && selectedRow < (int)[_completions count]);
+    ASSERT(selectedRow >= 0);
+    ASSERT(selectedRow < (int)[_completions count]);
     [self _insertMatch:[_completions objectAtIndex:selectedRow]];
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list