# HG changeset patch # User Eugene Ostroukhov # Date 1264185553 28800 # Node ID 9ece1ee268bd3e4fc5426631d21994f6e8cfc3b8 # Parent fc4a1d68260ae69ef8d74a6f46e5fab031bac5ad Fixed FireFox security settings diff -r fc4a1d68260a -r 9ece1ee268bd org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java --- a/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java Thu Jan 21 17:49:50 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/src/org/symbian/tools/wrttools/previewer/preview/PreviewPage.java Fri Jan 22 10:39:13 2010 -0800 @@ -34,6 +34,8 @@ import org.osgi.framework.Bundle; import org.symbian.tools.wrttools.previewer.PreviewerPlugin; import org.symbian.tools.wrttools.previewer.Images; +import org.symbian.tools.wrttools.previewer.http.WebAppInterface; +import org.symbian.tools.wrttools.previewer.http.WebappManager; public class PreviewPage extends Page implements IPageBookViewPage, ISelectionProvider { private static final String XUL_RUNNER_PATH_PARAMETER = "org.eclipse.swt.browser.XULRunnerPath"; @@ -155,12 +157,14 @@ browser.refresh(); refreshAction.setImageDescriptor(PreviewerPlugin .getImageDescriptor(Images.GREEN_SYNC)); - asyncExec(new Runnable() { - @Override - public void run() { - focusControl.setFocus(); - } - }); + if (focusControl != null) { + asyncExec(new Runnable() { + @Override + public void run() { + focusControl.setFocus(); + } + }); + } refreshAction.setToolTipText("Refresh the preview browser"); needsRefresh = false; } finally { @@ -239,7 +243,7 @@ } private void bypassSameOriginPolicy() { - + WebAppInterface.getInstance(); try{ nsIServiceManager servMgr = null; try { @@ -287,7 +291,8 @@ mozillaPrefs.setCharPref("capability.policy.default.XMLHttpRequest.setRequestHeader", "allAccess"); /* to over-ride the internet security dialog when preview browser tries to access local hard drive */ mozillaPrefs.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect UniversalBrowserRead"); - mozillaPrefs.setCharPref("capability.principal.codebase.p0.id", "file://"); + String location = "http://127.0.0.1:" + WebappManager.getPort(); + mozillaPrefs.setCharPref("capability.principal.codebase.p0.id", location); mozillaPrefs.setBoolPref("security.fileuri.strict_origin_policy", 0); } catch (Exception e) { PreviewerPlugin.log("Error getting preferences", e); diff -r fc4a1d68260a -r 9ece1ee268bd org.symbian.tools.wrttools/META-INF/MANIFEST.MF --- a/org.symbian.tools.wrttools/META-INF/MANIFEST.MF Thu Jan 21 17:49:50 2010 -0800 +++ b/org.symbian.tools.wrttools/META-INF/MANIFEST.MF Fri Jan 22 10:39:13 2010 -0800 @@ -32,16 +32,6 @@ org.apache.velocity.io;version="1.5.0", org.apache.velocity.runtime;version="1.5.0", org.apache.velocity.util;version="1.5.0", - org.chromium.debug.core, - org.chromium.debug.core.model, - org.chromium.debug.core.util, - org.chromium.sdk, - org.chromium.sdk.internal, - org.chromium.sdk.internal.tools.devtools, - org.chromium.sdk.internal.tools.v8, - org.chromium.sdk.internal.tools.v8.processor, - org.chromium.sdk.internal.tools.v8.request, - org.chromium.sdk.internal.transport, org.eclipse.emf.common.notify, org.eclipse.emf.common.util, org.eclipse.emf.ecore, diff -r fc4a1d68260a -r 9ece1ee268bd org.symbian.tools.wrttools/plugin.xml --- a/org.symbian.tools.wrttools/plugin.xml Thu Jan 21 17:49:50 2010 -0800 +++ b/org.symbian.tools.wrttools/plugin.xml Fri Jan 22 10:39:13 2010 -0800 @@ -17,7 +17,7 @@ - +