本文整理汇总了C++中HTMLOptionElement::isDisabledFormControl方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLOptionElement::isDisabledFormControl方法的具体用法?C++ HTMLOptionElement::isDisabledFormControl怎么用?C++ HTMLOptionElement::isDisabledFormControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLOptionElement
的用法示例。
在下文中一共展示了HTMLOptionElement::isDisabledFormControl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: isMatchingElement
template <> inline bool isMatchingElement(const HTMLCollection* htmlCollection, Element* element)
{
CollectionType type = htmlCollection->type();
if (!element->isHTMLElement() && !(type == DocAll || type == NodeChildren || type == WindowNamedItems))
return false;
switch (type) {
case DocImages:
return element->hasLocalName(imgTag);
case DocScripts:
return element->hasLocalName(scriptTag);
case DocForms:
return element->hasLocalName(formTag);
case TableTBodies:
return element->hasLocalName(tbodyTag);
case TRCells:
return element->hasLocalName(tdTag) || element->hasLocalName(thTag);
case TSectionRows:
return element->hasLocalName(trTag);
case SelectOptions:
return element->hasLocalName(optionTag);
case SelectedOptions:
return element->hasLocalName(optionTag) && toHTMLOptionElement(element)->selected();
case DataListOptions:
if (element->hasLocalName(optionTag)) {
HTMLOptionElement* option = toHTMLOptionElement(element);
if (!option->isDisabledFormControl() && !option->value().isEmpty())
return true;
}
return false;
case MapAreas:
return element->hasLocalName(areaTag);
case DocApplets:
return element->hasLocalName(appletTag) || (element->hasLocalName(objectTag) && static_cast<HTMLObjectElement*>(element)->containsJavaApplet());
case DocEmbeds:
return element->hasLocalName(embedTag);
case DocLinks:
return (element->hasLocalName(aTag) || element->hasLocalName(areaTag)) && element->fastHasAttribute(hrefAttr);
case DocAnchors:
return element->hasLocalName(aTag) && element->fastHasAttribute(nameAttr);
case DocAll:
case NodeChildren:
return true;
case DocumentNamedItems:
return static_cast<const DocumentNameCollection*>(htmlCollection)->nodeMatches(element);
case WindowNamedItems:
return static_cast<const WindowNameCollection*>(htmlCollection)->nodeMatches(element);
case FormControls:
case TableRows:
case ChildNodeListType:
case ClassNodeListType:
case NameNodeListType:
case TagNodeListType:
case HTMLTagNodeListType:
case RadioNodeListType:
case LabelsNodeListType:
ASSERT_NOT_REACHED();
}
return false;
}
示例2: addOption
void PopupMenuImpl::addOption(HTMLOptionElement& element, bool enableExtraStyling, SharedBuffer* data)
{
PagePopupClient::addString("{\n", data);
PagePopupClient::addString("type: \"option\",\n", data);
addProperty("label", element.text(), data);
addProperty("title", element.title(), data);
addProperty("value", element.listIndex(), data);
addProperty("ariaLabel", element.fastGetAttribute(HTMLNames::aria_labelAttr), data);
addProperty("disabled", element.isDisabledFormControl(), data);
addElementStyle(element, enableExtraStyling, data);
PagePopupClient::addString("},\n", data);
}
示例3: addOption
void PopupMenuImpl::addOption(ItemIterationContext& context, HTMLOptionElement& element)
{
SharedBuffer* data = context.m_buffer;
PagePopupClient::addString("{", data);
addProperty("label", element.displayLabel(), data);
addProperty("value", context.m_listIndex, data);
if (!element.title().isEmpty())
addProperty("title", element.title(), data);
const AtomicString& ariaLabel = element.fastGetAttribute(HTMLNames::aria_labelAttr);
if (!ariaLabel.isEmpty())
addProperty("ariaLabel", ariaLabel, data);
if (element.isDisabledFormControl())
addProperty("disabled", true, data);
addElementStyle(context, element);
PagePopupClient::addString("},", data);
}