summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2010-06-25 20:49:40 +0000
committerGrant Gayed <ggayed>2010-06-25 20:49:40 +0000
commit7692871f7f787db56ee6d7e9051fd08cd8bb22cb (patch)
treee3bc23c9863c2171803a0e246f46ff70b354357f
parent6c6ae9e56aa891fd3bc758cad0772a1a8cad8c06 (diff)
downloadeclipse.platform.swt-7692871f7f787db56ee6d7e9051fd08cd8bb22cb.tar.gz
eclipse.platform.swt-7692871f7f787db56ee6d7e9051fd08cd8bb22cb.tar.xz
eclipse.platform.swt-7692871f7f787db56ee6d7e9051fd08cd8bb22cb.zip
316811 - change all "Safari" references to "WebKit"
-rw-r--r--bundles/org.eclipse.swt/.classpath_carbon2
-rwxr-xr-xbundles/org.eclipse.swt/.classpath_cocoa2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT WebKit/carbon/org/eclipse/swt/browser/WebKit.java (renamed from bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java)88
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java (renamed from bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java)166
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java12
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java12
-rw-r--r--bundles/org.eclipse.swt/buildFragment.xml4
12 files changed, 148 insertions, 148 deletions
diff --git a/bundles/org.eclipse.swt/.classpath_carbon b/bundles/org.eclipse.swt/.classpath_carbon
index cdb68d6467..60ccf245a3 100644
--- a/bundles/org.eclipse.swt/.classpath_carbon
+++ b/bundles/org.eclipse.swt/.classpath_carbon
@@ -27,7 +27,7 @@
<classpathentry kind="src" path="Eclipse SWT Program/common"/>
<classpathentry kind="src" path="Eclipse SWT Program/carbon"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
- <classpathentry kind="src" path="Eclipse SWT Browser/carbon"/>
+ <classpathentry kind="src" path="Eclipse SWT WebKit/carbon"/>
<classpathentry kind="src" path="Eclipse SWT Mozilla/common"/>
<classpathentry kind="src" path="Eclipse SWT Mozilla/carbon"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/carbon"/>
diff --git a/bundles/org.eclipse.swt/.classpath_cocoa b/bundles/org.eclipse.swt/.classpath_cocoa
index 7ffa7533f5..752f05d15e 100755
--- a/bundles/org.eclipse.swt/.classpath_cocoa
+++ b/bundles/org.eclipse.swt/.classpath_cocoa
@@ -27,7 +27,7 @@
<classpathentry kind="src" path="Eclipse SWT Program/common"/>
<classpathentry kind="src" path="Eclipse SWT Program/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
- <classpathentry kind="src" path="Eclipse SWT Browser/cocoa"/>
+ <classpathentry kind="src" path="Eclipse SWT WebKit/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT Mozilla/common"/>
<classpathentry kind="src" path="Eclipse SWT Mozilla/cocoa"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/cocoa"/>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
index 88c8297d37..af99646df9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/Browser.java
@@ -101,7 +101,7 @@ public Browser (Composite parent, int style) {
classNames = new String[] {"org.eclipse.swt.browser.Mozilla"}; //$NON-NLS-1$
}
} else if ("carbon".equals (platform) || "cocoa".equals (platform)) { //$NON-NLS-1$
- classNames = new String[] {"org.eclipse.swt.browser.Safari"}; //$NON-NLS-1$
+ classNames = new String[] {"org.eclipse.swt.browser.WebKit"}; //$NON-NLS-1$
} else if ("photon".equals (platform)) { //$NON-NLS-1$
classNames = new String[] {"org.eclipse.swt.browser.Voyager"}; //$NON-NLS-1$
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
index 8b93b11642..e58a4bed9d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
@@ -171,7 +171,7 @@ abstract class WebBrowser {
{19, SWT.PAUSE},
{3, SWT.BREAK},
- /* WebKit/Safari-specific */
+ /* WebKit-specific */
{186, ';'},
{187, '='},
{189, '-'},
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
index d48cd8a0e2..8ca38e08c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java
@@ -5688,7 +5688,7 @@ public static final String kAXDateFieldRole = "AXDateField";
public static final String kAXHelpTagRole = "AXHelpTag";
public static final String kAXMatteRole = "AXMatteRole";
public static final String kAXDockItemRole = "AXDockItem";
-public static final String kAXLinkRole = "AXLink"; // as seen in Safari
+public static final String kAXLinkRole = "AXLink"; // as seen in WebKit
public static final String kAXCloseButtonSubrole = "AXCloseButton";
public static final String kAXMinimizeButtonSubrole = "AXMinimizeButton";
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/carbon/org/eclipse/swt/browser/WebKit.java
index 21fe5610d1..6bd8948632 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/Safari.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/carbon/org/eclipse/swt/browser/WebKit.java
@@ -22,7 +22,7 @@ import org.eclipse.swt.internal.cocoa.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
-class Safari extends WebBrowser {
+class WebKit extends WebBrowser {
/* Objective-C WebView delegate */
int delegate;
@@ -62,7 +62,7 @@ class Safari extends WebBrowser {
static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
static final String BROWSER_WINDOW = "org.eclipse.swt.browser.Browser.Window"; //$NON-NLS-1$
- static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
+ static final String WEBKIT_EVENTS_FIX_KEY = "org.eclipse.swt.internal.webKitEventsFix"; //$NON-NLS-1$
/* event strings */
static final String DOMEVENT_KEYUP = "keyup"; //$NON-NLS-1$
@@ -162,7 +162,7 @@ public boolean create (Composite parent, int style) {
}
/*
- * Bug in Safari on OSX 10.5 (Leopard) only. VoiceOver no longer follows focus when
+ * Bug in WebKit on OSX 10.5 (Leopard) only. VoiceOver no longer follows focus when
* HIWebViewCreate is used to create a WebView. The VoiceOver cursor (activated by
* Control+Alt+arrows) continues to work, but keyboard focus is not tracked. The fix
* is to create the WebView with HICocoaViewCreate (api introduced in OSX 10.5) when
@@ -198,11 +198,11 @@ public boolean create (Composite parent, int style) {
* to the DOM instead.
*/
if (!(OS.VERSION < 0x1040)) {
- browser.setData(SAFARI_EVENTS_FIX_KEY);
+ browser.setData(WEBKIT_EVENTS_FIX_KEY);
}
/*
- * Bug in Safari. For some reason, every application must contain
+ * Bug in WebKit. For some reason, every application must contain
* a visible window that has never had a WebView or mouse move events
* are not delivered. This seems to happen after a browser has been
* either hidden or disposed in any window. The fix is to create a
@@ -228,7 +228,7 @@ public boolean create (Composite parent, int style) {
}
/*
- * Bug in Safari. The WebView does not draw properly if it is embedded as
+ * Bug in WebKit. The WebView does not draw properly if it is embedded as
* sub view of the browser handle. The fix is to add the web view to the
* window root control and resize it on top of the browser handle.
*
@@ -242,11 +242,11 @@ public boolean create (Composite parent, int style) {
OS.HIViewChangeFeatures(webViewHandle, OS.kHIViewFeatureIsOpaque, 0);
/*
- * Bug in Safari. The WebView does not receive mouse and key events when it is added
- * to a visible top window. It is assumed that Safari hooks its own event listener
+ * Bug in WebKit. The WebView does not receive mouse and key events when it is added
+ * to a visible top window. It is assumed that WebKit hooks its own event listener
* when the top window emits the kEventWindowShown event. The workaround is to send a
* fake kEventWindowShown event to the top window after the WebView has been added
- * to the HIView (after the top window is visible) to give Safari a chance to hook
+ * to the HIView (after the top window is visible) to give WebKit a chance to hook
* events.
*/
OS.HIViewSetVisible(webViewHandle, true);
@@ -260,7 +260,7 @@ public boolean create (Composite parent, int style) {
/*
* This code is intentionally commented. Setting a group name is the right thing
- * to do in order to avoid multiple open window requests. For some reason, Safari
+ * to do in order to avoid multiple open window requests. For some reason, WebKit
* crashes when requested to reopen the same window if that window was previously
* closed. This may be because that window was not correctly closed.
*/
@@ -408,7 +408,7 @@ public boolean create (Composite parent, int style) {
static int eventProc3(int nextHandler, int theEvent, int userData) {
Widget widget = Display.getCurrent().findWidget(userData);
if (widget instanceof Browser) {
- return ((Safari)((Browser)widget).webBrowser).handleCallback(nextHandler, theEvent);
+ return ((WebKit)((Browser)widget).webBrowser).handleCallback(nextHandler, theEvent);
}
return OS.eventNotHandledErr;
}
@@ -416,7 +416,7 @@ static int eventProc3(int nextHandler, int theEvent, int userData) {
static int eventProc7(int webview, int userData, int selector, int arg0, int arg1, int arg2, int arg3) {
Widget widget = Display.getCurrent().findWidget(userData);
if (widget instanceof Browser) {
- return ((Safari)((Browser)widget).webBrowser).handleCallback(selector, arg0, arg1, arg2, arg3);
+ return ((WebKit)((Browser)widget).webBrowser).handleCallback(selector, arg0, arg1, arg2, arg3);
}
return 0;
}
@@ -542,7 +542,7 @@ int handleCallback(int nextHandler, int theEvent) {
}
case OS.kEventControlDraw: {
/*
- * Bug on Safari. The web view cannot be obscured by other views above it.
+ * Bug on WebKit. The web view cannot be obscured by other views above it.
* This problem is specified in the apple documentation for HiWebViewCreate.
* The workaround is to don't draw the web view when it is not visible.
*/
@@ -569,7 +569,7 @@ int handleCallback(int nextHandler, int theEvent) {
case OS.kEventControlBoundsChanged:
case OS.kEventControlVisibilityChanged: {
/*
- * Bug on Safari. The web view cannot be obscured by other views above it.
+ * Bug on WebKit. The web view cannot be obscured by other views above it.
* This problem is specified in the apple documentation for HiWebViewCreate.
* The workaround is to hook kEventControlVisibilityChanged on the browser
* and move the browser out of the screen when hidden and restore its bounds
@@ -586,7 +586,7 @@ int handleCallback(int nextHandler, int theEvent) {
OS.HIViewFindByID(OS.HIViewGetRoot(OS.GetControlOwner(browser.handle)), OS.kHIViewWindowContentID(), contentView);
OS.HIViewConvertRect(bounds, browser.handle, contentView[0]);
/*
- * Bug in Safari. For some reason, the web view will display incorrectly or
+ * Bug in WebKit. For some reason, the web view will display incorrectly or
* blank depending on its contents, if its size is set to a value smaller than
* MIN_SIZE. It will not display properly even after the size is made larger.
* The fix is to avoid setting sizes smaller than MIN_SIZE.
@@ -602,7 +602,7 @@ int handleCallback(int nextHandler, int theEvent) {
switch (eventKind) {
case OS.kEventWindowBoundsChanged:
/*
- * Bug on Safari. Resizing the height of a Shell containing a Browser at
+ * Bug on WebKit. Resizing the height of a Shell containing a Browser at
* a fixed location causes the Browser to redraw at a wrong location.
* The web view is a HIView container that internally hosts
* a Cocoa NSView that uses a coordinates system with the origin at the
@@ -623,7 +623,7 @@ int handleCallback(int nextHandler, int theEvent) {
OS.HIViewFindByID(OS.HIViewGetRoot(OS.GetControlOwner(browser.handle)), OS.kHIViewWindowContentID(), contentView);
OS.HIViewConvertRect(bounds, browser.handle, contentView[0]);
/*
- * Bug in Safari. For some reason, the web view will display incorrectly or
+ * Bug in WebKit. For some reason, the web view will display incorrectly or
* blank depending on its contents, if its size is set to a value smaller than
* MIN_SIZE. It will not display properly even after the size is made larger.
* The fix is to avoid setting sizes smaller than MIN_SIZE.
@@ -641,7 +641,7 @@ int handleCallback(int nextHandler, int theEvent) {
switch (eventKind) {
case OS.kEventRawKeyDown: {
/*
- * Bug in Safari. The WebView blocks the propagation of certain Carbon events
+ * Bug in WebKit. The WebView blocks the propagation of certain Carbon events
* such as kEventRawKeyDown. On the Mac, Carbon events propagate from the
* Focus Target Handler to the Control Target Handler, Window Target and finally
* the Application Target Handler. It is assumed that WebView hooks its events
@@ -651,7 +651,7 @@ int handleCallback(int nextHandler, int theEvent) {
* used by SWT to send a SWT.KeyDown event.
* The workaround is to hook kEventRawKeyDown on the Control Target Handler which gets
* called before the WebView hook on the Window Target Handler. Then, forward this event
- * directly to the Application Target Handler. Note that if in certain conditions Safari
+ * directly to the Application Target Handler. Note that if in certain conditions WebKit
* does not block the kEventRawKeyDown, then multiple kEventTextInputUnicodeForKeyEvent
* events might be generated as a result of this workaround.
*/
@@ -855,7 +855,7 @@ public boolean setUrl(String url, String postData, String[] headers) {
if (key.length() > 0 && value.length() > 0) {
if (key.equalsIgnoreCase(USER_AGENT)) {
/*
- * Feature of Safari. The user-agent header value cannot be overridden
+ * Feature of WebKit. The user-agent header value cannot be overridden
* here. The workaround is to temporarily set the value on the WebView
* and then remove it after the loading of the request has begun.
*/
@@ -941,11 +941,11 @@ void didChangeLocationWithinPageForFrame(int frame) {
void didFailProvisionalLoadWithError(int error, int frame) {
if (frame == Cocoa.objc_msgSend(webView, Cocoa.S_mainFrame)) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. However, Safari fires
+ * the identifierForInitialRequest event is received. However, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -1098,11 +1098,11 @@ void didFinishLoadForFrame(int frame) {
if (browser.isDisposed()) return;
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. Howeever, Safari fires
+ * the identifierForInitialRequest event is received. Howeever, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -1118,7 +1118,7 @@ void hookDOMFocusListeners(int frame) {
/*
* These listeners only need to be hooked for OSX 10.4 (Tiger). The WebKit on
* OSX < 10.4 does not send these DOM events, and tab traversals that exit
- * Safari are handled as of OSX 10.5 as a result of using HICocoaViewCreate,
+ * WebKit are handled as of OSX 10.5 as a result of using HICocoaViewCreate,
* which makes these listeners unnecessary.
*/
if (!(0x1040 <= OS.VERSION && OS.VERSION < 0x1050)) return;
@@ -1249,7 +1249,7 @@ void didCommitLoadForFrame(int frame) {
/*
* Each invocation of setText() causes didCommitLoadForFrame to be invoked twice,
* once for the initial navigate to about:blank, and once for the auto-navigate
- * to about:blank that Safari does when loadHTMLStringBaseURL is invoked. If
+ * to about:blank that WebKit does when loadHTMLStringBaseURL is invoked. If
* this is the first didCommitLoadForFrame callback received for a setText()
* invocation then do not send any events or re-install registered BrowserFunctions.
*/
@@ -1308,11 +1308,11 @@ void windowScriptObjectAvailable (int windowScriptObject) {
void didFinishLoadingFromDataSource(int identifier, int dataSource) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. Howeever, Safari fires
+ * the identifierForInitialRequest event is received. Howeever, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -1326,11 +1326,11 @@ void didFinishLoadingFromDataSource(int identifier, int dataSource) {
void didFailLoadingWithError(int identifier, int error, int dataSource) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. Howeever, Safari fires
+ * the identifierForInitialRequest event is received. Howeever, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -1551,11 +1551,11 @@ int createWebViewWithRequest(int request) {
int webView = 0;
Browser browser = null;
- if (newEvent.browser != null && newEvent.browser.webBrowser instanceof Safari) {
+ if (newEvent.browser != null && newEvent.browser.webBrowser instanceof WebKit) {
browser = newEvent.browser;
}
if (browser != null && !browser.isDisposed()) {
- webView = ((Safari)browser.webBrowser).webView;
+ webView = ((WebKit)browser.webBrowser).webView;
if (request != 0) {
//mainFrame = [webView mainFrame];
@@ -1570,8 +1570,8 @@ int createWebViewWithRequest(int request) {
void webViewShow(int sender) {
/*
- * Feature on WebKit. The Safari WebKit expects the application
- * to create a new Window using the Objective C Cocoa API in response
+ * Feature on WebKit. WebKit expects the application to
+ * create a new Window using the Objective C Cocoa API in response
* to UIDelegate.createWebViewWithRequest. The application is then
* expected to use Objective C Cocoa API to make this window visible
* when receiving the UIDelegate.webViewShow message. For some reason,
@@ -1589,7 +1589,7 @@ void webViewShow(int sender) {
if (location != null) newEvent.location = location;
if (size != null) newEvent.size = size;
/*
- * Feature in Safari. Safari's tool bar contains
+ * Feature in WebKit. WebKit's tool bar contains
* the address bar. The address bar is displayed
* if the tool bar is displayed. There is no separate
* notification for the address bar.
@@ -1695,8 +1695,8 @@ void webViewClose() {
browser.dispose();
if (parent.isDisposed()) return;
/*
- * Feature on WebKit. The Safari WebKit expects the application
- * to create a new Window using the Objective C Cocoa API in response
+ * Feature on WebKit. WebKit expects the application to
+ * create a new Window using the Objective C Cocoa API in response
* to UIDelegate.createWebViewWithRequest. The application is then
* expected to use Objective C Cocoa API to make this window visible
* when receiving the UIDelegate.webViewShow message. For some reason,
@@ -1814,7 +1814,7 @@ void decidePolicyForNavigationAction(int actionInformation, int request, int fra
int url = Cocoa.objc_msgSend(request, Cocoa.S_URL);
if (loadingText) {
/*
- * Safari is auto-navigating to about:blank in response to a loadHTMLString()
+ * WebKit is auto-navigating to about:blank in response to a loadHTMLString()
* invocation. This navigate should always proceed without sending an event
* since it is preceded by an explicit navigate to about:blank in setText().
*/
@@ -1900,7 +1900,7 @@ void decideDestinationWithSuggestedFilename (int download, int filename) {
String name = new String(buffer);
/*
- * Bug in Safari. As of OSX 10.5.5, showing the file dialog here invokes this
+ * Bug in WebKit. As of OSX 10.5.5, showing the file dialog here invokes this
* callback a second time when the file dialog runs the event loop, which
* always leads to a crash. The workaround is to choose a location to save
* the file without showing the file dialog.
@@ -1985,7 +1985,7 @@ void handleEvent(int evt) {
}
keyEvent.keyCode = translateKey(keyCode);
/*
- * Safari maps the Delete key's character to 0xf728. Detect
+ * WebKit maps the Delete key's character to 0xf728. Detect
* this key and set its character to SWT.DEL so that the
* Browser's key events are consistent with other controls.
*/
@@ -2009,9 +2009,9 @@ void handleEvent(int evt) {
}
/*
- * Bug in Safari. As a result of using HIWebViewCreate on OSX versions < 10.5 (Leopard), attempting
- * to traverse out of Safari backwards (Shift+Tab) leaves it in a strange state where Safari no
- * longer has focus but still receives keys. The Carbon-based Safari examples have the same
+ * Bug in WebKit. As a result of using HIWebViewCreate on OSX versions < 10.5 (Leopard), attempting
+ * to traverse out of WebKit backwards (Shift+Tab) leaves it in a strange state where WebKit no
+ * longer has focus but still receives keys. The Carbon-based WebKit examples have the same
* problem. The workaround is to only allow forward Tab traversals in the Browser on OSX < 10.5.
*/
if (doit && OS.VERSION < 0x1050 && keyEvent.keyCode == SWT.TAB && (keyEvent.stateMask & SWT.SHIFT) != 0) {
@@ -2065,7 +2065,7 @@ void handleEvent(int evt) {
}
} else if (DOMEVENT_MOUSEMOVE.equals (typeString)) {
/*
- * Feature in Safari. Spurious and redundant mousemove events are received in
+ * Feature in WebKit. Spurious and redundant mousemove events are received in
* various contexts, including following every MouseUp. The workaround is to
* not fire MouseMove events whose x and y values match the last MouseMove.
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
index 90ecf697a9..82d38700f8 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/cocoa/org/eclipse/swt/browser/WebKit.java
@@ -20,7 +20,7 @@ import org.eclipse.swt.internal.cocoa.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
-class Safari extends WebBrowser {
+class WebKit extends WebBrowser {
WebView webView;
WebPreferences preferences;
SWTWebViewDelegate delegate;
@@ -54,7 +54,7 @@ class Safari extends WebBrowser {
static final String POST = "POST"; //$NON-NLS-1$
static final String USER_AGENT = "user-agent"; //$NON-NLS-1$
static final String ADD_WIDGET_KEY = "org.eclipse.swt.internal.addWidget"; //$NON-NLS-1$
- static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
+ static final String WEBKIT_EVENTS_FIX_KEY = "org.eclipse.swt.internal.webKitEventsFix"; //$NON-NLS-1$
static final byte[] SWT_OBJECT = {'S', 'W', 'T', '_', 'O', 'B', 'J', 'E', 'C', 'T', '\0'};
/* event strings */
@@ -121,20 +121,20 @@ class Safari extends WebBrowser {
public boolean create (Composite parent, int style) {
if (delegateClass == 0) {
- Class safariClass = this.getClass();
- Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$
+ Class webKitClass = this.getClass();
+ Callback3 = new Callback(webKitClass, "browserProc", 3); //$NON-NLS-1$
int /*long*/ proc3 = Callback3.getAddress();
if (proc3 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- Callback4 = new Callback(safariClass, "browserProc", 4); //$NON-NLS-1$
+ Callback4 = new Callback(webKitClass, "browserProc", 4); //$NON-NLS-1$
int /*long*/ proc4 = Callback4.getAddress();
if (proc4 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- Callback5 = new Callback(safariClass, "browserProc", 5); //$NON-NLS-1$
+ Callback5 = new Callback(webKitClass, "browserProc", 5); //$NON-NLS-1$
int /*long*/ proc5 = Callback5.getAddress();
if (proc5 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- Callback6 = new Callback(safariClass, "browserProc", 6); //$NON-NLS-1$
+ Callback6 = new Callback(webKitClass, "browserProc", 6); //$NON-NLS-1$
int /*long*/ proc6 = Callback6.getAddress();
if (proc6 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- Callback7 = new Callback(safariClass, "browserProc", 7); //$NON-NLS-1$
+ Callback7 = new Callback(webKitClass, "browserProc", 7); //$NON-NLS-1$
int /*long*/ proc7 = Callback7.getAddress();
if (proc7 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
int /*long*/ setFrameProc = OS.CALLBACK_webView_setFrame_(proc4);
@@ -197,7 +197,7 @@ public boolean create (Composite parent, int style) {
* Override the default event mechanism to not send key events so
* that the browser can send them by listening to the DOM instead.
*/
- browser.setData(SAFARI_EVENTS_FIX_KEY);
+ browser.setData(WEBKIT_EVENTS_FIX_KEY);
WebView webView = (WebView)new WebView().alloc();
if (webView == null) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -217,7 +217,7 @@ public boolean create (Composite parent, int style) {
public void handleEvent(Event e) {
switch (e.type) {
case SWT.FocusIn:
- Safari.this.webView.window().makeFirstResponder(Safari.this.webView);
+ WebKit.this.webView.window().makeFirstResponder(WebKit.this.webView);
break;
case SWT.Dispose: {
/* make this handler run after other dispose listeners */
@@ -239,16 +239,16 @@ public boolean create (Composite parent, int style) {
e.display.setData(ADD_WIDGET_KEY, new Object[] {delegate, null});
}
- Safari.this.webView.setFrameLoadDelegate(null);
- Safari.this.webView.setResourceLoadDelegate(null);
- Safari.this.webView.setUIDelegate(null);
- Safari.this.webView.setPolicyDelegate(null);
- Safari.this.webView.setDownloadDelegate(null);
+ WebKit.this.webView.setFrameLoadDelegate(null);
+ WebKit.this.webView.setResourceLoadDelegate(null);
+ WebKit.this.webView.setUIDelegate(null);
+ WebKit.this.webView.setPolicyDelegate(null);
+ WebKit.this.webView.setDownloadDelegate(null);
- Safari.this.webView.release();
- Safari.this.webView = null;
- Safari.this.delegate.release();
- Safari.this.delegate = null;
+ WebKit.this.webView.release();
+ WebKit.this.webView = null;
+ WebKit.this.delegate.release();
+ WebKit.this.delegate = null;
html = null;
lastHoveredLinkURL = lastNavigateURL = null;
@@ -301,17 +301,17 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
Widget widget = Display.getCurrent().findWidget(id);
if (widget == null) return 0;
- Safari safari = (Safari)((Browser)widget).webBrowser;
+ WebKit webKit = (WebKit)((Browser)widget).webBrowser;
if (sel == OS.sel_webViewShow_) {
- safari.webViewShow(arg0);
+ webKit.webViewShow(arg0);
} else if (sel == OS.sel_webViewClose_) {
- safari.webViewClose(arg0);
+ webKit.webViewClose(arg0);
} else if (sel == OS.sel_webViewFocus_) {
- safari.webViewFocus(arg0);
+ webKit.webViewFocus(arg0);
} else if (sel == OS.sel_webViewUnfocus_) {
- safari.webViewUnfocus(arg0);
+ webKit.webViewUnfocus(arg0);
} else if (sel == OS.sel_handleEvent_) {
- safari.handleEvent(arg0);
+ webKit.handleEvent(arg0);
}
return 0;
}
@@ -319,41 +319,41 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1) {
Widget widget = Display.getCurrent().findWidget(id);
if (widget == null) return 0;
- Safari safari = (Safari)((Browser)widget).webBrowser;
+ WebKit webKit = (WebKit)((Browser)widget).webBrowser;
if (sel == OS.sel_webView_didChangeLocationWithinPageForFrame_) {
- safari.webView_didChangeLocationWithinPageForFrame(arg0, arg1);
+ webKit.webView_didChangeLocationWithinPageForFrame(arg0, arg1);
} else if (sel == OS.sel_webView_didFinishLoadForFrame_) {
- safari.webView_didFinishLoadForFrame(arg0, arg1);
+ webKit.webView_didFinishLoadForFrame(arg0, arg1);
} else if (sel == OS.sel_webView_didStartProvisionalLoadForFrame_) {
- safari.webView_didStartProvisionalLoadForFrame(arg0, arg1);
+ webKit.webView_didStartProvisionalLoadForFrame(arg0, arg1);
} else if (sel == OS.sel_webView_didCommitLoadForFrame_) {
- safari.webView_didCommitLoadForFrame(arg0, arg1);
+ webKit.webView_didCommitLoadForFrame(arg0, arg1);
} else if (sel == OS.sel_webView_setFrame_) {
- safari.webView_setFrame(arg0, arg1);
+ webKit.webView_setFrame(arg0, arg1);
} else if (sel == OS.sel_webView_createWebViewWithRequest_) {
- return safari.webView_createWebViewWithRequest(arg0, arg1);
+ return webKit.webView_createWebViewWithRequest(arg0, arg1);
} else if (sel == OS.sel_webView_setStatusBarVisible_) {
- safari.webView_setStatusBarVisible(arg0, arg1 != 0);
+ webKit.webView_setStatusBarVisible(arg0, arg1 != 0);
} else if (sel == OS.sel_webView_setResizable_) {
- safari.webView_setResizable(arg0, arg1 != 0);
+ webKit.webView_setResizable(arg0, arg1 != 0);
} else if (sel == OS.sel_webView_setStatusText_) {
- safari.webView_setStatusText(arg0, arg1);
+ webKit.webView_setStatusText(arg0, arg1);
} else if (sel == OS.sel_webView_setToolbarsVisible_) {
- safari.webView_setToolbarsVisible(arg0, arg1 != 0);
+ webKit.webView_setToolbarsVisible(arg0, arg1 != 0);
} else if (sel == OS.sel_webView_runJavaScriptAlertPanelWithMessage_) {
- safari.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
+ webKit.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
} else if (sel == OS.sel_webView_runJavaScriptConfirmPanelWithMessage_) {
- return safari.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
+ return webKit.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
} else if (sel == OS.sel_webView_runOpenPanelForFileButtonWithResultListener_) {
- safari.webView_runOpenPanelForFileButtonWithResultListener(arg0, arg1);
+ webKit.webView_runOpenPanelForFileButtonWithResultListener(arg0, arg1);
} else if (sel == OS.sel_download_decideDestinationWithSuggestedFilename_) {
- safari.download_decideDestinationWithSuggestedFilename(arg0, arg1);
+ webKit.download_decideDestinationWithSuggestedFilename(arg0, arg1);
} else if (sel == OS.sel_webView_printFrameView_) {
- safari.webView_printFrameView(arg0, arg1);
+ webKit.webView_printFrameView(arg0, arg1);
} else if (sel == OS.sel_webView_windowScriptObjectAvailable_) {
- safari.webView_windowScriptObjectAvailable (arg0, arg1);
+ webKit.webView_windowScriptObjectAvailable (arg0, arg1);
} else if (sel == OS.sel_callRunBeforeUnloadConfirmPanelWithMessage) {
- return safari.callRunBeforeUnloadConfirmPanelWithMessage (arg0, arg1).id;
+ return webKit.callRunBeforeUnloadConfirmPanelWithMessage (arg0, arg1).id;
}
return 0;
}
@@ -361,32 +361,32 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
Widget widget = Display.getCurrent().findWidget(id);
if (widget == null) return 0;
- Safari safari = (Safari)((Browser)widget).webBrowser;
+ WebKit webKit = (WebKit)((Browser)widget).webBrowser;
if (sel == OS.sel_webView_didFailProvisionalLoadWithError_forFrame_) {
- safari.webView_didFailProvisionalLoadWithError_forFrame(arg0, arg1, arg2);
+ webKit.webView_didFailProvisionalLoadWithError_forFrame(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_didReceiveTitle_forFrame_) {
- safari.webView_didReceiveTitle_forFrame(arg0, arg1, arg2);
+ webKit.webView_didReceiveTitle_forFrame(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_resource_didFinishLoadingFromDataSource_) {
- safari.webView_resource_didFinishLoadingFromDataSource(arg0, arg1, arg2);
+ webKit.webView_resource_didFinishLoadingFromDataSource(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_identifierForInitialRequest_fromDataSource_) {
- return safari.webView_identifierForInitialRequest_fromDataSource(arg0, arg1, arg2);
+ return webKit.webView_identifierForInitialRequest_fromDataSource(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_contextMenuItemsForElement_defaultMenuItems_) {
- return safari.webView_contextMenuItemsForElement_defaultMenuItems(arg0, arg1, arg2);
+ return webKit.webView_contextMenuItemsForElement_defaultMenuItems(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_mouseDidMoveOverElement_modifierFlags_) {
- safari.webView_mouseDidMoveOverElement_modifierFlags(arg0, arg1, arg2);
+ webKit.webView_mouseDidMoveOverElement_modifierFlags(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_unableToImplementPolicyWithError_frame_) {
- safari.webView_unableToImplementPolicyWithError_frame(arg0, arg1, arg2);
+ webKit.webView_unableToImplementPolicyWithError_frame(arg0, arg1, arg2);
} else if (sel == OS.sel_webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame_) {
- return safari.webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(arg0, arg1, arg2) ? 1 : 0;
+ return webKit.webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(arg0, arg1, arg2) ? 1 : 0;
} else if (sel == OS.sel_webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame_) {
- safari.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
+ webKit.webView_runJavaScriptAlertPanelWithMessage(arg0, arg1);
} else if (sel == OS.sel_webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame_) {
- return safari.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
+ return webKit.webView_runJavaScriptConfirmPanelWithMessage(arg0, arg1);
} else if (sel == OS.sel_callJava) {
- id result = safari.callJava(arg0, arg1, arg2);
+ id result = webKit.callJava(arg0, arg1, arg2);
return result == null ? 0 : result.id;
} else if (sel == OS.sel_createPanelDidEnd) {
- safari.createPanelDidEnd(arg0, arg1, arg2);
+ webKit.createPanelDidEnd(arg0, arg1, arg2);
}
return 0;
}
@@ -394,11 +394,11 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
Widget widget = Display.getCurrent().findWidget(id);
if (widget == null) return 0;
- Safari safari = (Safari)((Browser)widget).webBrowser;
+ WebKit webKit = (WebKit)((Browser)widget).webBrowser;
if (sel == OS.sel_webView_resource_didFailLoadingWithError_fromDataSource_) {
- safari.webView_resource_didFailLoadingWithError_fromDataSource(arg0, arg1, arg2, arg3);
+ webKit.webView_resource_didFailLoadingWithError_fromDataSource(arg0, arg1, arg2, arg3);
} else if (sel == OS.sel_webView_resource_didReceiveAuthenticationChallenge_fromDataSource_) {
- safari.webView_resource_didReceiveAuthenticationChallenge_fromDataSource(arg0, arg1, arg2, arg3);
+ webKit.webView_resource_didReceiveAuthenticationChallenge_fromDataSource(arg0, arg1, arg2, arg3);
}
return 0;
}
@@ -406,15 +406,15 @@ static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/
static int /*long*/ browserProc(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4) {
Widget widget = Display.getCurrent().findWidget(id);
if (widget == null) return 0;
- Safari safari = (Safari)((Browser)widget).webBrowser;
+ WebKit webKit = (WebKit)((Browser)widget).webBrowser;
if (sel == OS.sel_webView_resource_willSendRequest_redirectResponse_fromDataSource_) {
- return safari.webView_resource_willSendRequest_redirectResponse_fromDataSource(arg0, arg1, arg2, arg3, arg4);
+ return webKit.webView_resource_willSendRequest_redirectResponse_fromDataSource(arg0, arg1, arg2, arg3, arg4);
} else if (sel == OS.sel_webView_decidePolicyForMIMEType_request_frame_decisionListener_) {
- safari.webView_decidePolicyForMIMEType_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
+ webKit.webView_decidePolicyForMIMEType_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
} else if (sel == OS.sel_webView_decidePolicyForNavigationAction_request_frame_decisionListener_) {
- safari.webView_decidePolicyForNavigationAction_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
+ webKit.webView_decidePolicyForNavigationAction_request_frame_decisionListener(arg0, arg1, arg2, arg3, arg4);
} else if (sel == OS.sel_webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener_) {
- safari.webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(arg0, arg1, arg2, arg3, arg4);
+ webKit.webView_decidePolicyForNewWindowAction_request_newFrameName_decisionListener(arg0, arg1, arg2, arg3, arg4);
}
return 0;
}
@@ -578,7 +578,7 @@ public boolean setUrl(String url, String postData, String[] headers) {
if (key.length() > 0 && value.length() > 0) {
if (key.equalsIgnoreCase(USER_AGENT)) {
/*
- * Feature of Safari. The user-agent header value cannot be overridden
+ * Feature of WebKit. The user-agent header value cannot be overridden
* here. The workaround is to temporarily set the value on the WebView
* and then remove it after the loading of the request has begun.
*/
@@ -655,11 +655,11 @@ void webView_didChangeLocationWithinPageForFrame(int /*long*/ sender, int /*long
void webView_didFailProvisionalLoadWithError_forFrame(int /*long*/ sender, int /*long*/ error, int /*long*/ frame) {
if (frame == webView.mainFrame().id) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. However, Safari fires
+ * the identifierForInitialRequest event is received. However, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -804,11 +804,11 @@ void webView_didFinishLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
if (browser.isDisposed()) return;
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. However, Safari fires
+ * the identifierForInitialRequest event is received. However, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -909,7 +909,7 @@ void webView_didCommitLoadForFrame(int /*long*/ sender, int /*long*/ frameID) {
/*
* Each invocation of setText() causes webView_didCommitLoadForFrame to be invoked
* twice, once for the initial navigate to about:blank, and once for the auto-navigate
- * to about:blank that Safari does when loadHTMLString is invoked. If this is the
+ * to about:blank that WebKit does when loadHTMLString is invoked. If this is the
* first webView_didCommitLoadForFrame callback received for a setText() invocation
* then do not send any events or re-install registered BrowserFunctions.
*/
@@ -966,11 +966,11 @@ void webView_windowScriptObjectAvailable (int /*long*/ webView, int /*long*/ win
void webView_resource_didFinishLoadingFromDataSource(int /*long*/ sender, int /*long*/ identifier, int /*long*/ dataSource) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. However, Safari fires
+ * the identifierForInitialRequest event is received. However, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -984,11 +984,11 @@ void webView_resource_didFinishLoadingFromDataSource(int /*long*/ sender, int /*
void webView_resource_didFailLoadingWithError_fromDataSource(int /*long*/ sender, int /*long*/ identifier, int /*long*/ error, int /*long*/ dataSource) {
/*
- * Feature on Safari. The identifier is used here as a marker for the events
+ * Feature on WebKit. The identifier is used here as a marker for the events
* related to the top frame and the URL changes related to that top frame as
* they should appear on the location bar of a browser. It is expected to reset
* the identifier to 0 when the event didFinishLoadingFromDataSource related to
- * the identifierForInitialRequest event is received. However, Safari fires
+ * the identifierForInitialRequest event is received. However, WebKit fires
* the didFinishLoadingFromDataSource event before the entire content of the
* top frame is loaded. It is possible to receive multiple willSendRequest
* events in this interval, causing the Browser widget to send unwanted
@@ -1187,11 +1187,11 @@ int /*long*/ webView_createWebViewWithRequest(int /*long*/ sender, int /*long*/
}
WebView result = null;
Browser browser = null;
- if (newEvent.browser != null && newEvent.browser.webBrowser instanceof Safari) {
+ if (newEvent.browser != null && newEvent.browser.webBrowser instanceof WebKit) {
browser = newEvent.browser;
}
if (browser != null && !browser.isDisposed()) {
- result = ((Safari)browser.webBrowser).webView;
+ result = ((WebKit)browser.webBrowser).webView;
if (request != 0) {
WebFrame mainFrame = result.mainFrame();
mainFrame.loadRequest(new NSURLRequest(request));
@@ -1202,8 +1202,8 @@ int /*long*/ webView_createWebViewWithRequest(int /*long*/ sender, int /*long*/
void webViewShow(int /*long*/ sender) {
/*
- * Feature on WebKit. The Safari WebKit expects the application
- * to create a new Window using the Objective C Cocoa API in response
+ * Feature on WebKit. WebKit expects the application to
+ * create a new Window using the Objective C Cocoa API in response
* to UIDelegate.createWebViewWithRequest. The application is then
* expected to use Objective C Cocoa API to make this window visible
* when receiving the UIDelegate.webViewShow message. For some reason,
@@ -1221,7 +1221,7 @@ void webViewShow(int /*long*/ sender) {
if (location != null) newEvent.location = location;
if (size != null) newEvent.size = size;
/*
- * Feature in Safari. Safari's tool bar contains
+ * Feature in WebKit. WebKit's tool bar contains
* the address bar. The address bar is displayed
* if the tool bar is displayed. There is no separate
* notification for the address bar.
@@ -1314,8 +1314,8 @@ void webViewClose(int /*long*/ sender) {
browser.dispose();
if (parent.isDisposed()) return;
/*
- * Feature on WebKit. The Safari WebKit expects the application
- * to create a new Window using the Objective C Cocoa API in response
+ * Feature on WebKit. WebKit expects the application to
+ * create a new Window using the Objective C Cocoa API in response
* to UIDelegate.createWebViewWithRequest. The application is then
* expected to use Objective C Cocoa API to make this window visible
* when receiving the UIDelegate.webViewShow message. For some reason,
@@ -1443,7 +1443,7 @@ void webView_decidePolicyForNavigationAction_request_frame_decisionListener(int
if (loadingText) {
/*
- * Safari is auto-navigating to about:blank in response to a loadHTMLString()
+ * WebKit is auto-navigating to about:blank in response to a loadHTMLString()
* invocation. This navigate should always proceed without sending an event
* since it is preceded by an explicit navigate to about:blank in setText().
*/
@@ -1648,7 +1648,7 @@ void handleEvent(int /*long*/ evtId) {
}
} else if (DOMEVENT_MOUSEMOVE.equals (type)) {
/*
- * Bug in Safari. Spurious and redundant mousemove events are received in
+ * Bug in WebKit. Spurious and redundant mousemove events are received in
* various contexts, including following every MouseUp. The workaround is
* to not fire MouseMove events whose x and y values match the last MouseMove
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
index c06d8de1a1..f0f5033170 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
@@ -3022,7 +3022,7 @@ boolean sendMouseEvent (int type, short button, int count, boolean send, int cho
boolean sendMouseEvent (int type, short button, int count, int detail, boolean send, int chord, short x, short y, int modifiers) {
if (!hooks (type) && !filters (type)) return true;
- if ((state & SAFARI_EVENTS_FIX) != 0) {
+ if ((state & WEBKIT_EVENTS_FIX) != 0) {
switch (type) {
case SWT.MouseUp:
case SWT.MouseMove:
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
index 631dfb329b..1c6dccd335 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
@@ -86,9 +86,9 @@ public abstract class Widget {
static final int FOREIGN_HANDLE = 1<<17;
static final int DRAG_DETECT = 1<<18;
- /* Safari fixes */
- static final int SAFARI_EVENTS_FIX = 1<<19;
- static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
+ /* WebKit fixes */
+ static final int WEBKIT_EVENTS_FIX = 1<<19;
+ static final String WEBKIT_EVENTS_FIX_KEY = "org.eclipse.swt.internal.webKitEventsFix"; //$NON-NLS-1$
static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
@@ -1688,7 +1688,7 @@ void sendEvent (int eventType, Event event, boolean send) {
}
boolean sendKeyEvent (int type, int theEvent) {
- if ((state & SAFARI_EVENTS_FIX) != 0) return true;
+ if ((state & WEBKIT_EVENTS_FIX) != 0) return true;
int [] length = new int [1];
int status = OS.GetEventParameter (theEvent, OS.kEventParamKeyUnicodes, OS.typeUnicodeText, null, 4, length, (char[])null);
if (status == OS.noErr && length [0] > 2) {
@@ -1834,8 +1834,8 @@ int setBounds (int control, int x, int y, int width, int height, boolean move, b
*/
public void setData (Object data) {
checkWidget();
- if (SAFARI_EVENTS_FIX_KEY.equals(data)) {
- state |= SAFARI_EVENTS_FIX;
+ if (WEBKIT_EVENTS_FIX_KEY.equals(data)) {
+ state |= WEBKIT_EVENTS_FIX;
return;
}
if ((state & KEYED_DATA) != 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index a6f811461b..88dc8f84d4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -1224,7 +1224,7 @@ void fixFocus (Control focusControl) {
void flagsChanged (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
if (hasKeyboardFocus(id)) {
- if ((state & SAFARI_EVENTS_FIX) == 0) {
+ if ((state & WEBKIT_EVENTS_FIX) == 0) {
Shell s = this.getShell();
s.keyInputHappened = false;
int mask = 0;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index b5f2dc7b49..ed25eac48e 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -79,9 +79,9 @@ public abstract class Widget {
static final int FOREIGN_HANDLE = 1<<17;
static final int DRAG_DETECT = 1<<18;
- /* Safari fixes */
- static final int SAFARI_EVENTS_FIX = 1<<19;
- static final String SAFARI_EVENTS_FIX_KEY = "org.eclipse.swt.internal.safariEventsFix"; //$NON-NLS-1$
+ /* WebKit fixes */
+ static final int WEBKIT_EVENTS_FIX = 1<<19;
+ static final String WEBKIT_EVENTS_FIX_KEY = "org.eclipse.swt.internal.webKitEventsFix"; //$NON-NLS-1$
static final String GLCONTEXT_KEY = "org.eclipse.swt.internal.cocoa.glcontext"; //$NON-NLS-1$
static final String IS_ACTIVE = "org.eclipse.swt.internal.isActive"; //$NON-NLS-1$
@@ -1394,7 +1394,7 @@ void sendEvent (int eventType, Event event, boolean send) {
}
boolean sendKeyEvent (NSEvent nsEvent, int type) {
- if ((state & SAFARI_EVENTS_FIX) != 0) return true;
+ if ((state & WEBKIT_EVENTS_FIX) != 0) return true;
Event event = new Event ();
if (!setKeyState (event, type, nsEvent)) return true;
return sendKeyEvent (type, event);
@@ -1467,8 +1467,8 @@ void sendVerticalSelection () {
*/
public void setData (Object data) {
checkWidget();
- if (SAFARI_EVENTS_FIX_KEY.equals (data)) {
- state |= SAFARI_EVENTS_FIX;
+ if (WEBKIT_EVENTS_FIX_KEY.equals (data)) {
+ state |= WEBKIT_EVENTS_FIX;
return;
}
if ((state & KEYED_DATA) != 0) {
diff --git a/bundles/org.eclipse.swt/buildFragment.xml b/bundles/org.eclipse.swt/buildFragment.xml
index bf8a20aa66..8e3d891b57 100644
--- a/bundles/org.eclipse.swt/buildFragment.xml
+++ b/bundles/org.eclipse.swt/buildFragment.xml
@@ -135,7 +135,7 @@
<fileset dir="${plugindir}/Eclipse SWT Accessibility/carbon/"/>
<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
<fileset dir="${plugindir}/Eclipse SWT AWT/carbon/"/>
- <fileset dir="${plugindir}/Eclipse SWT Browser/carbon/"/>
+ <fileset dir="${plugindir}/Eclipse SWT WebKit/carbon/"/>
<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Mozilla/carbon/"/>
<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>
@@ -172,7 +172,7 @@
<fileset dir="${plugindir}/Eclipse SWT Accessibility/cocoa/"/>
<fileset dir="${plugindir}/Eclipse SWT AWT/common/"/>
<fileset dir="${plugindir}/Eclipse SWT AWT/cocoa/"/>
- <fileset dir="${plugindir}/Eclipse SWT Browser/cocoa/"/>
+ <fileset dir="${plugindir}/Eclipse SWT WebKit/cocoa/"/>
<fileset dir="${plugindir}/Eclipse SWT Browser/common/"/>
<fileset dir="${plugindir}/Eclipse SWT Mozilla/cocoa/"/>
<fileset dir="${plugindir}/Eclipse SWT Mozilla/common/"/>