Title: [239547] trunk/Source/WebKit
- Revision
- 239547
- Author
- [email protected]
- Date
- 2018-12-23 21:07:01 -0800 (Sun, 23 Dec 2018)
Log Message
[iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546>
https://bugs.webkit.org/show_bug.cgi?id=193019
Reviewed by Dan Bernstein.
Remove these SPI method declarations, as well as method forwarding in WKContentView. Mail was the only adoptee
of these methods; after <rdar://problem/46047546>, they have moved to the underscore-prefixed versions, so we
we have no need for these erroneously-named SPI methods anymore. There is no change in behavior; verified this
through existing API tests (WKWebViewEditActions), as well as building iOS Mail against WebKit with these
changes to WKWebViewPrivate.h.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView canPerformAction:withSender:]):
(-[WKWebView targetForAction:withSender:]):
(-[WKWebView _setFont:sender:]):
(-[WKWebView _setFontSize:sender:]):
(-[WKWebView _setTextColor:sender:]):
(-[WKWebView setFont:sender:]): Deleted.
(-[WKWebView setTextColor:sender:]): Deleted.
(-[WKWebView setFontSize:sender:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView setFontForWebView:sender:]): Deleted.
(-[WKContentView setFontSizeForWebView:sender:]): Deleted.
(-[WKContentView setTextColorForWebView:sender:]): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (239546 => 239547)
--- trunk/Source/WebKit/ChangeLog 2018-12-23 23:51:30 UTC (rev 239546)
+++ trunk/Source/WebKit/ChangeLog 2018-12-24 05:07:01 UTC (rev 239547)
@@ -1,5 +1,35 @@
2018-12-23 Wenson Hsieh <[email protected]>
+ [iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546>
+ https://bugs.webkit.org/show_bug.cgi?id=193019
+
+ Reviewed by Dan Bernstein.
+
+ Remove these SPI method declarations, as well as method forwarding in WKContentView. Mail was the only adoptee
+ of these methods; after <rdar://problem/46047546>, they have moved to the underscore-prefixed versions, so we
+ we have no need for these erroneously-named SPI methods anymore. There is no change in behavior; verified this
+ through existing API tests (WKWebViewEditActions), as well as building iOS Mail against WebKit with these
+ changes to WKWebViewPrivate.h.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView canPerformAction:withSender:]):
+ (-[WKWebView targetForAction:withSender:]):
+ (-[WKWebView _setFont:sender:]):
+ (-[WKWebView _setFontSize:sender:]):
+ (-[WKWebView _setTextColor:sender:]):
+ (-[WKWebView setFont:sender:]): Deleted.
+ (-[WKWebView setTextColor:sender:]): Deleted.
+ (-[WKWebView setFontSize:sender:]): Deleted.
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView canPerformActionForWebView:withSender:]):
+ (-[WKContentView setFontForWebView:sender:]): Deleted.
+ (-[WKContentView setFontSizeForWebView:sender:]): Deleted.
+ (-[WKContentView setTextColorForWebView:sender:]): Deleted.
+
+2018-12-23 Wenson Hsieh <[email protected]>
+
Fix fast/ruby/ruby-base-merge-block-children-crash-2.html after r239543
https://bugs.webkit.org/show_bug.cgi?id=193015
<rdar://problem/46583527>
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (239546 => 239547)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-12-23 23:51:30 UTC (rev 239546)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-12-24 05:07:01 UTC (rev 239547)
@@ -1445,9 +1445,6 @@
FOR_EACH_WKCONTENTVIEW_ACTION(FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW)
FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW)
- FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(setTextColor:sender)
- FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(setFontSize:sender)
- FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(setFont:sender)
FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(_setTextColor:sender)
FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(_setFontSize:sender)
FORWARD_CANPERFORMACTION_TO_WKCONTENTVIEW(_setFont:sender)
@@ -1465,9 +1462,6 @@
FOR_EACH_WKCONTENTVIEW_ACTION(FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW)
FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW)
- FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(setTextColor:sender)
- FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(setFontSize:sender)
- FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(setFont:sender)
FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(_setTextColor:sender)
FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(_setFontSize:sender)
FORWARD_TARGETFORACTION_TO_WKCONTENTVIEW(_setFont:sender)
@@ -1477,21 +1471,6 @@
return [super targetForAction:action withSender:sender];
}
-- (void)setFont:(UIFont *)font sender:(id)sender
-{
- [_contentView setFontForWebView:font sender:sender];
-}
-
-- (void)setTextColor:(UIColor *)color sender:(id)sender
-{
- [_contentView setTextColorForWebView:color sender:sender];
-}
-
-- (void)setFontSize:(CGFloat)fontSize sender:(id)sender
-{
- [_contentView setFontSizeForWebView:fontSize sender:sender];
-}
-
static inline CGFloat floorToDevicePixel(CGFloat input, float deviceScaleFactor)
{
return CGFloor(input * deviceScaleFactor) / deviceScaleFactor;
@@ -4432,19 +4411,19 @@
- (void)_setFont:(UIFont *)font sender:(id)sender
{
if (self.usesStandardContentView)
- [_contentView setFontForWebView:font sender:sender];
+ [_contentView _setFontForWebView:font sender:sender];
}
- (void)_setFontSize:(CGFloat)fontSize sender:(id)sender
{
if (self.usesStandardContentView)
- [_contentView setFontSizeForWebView:fontSize sender:sender];
+ [_contentView _setFontSizeForWebView:fontSize sender:sender];
}
- (void)_setTextColor:(UIColor *)color sender:(id)sender
{
if (self.usesStandardContentView)
- [_contentView setTextColorForWebView:color sender:sender];
+ [_contentView _setTextColorForWebView:color sender:sender];
}
#endif // PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (239546 => 239547)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-12-23 23:51:30 UTC (rev 239546)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h 2018-12-24 05:07:01 UTC (rev 239547)
@@ -406,19 +406,6 @@
#if TARGET_OS_IPHONE
@interface WKWebView () <UIResponderStandardEditActions>
-// FIXME: Remove these once internal clients have moved to the underscore-prefixed versions.
-- (void)alignCenter:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)alignJustified:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)alignLeft:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)alignRight:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)indent:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)insertOrderedList:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)insertUnorderedList:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)outdent:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)toggleStrikeThrough:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)setFont:(UIFont *)font sender:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)setFontSize:(CGFloat)fontSize sender:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
-- (void)setTextColor:(UIColor *)color sender:(id)sender WK_API_AVAILABLE(ios(WK_IOS_TBA));
@end
#else
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (239546 => 239547)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2018-12-23 23:51:30 UTC (rev 239546)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h 2018-12-24 05:07:01 UTC (rev 239547)
@@ -129,15 +129,6 @@
M(toggleUnderline) \
M(increaseSize) \
M(decreaseSize) \
- M(toggleStrikeThrough) \
- M(insertUnorderedList) \
- M(insertOrderedList) \
- M(indent) \
- M(outdent) \
- M(alignLeft) \
- M(alignRight) \
- M(alignCenter) \
- M(alignJustified) \
M(pasteAndMatchStyle) \
M(makeTextWritingDirectionNatural)
@@ -380,9 +371,9 @@
FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW)
#undef DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW
-- (void)setFontForWebView:(UIFont *)fontFamily sender:(id)sender;
-- (void)setFontSizeForWebView:(CGFloat)fontSize sender:(id)sender;
-- (void)setTextColorForWebView:(UIColor *)color sender:(id)sender;
+- (void)_setFontForWebView:(UIFont *)fontFamily sender:(id)sender;
+- (void)_setFontSizeForWebView:(CGFloat)fontSize sender:(id)sender;
+- (void)_setTextColorForWebView:(UIColor *)color sender:(id)sender;
#if ENABLE(TOUCH_EVENTS)
- (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsDefault;
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (239546 => 239547)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-12-23 23:51:30 UTC (rev 239546)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2018-12-24 05:07:01 UTC (rev 239547)
@@ -2453,21 +2453,6 @@
[self _toggleStrikeThroughForWebView:sender];
}
-- (void)setFontForWebView:(UIFont *)font sender:(id)sender
-{
- [self _setFontForWebView:font sender:sender];
-}
-
-- (void)setFontSizeForWebView:(CGFloat)fontSize sender:(id)sender
-{
- [self _setFontSizeForWebView:fontSize sender:sender];
-}
-
-- (void)setTextColorForWebView:(UIColor *)color sender:(id)sender
-{
- [self _setTextColorForWebView:color sender:sender];
-}
-
- (NSDictionary *)textStylingAtPosition:(UITextPosition *)position inDirection:(UITextStorageDirection)direction
{
if (!position || !_page->editorState().isContentRichlyEditable)
@@ -2561,11 +2546,7 @@
|| action == @selector(_setTextColor:sender:) || action == @selector(_setFont:sender:) || action == @selector(_setFontSize:sender:)
|| action == @selector(_insertOrderedList:) || action == @selector(_insertUnorderedList:) || action == @selector(_insertNestedOrderedList:) || action == @selector(_insertNestedUnorderedList:)
|| action == @selector(_increaseListLevel:) || action == @selector(_decreaseListLevel:) || action == @selector(_changeListType:) || action == @selector(_indent:) || action == @selector(_outdent:)
- || action == @selector(increaseSize:) || action == @selector(decreaseSize:)
- || action == @selector(toggleStrikeThrough:) || action == @selector(insertOrderedList:) || action == @selector(insertUnorderedList:) || action == @selector(indent:) || action == @selector(outdent:)
- || action == @selector(alignLeft:) || action == @selector(alignRight:) || action == @selector(alignCenter:) || action == @selector(alignJustified:)
- || action == @selector(setTextColor:sender:) || action == @selector(setFont:sender:) || action == @selector(setFontSize:sender:)
- || action == @selector(makeTextWritingDirectionNatural:)) {
+ || action == @selector(increaseSize:) || action == @selector(decreaseSize:) || action == @selector(makeTextWritingDirectionNatural:)) {
// FIXME: This should be more nuanced in the future, rather than returning YES for all richly editable areas. For instance, outdent: should be disabled when the selection is already
// at the outermost indentation level.
return editorState.isContentRichlyEditable;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes