-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[macOS] Ensure context menu images are localized consistently and update paragraph direction images #47227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
EWS run on previous version of this PR (hash ca8cf2d) |
EWS run on previous version of this PR (hash f7984d0) |
EWS run on current version of this PR (hash c09c4f3) |
RetainPtr scriptCode = [currentLocale scriptCode]; | ||
RetainPtr languageCode = [currentLocale languageCode]; | ||
|
||
const auto isoScriptCode = scriptCode ? scriptNameToCode(String(scriptCode.get())) : localeToScriptCode(languageCode.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to create WTF::String
for either
const auto isoScriptCode = scriptCode ? scriptNameToCode(String(scriptCode.get())) : localeToScriptCode(languageCode.get()); | |
const auto isoScriptCode = scriptCode ? scriptNameToCode(scriptCode.get()) : localeToScriptCode(languageCode.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scriptNameToCode
takes a StringView
, so the build fails with this suggestion
…ate paragraph direction images https://bugs.webkit.org/show_bug.cgi?id=295021 rdar://154374848 Reviewed by Abrar Rahman Protyasha and Wenson Hsieh. Only show images in the context menu’s transformations submenu if a localized image exists for all 3 items, otherwise show nothing. Update the images for the paragraph direction items as well. Renamed `localeToScriptCodeForFontSelection` to `localeToScriptCode` since it is no longer used solely for font selection. * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/FontDescription.cpp: (WebCore::FontDescription::setSpecifiedLocale): * Source/WebCore/platform/text/LocaleToScriptMapping.cpp: (WebCore::localeToScriptCode): (WebCore::localeToScriptCodeForFontSelection): Deleted. * Source/WebCore/platform/text/LocaleToScriptMapping.h: * Source/WebKit/Platform/mac/MenuUtilities.mm: (WebKit::symbolForTransformationItem): (WebKit::symbolNameWithTypeForAction): Canonical link: https://commits.webkit.org/296777@main
c09c4f3
to
e95e526
Compare
Committed 296777@main (e95e526): https://commits.webkit.org/296777@main Reviewed commits have been landed. Closing PR #47227 and removing active labels. |
e95e526
c09c4f3