WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
32079
Undo should not affect elements that are not editable
https://bugs.webkit.org/show_bug.cgi?id=32079
Summary
Undo should not affect elements that are not editable
Enrica Casucci
Reported
2009-12-02 11:21:46 PST
If an element changes from editable to non-editable, all undo commands that apply to it and its descendant should be ignored. Same goes for redo.
Attachments
patch
(13.57 KB, patch)
2009-12-02 11:56 PST
,
Enrica Casucci
adele
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Enrica Casucci
Comment 1
2009-12-02 11:56:37 PST
Created
attachment 44170
[details]
patch
WebKit Review Bot
Comment 2
2009-12-02 21:10:58 PST
style-queue ran check-webkit-style on
attachment 44170
[details]
without any errors.
Adele Peterson
Comment 3
2009-12-02 22:52:13 PST
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); > }
Enrica Casucci
Comment 4
2009-12-03 10:10:40 PST
(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());
Adele Peterson
Comment 5
2009-12-03 10:42:05 PST
ok, makes sense
Enrica Casucci
Comment 6
2009-12-03 11:22:27 PST
Committed revision 51645.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug