static void networkStateChanged() { Vector<RefPtr<Frame> > frames; // Get all the frames of all the pages in all the page groups if(allPages) // Added by Paul Pedriana, 1/2009. { HashSet<Page*>::iterator end = allPages->end(); for (HashSet<Page*>::iterator it = allPages->begin(); it != end; ++it) { for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) frames.append(frame); } } //+daw ca 30/07/2008 static and global management AtomicString eventName = NetworkStateNotifier::networkStateNotifier()->onLine() ? eventNames().onlineEvent : eventNames().offlineEvent; //-daw ca for (unsigned i = 0; i < frames.size(); i++) { Document* document = frames[i]->document(); if (!document) continue; // If the document does not have a body the event should be dispatched to the document EventTargetNode* eventTarget = document->body(); if (!eventTarget) eventTarget = document; eventTarget->dispatchHTMLEvent(eventName, false, false); } }
static void networkStateChanged() { Vector<RefPtr<Frame> > frames; // Get all the frames of all the pages in all the page groups HashSet<Page*>::iterator end = allPages->end(); for (HashSet<Page*>::iterator it = allPages->begin(); it != end; ++it) { for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) frames.append(frame); } AtomicString eventName = networkStateNotifier().onLine() ? onlineEvent : offlineEvent; for (unsigned i = 0; i < frames.size(); i++) { Document* document = frames[i]->document(); if (!document) continue; // If the document does not have a body the event should be dispatched to the document EventTargetNode* eventTarget = document->body(); if (!eventTarget) eventTarget = document; eventTarget->dispatchHTMLEvent(eventName, false, false); } }