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


C++ HTMLTableCellElement类代码示例

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


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

示例1: noWrapAttrGetter

static v8::Handle<v8::Value> noWrapAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLTableCellElement.noWrap._get");
    HTMLTableCellElement* imp = V8HTMLTableCellElement::toNative(info.Holder());
    if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined());
    return v8Boolean(imp->hasAttribute(WebCore::HTMLNames::nowrapAttr));
}
开发者ID:Treeeater,项目名称:chrome_bindings,代码行数:7,代码来源:V8HTMLTableCellElement.cpp

示例2: searchForLabelsAboveCell

String Frame::searchForLabelsAboveCell(RegularExpression* regExp, HTMLTableCellElement* cell, size_t* resultDistanceFromStartOfCell)
{
    HTMLTableCellElement* aboveCell = cell->cellAbove();
    if (aboveCell) {
        // search within the above cell we found for a match
        size_t lengthSearched = 0;    
        for (Node* n = aboveCell->firstChild(); n; n = n->traverseNextNode(aboveCell)) {
            if (n->isTextNode() && n->renderer() && n->renderer()->style()->visibility() == VISIBLE) {
                // For each text chunk, run the regexp
                String nodeString = n->nodeValue();
                int pos = regExp->searchRev(nodeString);
                if (pos >= 0) {
                    if (resultDistanceFromStartOfCell)
                        *resultDistanceFromStartOfCell = lengthSearched;
                    return nodeString.substring(pos, regExp->matchedLength());
                }
                lengthSearched += nodeString.length();
            }
        }
    }

    // Any reason in practice to search all cells in that are above cell?
    if (resultDistanceFromStartOfCell)
        *resultDistanceFromStartOfCell = notFound;
    return String();
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:26,代码来源:Frame.cpp

示例3: cellIndexAttrGetter

static v8::Handle<v8::Value> cellIndexAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLTableCellElement.cellIndex._get");
    HTMLTableCellElement* imp = V8HTMLTableCellElement::toNative(info.Holder());
    if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined());
    return v8::Integer::New(imp->cellIndex());
}
开发者ID:Treeeater,项目名称:chrome_bindings,代码行数:7,代码来源:V8HTMLTableCellElement.cpp

示例4: jsHTMLTableCellElementWidth

JSValue jsHTMLTableCellElementWidth(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl());
    return jsString(exec, imp->width());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSHTMLTableCellElement.cpp

示例5: rowSpanAttrSetter

static void rowSpanAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLTableCellElement.rowSpan._set");
    HTMLTableCellElement* imp = V8HTMLTableCellElement::toNative(info.Holder());
    int v = toInt32(value);
    imp->setRowSpan(v);
    return;
}
开发者ID:Treeeater,项目名称:chrome_bindings,代码行数:8,代码来源:V8HTMLTableCellElement.cpp

示例6: noWrapAttrSetter

static void noWrapAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
{
    INC_STATS("DOM.HTMLTableCellElement.noWrap._set");
    HTMLTableCellElement* imp = V8HTMLTableCellElement::toNative(info.Holder());
    bool v = value->BooleanValue();
    imp->setBooleanAttribute(WebCore::HTMLNames::nowrapAttr, v);
    return;
}
开发者ID:Treeeater,项目名称:chrome_bindings,代码行数:8,代码来源:V8HTMLTableCellElement.cpp

示例7: jsHTMLTableCellElementVAlign

JSValue jsHTMLTableCellElementVAlign(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->getAttribute(WebCore::HTMLNames::valignAttr));
    return result;
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:8,代码来源:JSHTMLTableCellElement.cpp

示例8: jsHTMLTableCellElementWidth

JSValue jsHTMLTableCellElementWidth(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl());
    JSValue result = jsString(exec, imp->width());
    return result;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:8,代码来源:JSHTMLTableCellElement.cpp

示例9: jsHTMLTableCellElementNoWrap

JSValue jsHTMLTableCellElementNoWrap(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl());
    JSValue result = jsBoolean(imp->noWrap());
    return result;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:8,代码来源:JSHTMLTableCellElement.cpp

示例10: node

void RenderTableCell::updateFromElement()
{
    Node* n = node();
    if (n && (n->hasTagName(tdTag) || n->hasTagName(thTag))) {
        HTMLTableCellElement* tc = static_cast<HTMLTableCellElement*>(n);
        int oldRSpan = m_rowSpan;
        int oldCSpan = m_columnSpan;

        m_columnSpan = tc->colSpan();
        m_rowSpan = tc->rowSpan();
        if ((oldRSpan != m_rowSpan || oldCSpan != m_columnSpan) && style() && parent()) {
            setNeedsLayoutAndPrefWidthsRecalc();
            if (section())
                section()->setNeedsCellRecalc();
        }
    }
}
开发者ID:sanyaade-mobiledev,项目名称:Webkit-Projects,代码行数:17,代码来源:RenderTableCell.cpp

