Changeset 241124 in webkit
- Timestamp:
- Feb 7, 2019 10:22:12 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r241120 r241124 1 2019-02-07 Alex Christensen <achristensen@webkit.org> 2 3 Shrink and hyphenate safe browsing warning text on watchOS 4 https://bugs.webkit.org/show_bug.cgi?id=194361 5 <rdar://problem/47466549> 6 7 Reviewed by Geoffrey Garen. 8 9 Some internationalizations use long words that didn't fit on small watches. 10 11 * UIProcess/Cocoa/WKSafeBrowsingWarning.mm: 12 (fontOfSize): 13 (-[WKSafeBrowsingWarning addContent]): 14 (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]): 15 1 16 2019-02-07 Miguel Gomez <magomez@igalia.com> 2 17 -
trunk/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm
r240014 r241124 38 38 #if HAVE(SAFE_BROWSING) 39 39 #if PLATFORM(WATCHOS) 40 constexpr CGFloat marginSize = 10;40 constexpr CGFloat marginSize = 9; 41 41 #else 42 42 constexpr CGFloat marginSize = 20; … … 89 89 case WarningTextSize::Title: 90 90 #if PLATFORM(WATCHOS) 91 return [UIFont preferredFontForTextStyle:UIFontTextStyle Headline];91 return [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]; 92 92 #else 93 93 return [UIFont preferredFontForTextStyle:UIFontTextStyleLargeTitle]; … … 290 290 NSFontAttributeName:fontOfSize(WarningTextSize::Title), 291 291 NSForegroundColorAttributeName:colorForItem(WarningItem::TitleText, self) 292 #if PLATFORM(WATCHOS) 293 , NSHyphenationFactorDocumentAttribute:@1 294 #endif 292 295 }] autorelease]); 293 296 auto warning = makeLabel([[[NSAttributedString alloc] initWithString:_warning->warning() attributes:@{ 294 297 NSFontAttributeName:fontOfSize(WarningTextSize::Body), 295 298 NSForegroundColorAttributeName:colorForItem(WarningItem::MessageText, self) 299 #if PLATFORM(WATCHOS) 300 , NSHyphenationFactorDocumentAttribute:@1 301 #endif 296 302 }] autorelease]); 297 303 auto showDetails = makeButton(WarningItem::ShowDetailsButton, self, @selector(showDetailsClicked)); … … 369 375 ViewType *box = _box.get().get(); 370 376 ButtonType *showDetails = box.subviews.lastObject; 371 WTFLogAlways("SHOW DETAILS BUTTON? %@", showDetails);372 377 [showDetails removeFromSuperview]; 373 378 … … 538 543 self.scrollEnabled = NO; 539 544 #endif 545 #if PLATFORM(WATCHOS) 546 self.layoutManager.hyphenationFactor = 1; 547 #endif 540 548 541 549 return self;
Note: See TracChangeset
for help on using the changeset viewer.