本文整理汇总了C++中HTMLOListElement::start方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLOListElement::start方法的具体用法?C++ HTMLOListElement::start怎么用?C++ HTMLOListElement::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLOListElement
的用法示例。
在下文中一共展示了HTMLOListElement::start方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: getValueProperty
JSValue* JSHTMLOListElement::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case CompactAttrNum: {
HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
return jsBoolean(imp->compact());
}
case StartAttrNum: {
HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
return jsNumber(exec, imp->start());
}
case TypeAttrNum: {
HTMLOListElement* imp = static_cast<HTMLOListElement*>(impl());
return jsString(exec, imp->type());
}
case ConstructorAttrNum:
return getConstructor(exec);
}
return 0;
}
示例3: calcValue
inline int RenderListItem::calcValue() const
{
if (m_hasExplicitValue)
return m_explicitValue;
Node* list = enclosingList(this);
HTMLOListElement* oListElement = isHTMLOListElement(list) ? toHTMLOListElement(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(list, this))
return previousItem->value() + valueStep;
if (oListElement)
return oListElement->start();
return 1;
}
示例4: calcValue
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;
}