diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-11-21 11:48:43 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-11-21 11:48:43 +0000 |
commit | 3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3 (patch) | |
tree | 7ccaf71c89c158a9c1c7ce5bdceea6dcf4fc39ac /desktop/browser.c | |
parent | 0f0c3b02d7b3aa4687376d9c4e92312d77aa42c2 (diff) | |
download | netsurf-3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3.tar.gz netsurf-3ff4846c1a7d1b85624f5c1ced2df8637b0bd1e3.tar.bz2 |
Remove usage of browser private interfaces
The cocoa frontend was directly acessing browser internals instead of
using the API. In the case of gui.m there was a check for the browser
window not being root (browser->parent != NULL) . As gui windows can
only ever be associated with the root brower window (i.e. its parent
will always be NULL) this was completely redundant.
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 5570d4279..195814c20 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -2568,6 +2568,10 @@ void browser_window_set_scale(struct browser_window *bw, float scale, bool all) /* exported interface documented in desktop/browser.h */ float browser_window_get_scale(struct browser_window *bw) { + if (bw == NULL) { + return 1.0; + } + return bw->scale; } |