From 5572f39cfbff02a13a715c12aac97db2277f910c Mon Sep 17 00:00:00 2001 From: Avi Drissman Date: Fri, 25 Nov 2022 03:23:27 +0000 Subject: [PATCH] Remove unused code These files contain code whose last callers were removed two years ago with https://crrev.com/c/2360314. Bug: 846357 Change-Id: I04279862f55abfbdc74f7ffc37822311d8f59b9e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4053302 Auto-Submit: Avi Drissman Reviewed-by: Kentaro Hara Commit-Queue: Avi Drissman Commit-Queue: Kentaro Hara Cr-Commit-Position: refs/heads/main@{#1075682} --- third_party/blink/renderer/platform/BUILD.gn | 2 - .../platform/mac/web_core_ns_cell_extras.h | 35 -------------- .../platform/mac/web_core_ns_cell_extras.mm | 48 ------------------- 3 files changed, 85 deletions(-) delete mode 100644 third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.h delete mode 100644 third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.mm diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index ea5e1d71d7374..5c17be4c62ba5 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1598,8 +1598,6 @@ component("platform") { "mac/color_mac.mm", "mac/graphics_context_canvas.h", "mac/graphics_context_canvas.mm", - "mac/web_core_ns_cell_extras.h", - "mac/web_core_ns_cell_extras.mm", "text/locale_mac.h", "text/locale_mac.mm", "theme/web_theme_engine_mac.cc", diff --git a/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.h b/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.h deleted file mode 100644 index b543855604656..0000000000000 --- a/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2011, 2012 Apple 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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. - */ - -#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MAC_WEB_CORE_NS_CELL_EXTRAS_H_ -#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MAC_WEB_CORE_NS_CELL_EXTRAS_H_ - -#import - -@interface NSCell (BlinkFocusRingDrawing) -- (void)cr_drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView*)controlView; -@end - -#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MAC_WEB_CORE_NS_CELL_EXTRAS_H_ diff --git a/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.mm b/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.mm deleted file mode 100644 index 8b6353dd14f70..0000000000000 --- a/third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.mm +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011, 2012 Apple 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 INC. AND ITS CONTRIBUTORS ``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 INC. OR ITS 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. - */ - -#import "third_party/blink/renderer/platform/mac/web_core_ns_cell_extras.h" - -@interface NSCell (LionSDKDeclarations) -- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame - inView:(NSView*)controlView; -@end - -@implementation NSCell (BlinkFocusRingDrawing) - -- (void)cr_drawFocusRingWithFrame:(NSRect)cellFrame - inView:(NSView*)controlView { - CGContextRef cgContext = - (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; - CGContextSaveGState(cgContext); - NSSetFocusRingStyle(NSFocusRingOnly); - CGContextBeginTransparencyLayerWithRect(cgContext, NSRectToCGRect(cellFrame), - 0); - [self drawFocusRingMaskWithFrame:cellFrame inView:controlView]; - CGContextEndTransparencyLayer(cgContext); - CGContextRestoreGState(cgContext); -} - -@end