Browser browser = (Browser) event.getSource();
if (browser.getData("navigation") != null //$NON-NLS-1$
&& browser.getData("navigation").equals("true")) //$NON-NLS-1$ //$NON-NLS-2$
return;
IntroModelRoot model = implementation.getModel();
IntroURLParser parser = new IntroURLParser(url);
if (!parser.hasProtocol() || parser.getHost() == null
|| parser.getHost().equals("")) //$NON-NLS-1$
// This will filter out two navigation events fired by the browser
// on a setText. (about:blank and
// res://C:\WINDOWS\System32\shdoclc.dll/navcancl.htm on windows,
// and file:/// on Linux)
return;
if (model.isDynamic()) {
// Update the history even with real URLs. Note that if we have
// multiple embedded URL navigations due to frames, the
// frameNavigation flag filters them. This flag is set here, and is
// cleared by a progress listener, when all the frame navigation is
// completed. We need to update history only in dynamic case. In
// static case, the browser keeps the history.
if (browser.getData("frameNavigation") != null) { //$NON-NLS-1$
// this is at least the second frame navigation, remove last
// history since it was added just as a filler.
if (event.top == false && browser.getData("tempUrl") != null //$NON-NLS-1$
&& browser.getData("tempUrl").equals("true")) { //$NON-NLS-1$ //$NON-NLS-2$
implementation.getHistory().removeLastHistory();
flagRemovedTempUrl();
}
}
if (event.top == true) {
// we are navigating to a regular fully qualified URL. Event.top
// is true.
flagStartOfFrameNavigation();
implementation.updateHistory(url);
}
if (browser.getData("frameNavigation") == null //$NON-NLS-1$
&& event.top == false) {
// a new url navigation that is not in a top frame. It can
// be a navigation url due to frames, it can be due to a true
// single Frame navigation (when you click on a link inside a
// Frame) or it is an embedded Help System topic navigation.
AbstractIntroPage currentPage = model.getCurrentPage();
if (currentPage.isIFramePage()) {
// it is an embedded Help System topic navigation. we are
// navigating to an injected iframe since event.top is
// false. Set the iframe url of the current iframe page, and
// add it