6ce44677c7ebdc10d467d3deb54512c8f6ea1e11: Bug 1451672 - part 23: Rename HTMLEditor::Set*BackgroundColor() to HTMLEditor::Set*BackgroundColorWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Apr 2018 00:02:39 +0900 - rev 414843
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 23: Rename HTMLEditor::Set*BackgroundColor() to HTMLEditor::Set*BackgroundColorWithTransaction() r=m_kato MozReview-Commit-ID: 7kUahOPZCwE
7b6165489943f380905a61ecc882b7d22dc04ce4: Bug 1451672 - part 22: Rename HTMLEditor::InsertNodeIntoProperAncestor() to HTMLEditor::InsertNodeIntoProperAncestorWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 16 Apr 2018 23:53:46 +0900 - rev 414842
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 22: Rename HTMLEditor::InsertNodeIntoProperAncestor() to HTMLEditor::InsertNodeIntoProperAncestorWithTransaction() r=m_kato MozReview-Commit-ID: 6O47YeSpud8
ec93f6db7e4b525495c549916a878972dfcda34d: Bug 1451672 - part 21: Refine TextEditor::TypedText() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 16 Apr 2018 23:43:36 +0900 - rev 414841
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 21: Refine TextEditor::TypedText() r=m_kato According to existing comments, TextEditor::TypedText() and HTMLEditor::TypedText() are intentional bottleneck to debug. However, only for that purpose, it and its internal methods are made virtual. This really doesn't make sense. So, this patch creates TextEditor::OnInputText() for callers of TypedText() with non-empty string, TextEditor::OnInputParagraphSeparator() for callers of TypedText() with eTypeBreak (Enter key or insertParagraphSeparator), HTMLEditor::OnInputLineBreak() for callers of TypedText() with eTypeBR (Shift + Enter or insertLineBreak). Additionally, this creates internal non-virtual methods for XPCOM methods which are used as internal methods of TypedText(). One is InsertTextAsAction() for nsIPlatintextEditor.insertText(). the other is InsertParagraphSeparator() for nsIPlaintextEditor.insertLineBreak(). Although those new methods are not have "WithTransaction" postfix, they must be clearer they'll use transactions since user input and actions should be undo-able. MozReview-Commit-ID: AmOkMqovIKA
5726deba80285b649b0f19c190a9b9275282eff1: Bug 1451672 - part 20: Rename HTMLEditor::MakeDefinitionItem() and HTMLEditor::InsertBasicBlock() with "WithTransaction" postfix r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 16 Apr 2018 20:33:27 +0900 - rev 414840
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 20: Rename HTMLEditor::MakeDefinitionItem() and HTMLEditor::InsertBasicBlock() with "WithTransaction" postfix r=m_kato MozReview-Commit-ID: 2D50suUnFcw
9617921cebc374474b9fb42f6543841041d4cfda: Bug 1451672 - part 19: Remove TextEditor::CreateBR() and rename TextEditor::CreateBRImpl() to TextEditor::InsertBrElementWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Mon, 16 Apr 2018 19:21:29 +0900 - rev 414839
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 19: Remove TextEditor::CreateBR() and rename TextEditor::CreateBRImpl() to TextEditor::InsertBrElementWithTransaction() r=m_kato TextEditor::CreateBR() is just a wrapper of TextEditor::CreateBRImpl() for automatically retrieving Selection of the editor. And TextEditor::CreateBRImpl() should be renamed to TextEditor::InsertBrElementWithTransaction() for making it clearer what it does. MozReview-Commit-ID: D8sjVdLrVrd
907f07168fedfb1d6ec03c07f881c1327ae56c35: Bug 1451672 - part 18: Rename EditorBase::CloneAttributes() to EditorBase::CloneAttributesWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Apr 2018 18:44:08 +0900 - rev 414838
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 18: Rename EditorBase::CloneAttributes() to EditorBase::CloneAttributesWithTransaction() r=m_kato MozReview-Commit-ID: 5tL31gRDVc9
a6d341deddb0e73c1bba5109df5ec84b7e616020: Bug 1451672 - part 17: Rename EditorBase::InsertContainerAbove() to EditorBase::InsertContainerWithTransactionInternal() and wraps it with new inline methods, EditorBase::InsertContainerWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Fri, 13 Apr 2018 18:17:04 +0900 - rev 414837
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 17: Rename EditorBase::InsertContainerAbove() to EditorBase::InsertContainerWithTransactionInternal() and wraps it with new inline methods, EditorBase::InsertContainerWithTransaction() r=m_kato Similar to EditorBase::ReplaceContainerWithTransaction(), EditorBase::InsertContainerAbove() may set an attribute to newly created element if it's specified. However, for avoiding the null check, let's make them as references rather than pointers and treat nsGkAtoms::_empty as nullptr for making the code safer. This patch removes "Above" from the method name since it's redundant. "Insert" sounds like inserting a node, and "Container" means to keep existing children with new element in EditorBase. MozReview-Commit-ID: 6EnkKHynYSP
1871811c637d761880fb4af87f20bfb0feff7b50: Bug 1451672 - part 16: Rename EditorBase::MoveNode() to EditorBase::MoveNodeWithTransaction() and create EditorBase::MoveNodeToEndWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 23:58:52 +0900 - rev 414836
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 16: Rename EditorBase::MoveNode() to EditorBase::MoveNodeWithTransaction() and create EditorBase::MoveNodeToEndWithTransaction() r=m_kato This patch renames EditorBase::MoveNode() to EditorBase::MoveNodeWithTransaction() and redesign its parameters including replacing a set of container node and offset in it to EditorDOMPointBase. However, it takes magic number -1 as meaning end of the container. Therefore, this patch adds MoveNodeToEndWithTransaction() for keeping the callers simple. MozReview-Commit-ID: BeTq5c7GQNN
3bd18c2b985162bf4fa3a5d74214861839036325: Bug 1451672 - part 15: Rename EditorBase::RemoveContainer() and HTMLEditor::RemoveBlockContainer() with "WithTransaction" postfix and make their argument |Element&| r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 22:23:04 +0900 - rev 414835
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 15: Rename EditorBase::RemoveContainer() and HTMLEditor::RemoveBlockContainer() with "WithTransaction" postfix and make their argument |Element&| r=m_kato MozReview-Commit-ID: 2toj48mqHM9
24e17127ec4875531ef46308dde8169bf35cea67: Bug 1451672 - part 14: Rename EditorBase::ReplaceContainer() to EditorBase::ReplaceContainerWithTransactionInternal() and create some wrappers of it r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 21:45:55 +0900 - rev 414834
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 14: Rename EditorBase::ReplaceContainer() to EditorBase::ReplaceContainerWithTransactionInternal() and create some wrappers of it r=m_kato The parameters of EditorBase::ReplaceContainer() are complicated. For example, if it's specified as cloning all attributes, aAttribute and aValue are ignored because CloneAttributes() removes all existing attributes but ReplaceContainer() sets attributes before calling CloneAttributes(). This method has 3 modes: 1. Just replaces aOldContainer with new element. 2. #1 and clones all attributes from aOldContainer to the new element. 3. #1 and sets aAttribute of the new element to aValue. Therefore, this patch creates 3 inline wrappers of the renamed method. MozReview-Commit-ID: IsPu2uZuU8f
979bfcb751572486dce5e69b709f916c008425ee: Bug 1451672 - part 13: Rename EditorBase::InsertTextImpl() and EditorBase::InsertTextIntoTextNodeImpl() to EditorBase::InsertTextWithTransaction() and EditorBase::InsertTextIntoTextNodeWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 17:58:14 +0900 - rev 414833
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 13: Rename EditorBase::InsertTextImpl() and EditorBase::InsertTextIntoTextNodeImpl() to EditorBase::InsertTextWithTransaction() and EditorBase::InsertTextIntoTextNodeWithTransaction() r=m_kato MozReview-Commit-ID: DF3HBVyu4P2
4b372e4cc463abb94c3fbc5ccaf2870ffceec894: Bug 1451672 - part 12: Create HTMLEditor::RemoveStyleSheetWithTransaction() as implementation of nsIEditorStyleSheets::RemoveStyleSheet() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 17:20:21 +0900 - rev 414832
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 12: Create HTMLEditor::RemoveStyleSheetWithTransaction() as implementation of nsIEditorStyleSheets::RemoveStyleSheet() r=m_kato MozReview-Commit-ID: BIXU3jzD1rU
4076543894020d6614e523e805b13b35e511cb45: Bug 1451672 - part 11: Rename EditorBase::SetAttribute(), EditorBase::RemoveAttribute() and EditorBase::CloneAttribute() with "WithTransaction" postfix r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Thu, 12 Apr 2018 16:58:33 +0900 - rev 414831
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 11: Rename EditorBase::SetAttribute(), EditorBase::RemoveAttribute() and EditorBase::CloneAttribute() with "WithTransaction" postfix r=m_kato MozReview-Commit-ID: I8T9MNkY8Yq
81798a8610e1b350998ea29ef177fcd5a8c0b801: Bug 1451672 - part 10: Rename TextEditor::DeleteSelectionImpl() to TextEditor::DeleteSelectionWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 11 Apr 2018 19:11:15 +0900 - rev 414830
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 10: Rename TextEditor::DeleteSelectionImpl() to TextEditor::DeleteSelectionWithTransaction() r=m_kato MozReview-Commit-ID: 8nypHV8X3js
585bed4748a744017ef8cdb2cdbfea922c3e67b2: Bug 1451672 - part 9: Create TextEditor::DeleteSelectionAsAction() as implementation of nsIEditor::DeleteSelection() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Wed, 11 Apr 2018 17:37:49 +0900 - rev 414829
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 9: Create TextEditor::DeleteSelectionAsAction() as implementation of nsIEditor::DeleteSelection() r=m_kato First, EditorBase::DeleteSelection() is never used since TextEditor::DeleteSelection() overrides it but does not call it. So, this patch makes EditorBase::DeleteSelection() only returns NS_ERROR_NOT_IMPLEMENTED. Next, EditorBase::DeleteSelectionImpl() actually removes content for TextEditor::DeleteSelection(). So, it should be named as DeleteSelectionWithTransaction(). However, it'll be done in the following patch. On the other hand, its callers are EditorBase::HandleKeyPressEvent() and EditorBase::DeleteSelectionAndPrepareToCreateNode(). Fortunately, they can be moved to TextEditor simply. Therefore this patch moves the methods to TextEditor for making related methods in a place. Then, we can make the implementation of nsIEditor::TextEditor() as a non-virtual method, TextEditor::DeleteSelectionAsAction(). MozReview-Commit-ID: KXFDhW3G9lA
5e8f25ef1174d4af6ac4c16c02effa8c49c432ed: Bug 1451672 - part 8: Rename EditorBase::DeleteText() to EditorBase::DeleteTextWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Apr 2018 16:50:06 +0900 - rev 414828
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 8: Rename EditorBase::DeleteText() to EditorBase::DeleteTextWithTransaction() r=m_kato MozReview-Commit-ID: KK4dTpKbpLc
81a8389b9daaf8049ab3934904849de7dc527232: Bug 1451672 - part 7: Rename EditorBase::DeleteNode() to EditorBase::DeleteNodeWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Apr 2018 16:23:54 +0900 - rev 414827
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 7: Rename EditorBase::DeleteNode() to EditorBase::DeleteNodeWithTransaction() r=m_kato MozReview-Commit-ID: AQVVTjfXJv
28422b0eee9a95a153980bcd741d5ac7b094cb0c: Bug 1451672 - part 6: Rename EditorBase::JoinNodesImpl() to EditorBase::DoJoinNodes() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Apr 2018 03:56:46 +0900 - rev 414826
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 6: Rename EditorBase::JoinNodesImpl() to EditorBase::DoJoinNodes() r=m_kato MozReview-Commit-ID: 9fqa4fKkAF5
5f61649cdc967a95fccb1b13d8beaf6f97811ee5: Bug 1451672 - part 5: Rename EditorBase::JoinNodes() and related methods with "WithTransaction" postfix r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Apr 2018 03:46:44 +0900 - rev 414825
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 5: Rename EditorBase::JoinNodes() and related methods with "WithTransaction" postfix r=m_kato This patch renames: EditorBase::JoinNodes() -> EditorBase::JoinNodesWithTransaction() EditorBase::JoinNodeDeep() -> EditorBase::JoinNodesDeepWithTransaction() HTMLEditRules::JoinNodesSmart() -> HTMLEditRules::JoinNearestEditableNodesWithTransaction() HTMLEditRules::TryToJoinBlocks() -> HTMLEditRules::TryToJoinBlocksWithTransaction() MozReview-Commit-ID: Ao16GhAcyIZ
1f538ba260f81864adfee97c14b81a03e032f275: Bug 1451672 - part 4: Rename EditorBase::SplitNodeImpl() to EditorBase::DoSplitNode() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 10 Apr 2018 02:32:33 +0900 - rev 414824
Push 33878 by apavel@mozilla.com at Sat, 21 Apr 2018 09:30:31 +0000
Bug 1451672 - part 4: Rename EditorBase::SplitNodeImpl() to EditorBase::DoSplitNode() r=m_kato EditorBase::SplitNodeImpl() is called by SplitNodeTransaction::DoTransaction() for actually splitting a node. However, "WithoutTransaction" postfix is really redundant. Perhaps, just naming DoSplitNode() is better since "Impl" isn't unclear and not useful if somebody wants to use it as a utility method and there has already been EditorBase::SplitNode() which is an override of nsIEditor::SplitNode(). It must not be good to use same name for different purpose (EditorBase::SplitNode() creates a transaction). MozReview-Commit-ID: Akjeyp52vVv
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip