Title: [241370] branches/safari-608.1.5.1-branch/Source/WebKit
- Revision
- 241370
- Author
- [email protected]
- Date
- 2019-02-13 01:03:15 -0800 (Wed, 13 Feb 2019)
Log Message
Cherry-pick r241124. rdar://problem/47466549
Shrink and hyphenate safe browsing warning text on watchOS
https://bugs.webkit.org/show_bug.cgi?id=194361
<rdar://problem/47466549>
Reviewed by Geoffrey Garen.
Some internationalizations use long words that didn't fit on small watches.
* UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
(fontOfSize):
(-[WKSafeBrowsingWarning addContent]):
(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog (241369 => 241370)
--- branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog 2019-02-13 09:03:13 UTC (rev 241369)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/ChangeLog 2019-02-13 09:03:15 UTC (rev 241370)
@@ -1,5 +1,41 @@
2019-02-13 Babak Shafiei <[email protected]>
+ Cherry-pick r241124. rdar://problem/47466549
+
+ Shrink and hyphenate safe browsing warning text on watchOS
+ https://bugs.webkit.org/show_bug.cgi?id=194361
+ <rdar://problem/47466549>
+
+ Reviewed by Geoffrey Garen.
+
+ Some internationalizations use long words that didn't fit on small watches.
+
+ * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
+ (fontOfSize):
+ (-[WKSafeBrowsingWarning addContent]):
+ (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-07 Alex Christensen <[email protected]>
+
+ Shrink and hyphenate safe browsing warning text on watchOS
+ https://bugs.webkit.org/show_bug.cgi?id=194361
+ <rdar://problem/47466549>
+
+ Reviewed by Geoffrey Garen.
+
+ Some internationalizations use long words that didn't fit on small watches.
+
+ * UIProcess/Cocoa/WKSafeBrowsingWarning.mm:
+ (fontOfSize):
+ (-[WKSafeBrowsingWarning addContent]):
+ (-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
+
+2019-02-13 Babak Shafiei <[email protected]>
+
Cherry-pick r241105. rdar://problem/46733045
[Payment Request] It should be possible to require a phonetic name for shipping contacts
Modified: branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm (241369 => 241370)
--- branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm 2019-02-13 09:03:13 UTC (rev 241369)
+++ branches/safari-608.1.5.1-branch/Source/WebKit/UIProcess/Cocoa/WKSafeBrowsingWarning.mm 2019-02-13 09:03:15 UTC (rev 241370)
@@ -37,7 +37,7 @@
constexpr CGFloat boxCornerRadius = 6;
#if HAVE(SAFE_BROWSING)
#if PLATFORM(WATCHOS)
-constexpr CGFloat marginSize = 10;
+constexpr CGFloat marginSize = 9;
#else
constexpr CGFloat marginSize = 20;
#endif
@@ -88,7 +88,7 @@
switch (size) {
case WarningTextSize::Title:
#if PLATFORM(WATCHOS)
- return [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
+ return [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
#else
return [UIFont preferredFontForTextStyle:UIFontTextStyleLargeTitle];
#endif
@@ -289,10 +289,16 @@
auto title = makeLabel([[[NSAttributedString alloc] initWithString:_warning->title() attributes:@{
NSFontAttributeName:fontOfSize(WarningTextSize::Title),
NSForegroundColorAttributeName:colorForItem(WarningItem::TitleText, self)
+#if PLATFORM(WATCHOS)
+ , NSHyphenationFactorDocumentAttribute:@1
+#endif
}] autorelease]);
auto warning = makeLabel([[[NSAttributedString alloc] initWithString:_warning->warning() attributes:@{
NSFontAttributeName:fontOfSize(WarningTextSize::Body),
NSForegroundColorAttributeName:colorForItem(WarningItem::MessageText, self)
+#if PLATFORM(WATCHOS)
+ , NSHyphenationFactorDocumentAttribute:@1
+#endif
}] autorelease]);
auto showDetails = makeButton(WarningItem::ShowDetailsButton, self, @selector(showDetailsClicked));
auto goBack = makeButton(WarningItem::GoBackButton, self, @selector(goBackClicked));
@@ -368,7 +374,6 @@
{
ViewType *box = _box.get().get();
ButtonType *showDetails = box.subviews.lastObject;
- WTFLogAlways("SHOW DETAILS BUTTON? %@", showDetails);
[showDetails removeFromSuperview];
NSMutableAttributedString *text = [[_warning->details() mutableCopy] autorelease];
@@ -537,6 +542,9 @@
#if !PLATFORM(MAC)
self.scrollEnabled = NO;
#endif
+#if PLATFORM(WATCHOS)
+ self.layoutManager.hyphenationFactor = 1;
+#endif
return self;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes