and bug #10815 (Crash deleting selected text and table)
mozilla/editor/base/nsHTMLEditRules.cpp
- Added check, in WillDeleteSelection(), to see if
endpoints of the range are in the body before calling
GetBlockNodeParent(). (Bug #10231)
- Modified GetPromotedPoint() to check for NULL in the
case where aWhere == kEnd and GetChildAt() returns NULL.
(Bug #10815)
mozilla/layout/base/src/nsGenericElement.cpp
- Modified RangeAdd() so that it doesn't add
a range if it's already in the list. (Bug #10231)
mozilla/layout/base/src/nsRangeList.cpp
- Modified GetPrimaryFrameForFocusNode() to
initialize aReturnFrame and to return a failure
if ChildAt() returns NULL. (Bug #10231)
1. IsEditable is much less hacky. It basically says:
1. if the node is a special bogus text node, it's not editable
2. if the node is a text node with only newlines, then it's not editable
3. if the node has no frame associated with it, then it is not editable
4. otherwise, it is editable.
As part of this, I had to make IsEditable non-static. This had some cascading effects on static methods that called
IsEditable, which likewise had to be made non-static.
2. SetTextProperties now works when the endpoints are leaf nodes (like images), not just text. Charlie, you should
put this through some stress cases.
* Added some code to restore selection after RemoveTextProperty.
* Made a tiny change to the way the editor holds onto the transaction manager, so client (like the ender text control) can
turn undo on and off effectively
* Fixed a bug in IsNodeInline that was causing GetBlockParent to return the wrong parent node (and who knows what
other mischief) where atom compares were being done on strings of different case, for <B>, "b" vs. "B". The DOM
method nsIDOMElement::GetTagName forced the returned tag name to upper case. I don't know how long that has
been true, but I assume it's a fairly recent change (or something on our side related to it changed recently) or this method
never would have worked. I also found a few cases of nsString::Equals that I changed to EqualsIgnoreCase
* Made some general improvements to the interaction between editors and rules, so that the aCancel out param is always
intialized, and all rules with Will... are matched with a Did... call. Added Will/DidSetTextProperty() and
Will/DidRemoveTextProperty(). This helps enable plain text mode. Added a skeleton for max length support in text editor.
* fixed some warnings.