log.fine("current frame " + iframe.getNodeId() + " is gone.Parent = " + parent);
List<ChildIframeInserted> newOnes = eventHistory.getInsertedFrames(parent);
if (newOnes.size() == 0) {
return;
} else if (newOnes.size() == 1) {
Event newFrame = newOnes.get(0);
assignNewFrameFromEvent((ChildIframeInserted) newFrame);
eventHistory.removeEvent(newFrame);
} else {
log.warning(
"there should be only 1 newly created frame with parent =" + parent + ". Found "
+ newOnes.size());
}
}
return;
}
if (e instanceof ChildIframeInserted) {
ChildIframeInserted newFrame = (ChildIframeInserted) e;
// are we waiting for something ?
if (isReady) {
eventHistory.add(newFrame);
return;
} else {
// is it the new node we're looking for ?
if (parent.equals(newFrame.getParent())) {
if (log.isLoggable(Level.FINE))
log.fine("the new node is here :" + newFrame.getNode());
assignNewFrameFromEvent(newFrame);
}
}
}
} catch (Exception ex) {