这篇教程C++ ASCIILiteral函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ASCIILiteral函数的典型用法代码示例。如果您正苦于以下问题:C++ ASCIILiteral函数的具体用法?C++ ASCIILiteral怎么用?C++ ASCIILiteral使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ASCIILiteral函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: documentvoid SVGSVGElement::parseAttribute(const QualifiedName& name, const AtomicString& value){ if (!nearestViewportElement()) { // For these events, the outermost <svg> element works like a <body> element does, // setting certain event handlers directly on the window object. if (name == HTMLNames::onunloadAttr) { document().setWindowAttributeEventListener(eventNames().unloadEvent, name, value); return; } if (name == HTMLNames::onresizeAttr) { document().setWindowAttributeEventListener(eventNames().resizeEvent, name, value); return; } if (name == HTMLNames::onscrollAttr) { document().setWindowAttributeEventListener(eventNames().scrollEvent, name, value); return; } if (name == SVGNames::onzoomAttr) { document().setWindowAttributeEventListener(eventNames().zoomEvent, name, value); return; } } // For these events, any <svg> element works like a <body> element does, // setting certain event handlers directly on the window object. // FIXME: Why different from the events above that work only on the outermost <svg> element? if (name == HTMLNames::onabortAttr) { document().setWindowAttributeEventListener(eventNames().abortEvent, name, value); return; } if (name == HTMLNames::onerrorAttr) { document().setWindowAttributeEventListener(eventNames().errorEvent, name, value); return; } SVGParsingError parseError = NoError; if (name == SVGNames::xAttr) setXBaseValue(SVGLength::construct(LengthModeWidth, value, parseError)); else if (name == SVGNames::yAttr) setYBaseValue(SVGLength::construct(LengthModeHeight, value, parseError)); else if (name == SVGNames::widthAttr) { SVGLength length = SVGLength::construct(LengthModeWidth, value, parseError, ForbidNegativeLengths); if (parseError != NoError || value.isEmpty()) { // FIXME: This is definitely the correct behavior for a missing/removed attribute. // Not sure it's correct for the empty string or for something that can't be parsed. length = SVGLength(LengthModeWidth, ASCIILiteral("100%")); } setWidthBaseValue(length); } else if (name == SVGNames::heightAttr) { SVGLength length = SVGLength::construct(LengthModeHeight, value, parseError, ForbidNegativeLengths); if (parseError != NoError || value.isEmpty()) { // FIXME: This is definitely the correct behavior for a removed attribute. // Not sure it's correct for the empty string or for something that can't be parsed. length = SVGLength(LengthModeHeight, ASCIILiteral("100%")); } setHeightBaseValue(length); } reportAttributeParsingError(parseError, name, value); SVGExternalResourcesRequired::parseAttribute(name, value); SVGFitToViewBox::parseAttribute(this, name, value); SVGZoomAndPan::parseAttribute(*this, name, value); SVGGraphicsElement::parseAttribute(name, value);}
开发者ID:srinivas-kakarla,项目名称:WebKitForWayland,代码行数:66,
示例2: InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pageAgent) : InspectorBaseAgent<InspectorApplicationCacheAgent>(ASCIILiteral("ApplicationCache"), instrumentingAgents, state) , m_pageAgent(pageAgent) , m_frontend(0){}
开发者ID:webOS-ports,项目名称:webkit,代码行数:6,
示例3: LOGvoid WebSocket::send(const String& message, ExceptionCode& ec){ LOG(Network, "WebSocket %p send() Sending String '%s'", this, message.utf8().data()); if (m_state == CONNECTING) { ec = INVALID_STATE_ERR; return; } // No exception is raised if the connection was once established but has subsequently been closed. if (m_state == CLOSING || m_state == CLOSED) { size_t payloadSize = message.utf8().length(); m_bufferedAmountAfterClose = saturateAdd(m_bufferedAmountAfterClose, payloadSize); m_bufferedAmountAfterClose = saturateAdd(m_bufferedAmountAfterClose, getFramingOverhead(payloadSize)); return; } ASSERT(m_channel); ThreadableWebSocketChannel::SendResult result = m_channel->send(message); if (result == ThreadableWebSocketChannel::InvalidMessage) { scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, ASCIILiteral("Websocket message contains invalid character(s).")); ec = SYNTAX_ERR; return; }}
开发者ID:Wrichik1999,项目名称:webkit,代码行数:22,
示例4: LOGRefPtr<IDBRequest> IDBObjectStore::putOrAdd(JSC::ExecState& state, JSC::JSValue value, RefPtr<IDBKey> key, IndexedDB::ObjectStoreOverwriteMode overwriteMode, InlineKeyCheck inlineKeyCheck, ExceptionCodeWithMessage& ec){ LOG(IndexedDB, "IDBObjectStore::putOrAdd"); if (!m_transaction->isActive()) { ec.code = IDBDatabaseException::TransactionInactiveError; ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is inactive or finished."); return nullptr; } if (m_transaction->isReadOnly()) { ec.code = IDBDatabaseException::ReadOnlyError; ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: The transaction is read-only."); return nullptr; } if (m_deleted) { ec.code = IDBDatabaseException::InvalidStateError; return nullptr; } RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::create(&state, value, nullptr, nullptr); if (state.hadException()) { ec.code = IDBDatabaseException::DataCloneError; ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: An object could not be cloned."); return nullptr; } if (serializedValue->hasBlobURLs()) { // FIXME: Add Blob/File/FileList support ec.code = IDBDatabaseException::DataCloneError; ec.message = ASCIILiteral("Failed to store record in an IDBObjectStore: BlobURLs are not yet supported."); return nullptr; } if (key && key->type() == KeyType::Invalid) { ec.code = IDBDatabaseException::DataError; return nullptr; } bool usesInlineKeys = !m_info.keyPath().isNull(); bool usesKeyGenerator = autoIncrement(); if (usesInlineKeys && inlineKeyCheck == InlineKeyCheck::Perform) { if (key) { ec.code = IDBDatabaseException::DataError; return nullptr; } RefPtr<IDBKey> keyPathKey = maybeCreateIDBKeyFromScriptValueAndKeyPath(state, value, m_info.keyPath()); if (keyPathKey && !keyPathKey->isValid()) { ec.code = IDBDatabaseException::DataError; return nullptr; } if (!keyPathKey) { if (usesKeyGenerator) { if (!canInjectIDBKeyIntoScriptValue(state, value, m_info.keyPath())) { ec.code = IDBDatabaseException::DataError; return nullptr; } } else { ec.code = IDBDatabaseException::DataError; return nullptr; } } if (keyPathKey) { ASSERT(!key); key = keyPathKey; } } else if (!usesKeyGenerator && !key) { ec.code = IDBDatabaseException::DataError; return nullptr; } auto context = scriptExecutionContextFromExecState(&state); if (!context) { ec.code = IDBDatabaseException::UnknownError; return nullptr; } Ref<IDBRequest> request = m_transaction->requestPutOrAdd(*context, *this, key.get(), *serializedValue, overwriteMode); return adoptRef(request.leakRef());}
开发者ID:josedealcala,项目名称:webkit,代码行数:84,
示例5: toPropertyDescriptor// ES5 8.10.5 ToPropertyDescriptorstatic bool toPropertyDescriptor(ExecState* exec, JSValue in, PropertyDescriptor& desc){ if (!in.isObject()) { exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Property description must be an object."))); return false; } JSObject* description = asObject(in); PropertySlot enumerableSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().enumerable, enumerableSlot)) { desc.setEnumerable(enumerableSlot.getValue(exec, exec->propertyNames().enumerable).toBoolean(exec)); if (exec->hadException()) return false; } PropertySlot configurableSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().configurable, configurableSlot)) { desc.setConfigurable(configurableSlot.getValue(exec, exec->propertyNames().configurable).toBoolean(exec)); if (exec->hadException()) return false; } JSValue value; PropertySlot valueSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().value, valueSlot)) { desc.setValue(valueSlot.getValue(exec, exec->propertyNames().value)); if (exec->hadException()) return false; } PropertySlot writableSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().writable, writableSlot)) { desc.setWritable(writableSlot.getValue(exec, exec->propertyNames().writable).toBoolean(exec)); if (exec->hadException()) return false; } PropertySlot getSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().get, getSlot)) { JSValue get = getSlot.getValue(exec, exec->propertyNames().get); if (exec->hadException()) return false; if (!get.isUndefined()) { CallData callData; if (getCallData(get, callData) == CallTypeNone) { exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Getter must be a function."))); return false; } } desc.setGetter(get); } PropertySlot setSlot(description); if (description->getPropertySlot(exec, exec->propertyNames().set, setSlot)) { JSValue set = setSlot.getValue(exec, exec->propertyNames().set); if (exec->hadException()) return false; if (!set.isUndefined()) { CallData callData; if (getCallData(set, callData) == CallTypeNone) { exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Setter must be a function."))); return false; } } desc.setSetter(set); } if (!desc.isAccessorDescriptor()) return true; if (desc.value()) { exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Invalid property. 'value' present on property with getter or setter."))); return false; } if (desc.writablePresent()) { exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Invalid property. 'writable' present on property with getter or setter."))); return false; } return true;}
开发者ID:CannedFish,项目名称:webkit,代码行数:82,
示例6: WebViewDidEndEditingNotificationvoid WebEditorClient::didEndEditing(){ static NeverDestroyed<String> WebViewDidEndEditingNotification(ASCIILiteral("WebViewDidEndEditingNotification")); m_page->injectedBundleEditorClient().didEndEditing(m_page, WebViewDidEndEditingNotification.get().impl()); notImplemented();}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:6,
示例7: constructJSReadableStreamControllerEncodedJSValue JSC_HOST_CALL constructJSReadableStreamController(ExecState* exec){ return throwVMError(exec, createTypeError(exec, ASCIILiteral("ReadableStreamController constructor should not be called directly")));}
开发者ID:AlanWasTaken,项目名称:webkit,代码行数:4,
示例8: showMainResourceForFramevoid WebInspectorUI::showMainResourceForFrame(const String& frameIdentifier){ m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showMainResourceForFrame"), frameIdentifier);}
开发者ID:zosimos,项目名称:webkit,代码行数:4,
示例9: stopPageProfilingvoid WebInspectorUI::stopPageProfiling(){ m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setTimelineProfilingEnabled"), false);}
开发者ID:zosimos,项目名称:webkit,代码行数:4,
示例10: showConsolevoid WebInspectorUI::showConsole(){ m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showConsole"));}
开发者ID:zosimos,项目名称:webkit,代码行数:4,
示例11: showResourcesvoid WebInspectorUI::showResources(){ m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("showResources"));}
开发者ID:zosimos,项目名称:webkit,代码行数:4,
示例12: setDockingUnavailablevoid WebInspectorUI::setDockingUnavailable(bool unavailable){ m_frontendAPIDispatcher.dispatchCommand(ASCIILiteral("setDockingUnavailable"), unavailable); m_dockingUnavailable = unavailable;}
开发者ID:zosimos,项目名称:webkit,代码行数:5,
示例13: canonicalizeLocaleListvoid IntlCollator::initializeCollator(ExecState& state, JSValue locales, JSValue optionsValue){ // 10.1.1 InitializeCollator (collator, locales, options) (ECMA-402 2.0) // 1. If collator has an [[initializedIntlObject]] internal slot with value true, throw a TypeError exception. // 2. Set collator.[[initializedIntlObject]] to true. // 3. Let requestedLocales be CanonicalizeLocaleList(locales). auto requestedLocales = canonicalizeLocaleList(state, locales); // 4. ReturnIfAbrupt(requestedLocales). if (state.hadException()) return; // 5. If options is undefined, then JSObject* options; if (optionsValue.isUndefined()) { // a. Let options be ObjectCreate(%ObjectPrototype%). options = constructEmptyObject(&state); } else { // 6. Else // a. Let options be ToObject(options). options = optionsValue.toObject(&state); // b. ReturnIfAbrupt(options). if (state.hadException()) return; } // 7. Let u be GetOption(options, "usage", "string", C++ ASET函数代码示例 C++ AS3_ReturnAS3Var函数代码示例
|