当前位置: 首页>>代码示例>>C++>>正文


C++ HTMLOListElement类代码示例

本文整理汇总了C++中HTMLOListElement的典型用法代码示例。如果您正苦于以下问题:C++ HTMLOListElement类的具体用法?C++ HTMLOListElement怎么用?C++ HTMLOListElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HTMLOListElement类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: enclosingList

void RenderListItem::updateListMarkerNumbers()
{
    // If distribution recalc is needed, updateListMarkerNumber will be re-invoked
    // after distribution is calculated.
    if (node()->document().childNeedsDistributionRecalc())
        return;

    Node* listNode = enclosingList(this);
    ASSERT(listNode);

    bool isListReversed = false;
    HTMLOListElement* oListElement = isHTMLOListElement(listNode) ? toHTMLOListElement(listNode) : 0;
    if (oListElement) {
        oListElement->itemCountChanged();
        isListReversed = oListElement->isReversed();
    }

    // FIXME: The n^2 protection below doesn't help if the elements were inserted after the
    // the list had already been displayed.

    // Avoid an O(n^2) walk over the children below when they're all known to be attaching.
    if (listNode->needsAttach())
        return;

    for (RenderListItem* item = previousOrNextItem(isListReversed, listNode, this); item; item = previousOrNextItem(isListReversed, listNode, item)) {
        if (!item->m_isValueUpToDate) {
            // If an item has been marked for update before, we can safely
            // assume that all the following ones have too.
            // This gives us the opportunity to stop here and avoid
            // marking the same nodes again.
            break;
        }
        item->updateValue();
    }
}
开发者ID:kjthegod,项目名称:WebKit,代码行数:35,代码来源:RenderListItem.cpp

示例2: enclosingList

void RenderListItem::updateListMarkerNumbers()
{
    // If distribution recalc is needed, updateListMarkerNumber will be re-invoked
    // after distribution is calculated.
    if (node()->document().childNeedsDistributionRecalc())
        return;

    Node* listNode = enclosingList(this);
    // The list node can be the shadow root which has no renderer.
    ASSERT(listNode);
    if (!listNode)
        return;

    bool isListReversed = false;
    HTMLOListElement* oListElement = isHTMLOListElement(listNode) ? toHTMLOListElement(listNode) : 0;
    if (oListElement) {
        oListElement->itemCountChanged();
        isListReversed = oListElement->isReversed();
    }
    for (RenderListItem* item = previousOrNextItem(isListReversed, listNode, this); item; item = previousOrNextItem(isListReversed, listNode, item)) {
        if (!item->m_isValueUpToDate) {
            // If an item has been marked for update before, we can safely
            // assume that all the following ones have too.
            // This gives us the opportunity to stop here and avoid
            // marking the same nodes again.
            break;
        }
        item->updateValue();
    }
}
开发者ID:jeremyroman,项目名称:blink,代码行数:30,代码来源:RenderListItem.cpp

示例3: enclosingList

void RenderListItem::updateListMarkerNumbers()
{
    Node* listNode = enclosingList(this);
    // The list node can be the shadow root which has no renderer.
    ASSERT(listNode);
    if (!listNode)
        return;

    bool isListReversed = false;
    HTMLOListElement* oListElement = (listNode && listNode->hasTagName(olTag)) ? toHTMLOListElement(listNode) : 0;
    if (oListElement) {
        oListElement->itemCountChanged();
        isListReversed = oListElement->isReversed();
    }
    for (RenderListItem* item = previousOrNextItem(isListReversed, listNode, this); item; item = previousOrNextItem(isListReversed, listNode, item)) {
        if (!item->m_isValueUpToDate) {
            // If an item has been marked for update before, we can safely
            // assume that all the following ones have too.
            // This gives us the opportunity to stop here and avoid
            // marking the same nodes again.
            break;
        }
        item->updateValue();
    }
}
开发者ID:glenkim-dev,项目名称:blink-crosswalk,代码行数:25,代码来源:RenderListItem.cpp

示例4: jsHTMLOListElementType

JSValue jsHTMLOListElementType(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::typeAttr));
    return result;
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:8,代码来源:JSHTMLOListElement.cpp

示例5: jsHTMLOListElementStart

JSValue jsHTMLOListElementStart(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    JSValue result = jsNumber(exec, imp->start());
    return result;
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:8,代码来源:JSHTMLOListElement.cpp

示例6: jsHTMLOListElementCompact

JSValue jsHTMLOListElementCompact(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::compactAttr));
    return result;
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:8,代码来源:JSHTMLOListElement.cpp

示例7: enclosingList

inline int RenderListItem::calcValue() const
{
    if (m_hasExplicitValue)
        return m_explicitValue;
    Node* list = enclosingList(this);
    RenderObject* listRenderer = list ? list->renderer() : 0;
    HTMLOListElement* oListElement = (list && list->hasTagName(olTag)) ? static_cast<HTMLOListElement*>(list) : 0;
    int valueStep = 1;
    if (oListElement && oListElement->isReversed())
        valueStep = -1;

    // FIXME: This recurses to a possible depth of the length of the list.
    // That's not good -- we need to change this to an iterative algorithm.
    if (RenderListItem* previousItem = previousListItem(listRenderer, this))
        return previousItem->value() + valueStep;

    if (oListElement)
        return oListElement->start();

    return 1;
}
开发者ID:johnwpoliver,项目名称:Samsung-GT-P3113-AOSP-CM-Kernel-and-Ramdisk,代码行数:21,代码来源:RenderListItem.cpp

示例8: switch

void JSHTMLOListElement::putValueProperty(ExecState* exec, int token, JSValue* value)
{
    switch (token) {
    case CompactAttrNum: {
        HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
        imp->setCompact(value->toBoolean(exec));
        break;
    }
    case StartAttrNum: {
        HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
        imp->setStart(value->toInt32(exec));
        break;
    }
    case TypeAttrNum: {
        HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
        imp->setType(valueToStringWithNullCheck(exec, value));
        break;
    }
    }
}
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:20,代码来源:JSHTMLOListElement.cpp

示例9: setJSHTMLOListElementType

void setJSHTMLOListElementType(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    imp->setAttribute(WebCore::HTMLNames::typeAttr, valueToStringWithNullCheck(exec, value));
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:6,代码来源:JSHTMLOListElement.cpp

示例10: setJSHTMLOListElementStart

void setJSHTMLOListElementStart(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    imp->setStart(value.toInt32(exec));
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:6,代码来源:JSHTMLOListElement.cpp

示例11: setJSHTMLOListElementCompact

void setJSHTMLOListElementCompact(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLOListElement* castedThis = static_cast<JSHTMLOListElement*>(thisObject);
    HTMLOListElement* imp = static_cast<HTMLOListElement*>(castedThis->impl());
    imp->setBooleanAttribute(WebCore::HTMLNames::compactAttr, value.toBoolean(exec));
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:6,代码来源:JSHTMLOListElement.cpp


注:本文中的HTMLOListElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。