本文整理汇总了C++中AtomicString::is8Bit方法的典型用法代码示例。如果您正苦于以下问题:C++ AtomicString::is8Bit方法的具体用法?C++ AtomicString::is8Bit怎么用?C++ AtomicString::is8Bit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AtomicString
的用法示例。
在下文中一共展示了AtomicString::is8Bit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseAttribute
void SVGGlyphRefElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
if (value.isEmpty() || value.is8Bit())
parseAttributeInternal<LChar>(name, value);
else
parseAttributeInternal<UChar>(name, value);
}
示例2: parseSizesAttribute
void HTMLLinkElement::parseSizesAttribute(const AtomicString& value, Vector<IntSize>& iconSizes)
{
ASSERT(iconSizes.isEmpty());
if (value.isEmpty())
return;
if (value.is8Bit())
parseSizes(value.characters8(), value.length(), iconSizes);
else
parseSizes(value.characters16(), value.length(), iconSizes);
}
示例3: parseQualifiedName
bool Document::parseQualifiedName(const AtomicString& qualifiedName, AtomicString& prefix, AtomicString& localName, ExceptionState& exceptionState)
{
unsigned length = qualifiedName.length();
if (!length) {
exceptionState.ThrowDOMException(InvalidCharacterError, "The qualified name provided is empty.");
return false;
}
if (qualifiedName.is8Bit())
return parseQualifiedNameInternal(qualifiedName, qualifiedName.characters8(), length, prefix, localName, exceptionState);
return parseQualifiedNameInternal(qualifiedName, qualifiedName.characters16(), length, prefix, localName, exceptionState);
}
示例4: nameToPseudoType
static CSSSelector::PseudoType nameToPseudoType(const AtomicString& name)
{
if (name.isNull() || !name.is8Bit())
return CSSSelector::PseudoUnknown;
const NameToPseudoStruct* pseudoTypeMapEnd = pseudoTypeMap + WTF_ARRAY_LENGTH(pseudoTypeMap);
NameToPseudoStruct dummyKey = { 0, CSSSelector::PseudoUnknown };
const NameToPseudoStruct* match = std::lower_bound(pseudoTypeMap, pseudoTypeMapEnd, dummyKey, NameToPseudoCompare(name));
if (match == pseudoTypeMapEnd || match->string != name.string())
return CSSSelector::PseudoUnknown;
return static_cast<CSSSelector::PseudoType>(match->type);
}
示例5: containsHTMLSpace
static inline bool containsHTMLSpace(const AtomicString& string)
{
if (LIKELY(string.is8Bit()))
return containsHTMLSpaceTemplate<LChar>(string.characters8(), string.length());
return containsHTMLSpaceTemplate<UChar>(string.characters16(), string.length());
}