Summary: | Undo should not affect elements that are not editable | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Enrica Casucci <enrica> | ||||
Component: | HTML Editing | Assignee: | Enrica Casucci <enrica> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | adele, webkit.review.bot | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Enrica Casucci
2009-12-02 11:21:46 PST
Created attachment 44170 [details]
patch
style-queue ran check-webkit-style on attachment 44170 [details] without any errors.
Comment on attachment 44170 [details] patch Are there cases where the parent isn't editable, and its not attached, where we would want to allow the AppendNodeCommand? > void AppendNodeCommand::doApply() > { > + if (!m_parent->isContentEditable() && m_parent->attached()) > + return; > + > ExceptionCode ec; > m_parent->appendChild(m_node.get(), ec); > } (In reply to comment #3) > (From update of attachment 44170 [details]) > Are there cases where the parent isn't editable, and its not attached, where we > would want to allow the AppendNodeCommand? > > > void AppendNodeCommand::doApply() > > { > > + if (!m_parent->isContentEditable() && m_parent->attached()) > > + return; > > + > > ExceptionCode ec; > > m_parent->appendChild(m_node.get(), ec); > > } I don't think so. Look at the ASSERT in the constructor. ASSERT(m_parent->isContentEditable() || !m_parent->attached()); ok, makes sense Committed revision 51645. |