Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm

Issue 2803783002: Ensure strikethrough font renders in omnibox on iOS 10.3 (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm b/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
index 22c5022ec9f6e3f2ed15bd777b6fd50e9b51d248..b8f27c7827b4b88865b8509a265a46ac141b5e96 100644
--- a/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
+++ b/ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm
@@ -671,6 +671,13 @@ void OmniboxViewIOS::UpdateSchemeStyle(const gfx::Range& range) {
DCHECK_NE(security_state::SECURE_WITH_POLICY_INSTALLED_CERT, security_level);
if (security_level == security_state::DANGEROUS) {
+ // Workaround: Add an attribute to allow strikethough to apply on iOS 10.3.
rohitrao (ping after 24h) 2017/04/06 14:51:21 Should we only apply this attribute if running on
+ // See https://crbug.com/699702 for discussion.
+ [attributing_display_string_
+ addAttribute:NSBaselineOffsetAttributeName
+ value:@0
+ range:NSMakeRange(0, [attributing_display_string_ length])];
+
// Add a strikethrough through the scheme.
[attributing_display_string_
addAttribute:NSStrikethroughStyleAttributeName
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698