WebKit Bugzilla
Attachment 358034 Details for
Bug 193019
: [iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546>
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193019-20181223191250.patch (text/plain), 10.71 KB, created by
Wenson Hsieh
on 2018-12-23 19:12:51 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-12-23 19:12:51 PST
Size:
10.71 KB
patch
obsolete
>Subversion Revision: 239546 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 57623fa2e6e87bd067a4fbb0de4065257d2ec70c..2a40e0fb0c398172f963924922d06064e80478de 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,33 @@ >+2018-12-23 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Remove some unnecessary editing SPI after <rdar://problem/46047546> >+ https://bugs.webkit.org/show_bug.cgi?id=193019 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <wenson_hsieh@apple.com> > > Fix fast/ruby/ruby-base-merge-block-children-crash-2.html after r239543 >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >index 2b4de5cb2419f2fe8a065d1fefd85f937c06114b..6d893965eb345cb6813dfe7f0c64c4d321b6da6b 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm >@@ -1445,9 +1445,6 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender > > 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 @@ - (id)targetForAction:(SEL)action withSender:(id)sender > > 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 @@ - (id)targetForAction:(SEL)action withSender:(id)sender > 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 @@ FOR_EACH_PRIVATE_WKCONTENTVIEW_ACTION(FORWARD_ACTION_TO_WKCONTENTVIEW) > - (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) >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >index 8af852e1cb475c6140f83ca5dde7cdd8a5d9424d..88b5635be8fe6a0bb2e5d3cf62c7bf62f6c786bd 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h >@@ -406,19 +406,6 @@ typedef NS_OPTIONS(NSUInteger, _WKRectEdge) { > #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 >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >index d91a585ae247e637ccf138404acf8ba5dafc111c..7cc65fb43d79f4893965b9a98c7bb0f91f794056 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h >@@ -129,15 +129,6 @@ typedef std::pair<WebKit::InteractionInformationRequest, InteractionInformationC > 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_WKCONTENTVIEW_ACTION(DECLARE_WKCONTENTVIEW_ACTION_FOR_WEB_VIEW) > 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; >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index b71543c691f1b8f8fea3553ad56fd09102a4702c..cdfe5dba2e3877a1183f69b8f4c100aeda7ff931 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -2453,21 +2453,6 @@ - (void)toggleStrikeThroughForWebView:(id)sender > [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 @@ - (BOOL)canPerformActionForWebView:(SEL)action withSender:(id)sender > || 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;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193019
: 358034