Title: [270798] trunk/Source
Revision
270798
Author
[email protected]
Date
2020-12-14 12:24:54 -0800 (Mon, 14 Dec 2020)

Log Message

Adopt symbol image API instead of SPI in WKPDFHUDView
https://bugs.webkit.org/show_bug.cgi?id=219866

Reviewed by Wenson Hsieh.

Source/WebCore/PAL:

* pal/spi/mac/NSImageSPI.h:

Source/WebKit:

* UIProcess/PDF/WKPDFHUDView.mm:
(-[WKPDFHUDView _getImageForControlName:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (270797 => 270798)


--- trunk/Source/WebCore/PAL/ChangeLog	2020-12-14 20:18:13 UTC (rev 270797)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-12-14 20:24:54 UTC (rev 270798)
@@ -1,3 +1,12 @@
+2020-12-14  Tim Horton  <[email protected]>
+
+        Adopt symbol image API instead of SPI in WKPDFHUDView
+        https://bugs.webkit.org/show_bug.cgi?id=219866
+
+        Reviewed by Wenson Hsieh.
+
+        * pal/spi/mac/NSImageSPI.h:
+
 2020-12-14  Sihui Liu  <[email protected]>
 
         Implement recognizer for SpeechRecognition

Modified: trunk/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h (270797 => 270798)


--- trunk/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h	2020-12-14 20:18:13 UTC (rev 270797)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/NSImageSPI.h	2020-12-14 20:24:54 UTC (rev 270798)
@@ -37,7 +37,6 @@
 
 @interface NSImage ()
 + (instancetype)imageWithImageRep:(NSImageRep *)imageRep;
-- (instancetype)_imageWithConfiguration:(NSDictionary *)configuration;
 - (void)lockFocusWithRect:(NSRect)rect context:(nullable NSGraphicsContext *)context hints:(nullable NSDictionary *)hints flipped:(BOOL)flipped;
 @end
 
@@ -45,13 +44,6 @@
 + (nullable NSImage *)_imageWithSystemSymbolName:(NSString *) symbolName;
 @end
 
-WTF_EXTERN_C_BEGIN
-
-extern const NSString *NSImageAlternateCriterionFont;
-extern const NSString *NSImageAlternateCriterionSymbolScale;
-
-WTF_EXTERN_C_END
-
 NS_ASSUME_NONNULL_END
 
 #endif

Modified: trunk/Source/WebKit/ChangeLog (270797 => 270798)


--- trunk/Source/WebKit/ChangeLog	2020-12-14 20:18:13 UTC (rev 270797)
+++ trunk/Source/WebKit/ChangeLog	2020-12-14 20:24:54 UTC (rev 270798)
@@ -1,3 +1,13 @@
+2020-12-14  Tim Horton  <[email protected]>
+
+        Adopt symbol image API instead of SPI in WKPDFHUDView
+        https://bugs.webkit.org/show_bug.cgi?id=219866
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/PDF/WKPDFHUDView.mm:
+        (-[WKPDFHUDView _getImageForControlName:]):
+
 2020-12-14  Pablo Saavedra  <[email protected]>
 
         [GLIB] Missing header for std::once_flag in WebKitInitialize.cpp

Modified: trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm (270797 => 270798)


--- trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm	2020-12-14 20:18:13 UTC (rev 270797)
+++ trunk/Source/WebKit/UIProcess/PDF/WKPDFHUDView.mm	2020-12-14 20:24:54 UTC (rev 270798)
@@ -336,11 +336,7 @@
     if (!iconImage)
         return nil;
 
-    // This was introduced in rdar://problem/59118412
-    iconImage = [iconImage _imageWithConfiguration:@{
-        NSImageAlternateCriterionFont:[NSFont preferredFontForTextStyle:NSFontTextStyleTitle2 options:@{ }],
-        NSImageAlternateCriterionSymbolScale:@(NSImageSymbolScaleLarge)
-    }];
+    iconImage = [iconImage imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithTextStyle:NSFontTextStyleTitle2 scale:NSImageSymbolScaleLarge]];
         
     NSRect iconImageRect = NSMakeRect(0, 0, [iconImage size].width * layerImageScale * _deviceScaleFactor, [iconImage size].height * layerImageScale * _deviceScaleFactor);
     NSImageRep *iconImageRep = [iconImage bestRepresentationForRect:iconImageRect context:nil hints:nil];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to