title: Webkit page scaling in Cocoa
body: <p>I'm making a WebKit-based text editor app for Mac, and I need to find a way to zoom the document in and out.</p>
  
  <p>I've seen this StackOverflow article <a href="https://stackoverflow.com/questions/2181587/scale-webview-in-cocoa">here</a>, it suggests just scaling the view that Webkit is rendered into. The problem is, since Webkit doesn't know about it, this breaks things like drag &amp; drop and causes Javascript to report the wrong cursor locations. Unfortunately, for some reason, the Cocoa WebKit API only supports scaling text up or down, not the whole page.</p>
  
  <p>Safari and Chrome are both able to do this properly. I've gone as far as to look through the Chromium source code to figure out how it's done, but unfortunately it's using a completely different cross-platform API.</p>
  
  <p>Any advice would be greatly appreciated. I'm not opposed to using private APIs, if I can figure out how to use them in a safe way.</p>
  
  <p>-Keaton</p>