|
@@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
|
|
Additionally, disables usage of some private APIs in MAS builds.
|
|
|
|
|
|
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
|
|
-index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc1937812fd3 100644
|
|
|
+index c7fb942367100b7a371d8941c73fc608a1a39435..18b561acce8d3a8abe233162cff34d436fb8f970 100644
|
|
|
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
|
|
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
|
|
-@@ -154,6 +154,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
+@@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
|
|
|
} // namespace
|
|
|
|
|
@@ -21,11 +21,15 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19
|
|
|
+- (BOOL)acceptsFirstMouse;
|
|
|
+- (BOOL)disableAutoHideCursor;
|
|
|
+@end
|
|
|
++
|
|
|
++@interface NSView (ElectronCustomMethods)
|
|
|
++- (BOOL)shouldIgnoreMouseEvent;
|
|
|
++@end
|
|
|
+
|
|
|
// These are not documented, so use only after checking -respondsToSelector:.
|
|
|
@interface NSApplication (UndocumentedSpeechMethods)
|
|
|
- (void)speakString:(NSString*)string;
|
|
|
-@@ -573,6 +578,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
+@@ -573,6 +582,9 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
}
|
|
|
|
|
|
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
|
@@ -35,7 +39,16 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19
|
|
|
return [self acceptsMouseEventsWhenInactive];
|
|
|
}
|
|
|
|
|
|
-@@ -983,6 +991,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
+@@ -648,6 +660,8 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
+ // its parent view.
|
|
|
+ BOOL hitSelf = NO;
|
|
|
+ while (view) {
|
|
|
++ if ([view respondsToSelector:@selector(shouldIgnoreMouseEvent)] && ![view shouldIgnoreMouseEvent])
|
|
|
++ return NO;
|
|
|
+ if (view == self)
|
|
|
+ hitSelf = YES;
|
|
|
+ if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
|
|
|
+@@ -983,6 +997,10 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
eventType == NSKeyDown &&
|
|
|
!(modifierFlags & NSCommandKeyMask);
|
|
|
|
|
@@ -46,7 +59,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19
|
|
|
// We only handle key down events and just simply forward other events.
|
|
|
if (eventType != NSKeyDown) {
|
|
|
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
|
|
-@@ -1759,9 +1771,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
+@@ -1759,9 +1777,11 @@ void ExtractUnderlines(NSAttributedString* string,
|
|
|
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
|
|
// make any key-typing jank. --hbono 7/23/09
|
|
|
//
|
|
@@ -58,7 +71,7 @@ index c7fb942367100b7a371d8941c73fc608a1a39435..ab0e620e824e0a0df93b12d2ff42cc19
|
|
|
|
|
|
- (NSArray*)validAttributesForMarkedText {
|
|
|
// This code is just copied from WebKit except renaming variables.
|
|
|
-@@ -1770,7 +1784,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
|
|
+@@ -1770,7 +1790,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
|
|
|
initWithObjects:NSUnderlineStyleAttributeName,
|
|
|
NSUnderlineColorAttributeName,
|
|
|
NSMarkedClauseSegmentAttributeName,
|