Revoke "LocalContentCanAccess*Urls"

Since we embed the content of the PDF directly, we no longer need the
permissions for pdf.js.
This commit is contained in:
Daniel Schadt 2015-11-11 10:22:02 +01:00
parent ea4d9e884e
commit fcfc09f541

View File

@ -145,12 +145,6 @@ class WebView(QWebView):
self.loadProgress.connect(lambda p: setattr(self, 'progress', p)) self.loadProgress.connect(lambda p: setattr(self, 'progress', p))
objreg.get('config').changed.connect(self.on_config_changed) objreg.get('config').changed.connect(self.on_config_changed)
# Allow pdf.js to retrieve pages
self.settings().setAttribute(
QWebSettings.LocalContentCanAccessRemoteUrls, True)
self.settings().setAttribute(
QWebSettings.LocalContentCanAccessFileUrls, True)
def _init_page(self): def _init_page(self):
"""Initialize the QWebPage used by this view.""" """Initialize the QWebPage used by this view."""
page = webpage.BrowserPage(self.win_id, self.tab_id, self) page = webpage.BrowserPage(self.win_id, self.tab_id, self)