This workaround is to avoid a couple of undesired behaviors in the `HTMLOutputWindow` when the web page implements keyboard commands such as Git → Browse Annotated File (Blame). Namely, when using the keyboard commands, we would always receive an NSBeep. Also, fixed an issue when these key commands may conflict with menu keys. See comment in the commit for details.
I mainly dislike the trailing zeroes because CGFloat used to be a float but 1.0 is a double (1.0f would be a float). So better to under-specify and let the compiler figure out the proper type.
Since switching to ARC we need to ensure the NSWindow is “over-retained” as we rely on “setReleasedWhenClosed:YES”.
Also add ability to close such windows from JavaScript.
We now try to find a scrollable view under the mouse, and if any scrolling was done, we reject the gesture as a “go back/forward” event.
Additionally we reject gestures with a duration of more than 0.2 seconds.
Maybe fixes#854.
I am not sure what Apple’s thinking is here. We have swipeWithEvent: which worked on 10.7 but seems to no longer work, yet there is a global preference for configuring a swipe gesture and Safari supports that config option, but it appears other apps have to role their own implementation.
We now check for an ‘index.html’ when a file:-link points to a directory. If no such file exist then we show the “Not Found” error page.
This is to work with offline docs that doesn’t include the ‘index.html’ in the URL.
__attribute__((format(...))) was added to NSAlert's class-based initializer in 10.7, and due to using string objects instead of literals as informative text, Clang is unable to guarantee the safety of the formatter, and, as such, issues a warning.