void* ModuleThread::run() { module->event_base = event_base_new(); module->OnLoaded(); if (unloadOnCrash == false || setjmp(jmp_buffer) == 0) { if (unloadOnCrash) { struct sigaction act; bzero(&act, sizeof(act)); sigfillset(&act.sa_mask); act.sa_flags = SA_RESETHAND|SA_SIGINFO; act.sa_sigaction = ModuleThread::CrashHandler; sigaction(SIGABRT, &act, NULL); sigaction(SIGBUS, &act, NULL); sigaction(SIGFPE, &act, NULL); #ifdef SIGILL sigaction(SIGILL, &act, NULL); #endif sigaction(SIGSEGV, &act, NULL); } while (shouldContinue()) event_base_loop(module->event_base, EVLOOP_ONCE); }; return NULL; };
void HTMLMarqueeElement::continueAnimation() { if (!shouldContinue()) return; if (m_player && m_player->playState() == "paused") { m_player->play(); return; } AnimationParameters parameters = getAnimationParameters(); int scrollDelay = this->scrollDelay(); int scrollAmount = this->scrollAmount(); if (scrollDelay < kMinimumScrollDelayMS && !fastHasAttribute(HTMLNames::truespeedAttr)) scrollDelay = kDefaultScrollDelayMS; double duration = 0; if (scrollAmount) duration = parameters.distance * scrollDelay / scrollAmount; if (!duration) return; StringKeyframeEffectModel* effectModel = createEffectModel(parameters); Timing timing; timing.fillMode = Timing::FillMode::FORWARDS; TimingInput::setIterationDuration( timing, UnrestrictedDoubleOrString::fromUnrestrictedDouble(duration), ASSERT_NO_EXCEPTION); KeyframeEffect* keyframeEffect = KeyframeEffect::create(m_mover, effectModel, timing); Animation* player = m_mover->document().timeline().play(keyframeEffect); player->setId(emptyString()); player->setOnfinish(new AnimationFinished(this)); m_player = player; }