Title: [291501] trunk/Source
Revision
291501
Author
[email protected]
Date
2022-03-18 16:11:44 -0700 (Fri, 18 Mar 2022)

Log Message

[iOS 15.4] Fix unused variables
https://bugs.webkit.org/show_bug.cgi?id=238089
<rdar://problem/90498642 >

Reviewed by Alexey Proskuryakov and Chris Dumez.

* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess): Declare isSafari as unused for Mac and Catalyst.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
(-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
Remove canPanX and canPanY, since they are unused.
* Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _createSheetWithElementActions:defaultTitle:showLinkTitle:]): Remove titleIsURL.
* Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::addMessageToConsole): Declare respondsToNewSelector as unused on iOS family.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::visiblePositionForPoint const): frameView is only used on Mac.
* Source/WebCore/editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addAttachmentForElement): Declare ignoreOrientation as unused on iOS family.
* Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:
(WebCore::AudioOutputUnitAdaptor::configure): Assert that result is unused.
* Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::FontCascade::drawGlyphs): Declare shouldSmoothFonts as unused on iOS family.

Canonical link: https://commits.webkit.org/248613@main

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (291500 => 291501)


--- trunk/Source/WebCore/ChangeLog	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebCore/ChangeLog	2022-03-18 23:11:44 UTC (rev 291501)
@@ -1,3 +1,22 @@
+2022-03-18  Jonathan Bedard  <[email protected]>
+
+        [iOS 15.4] Fix unused variables
+        https://bugs.webkit.org/show_bug.cgi?id=238089
+        <rdar://problem/90498642>
+
+        Reviewed by Alexey Proskuryakov and Chris Dumez.
+
+        Covered by exisiting tests.
+
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::visiblePositionForPoint const): frameView is only used on Mac.
+        * editing/cocoa/HTMLConverter.mm:
+        (HTMLConverter::_addAttachmentForElement): Declare ignoreOrientation as unused on iOS family.
+        * platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp:
+        (WebCore::AudioOutputUnitAdaptor::configure): Assert that result is unused.
+        * platform/graphics/coretext/FontCascadeCoreText.cpp:
+        (WebCore::FontCascade::drawGlyphs): Declare shouldSmoothFonts as unused on iOS family.
+
 2022-03-18  Antti Koivisto  <[email protected]>
 
         [CSS Container Queries] Ensure container style changes are propagated to descendants

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (291500 => 291501)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2022-03-18 23:11:44 UTC (rev 291501)
@@ -2374,7 +2374,7 @@
     if (!renderView)
         return VisiblePosition();
 
-#if PLATFORM(COCOA)
+#if PLATFORM(MAC)
     FrameView* frameView = &renderView->frameView();
 #endif
 
@@ -2413,7 +2413,7 @@
             break;
         Frame& frame = downcast<FrameView>(*widget).frame();
         renderView = frame.document()->renderView();
-#if PLATFORM(COCOA)
+#if PLATFORM(MAC)
         frameView = downcast<FrameView>(widget);
 #endif
     }

Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (291500 => 291501)


--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2022-03-18 23:11:44 UTC (rev 291501)
@@ -1319,7 +1319,9 @@
         NSRange rangeToReplace = NSMakeRange(textLength, 0);
         NSDictionary *attrs;
         if (fileWrapper) {
-#if !PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY)
+            UNUSED_VARIABLE(ignoreOrientation);
+#else
             if (ignoreOrientation)
                 [attachment setIgnoresOrientation:YES];
 #endif

Modified: trunk/Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp (291500 => 291501)


--- trunk/Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebCore/platform/audio/ios/AudioOutputUnitAdaptorIOS.cpp	2022-03-18 23:11:44 UTC (rev 291501)
@@ -55,7 +55,7 @@
     ASSERT(comp);
 
     OSStatus result = PAL::AudioComponentInstanceNew(comp, &m_outputUnit);
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
 
     UInt32 flag = 1;
     result = PAL::AudioUnitSetProperty(m_outputUnit,
@@ -64,16 +64,16 @@
         0,
         &flag,
         sizeof(flag));
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
 
     result = PAL::AudioUnitInitialize(m_outputUnit);
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
     // Set render callback
     AURenderCallbackStruct input;
     input.inputProc = inputProc;
     input.inputProcRefCon = this;
     result = PAL::AudioUnitSetProperty(m_outputUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &input, sizeof(input));
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
 
     // Set stream format
     AudioStreamBasicDescription streamFormat;
@@ -80,7 +80,7 @@
 
     UInt32 size = sizeof(AudioStreamBasicDescription);
     result = PAL::AudioUnitGetProperty(m_outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 0, (void*)&streamFormat, &size);
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
 
     constexpr int bytesPerFloat = sizeof(Float32);
     constexpr int bitsPerByte = 8;
@@ -94,7 +94,7 @@
     streamFormat.mBitsPerChannel = bitsPerByte * bytesPerFloat;
 
     result = PAL::AudioUnitSetProperty(m_outputUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, (void*)&streamFormat, sizeof(AudioStreamBasicDescription));
-    ASSERT(!result);
+    ASSERT_UNUSED(result, !result);
 
     AudioSession::sharedSession().setPreferredBufferSize(kPreferredBufferSize);
 }

