Commit Graph

597030 Commits

Author SHA1 Message Date
Masayuki Nakano
278c709e0b Bug 1460509 - part 43: Make HTMLEditRules::BustUpInlinesAtRangeEndpoints() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: CSYCey8ugA8

--HG--
extra : rebase_source : ed2ace9e445f750b317ab984707c3c44b12bd72b
2018-05-15 17:21:08 +09:00
Masayuki Nakano
7e4a66f58c Bug 1460509 - part 42: Make HTMLEditRules::BustUpInlinesAtBRs() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 5KGPE8mPqge

--HG--
extra : rebase_source : 9de693ba99508ebc5b5c235cbc2ed589676fc045
2018-05-15 17:04:28 +09:00
Masayuki Nakano
6ce0d49219 Bug 1460509 - part 41: Make HTMLEditRules::ReturnInHeader() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: r03QSPXsZ2

--HG--
extra : rebase_source : 76b3a2043c8ffaa44bf861cd9e32256bba545ec1
2018-05-15 16:36:53 +09:00
Masayuki Nakano
0e442165f7 Bug 1460509 - part 40: Make HTMLEditRules::ReturnInParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: cnR8uXTfno

--HG--
extra : rebase_source : 5fdca1b01b3b37fd997f8686a03ada6079410e96
2018-05-15 16:22:59 +09:00
Masayuki Nakano
6c48f47e99 Bug 1460509 - part 39: Make HTMLEditRules::SplitParagraph() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 38hfUl88xXI

--HG--
extra : rebase_source : 7086a0f907487a74bc4656ec3f27fee99727af19
2018-05-15 16:15:35 +09:00
Masayuki Nakano
23b339760b Bug 1460509 - part 38: Make HTMLEditRules::ReturnInListItem() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: Jl0oiBCuYPb

--HG--
extra : rebase_source : 825ea4d5bf571752b77b80d759bfe4071f902b6e
2018-05-15 15:32:11 +09:00
Masayuki Nakano
2a52edcc52 Bug 1460509 - part 37: Make HTMLEditRules::MakeBlockquote() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 3pUx52d6EYd

--HG--
extra : rebase_source : 160cfd6bcdd00572c4242ed8cd8721dbee43ba76
2018-05-15 15:09:13 +09:00
Masayuki Nakano
d7b703771c Bug 1460509 - part 36: Make HTMLEditRules::RemoveBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: KDfxeD9k0UN

--HG--
extra : rebase_source : 2ec8c6fb2b8803e56605ebdeee5aacce5cd323f9
2018-05-15 00:43:07 +09:00
Masayuki Nakano
6cb4ec14c0 Bug 1460509 - part 35: Make HTMLEditRules::ApplyBlockStyle() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 1ddHNx7lF9P

--HG--
extra : rebase_source : 660c205f47473daade92145385d047d482ded72e
2018-05-15 00:08:46 +09:00
Masayuki Nakano
76e7240d35 Bug 1460509 - part 34: Make HTMLEditRules::MaybeSplitAncestorsForInsertWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 7MqtKPNAOZ1

--HG--
extra : rebase_source : e66f057754082e0b28f14311462a84516c06cc37
2018-05-14 23:55:53 +09:00
Masayuki Nakano
a3320a815b Bug 1460509 - part 33: Make HTMLEditRules::JoinNearestEditableNodesWithTransaction() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Unfortunately, we need to make it take out argument for returning new first
child point of right node.  If we can create JoinNodesResult which have
nsresult and EditorDOMPoint, we can avoid that, but EditorBase::JoinNodes()
does not want it.  So, even if we create such class, only 2 callers of the
methods are its users...

MozReview-Commit-ID: 1zwVZ0FriwN

