e.display.update();
		public void handleEvent(Event e) {			switch (e.type) {				case SWT.Dispose: {					Shell shell = getShell();					shell.removeListener(SWT.Resize, this);					shell.removeListener(SWT.Show, this);					shell.removeListener(SWT.Hide, this);					Control c = Browser.this;					do {						c.removeListener(SWT.Show, this);						c.removeListener(SWT.Hide, this);						c = c.getParent();					} while (c != shell);										e.display.setData(ADD_WIDGET_KEY, new Object[] {new Integer(webViewHandle), null});					WebKit.objc_msgSend(webView, WebKit.S_setFrameLoadDelegate, 0);					WebKit.objc_msgSend(webView, WebKit.S_setResourceLoadDelegate, 0);					WebKit.objc_msgSend(webView, WebKit.S_setUIDelegate, 0);					WebKit.objc_msgSend(webView, WebKit.S_setPolicyDelegate, 0);					WebKit.objc_msgSend(notificationCenter, WebKit.S_removeObserver, delegate);										WebKit.objc_msgSend(delegate, WebKit.S_release);										break;				}				case SWT.Hide: {					/*					* Bug on Safari. 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 Hide and Show events on the browser's parents					* and set its size to 0 in Hide and to restore its size in Show.					*/					CGRect bounds = new CGRect();					bounds.x = bounds.y = -MIN_SIZE;					bounds.width = bounds.height = MIN_SIZE;					OS.HIViewSetFrame(webViewHandle, bounds);					break;				}				case SWT.Show: {					/*					* Bug on Safari. 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 Hide and Show events on the browser's parents					* and set its size to 0 in Hide and to restore its size in Show.					*/					CGRect bounds = new CGRect();					OS.HIViewGetFrame(handle, bounds);					/* 					* Bug in Safari.  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. 					*/					if (bounds.width <= MIN_SIZE) bounds.width = MIN_SIZE;					if (bounds.height <= MIN_SIZE) bounds.height = MIN_SIZE;					OS.HIViewSetFrame(webViewHandle, bounds);					break;				}				case SWT.Resize: {					/* Do not update size when it is not visible */					if (!isVisible()) return;					/*					* Bug on Safari. 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					* bottom left corner of a window instead of the coordinates system used					* in Carbon that starts at the top left corner. The workaround is to					* reposition the web view every time the Shell of the Browser is resized.					*/					CGRect bounds = new CGRect();					OS.HIViewGetFrame(handle, bounds);					/* 					* Bug in Safari.  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. 					*/					if (bounds.width <= MIN_SIZE) bounds.width = MIN_SIZE;					if (bounds.height <= MIN_SIZE) bounds.height = MIN_SIZE;					OS.HIViewSetFrame(webViewHandle, bounds);					/*					* Bug on Webkit. Resizing a Cocoa WebView in a Carbon window does not					* redraw the new area of the WebView. The workaround is to call Display.update.					* That call invokes UpdateControls on the Carbon window and that causes the					* Cocoa view to redraw correctly.					*/					e.display.update();					break;				}			}		}