本文整理汇总了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);
}
示例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);
}
示例3: doReapply
void SplitTextNodeCommand::doReapply()
{
if (!m_text1 || !m_text2)
return;
ContainerNode* parent = m_text2->parentNode();
if (!parent || !parent->rendererIsEditable())
return;
insertText1AndTrimText2();
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}