Title: [292312] trunk/Source/WebCore
- Revision
- 292312
- Author
- [email protected]
- Date
- 2022-04-04 12:48:18 -0700 (Mon, 04 Apr 2022)
Log Message
[Apple Pay] buttons should be localized based on the system if not specified by the HTML
https://bugs.webkit.org/show_bug.cgi?id=238743
<rdar://problem/89592004>
Reviewed by Wenson Hsieh.
* rendering/RenderThemeCocoa.mm:
(WebCore::RenderThemeCocoa::paintApplePayButton):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (292311 => 292312)
--- trunk/Source/WebCore/ChangeLog 2022-04-04 19:44:17 UTC (rev 292311)
+++ trunk/Source/WebCore/ChangeLog 2022-04-04 19:48:18 UTC (rev 292312)
@@ -1,3 +1,14 @@
+2022-04-04 Devin Rousso <[email protected]>
+
+ [Apple Pay] buttons should be localized based on the system if not specified by the HTML
+ https://bugs.webkit.org/show_bug.cgi?id=238743
+ <rdar://problem/89592004>
+
+ Reviewed by Wenson Hsieh.
+
+ * rendering/RenderThemeCocoa.mm:
+ (WebCore::RenderThemeCocoa::paintApplePayButton):
+
2022-04-04 Brent Fulgham <[email protected]>
Update 'features.json' for current state of WebKit
Modified: trunk/Source/WebCore/rendering/RenderThemeCocoa.mm (292311 => 292312)
--- trunk/Source/WebCore/rendering/RenderThemeCocoa.mm 2022-04-04 19:44:17 UTC (rev 292311)
+++ trunk/Source/WebCore/rendering/RenderThemeCocoa.mm 2022-04-04 19:48:18 UTC (rev 292312)
@@ -35,6 +35,7 @@
#import "UserAgentStyleSheets.h"
#import <algorithm>
#import <pal/spi/cf/CoreTextSPI.h>
+#import <wtf/Language.h>
#if ENABLE(VIDEO)
#import "LocalizedStrings.h"
@@ -114,7 +115,10 @@
floatValueForLength(style.borderBottomRightRadius().height, paintRect.height()),
floatValueForLength(style.borderBottomRightRadius().width, paintRect.width())
});
- paintInfo.context().drawSystemImage(ApplePayButtonSystemImage::create(style.applePayButtonType(), style.applePayButtonStyle(), style.computedLocale(), largestCornerRadius), paintRect);
+ auto locale = style.computedLocale();
+ if (locale.isEmpty())
+ locale = defaultLanguage(ShouldMinimizeLanguages::No);
+ paintInfo.context().drawSystemImage(ApplePayButtonSystemImage::create(style.applePayButtonType(), style.applePayButtonStyle(), locale, largestCornerRadius), paintRect);
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes