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


C++ ContainerNode::rendererIsEditable方法代码示例

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


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

示例1: doUnapply

void MergeIdenticalElementsCommand::doUnapply()
{
    ASSERT(m_element1);
    ASSERT(m_element2);

    RefPtr<Node> atChild = m_atChild.release();

    ContainerNode* parent = m_element2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;

    TrackExceptionState es;

    parent->insertBefore(m_element1.get(), m_element2.get(), es);
    if (es.hadException())
        return;

    Vector<RefPtr<Node> > children;
    for (Node* child = m_element2->firstChild(); child && child != atChild; child = child->nextSibling())
        children.append(child);

    size_t size = children.size();
    for (size_t i = 0; i < size; ++i)
        m_element1->appendChild(children[i].release(), es);
}
开发者ID:chunywang,项目名称:blink-crosswalk,代码行数:25,代码来源:MergeIdenticalElementsCommand.cpp

示例2: executeApply

void SplitElementCommand::executeApply()
{
    if (m_atChild->parentNode() != m_element2)
        return;
    
    Vector<RefPtr<Node> > children;
    for (Node* node = m_element2->firstChild(); node != m_atChild; node = node->nextSibling())
        children.append(node);
    
    ExceptionCode ec = 0;
    
    ContainerNode* parent = m_element2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;
    parent->insertBefore(m_element1.get(), m_element2.get(), ec);
    if (ec)
        return;

    // Delete id attribute from the second element because the same id cannot be used for more than one element
    m_element2->removeAttribute(HTMLNames::idAttr, ec);
    ASSERT(!ec);

    size_t size = children.size();
    for (size_t i = 0; i < size; ++i)
        m_element1->appendChild(children[i], ec);
}
开发者ID:1833183060,项目名称:wke,代码行数:26,代码来源:SplitElementCommand.cpp

示例3: doReapply

void SplitTextNodeCommand::doReapply()
{
    if (!m_text1 || !m_text2)
        return;

    ContainerNode* parent = m_text2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;

    insertText1AndTrimText2();
}
开发者ID:Igalia,项目名称:blink,代码行数:11,代码来源:SplitTextNodeCommand.cpp

示例4: doApply

void RemoveNodeCommand::doApply()
{
    ContainerNode* parent = m_node->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;

    m_parent = parent;
    m_refChild = m_node->nextSibling();

    ExceptionCode ec;
    m_node->remove(ec);
}
开发者ID:1833183060,项目名称:wke,代码行数:12,代码来源:RemoveNodeCommand.cpp

示例5: doApply

void SplitTextNodeCommand::doApply()
{
    ContainerNode* parent = m_text2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;

    String prefixText = m_text2->substringData(0, m_offset, IGNORE_EXCEPTION);
    if (prefixText.isEmpty())
        return;

    m_text1 = Text::create(document(), prefixText);
    ASSERT(m_text1);
    document().markers()->copyMarkers(m_text2.get(), 0, m_offset, m_text1.get(), 0);

    insertText1AndTrimText2();
}
开发者ID:Igalia,项目名称:blink,代码行数:16,代码来源:SplitTextNodeCommand.cpp

示例6: doApply

void JoinTextNodesCommand::doApply()
{
    if (m_text1->nextSibling() != m_text2)
        return;

    ContainerNode* parent = m_text2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;
    
    ExceptionCode ec = 0;
    m_text2->insertData(0, m_text1->data(), ec);
    if (ec)
        return;

    m_text1->remove(ec);
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:16,代码来源:JoinTextNodesCommand.cpp

示例7: doUnapply

void JoinTextNodesCommand::doUnapply()
{
    if (m_text1->parentNode())
        return;

    ContainerNode* parent = m_text2->parentNode();
    if (!parent || !parent->rendererIsEditable())
        return;

    ExceptionCode ec = 0;

    parent->insertBefore(m_text1.get(), m_text2.get(), ec);
    if (ec)
        return;

    m_text2->deleteData(0, m_text1->length(), ec);
}
开发者ID:0omega,项目名称:platform_external_webkit,代码行数:17,代码来源:JoinTextNodesCommand.cpp


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