--HG--
extra : rebase_source : 1f7867774f9a30bec78596b0282717435e7223c0
2018-05-14 23:51:23 +09:00
Masayuki Nakano
f82870c55b Bug 1460509 - part 32: Mark HTMLEditRules::CacheInlineStyles() as MOZ_MUST_USE since it may cause destroying the editor and returns NS_ERROR_EDITOR_DESTROYED in such case r=m_kato
MozReview-Commit-ID: FJHxJ1j02l1

--HG--
extra : rebase_source : e881022bc486e3a8446afff6e3014dad6a79d292
2018-05-14 23:24:40 +09:00
Masayuki Nakano
5c4be41f42 Bug 1460509 - part 31: Make HTMLEditRules::GetInlineStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 3Nk1gBttuwM

--HG--
extra : rebase_source : b9e0d63683407d9e5440157309cb61d213524223
2018-05-14 23:20:28 +09:00
Masayuki Nakano
d13545d1b1 Bug 1460509 - part 30: Make HTMLEditRules::ReapplyCachedStyles() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: HSv2els7Lys

--HG--
extra : rebase_source : 716cf33ab9ef344d4ba40400eda7379c6a2ff85e
2018-05-14 23:14:50 +09:00
Masayuki Nakano
deb2c6e032 Bug 1460509 - part 29: Make HTMLEditRules::AdjustSpecialBreaks() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
And this patch renames it to
InsertBRElementToEmptyListItemsAndTableCellsInChangedRange().

MozReview-Commit-ID: 1DGhcI93YAk

--HG--
extra : rebase_source : caa675a5b02c18e9ca57171294bdaf48e7563dc0
2018-05-14 22:56:06 +09:00
Masayuki Nakano
603b4cc93a Bug 1460509 - part 28: Make HTMLEditRules::AdjustWhitespace() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 6dFP6BYDXMg

--HG--
extra : rebase_source : 1e16de2a3a1289a638cd4b157c5f099170fa831f
2018-05-14 22:42:08 +09:00
Masayuki Nakano
9490ca976d Bug 1460509 - part 27: Make HTMLEditRules::PinSelectionToNewBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: GW0xI5BBxqU

--HG--
extra : rebase_source : 44ffab9c212c1210b0a8e8bf63254622fd883281
2018-05-14 22:37:33 +09:00
Masayuki Nakano
314c0524b5 Bug 1460509 - part 26: Make HTMLEditRules::AdjustSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: JCEvhhxNBgg

--HG--
extra : rebase_source : 8c6972c8367ce0e44fdc1edcb2b18174e7da2930
2018-05-14 19:25:48 +09:00
Masayuki Nakano
4d9d37891e Bug 1460509 - part 25: Make HTMLEditRules::RemoveEmptyNodes() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
And this patch renames it to RemoveEmptyNodesInChangedRange().

MozReview-Commit-ID: Kr2xmUOH1ZZ

--HG--
extra : rebase_source : 59a0a70360c6e0d426c329f4be757c2c0eac96c4
2018-05-14 19:07:59 +09:00
Masayuki Nakano
5f681e9b5d Bug 1460509 - part 24: Make HTMLEditRules::PopListItem() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 2655OlPmteT

--HG--
extra : rebase_source : 464469593c4ed9fc58f75191cab47a72314001a8
2018-05-14 18:18:24 +09:00
Masayuki Nakano
3608fb3fbd Bug 1460509 - part 23: Make HTMLEditRules::RemoveListStructure() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: JLfjjtQS6Ar

--HG--
extra : rebase_source : a62dcf9cfa48c7c361efd80f76af7032703205e2
2018-05-14 17:47:21 +09:00
Masayuki Nakano
cf3ad1d97a Bug 1460509 - part 22: Mark HTMLEditRules::InsertBRIfNeededInternal() and its wrappers as MOZ_MUST_USE r=m_kato
MozReview-Commit-ID: 4ueY3i1QFuD

