PassRefPtr<SVGViewElement> SVGViewElement::create(const QualifiedName& tagName, Document* document) { return adoptRef(new SVGViewElement(tagName, document)); }
Ref<MutationRecord> MutationRecord::createAttributes(Element& target, const QualifiedName& name, const AtomicString& oldValue) { return adoptRef(static_cast<MutationRecord&>(*new AttributesRecord(target, name, oldValue))); }
Ref<MutationRecord> MutationRecord::createWithNullOldValue(MutationRecord& record) { return adoptRef(static_cast<MutationRecord&>(*new MutationRecordWithNullOldValue(record))); }
PassRefPtr<CachedPage> CachedPage::create(Page* page) { return adoptRef(new CachedPage(page)); }
PassRefPtr<Worklist> Worklist::create(unsigned numberOfThreads) { RefPtr<Worklist> result = adoptRef(new Worklist()); result->finishCreation(numberOfThreads); return result; }
PassRefPtr<FEBlend> FEBlend::create(Filter* filter, WebBlendMode mode) { return adoptRef(new FEBlend(filter, mode)); }
PassRefPtr<NotificationCenter> NotificationCenter::create(ScriptExecutionContext* context, NotificationClient* client) { RefPtr<NotificationCenter> notificationCenter(adoptRef(new NotificationCenter(context, client))); notificationCenter->suspendIfNeeded(); return notificationCenter.release(); }
PassRefPtr<IDBDatabase> IDBDatabase::create(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseBackendInterface> database) { RefPtr<IDBDatabase> idbDatabase(adoptRef(new IDBDatabase(context, database))); idbDatabase->suspendIfNeeded(); return idbDatabase.release(); }
PassRefPtr<FEDropShadow> FEDropShadow::create(Filter* filter, float stdX, float stdY, float dx, float dy, const Color& shadowColor, float shadowOpacity) { return adoptRef(new FEDropShadow(filter, stdX, stdY, dx, dy, shadowColor, shadowOpacity)); }
PassRefPtr<WebProcessConnection> WebProcessConnection::create(IPC::Connection::Identifier connectionIdentifier) { return adoptRef(new WebProcessConnection(connectionIdentifier)); }
PassRefPtr<SearchPopupMenu> ChromeClientImpl::createSearchPopupMenu(PopupMenuClient* client) const { return adoptRef(new SearchPopupMenuChromium(client)); }
Ref<IDBDatabase> IDBDatabase::create(ScriptExecutionContext& context, IDBConnectionToServer& connection, const IDBResultData& resultData) { return adoptRef(*new IDBDatabase(context, connection, resultData)); }
PassRefPtr<JSGlobalData> JSGlobalData::create(ThreadStackType type) { return adoptRef(new JSGlobalData(Default, type)); }
PassRefPtr<JSGlobalData> JSGlobalData::createContextGroup(ThreadStackType type) { return adoptRef(new JSGlobalData(APIContextGroup, type)); }
PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize size) { return adoptRef(new Scrollbar(scrollableArea, orientation, size)); }
NativeImagePtr ImageFrame::asNewNativeImage() const { return adoptRef(cairo_image_surface_create_for_data( reinterpret_cast<unsigned char*>(const_cast<PixelData*>(m_bytes)), CAIRO_FORMAT_ARGB32, width(), height(), width() * sizeof(PixelData))); }
PassRefPtr<WebHitTestResult> WebHitTestResult::create(const WebHitTestResult::Data& hitTestResultData) { return adoptRef(new WebHitTestResult(hitTestResultData)); }
PassRefPtr<ScrollbarLayerChromium> ScrollbarLayerChromium::create(Scrollbar* scrollbar, int scrollLayerId) { return adoptRef(new ScrollbarLayerChromium(scrollbar, scrollLayerId)); }
PassRefPtr<NotificationCenter::NotificationRequestCallback> NotificationCenter::NotificationRequestCallback::createAndStartTimer(NotificationCenter* center, PassRefPtr<VoidCallback> callback) { RefPtr<NotificationCenter::NotificationRequestCallback> requestCallback = adoptRef(new NotificationCenter::NotificationRequestCallback(center, callback)); requestCallback->startTimer(); return requestCallback.release(); }
void DocumentThreadableLoader::loadResourceSynchronously(Document* document, const ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoaderOptions& options) { // The loader will be deleted as soon as this function exits. RefPtr<DocumentThreadableLoader> loader = adoptRef(new DocumentThreadableLoader(document, &client, LoadSynchronously, request, options)); ASSERT(loader->hasOneRef()); }
Ref<AudioBufferSourceNode> AudioBufferSourceNode::create(AudioContext* context, float sampleRate) { return adoptRef(*new AudioBufferSourceNode(context, sampleRate)); }
PassRefPtr<MediaValues> MediaValuesDynamic::create(LocalFrame* frame) { if (!frame || !frame->view() || !frame->document() || !frame->document()->renderView()) return MediaValuesCached::create(); return adoptRef(new MediaValuesDynamic(frame)); }
PassRefPtr<SVGAnimateColorElement> SVGAnimateColorElement::create(const QualifiedName& tagName, Document& document) { return adoptRef(new SVGAnimateColorElement(tagName, document)); }
PassRefPtr<MediaValues> MediaValuesDynamic::copy() const { return adoptRef(new MediaValuesDynamic(m_frame)); }
Ref<MutationRecord> MutationRecord::createChildList(ContainerNode& target, Ref<NodeList>&& added, Ref<NodeList>&& removed, RefPtr<Node>&& previousSibling, RefPtr<Node>&& nextSibling) { return adoptRef(static_cast<MutationRecord&>(*new ChildListRecord(target, WTFMove(added), WTFMove(removed), WTFMove(previousSibling), WTFMove(nextSibling)))); }
WebContextMenuItem* WebContextMenuItem::separatorItem() { DEFINE_STATIC_LOCAL(WebContextMenuItem*, separatorItem, (adoptRef(new WebContextMenuItem(WebContextMenuItemData(WebCore::SeparatorType, WebCore::ContextMenuItemTagNoAction, String(), true, false))).leakRef())); return separatorItem; }
Ref<MutationRecord> MutationRecord::createCharacterData(CharacterData& target, const String& oldValue) { return adoptRef(static_cast<MutationRecord&>(*new CharacterDataRecord(target, oldValue))); }
Ref<SVGLineElement> SVGLineElement::create(const QualifiedName& tagName, Document& document) { return adoptRef(*new SVGLineElement(tagName, document)); }
PassRefPtr<MediaElementAudioSourceHandler> MediaElementAudioSourceHandler::create(AudioNode& node, HTMLMediaElement& mediaElement) { return adoptRef(new MediaElementAudioSourceHandler(node, mediaElement)); }
void delayedStartBlobResourceHandle(void* context) { RefPtr<BlobResourceHandle> handle = adoptRef(static_cast<BlobResourceHandle*>(context)); handle->doStart(); }