[Webkit-unassigned] [Bug 56771] editing commands shouldn't run when there's no body

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 18:02:14 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56771





--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org>  2011-03-21 18:02:14 PST ---
(From update of attachment 86393)
View in context: https://bugs.webkit.org/attachment.cgi?id=86393&action=review

>> Source/WebCore/editing/Editor.cpp:213
>> +    return m_frame->selection()->rootEditableElement();
> 
> Do we need to check both?  It's not clear to me how this is a superset of the previous check.

If selection start has a root editable element, then it must also be editable.  To verify this, rootEditableElement calls editableRootForPosition in htmlediting.cpp, which calls Node::rootEditableElement() but rootEditableElement() only traverses through nodes that are content editable.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list