示例11: toRenderTable


//.........这里部分代码省略.........
    
    Color alternatingRowColors[5];
    int alternatingRowColorCount = 0;
    
    int headersInFirstColumnCount = 0;
    for (int row = 0; row < numRows; ++row) {
    
        int headersInFirstRowCount = 0;
        for (int col = 0; col < numCols; ++col) {    
            RenderTableCell* cell = firstBody->primaryCellAt(row, col);
            if (!cell)
                continue;

            Element* cellElement = cell->element();
            if (!cellElement)
                continue;
            
            if (cell->width() < 1 || cell->height() < 1)
                continue;
            
            validCellCount++;
            
            bool isTHCell = cellElement->hasTagName(thTag);
            // If the first row is comprised of all <th> tags, assume it is a data table.
            if (!row && isTHCell)
                headersInFirstRowCount++;

            // If the first column is comprised of all <th> tags, assume it is a data table.
            if (!col && isTHCell)
                headersInFirstColumnCount++;
            
            // In this case, the developer explicitly assigned a "data" table attribute.
            if (cellElement->hasTagName(tdTag) || cellElement->hasTagName(thTag)) {
                HTMLTableCellElement* tableCellElement = toHTMLTableCellElement(cellElement);
                if (!tableCellElement->headers().isEmpty() || !tableCellElement->abbr().isEmpty()
                    || !tableCellElement->axis().isEmpty() || !tableCellElement->scope().isEmpty())
                    return true;
            }
            const RenderStyle& renderStyle = cell->style();

            // If the empty-cells style is set, we'll call it a data table.
            if (renderStyle.emptyCells() == HIDE)
                return true;

            // If a cell has matching bordered sides, call it a (fully) bordered cell.
            if ((cell->borderTop() > 0 && cell->borderBottom() > 0)
                || (cell->borderLeft() > 0 && cell->borderRight() > 0))
                borderedCellCount++;

            // Also keep track of each individual border, so we can catch tables where most
            // cells have a bottom border, for example.
            if (cell->borderTop() > 0)
                cellsWithTopBorder++;
            if (cell->borderBottom() > 0)
                cellsWithBottomBorder++;
            if (cell->borderLeft() > 0)
                cellsWithLeftBorder++;
            if (cell->borderRight() > 0)
                cellsWithRightBorder++;
            
            // If the cell has a different color from the table and there is cell spacing,
            // then it is probably a data table cell (spacing and colors take the place of borders).
            Color cellColor = renderStyle.visitedDependentColor(CSSPropertyBackgroundColor);
            if (table->hBorderSpacing() > 0 && table->vBorderSpacing() > 0
                && tableBGColor != cellColor && cellColor.alpha() != 1)
                backgroundDifferenceCellCount++;
开发者ID:CannedFish,项目名称:webkitgtk,代码行数:67,代码来源:AccessibilityTable.cpp

示例12: setJSHTMLTableCellElementWidth

void setJSHTMLTableCellElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLTableCellElement* castedThis = static_cast<JSHTMLTableCellElement*>(thisObject);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThis->impl());
    imp->setAttribute(WebCore::HTMLNames::widthAttr, valueToStringWithNullCheck(exec, value));
}
开发者ID:mulriple,项目名称:Webkit-Projects,代码行数:6,代码来源:JSHTMLTableCellElement.cpp

示例13: setJSHTMLTableCellElementWidth

void setJSHTMLTableCellElementWidth(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLTableCellElement* castedThisObj = static_cast<JSHTMLTableCellElement*>(thisObject);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThisObj->impl());
    imp->setWidth(valueToStringWithNullCheck(exec, value));
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:6,代码来源:JSHTMLTableCellElement.cpp

示例14: setJSHTMLTableCellElementRowSpan

void setJSHTMLTableCellElementRowSpan(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLTableCellElement* castedThisObj = static_cast<JSHTMLTableCellElement*>(thisObject);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThisObj->impl());
    imp->setRowSpan(value.toInt32(exec));
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:6,代码来源:JSHTMLTableCellElement.cpp

示例15: setJSHTMLTableCellElementNoWrap

void setJSHTMLTableCellElementNoWrap(ExecState* exec, JSObject* thisObject, JSValue value)
{
    JSHTMLTableCellElement* castedThisObj = static_cast<JSHTMLTableCellElement*>(thisObject);
    HTMLTableCellElement* imp = static_cast<HTMLTableCellElement*>(castedThisObj->impl());
    imp->setNoWrap(value.toBoolean(exec));
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:6,代码来源:JSHTMLTableCellElement.cpp


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