Modified: trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp (291500 => 291501)


--- trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp	2022-03-18 23:11:44 UTC (rev 291501)
@@ -221,10 +221,12 @@
         break;
     }
 
+#if PLATFORM(IOS_FAMILY)
+    UNUSED_VARIABLE(shouldSmoothFonts);
+#else
     if (!shouldUseSmoothing())
         shouldSmoothFonts = false;
 
-#if !PLATFORM(IOS_FAMILY)
     bool originalShouldUseFontSmoothing = CGContextGetShouldSmoothFonts(cgContext);
     if (shouldSmoothFonts != originalShouldUseFontSmoothing)
         CGContextSetShouldSmoothFonts(cgContext, shouldSmoothFonts);

Modified: trunk/Source/WebKit/ChangeLog (291500 => 291501)


--- trunk/Source/WebKit/ChangeLog	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKit/ChangeLog	2022-03-18 23:11:44 UTC (rev 291501)
@@ -1,3 +1,19 @@
+2022-03-18  Jonathan Bedard  <[email protected]>
+
+        [iOS 15.4] Fix unused variables
+        https://bugs.webkit.org/show_bug.cgi?id=238089
+        <rdar://problem/90498642>
+
+        Reviewed by Alexey Proskuryakov and Chris Dumez.
+
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess): Declare isSafari as unused for Mac and Catalyst.
+        * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:
+        (-[WKScrollingNodeScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
+        Remove canPanX and canPanY, since they are unused.
+        * UIProcess/ios/WKActionSheetAssistant.mm:
+        (-[WKActionSheetAssistant _createSheetWithElementActions:defaultTitle:showLinkTitle:]): Remove titleIsURL.
+
 2022-03-18  Per Arne Vollan  <[email protected]>
 
         Fix test failures when enabling content filtering in the Network process

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (291500 => 291501)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2022-03-18 23:11:44 UTC (rev 291501)
@@ -387,7 +387,8 @@
             parameters.audioCaptureExtensionHandle = WTFMove(*handle);
     }
 #else
-    UNUSED_PARAM(mediaDevicesEnabled);
+    UNUSED_VARIABLE(mediaDevicesEnabled);
+    UNUSED_VARIABLE(isSafari);
 #endif
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm (291500 => 291501)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm	2022-03-18 23:11:44 UTC (rev 291501)
@@ -82,16 +82,10 @@
         _scrollingTreeNodeDelegate->clearActiveTouchActions();
         
         if (touchActions && !touchActions.containsAny({ WebCore::TouchAction::Auto, WebCore::TouchAction::Manipulation })) {
-            bool canPanX = true;
-            bool canPanY = true;
-            if (!touchActions.contains(WebCore::TouchAction::PanX)) {
-                canPanX = false;
+            if (!touchActions.contains(WebCore::TouchAction::PanX))
                 targetContentOffset->x = scrollView.contentOffset.x;
-            }
-            if (!touchActions.contains(WebCore::TouchAction::PanY)) {
-                canPanY = false;
+            if (!touchActions.contains(WebCore::TouchAction::PanY))
                 targetContentOffset->y = scrollView.contentOffset.y;
-            }
         }
     }
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm (291500 => 291501)


--- trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm	2022-03-18 23:11:44 UTC (rev 291501)
@@ -341,14 +341,11 @@
     _interactionSheet.get().preferredStyle = UIAlertControllerStyleActionSheet;
 
     NSString *titleString = nil;
-    BOOL titleIsURL = NO;
     if (showLinkTitle && [[targetURL absoluteString] length]) {
         if (isJavaScriptURL(targetURL))
             titleString = WEB_UI_STRING_KEY("_javascript_", "_javascript_ Action Sheet Title", "Title for action sheet for _javascript_ link");
-        else {
+        else
             titleString = WTF::userVisibleString(targetURL);
-            titleIsURL = YES;
-        }
     } else if (defaultTitle)
         titleString = defaultTitle;
     else

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (291500 => 291501)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2022-03-18 23:11:44 UTC (rev 291501)
@@ -1,3 +1,14 @@
+2022-03-18  Jonathan Bedard  <[email protected]>
+
+        [iOS 15.4] Fix unused variables
+        https://bugs.webkit.org/show_bug.cgi?id=238089
+        <rdar://problem/90498642>
+
+        Reviewed by Alexey Proskuryakov and Chris Dumez.
+
+        * WebCoreSupport/WebChromeClient.mm:
+        (WebChromeClient::addMessageToConsole): Declare respondsToNewSelector as unused on iOS family.
+
 2022-03-15  Myles C. Maxfield  <[email protected]>
 
         [WebGPU] Allow for scheduling asynchronous work

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm (291500 => 291501)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2022-03-18 22:47:34 UTC (rev 291500)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.mm	2022-03-18 23:11:44 UTC (rev 291501)
@@ -444,6 +444,7 @@
 
 #if PLATFORM(IOS_FAMILY)
     [[[m_webView _UIKitDelegateForwarder] asyncForwarder] webView:m_webView addMessageToConsole:dictionary withSource:messageSource];
+    UNUSED_VARIABLE(respondsToNewSelector);
 #else
     if (respondsToNewSelector)
         CallUIDelegate(m_webView, selector, dictionary, messageSource);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to