--HG--
extra : rebase_source : adfa0f9e6ffbcde2f050703cd01e70ee4b05c5cc
2018-05-12 11:56:56 +09:00
Masayuki Nakano
8f32e9e8a5 Bug 1460509 - part 21: Make HTMLEditRules::RemoveAlignment() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: JV2vdZXoYIL

--HG--
extra : rebase_source : 959b56974c5d9229cb371e3791b645c7db54c3cf
2018-05-12 11:39:01 +09:00
Masayuki Nakano
5983a789e1 Bug 1460509 - part 20: Make HTMLEditRules::MakeSureElemStartsAndEndsOnCR() and HTMLEditRules::MakeSureElemStartsOrEndsOnCR() return NS_ERROR_EDITOR_DESTROYED if they cause destroying the editor r=m_kato
MozReview-Commit-ID: I8HcvO9IB7x

--HG--
extra : rebase_source : 6ca2e3a58b84a150504c73a17bda6cc825a10176
2018-05-12 11:25:23 +09:00
Masayuki Nakano
b591f81cf5 Bug 1460509 - part 19: Make HTMLEditRules::AlignBlock() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Additionally, this patch renames its specific enum class from ContentsOnly
to ResetAlignOf for making its target clearer.

MozReview-Commit-ID: KD4ndAsMClN

--HG--
extra : rebase_source : 302598397cf32893c7db18a6a014d0db862cb8f6
2018-05-12 10:58:57 +09:00
Masayuki Nakano
d5d67de86f Bug 1460509 - part 18: Make HTMLEditRules::ChangeIndentation() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Additionally, this patch renames it to ChangeMarginStart() for making its
job clearer and add two inline wrapper methods.

MozReview-Commit-ID: L2GfLKhT6sa

--HG--
extra : rebase_source : d1d293f742214048ce5dfbbb7ebd50b0cbeed881
2018-05-12 10:29:41 +09:00
Masayuki Nakano
dd74573897 Bug 1460509 - part 17: Make HTMLEditRules::WillAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the HTML editor r=m_kato
MozReview-Commit-ID: EGqb0hNpNnc

--HG--
extra : rebase_source : 97eeaca8b9386afe9ec320cd549d278955b69167
2018-05-11 20:25:01 +09:00
Masayuki Nakano
44d0e05143 Bug 1460509 - part 16: Make HTMLEditRules::DidAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: BBAvHn08og4

--HG--
extra : rebase_source : 5f4996be4be1813e382ec4180a583d5026dd7c63
2018-05-11 19:39:26 +09:00
Masayuki Nakano
8cb4cfda65 Bug 1460509 - part 15: Make HTMLEditRules::WillRemoveAbsolutePosition() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: DXzdtPQ01lo

--HG--
extra : rebase_source : 1fa36a1195aa7a6b5d891f83659af155b5bb16c0
2018-05-11 19:32:00 +09:00
Masayuki Nakano
531991202f Bug 1460509 - part 14: Make HTMLEditRules::WillRelativeChangeZIndex() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 8HEqK3DAPO4

--HG--
extra : rebase_source : bd1e3223b25d72ab0ef7728361fd9a9c3b8b12ab
2018-05-11 19:24:35 +09:00
Masayuki Nakano
285bb617db Bug 1460509 - part 13: Make TextEditRules::WillInsert() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
This patch also makes aCancel of TextEditRules::WillInsert() optional since
a lot of callers need to ignore the result.

MozReview-Commit-ID: JrvycxMQ9Mm

--HG--
extra : rebase_source : 9ecdc0fd363d9da33c12409f2993da9c58553598
2018-05-11 19:06:07 +09:00
Masayuki Nakano
21be173075 Bug 1460509 - part 12: Make TextEditRules::WillInsertBreak() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: Ia5MJ465Hdf

--HG--
extra : rebase_source : 15daea3f4c4fe68e0c39e07fa7fdfca8b3ccaee5
2018-05-11 18:49:44 +09:00
Masayuki Nakano
29bc07945c Bug 1460509 - part 11: Make TextEditRules::CollapseSelectionToTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 3ulGUfu1af1

