[webkit-reviews] review requested: [Bug 7579] TinyMCE: Implement
execCommand(insertImage, ...) : [Attachment 6911] patch
bugzilla-request-daemon at opendarwin.org
bugzilla-request-daemon at opendarwin.org
Tue Mar 7 01:09:12 PST 2006
Justin Garcia <justin.garcia at apple.com> has asked David Harrison
<harrison at apple.com> for review:
Bug 7579: TinyMCE: Implement execCommand(insertImage, ...)
http://bugzilla.opendarwin.org/show_bug.cgi?id=7579
Attachment 6911: patch
http://bugzilla.opendarwin.org/attachment.cgi?id=6911&action=edit
------- Additional Comments from Justin Garcia <justin.garcia at apple.com>
Implemented InsertHTML and added a layout test.
ReplaceSelectionCommand wasn't pruning empty non-blockflow containers (like
<span></span>), or empty blockflow containers with non-zero height (like <div
style="border: 1px solid black;"></div>).
- QPtrList<NodeImpl> blocks;
- NodeImpl *node = beyondEndNode->enclosingInlineElement();
- NodeImpl *refNode = m_lastNodeInserted.get();
+ NodeImpl* node = beyondEndNode->enclosingInlineElement();
+ NodeImpl* refNode = m_lastNodeInserted.get();
+ NodeImpl* nodeToPrune = node->parentNode();
while (node) {
if (node->isBlockFlowOrBlockTable())
break;
NodeImpl *next = node->nextSibling();
- blocks.append(node->enclosingBlockFlowElement());
computeAndStoreNodeDesiredStyle(node, styles);
removeNode(node);
Using a QPtrList wasn't unnecessary. We're removing siblings, no more than one
enclosingBlockFlowElement would have survived this removal.
Use parentNode() instead of enclosingBlockFlowElement(), if we only want to
prune blockFlows, that should be part of the pruning rule inside
shouldPruneNode.
More information about the webkit-reviews
mailing list