void PlugInAutoStartProvider::setAutoStartOriginsArray(ImmutableArray& originList) { m_autoStartOrigins.clear(); for (size_t i = 0, length = originList.size(); i < length; ++i) { if (originList.at(i)->type() != WebString::APIType) continue; m_autoStartOrigins.append(static_cast<WebString*>(originList.at(i))->string()); } }
WebTouchEvent WebEventFactory::createWebTouchEvent(const EwkTouchEvent* event, const AffineTransform& toWebContent) { ImmutableArray* touchPointsArray = toImpl(event->touchPoints()); size_t size = touchPointsArray->size(); Vector<WebPlatformTouchPoint> touchPoints; touchPoints.reserveInitialCapacity(size); for (size_t i = 0; i < size; ++i) { if (EwkTouchPoint* point = touchPointsArray->at<EwkTouchPoint>(i)) touchPoints.uncheckedAppend(WebPlatformTouchPoint(point->id(), toWebPlatformTouchPointState(point->state()), toIntPoint(point->screenPosition()), toWebContent.mapPoint(toIntPoint(point->position())), toIntSize(point->radius()), point->rotationAngle(), point->forceFactor())); } return WebTouchEvent(toWebEventType(event->eventType()), touchPoints, toWebEventModifiers(event->modifiers()), event->timestamp()); }
// Visit each user for V (== Visitor.V), looking for live users that will require // us to synthesise V. void IntegrationAttempt::visitUsers(ShadowValue V, DIVisitor& Visitor) { ImmutableArray<ShadowInstIdx>* Users; if(V.isInst()) { Users = &(V.getInst()->invar->userIdxs); } else { Users = &(V.getArg()->invar->userIdxs); } for(uint32_t i = 0; i < Users->size() && Visitor.shouldContinue(); ++i) { visitUser((*Users)[i], Visitor); } }
static void webkitCookieManagerGetDomainsWithCookiesCallback(WKArrayRef wkDomains, WKErrorRef, void* context) { GRefPtr<GTask> task = adoptGRef(G_TASK(context)); if (g_task_return_error_if_cancelled(task.get())) return; ImmutableArray* domains = toImpl(wkDomains); GPtrArray* returnValue = g_ptr_array_sized_new(domains->size()); for (size_t i = 0; i < domains->size(); ++i) { WebString* domainString = static_cast<WebString*>(domains->at(i)); String domain = domainString->string(); if (domain.isEmpty()) continue; g_ptr_array_add(returnValue, g_strdup(domain.utf8().data())); } g_ptr_array_add(returnValue, 0); g_task_return_pointer(task.get(), g_ptr_array_free(returnValue, FALSE), reinterpret_cast<GDestroyNotify>(g_strfreev)); }