--HG--
extra : rebase_source : 0828f72d3c847d2c989ee8496567293e637ea3f8
2018-05-11 18:40:47 +09:00
Masayuki Nakano
6f6c32762e Bug 1460509 - part 10: Make TextEditRules::WillInsertText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: RT0Bi9TBwt

--HG--
extra : rebase_source : d3c9657649dbce9ab8f872db9748a2d66d876f15
2018-05-11 18:29:54 +09:00
Masayuki Nakano
d43e448993 Bug 1460509 - part 9: Make TextEditRules::WillSetText() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: 9ksPugTVVqh

--HG--
extra : rebase_source : 25089af1de8fc8429118e773df25ec2788cb75b9
2018-05-11 17:33:55 +09:00
Masayuki Nakano
04fbe5c6c1 Bug 1460509 - part 8: Make TextEditRules::WillDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
This patch creates internal method for it as DeleteSelectionWithTransaction()
because it needs to create SelectionBatcher and destruction of it may cause
destroying the editor.  Therefore, unfortunately, all callers of
DeleteSelectionWithTransaction() needs to check CanHandleEditAction()
manually.  If we could use try-catch, we could make it safer, though.

MozReview-Commit-ID: 13enOQjEzNn

--HG--
extra : rebase_source : 5a902026bcc507fbf9f1949fdcf33a98aabd9a0b
2018-05-11 17:15:53 +09:00
Masayuki Nakano
b2219367ca Bug 1460509 - part 7: Make TextEditRules::DidDeleteSelection() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
And also this patch removes unnecessary arguments from the method.

MozReview-Commit-ID: UKscK4vFVX

--HG--
extra : rebase_source : 7f6b9405824a3f175f165a2d7d75a293108278f3
2018-05-11 16:48:29 +09:00
Masayuki Nakano
d6057a85d0 Bug 1460509 - part 6: Make TextEditRules::RemoveRedundantTrailingBR() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: HpFo0SiTBWJ

--HG--
extra : rebase_source : 531116b0621557293f026f214601848a60602331
2018-05-11 16:36:07 +09:00
Masayuki Nakano
849d638e49 Bug 1460509 - part 5: Make TextEditRules::CreateTrailingBRIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
MozReview-Commit-ID: CNTgECam862

--HG--
extra : rebase_source : 633d729868f9cb6a287c45f98497e45a08ef2c95
2018-05-11 16:31:53 +09:00
Masayuki Nakano
349bf14f6b Bug 1460509 - part 4: Make TextEditRules::CreateBogusNodeIfNeeded() return NS_ERROR_EDITOR_DESTROYED if it causes destroying the editor r=m_kato
Note that HTMLEditRules::DocumentModifiedWorker() is a runnable method.
So, it cannot return nsresult.  Therefore, it just checks the result
only with NS_WARNING_ASSERTION().

MozReview-Commit-ID: KBSpv5H5KGU

--HG--
extra : rebase_source : b356ab04d0459214df9dbb3dbfb0e3eecc686348
2018-05-11 16:24:15 +09:00
Masayuki Nakano
2d5d9aed52 Bug 1460509 - part 3: Make TextEditRules::HideLastPWInput() return NS_ERROR_EDITOR_DESTROYED when it causes destroying the editor r=m_kato
And also this patch marks it as MOZ_MUST_USE.  All callers have to check if
the result is NS_ERROR_EDITOR_DESTROYED at least.

MozReview-Commit-ID: H4DfU1asPpe

--HG--
extra : rebase_source : c11cc00500aad44bd542147fb971e3cce4d634e2
2018-05-11 16:08:47 +09:00
Masayuki Nakano
b2f86bbbe1 Bug 1460509 - part 2: Make TextEditRules::CreateBR() and TextEditRules::CreateMozBR() return both new <br> element node and error code since if they cause destroying the editor, each caller needs NS_ERROR_EDITOR_DESTROYED result r=m_kato
First, this patch changes TextEditRules::CreateBRInternal() to a private method
for making any callers use CreateBR() or CreateMozBR() instead.

