return [super resignFirstResponder];
}
-#define FOR_EACH_WKCONTENTVIEW_ACTION(M) \
- M(_addShortcut) \
- M(_arrowKey) \
- M(_define) \
- M(_lookup) \
- M(_promptForReplace) \
- M(_reanalyze) \
- M(_share) \
- M(_showTextStyleOptions) \
- M(_transliterateChinese) \
- M(copy) \
- M(cut) \
- M(paste) \
- M(replace) \
- M(select) \
- M(selectAll) \
- M(toggleBoldface) \
- M(toggleItalics) \
- M(toggleUnderline) \
-
#define FORWARD_ACTION_TO_WKCONTENTVIEW(_action) \
- (void)_action:(id)sender \
{ \
if (self.usesStandardContentView) \
- [_contentView _action:sender]; \
+ [_contentView _action ## ForWebView:sender]; \
}
FOR_EACH_WKCONTENTVIEW_ACTION(FORWARD_ACTION_TO_WKCONTENTVIEW)
return [super canPerformAction:action withSender:sender];
}
-#undef FOR_EACH_WKCONTENTVIEW_ACTION
-
static inline CGFloat floorToDevicePixel(CGFloat input, float deviceScaleFactor)
{
return CGFloor(input * deviceScaleFactor) / deviceScaleFactor;