Lines 24-29
Link Here
|
24 |
COMObject iInternetSecurityManager; |
24 |
COMObject iInternetSecurityManager; |
25 |
COMObject iOleCommandTarget; |
25 |
COMObject iOleCommandTarget; |
26 |
boolean ignoreNextMessage; |
26 |
boolean ignoreNextMessage; |
|
|
27 |
boolean javascriptDisabled; |
27 |
|
28 |
|
28 |
static final int OLECMDID_SHOWSCRIPTERROR = 40; |
29 |
static final int OLECMDID_SHOWSCRIPTERROR = 40; |
29 |
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'}; |
30 |
static final short [] ACCENTS = new short [] {'~', '`', '\'', '^', '"'}; |
Lines 31-36
Link Here
|
31 |
|
32 |
|
32 |
public WebSite(Composite parent, int style, String progId) { |
33 |
public WebSite(Composite parent, int style, String progId) { |
33 |
super(parent, style, progId); |
34 |
super(parent, style, progId); |
|
|
35 |
|
36 |
javascriptDisabled = (style & SWT.DISABLE_JAVASCRIPT) != 0; |
34 |
} |
37 |
} |
35 |
|
38 |
|
36 |
protected void createCOMInterfaces () { |
39 |
protected void createCOMInterfaces () { |
Lines 456-461
Link Here
|
456 |
*/ |
459 |
*/ |
457 |
int policy = IE.URLPOLICY_ALLOW; |
460 |
int policy = IE.URLPOLICY_ALLOW; |
458 |
/* |
461 |
/* |
|
|
462 |
* Don't allow Javascript if it's disabled. |
463 |
*/ |
464 |
if (dwAction == 5120 /*0x1400 - URLACTION_SCRIPT_RUN*/ && javascriptDisabled) { |
465 |
policy = IE.URLPOLICY_DISALLOW; |
466 |
} |
467 |
/* |
459 |
* The URLACTION_JAVA flags refer to the <applet> tag, which resolves to |
468 |
* The URLACTION_JAVA flags refer to the <applet> tag, which resolves to |
460 |
* the Microsoft VM if the applet is java 1.1.x compliant, or to the OS's |
469 |
* the Microsoft VM if the applet is java 1.1.x compliant, or to the OS's |
461 |
* java plug-in VM otherwise. Applets launched with the MS VM work in the |
470 |
* java plug-in VM otherwise. Applets launched with the MS VM work in the |