046d0e259116679e2c4908cfa288e774dcddbf07: Bug 1455492: While here, fix refcount churn. r=bholley
Emilio Cobos Álvarez <emilio@crisal.io> - Fri, 20 Apr 2018 03:45:04 +0200 - rev 414939
Push
102433 by ecoal95@gmail.com at Sat, 21 Apr 2018 10:09:09 +0000
Bug 1455492: While here, fix refcount churn. r=bholley
MozReview-Commit-ID: 88jzsn25e53
c007f07170a5b3b377f45ab63c6c508ab0ebb58f: Bug 1455492: Remove redundant ParseSheet arguments. r=bholley
Emilio Cobos Álvarez <emilio@crisal.io> - Fri, 20 Apr 2018 03:42:00 +0200 - rev 414938
Push
102433 by ecoal95@gmail.com at Sat, 21 Apr 2018 10:09:09 +0000
Bug 1455492: Remove redundant ParseSheet arguments. r=bholley
For the async caller, pretty much everything can be extracted out of the loader
/ loadData.
For the sync callers, we need to be a bit more careful because ReparseSheet
tries to get its line number on its own.
I changed the compat mode passed to the reparse stuff to be the document's one
in this case, but that seems a bug fix.
MozReview-Commit-ID: 2wi5HPRAlPi
2398baa3198845ea904fcdee1f009dc11d0090bb: Bug 1453989 - Apply Meta CSP to Content Privileged about:checkerboard. r=ckerschb,Gijs
vinoth <cegvinoth@gmail.com> - Sat, 21 Apr 2018 02:16:30 +0300 - rev 414937
Push
102432 by archaeopteryx@coole-files.de at Sat, 21 Apr 2018 09:46:11 +0000
Bug 1453989 - Apply Meta CSP to Content Privileged about:checkerboard. r=ckerschb,Gijs
Reviewers: ckerschb, Gijs
Reviewed By: ckerschb, Gijs
Subscribers: Gijs, ckerschb
Bug #: 1453989
Differential Revision:
https://phabricator.services.mozilla.com/D944
dd0e54d786743974a50a338059bcd68a09b6d5b2: Merge mozilla-inbound to mozilla-central. a=merge
Andreea Pavel <apavel@mozilla.com> - Sat, 21 Apr 2018 12:31:28 +0300 - rev 414936
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +0000
Merge mozilla-inbound to mozilla-central. a=merge
6a2fca281629f3cc53a98267b1bbff406b32e501: Bug 1451672 - part 24: Rename HTMLEditor::CopyLastEditableChildStyles() to HTMLEditor::CopyLastEditableChildStylesWithTransaction() r=m_kato
Masayuki Nakano <masayuki@d-toybox.com> - Tue, 17 Apr 2018 01:15:23 +0900 - rev 414935
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +0000
Bug 1451672 - part 24: Rename HTMLEditor::CopyLastEditableChildStyles() to HTMLEditor::CopyLastEditableChildStylesWithTransaction() r=m_kato
Like this adds new comments into the method, we should optimize the method
since it may create a lot of transactions and dispatch a lot of mutation
events.
MozReview-Commit-ID: FknJfu6QCjS
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 414934
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414933
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414932
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414931
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414930
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414929
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414928
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414927
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414926
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414925
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414924
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414923
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414922
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414921
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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 414920
Push
102431 by apavel@mozilla.com at Sat, 21 Apr 2018 09:37:01 +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