Then, this patch makes TextEditRules::CreateBRInternal() return both nsresult
and created <br> element with CreateElementResult class.

Finally, this patch makes all callers of them check if they don't return an
error code including NS_ERROR_EDITOR_DESTROYED.

MozReview-Commit-ID: 18OvPmbDVHK

--HG--
extra : rebase_source : 328a91146539763cec317105b92aa3ce5d4b8233
2018-05-11 15:52:24 +09:00
Masayuki Nakano
9ac857639c Bug 1460509 - part 1: Declare NS_ERROR_EDITOR_DESTROYED error code and add a check method to TextEditRules whether it can keep handling edit action at a moment r=m_kato
This patch defines NS_ERROR_EDITOR_DESTROYED error code as an editor module
specific error code.

And creates TextEditRules::CanHandleEditAction() to check if the instance
can keep handling edit action.

MozReview-Commit-ID: 4qECwNBO0yz

--HG--
extra : rebase_source : a925a9b6840d4d06e2792b9fe276e062288b0806
2018-04-24 15:23:01 +09:00
James Graham
0fdad07d90 Bug 1345875 - Reduce the amount of text about artifact mode, r=nalexander
Reduce the amount of text so that the options are more likely to be
visible and people are more likely to read it.

--HG--
extra : rebase_source : 95eacc8b6b09a82dfb1bec0e837bc70057c5cef1
2017-03-09 14:38:06 +00:00
Dan Minor
40fcbf60d9 Bug 1450658 - Should bring window to front when screen-sharing a window; r=pehrsons
This adds a FocusOnSelectedSource method to PCameras and uses it to focus the
selected window while window sharing. We can't just focus the window as soon as
it is shared because we have a live preview in the getUserMedia permissions
prompt which would cause the prompt to lose focus. Instead, this only focuses the
window when the sharing is not done from a chrome context.


MozReview-Commit-ID: 5jre75E3JLi

--HG--
extra : rebase_source : 97f472f6ed1c5d6bed1af01fb7243a82b2629b03
2018-05-08 15:55:36 -04:00
Andreas Tolfsen
58db281570 Bug 1463085 - Remove unnecessary self-assignment. r=maja_zf
Prior to bug 1400256 we used to have to deserialise the web
element received from chrome space manually, and presumably this
self-assignment is a leftover from that time.

This fixes an eslint error upon upgrading to eslint version 5.

Thanks-to: Mark Banner <standard8@mozilla.com>
MozReview-Commit-ID: A46wK71AwBe

--HG--
extra : rebase_source : 2ad04f87b31cb369c7c3acf6a50a3bcbd493a735
2018-05-21 13:29:30 +01:00
Jan Odvarko
17b577a283 Bug 1462882 - Avoid NPE when filtering using remote-ip; r=jryans
MozReview-Commit-ID: IJ2lNgMRCYz

--HG--
extra : rebase_source : 6cb4b7ea83e8e363a6ce635883ca39fe2e08791a
2018-05-22 10:34:50 +02:00
Mark Banner
467c04144d Bug 1463089 - Remove deprecated experimentalObjectRestSpread option from netmonitor's .eslintrc.js file, and clean it up. r=Honza
MozReview-Commit-ID: EiFTniuq3Qy

--HG--
extra : rebase_source : 5c6aabeb38b5dcbd8463d7f95ed6fbf79bf92b09
2018-05-21 12:20:37 +01:00
Dorel Luca
dbe91ea7b6 Merge mozilla-central to autoland 2018-05-23 13:03:24 +03:00
Dorel Luca
dc6d856805 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-23 12:51:22 +03:00