Commit Graph

8015 Commits

Author SHA1 Message Date
Masayuki Nakano
30fb5747b0 Bug 1391165 - part4: nsIEditor::EndOfDocument() should be implemented with an internal method which takes pointer to Selection r=smaug
EditorBase::GetSelection() sometimes appears in profile.  So, it shouldn't be
called in nsIEditor::EndOfDocument() if the callers of
nsIEditor::EndOfDocument() has a pointer to Selection.

This patch adds EditorBase::CollapseSelectionToEnd() for the internal method
and make all callers of nsIEditor::EndOfDocument() use it.

MozReview-Commit-ID: 8H4ThxzdKDf

--HG--
extra : rebase_source : 7436d7f286351fa9c91175b40e686f7ca1f3c69f
2017-08-17 17:08:22 +09:00
Masayuki Nakano
a329587e5e Bug 1391165 - part3: TextEditRules::CollapseSelectionToTrailingBRIfNeeded() should use EditorBase::GetChildOffset() only when it's necessary r=smaug
In most cases, TextEditRules::CollapseSelectionToTrailingBRIfNeeded() doesn't
use the index anymore.  Therefore, it should stop using
EditorBase::GetNodeLocation() and use EditorBase::GetChildOffset() only when
the offset is necessary.

MozReview-Commit-ID: 9vGcLnTUnsu

--HG--
extra : rebase_source : af0cdad3a1905bf2e5654a109aa4037ec70b422b
2017-08-17 16:48:49 +09:00
Masayuki Nakano
0290f8a69f Bug 1391165 - part2: TextEditRules::CollapseSelectionToTrailingBRIfNeeded() should use nsINode::GetNextSibling() for retrieving next child of a node r=smaug
nsINode::GetChildAt() is too expensive if it's used for next sibling of a node.

This patch makes it use nsINode::GetNextSibling() instead.

MozReview-Commit-ID: CAC7gFNo77w

--HG--
extra : rebase_source : 185457b910e2e09c58a6f02525ae61aff149511c
2017-08-17 16:35:30 +09:00
Masayuki Nakano
87f491432c Bug 1391165 - part1: EditorBase::GetChildOffset() and EditorBase::GetNodeLocation() shouldn't use nsINode::IndexOf() as far as possible r=smaug
nsINode::IndexOf() is expensive especially when it's in a hot path, it's too
expensive.  So, EditorBase::GetChildOffset() and EditorBase::GetNodeLocation()
should check child's siblings first.  If some of them are nullptr, it means
that it's first child or last child of the parent.

Note that EditorBase::GetChildOffset() may return wrong index if it's called
while aChild is being removed from aParent or aParent isn't actual parent of
aChild.  However, there are MOZ_ASSERTs to ensure value isn't -1.  Therefore,
it's safe to assume that aParent is always the parent of aChild and it won't
be called from ContentRemoved() of mutation observers.

MozReview-Commit-ID: 8JdYWuZbHe5

--HG--
extra : rebase_source : 6ded91a3aa8b00ab4d2d544c2c392d88cb769cef
2017-08-17 16:24:16 +09:00
Ehsan Akhgari
950a791753 Bug 1391315 - Avoid using nsINode::GetChildAt() in TextEditRules::DocumentIsEmpty(); r=masayuki
This method will become a lot slower when bug 651120 lands.
2017-08-18 01:49:08 -04:00
Yoshi Huang
b930b3d1ee Bug 1390770 - rewrite test_bug289384.html for new data: URI inheritance model. r=masayuki 2017-08-18 10:35:58 +08:00
Ehsan Akhgari
43a6f66350 Backout bug 1386480 for causing bug 1391410 2017-08-17 17:16:27 -04:00
Carsten "Tomcat" Book
99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Makoto Kato
4ad29844a4 Bug 1380824 - Call RepaintSelection out of script blocker. r=masayuki
MozReview-Commit-ID: LFyZLW0da7f
2017-08-17 15:28:04 +09:00
Nicholas Nethercote
025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Xidorn Quan
179961b3c9 Bug 1383845 - Enable tests disabled for bug 1383845. r=TYLin
MozReview-Commit-ID: Glao9d9PiUF

--HG--
extra : rebase_source : cfc70fcb350a7ee8e325ba1bda0bcdead62d786e
2017-08-17 10:51:59 +10:00
Masayuki Nakano
d2dd8c5d8f Bug 1390831 - Make test_bug635636.html e10s-aware r=Ehsan
test_bug655636.html refers gBrowser, however, it's available only in chrome
process and it's referred only for listening to "pageshow" event instead of
"load" event of the data URI.  So, we must be able to use "unload" event of the
previous URL instead.

Although, this testcase (even without this change) won't cause crash even if
backing out the patch for bug 635636 anymore.

MozReview-Commit-ID: B8qOwVZqZQm

--HG--
extra : rebase_source : d383181886152684a8bf9c2caf7248d5f7582c0a
2017-08-16 21:03:18 +09:00
Masatoshi Kimura
be91c9a266 Bug 886907 - Remove old synchronous contentPrefService from the tree. r=adw
MozReview-Commit-ID: BZsB3FR3jHC

--HG--
rename : toolkit/components/contentprefs/ContentPrefService2.jsm => toolkit/components/contentprefs/ContentPrefService2.js
rename : toolkit/components/contentprefs/nsContentPrefService.manifest => toolkit/components/contentprefs/ContentPrefService2.manifest
extra : rebase_source : ab45b7668e97734004502ea776effedcb9b74974
2017-08-11 23:29:55 +09:00
Masayuki Nakano
e1a21d5a3e Bug 1387317 - part5: AutoPlaceHolderBatch should take EditorBase instead of nsIEditor r=m_kato
AutoPlaceHolderBatch can take EditorBase class and its inherited class, AutoEditBatch, can be removed if we implement other constructor which doesn't take transaction name.

Additionally, nsIEditor::(Begin|End)PlaceHolderTransaction() are referred only by AutoPlaceHolderBatch.  Therefore, they can be non-public methods and removed from nsIEditor interface.

Note that this patch also repalces "PlaceHolder" with "Placeholder" since it's a word.

MozReview-Commit-ID: 5dw3kcX3bOx

--HG--
extra : rebase_source : e926cc1c2ebea70eb08e43778a8b52912b559b7b
2017-08-14 14:56:39 +09:00
Masayuki Nakano
1bbc0d5920 Bug 1387317 - part4: Make editor flag setters use new AddFlags() or RemoveFlags() if useful r=m_kato
MozReview-Commit-ID: EMDeGfK37Lx

--HG--
extra : rebase_source : 8a2b4e809c608649fbb41edd32d2165db7e77516
2017-08-08 12:36:29 +09:00
Masayuki Nakano
8437aa287b Bug 1387317 - part3: HTMLEditor should use RefPtr<HTMLEditor> rather than nsCOMPtr<nsIHTMLEditor> for kungFuDeathGrip r=m_kato
MozReview-Commit-ID: 1F6wwjvdD8H

--HG--
extra : rebase_source : 23c2fefa67e11b584868d349bd043148c4b91770
2017-08-08 12:06:10 +09:00
Masayuki Nakano
7c54bc878b Bug 1387317 - part2: EditorEventListener should stop using interface methods as far as possible r=m_kato
MozReview-Commit-ID: EPQeBez2tJh

--HG--
extra : rebase_source : b18b3399f703d3cdcb6f26cec3fcb8f707fb9519
2017-08-08 11:25:36 +09:00
Masayuki Nakano
20fc8ab477 Bug 1387317 - part1: Make AutoSelectionSetterAfterTableEdit use HTMLEditor instead of nsITableEditor r=m_kato
nsITableEditor is now a builtin class.  So, it's implemented only by HTMLEditor.  Therefore, AutoSelectionSetterAfterTableEdit can use HTMLEditor.

Then, nsITableEditor.setSelectionAfterTableEdit() can be removed from nsITableEditor and moved to HTMLEditor as non-virtual method since nobody uses it from JS.

MozReview-Commit-ID: KnN6Fw4TYyn

--HG--
extra : rebase_source : 48412a5f81f30d9ada47550fdb4d1ee0d88de6f4
2017-08-08 10:57:19 +09:00
Carsten "Tomcat" Book
bcbc42d4e3 Merge mozilla-central to mozilla-inbound 2017-08-15 13:09:01 +02:00
Yoshi Huang
60b7d9f697 Bug 1390398: fix failures on windows for new data: URI inheritance model. r=smaug 2017-08-15 18:09:28 +08:00
Carsten "Tomcat" Book
6b36e00b7c merge mozilla-inbound to mozilla-central a=merge 2017-08-15 11:42:11 +02:00
Makoto Kato
357fdca523 Bug 1390053 - Enable editor/libeditor/tests/test_bug830600.html on mochitest-e10s. r=masayuki
This test is turned off by bug 1269209 on e10s.  But there is no exactly reason why this test on e10s is turned off.

Although I run this test on e10s now, it seems to pass this.  So we should turn on this test even if e10s.

MozReview-Commit-ID: JHQP2ZYvsHL

--HG--
extra : rebase_source : 2bc45f0d2b5cc99bad93267f40191866264af414
2017-08-14 18:29:40 +09:00
Masayuki Nakano
9ee491b79f Bug 1388001 - part3: Remove nsIEditor argument of nsIHTMLDocument::TearingDownEditor() since it's unused r=smaug
nsIHTMLDocument::TearingDownEditor() takes nsIEditor as an argument.  However, it's not used in it.  So, we can remove it.

MozReview-Commit-ID: KUmIsnVGB6H

--HG--
extra : rebase_source : ddd344b9df18e0b33d54d2f99e6335449f55df81
2017-08-07 14:25:52 +09:00
Masayuki Nakano
d66337db9a Bug 1388001 - part2: nsEditingSession should treat editor as HTMLEditor r=m_kato
nsEditingSession should treat editor as HTMLEditor in its internal handling.

MozReview-Commit-ID: 51SfY4oeq3p

--HG--
extra : rebase_source : 90535267e62de17755fff9f21b6a0f74244d849a
2017-08-04 22:53:28 +09:00
Masayuki Nakano
fc87c572fa Bug 1388001 - part1: Create nsIEditingSession::GetHTMLEditorForWindow() r=smaug
Some users of HTMLEditor retrieve pointer to editors with nsIEditingSession::GetEditorForWindow() but it returns nsIEditor.  So, there should be a method which returns HTMLEditor*.

MozReview-Commit-ID: Bzc1LIlTSDF

--HG--
extra : rebase_source : f6fb3e5852809487883e3e6fedda9580206b2cb5
2017-08-12 11:44:16 +09:00
Sebastian Hengst
d98ea1f774 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: FzIkMLHbOh2
2017-08-14 01:30:32 +02:00
Aryeh Gregor
99a150fe57 Bug 1359397 - Don't allow Selection in nodes not in the document; r=masayuki
This matches the spec and Chrome, and seems to bring us closer to Edge
and WebKit as well.  It also matches our own behavior for addRange(),
which was changed in bug 1341137.

For collapse and selectAllChildren, we match the tests and browsers, but
the spec is incorrect at the time of this writing:
https://github.com/w3c/selection-api/pull/86

The removeAllRanges test hadn't been updated for the spec change.

MozReview-Commit-ID: DTK8283k5IP

--HG--
extra : rebase_source : 54701e7136c33ebce651d5f74c3dc1d8b944f9a3
2017-08-10 15:02:08 +03:00
Kyle Machulis
649634a721 Bug 1387184 - Remove nsIDOMHTMLEmbedElement; r=bz
Removes nsIDOMHTMLEmbedElement and all references. HTML elements are
now handled by WebIDL. With the deprecation of extensions, XPCOM
interfaces to HTML elements are no longer needed.

MozReview-Commit-ID: DI4XVvdgPDI

--HG--
extra : rebase_source : 74bd92619e3d1db04c3dd40ec3022474fe1d647c
2017-08-09 12:05:08 -07:00
Wes Kocher
936a9461f6 Merge inbound to m-c a=merge
MozReview-Commit-ID: KRQeIGmhAPA
2017-08-10 18:14:34 -07:00
Sebastian Hengst
51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Ehsan Akhgari
3ab3b25fad Bug 1388917 - Fix moving of SelectionState in PlaceholderTransaction's constructor; r=masayuki 2017-08-10 08:35:19 -04:00
Masayuki Nakano
19dc3194d7 Bug 1319340 - part9: Make nsComposerDocumentCommands use concrete class when calling methods of editor r=m_kato
MozReview-Commit-ID: 15WBfUpfo6L

--HG--
extra : rebase_source : 0e729ea9f2a37555836cca869ea1da4174895960
2017-08-07 18:27:16 +09:00
Masayuki Nakano
de893ee82e Bug 1319340 - part8: EditorCommands should use TextEditor instead of nsIEditor, nsIPlaintextEditor and nsIEditorMailSupport r=m_kato
EditorCommands implements common edit commands.  So, we can use TextEditor even if the instance is HTMLEditor.

Then, EditorCommands can use non-virtual methods of the concrete classes.

MozReview-Commit-ID: DgKHqC0osRb

--HG--
extra : rebase_source : e9abd7ef8b48cfdc65bbeb56ebe81dc0548005dd
2017-08-04 20:41:20 +09:00
Masayuki Nakano
2978474960 Bug 1319340 - part7: Fix some warnings in nsComposerCommands.h r=m_kato
MozReview-Commit-ID: A0KnOCCWqYZ

--HG--
extra : rebase_source : 35f0ad7b68e8c010eb98532e50bfc107abeefb7f
2017-08-04 18:50:26 +09:00
Masayuki Nakano
b5b8d1064d Bug 1319340 - part6: Implement some interface methods as non-virtual methods of EditorBase or HTMLEditor r=m_kato
nsComposerCommands uses some simple getter methods.  They can be simpler non-virtual methods.  So, we should do it.

Note that this changes that EditorBase::GetIsSelectionEditable() won't return error.  However, it has returned error only when selection controller isn't available.  That means that the selection controller has been destroyed and the editor will be destroyed.  So, this must not be problem since it returns false (non-editable) instead and won't break any behavior since the editor won't be editable by users nor JS anymore.

MozReview-Commit-ID: E9ccFspG6na

--HG--
extra : rebase_source : bcd1314cb386fcaf175adabfefde5885decd87c0
2017-08-04 18:30:13 +09:00
Masayuki Nakano
efae799abd Bug 1319340 - part5: Make nsComposerCommands use concrete class when calling methods of editor r=m_kato
Compiler may can optimize to call virtual methods at build time if we call them with concrete classes because some of them may have final keyword.

Even if not so, we can optimize some methods with creating non-virtual methods.

MozReview-Commit-ID: K3bRlc0URml

--HG--
extra : rebase_source : 4a76635c7aed29501f71ae74f3f73e2b22ca219e
2017-08-04 17:12:01 +09:00
Masayuki Nakano
6b4db6ec7f Bug 1319340 - part4: SetState() of nsComposerCommands should take HTMLEditor* instead of nsIEditor* r=m_kato
All SetState() methods in nsComposerCommands require HTMLEditor.  So, it should take HTMLEditor* rather than nsIEditor*.

MozReview-Commit-ID: AVbnRsMsmeY

--HG--
extra : rebase_source : 23bcc585a045a39620102c4fef9c1a9e12b9ea37
2017-08-04 16:20:56 +09:00
Masayuki Nakano
505c529148 Bug 1319340 - part3: ToggleState() in nsComposerCommands should take HTMLEditor* instead of nsIEditor* r=m_kato
Similar to GetCurrentState(), all ToggleState() methods require HTMLEditor.  So, they should take HTMLEditor* instead of nsIEditor*.

MozReview-Commit-ID: BwM6WRKFn6Q

--HG--
extra : rebase_source : 425b7b405b5881b97e8113c3ab88e9d0514b6a07
2017-08-04 15:57:57 +09:00
Masayuki Nakano
cf8f0ec404 Bug 1319340 - part2: GetCurrentState() of the classes in nsComposerCommands should take HTMLEditor instead of nsIEditor r=m_kato
All GetCurrentState() methods in nsComposerCommands require HTMLEditor but its argument is nsIEditor*.  So, it should take HTMLEditor* and it shouldn't be called if given editor isn't HTMLEditor since it's virtual method.

MozReview-Commit-ID: HsvYJN8hIxN

--HG--
extra : rebase_source : f8f9c8de902af5311771b71a96c76d63325970a5
2017-08-04 15:41:42 +09:00
Masayuki Nakano
722bf07347 Bug 1319340 - part1 Move AsTextEditor() and AsHTMLEditor() to nsIEditor r=m_kato
nsIEditor is still first contact with editor class for some modules.  They should be accessible to the concrete classes without QI.  Therefore, nsIEditor should have As*Editor() methods.

Additionally, this adds AsEditorBase().  That is always implemented but it might be necessary for some files for minimizing its include files.

MozReview-Commit-ID: 8WqkDJLiVDs

--HG--
extra : rebase_source : e51282df244efad62bc6fe04ab449e3beab440f9
2017-08-04 15:01:36 +09:00
Makoto Kato
b04d5091db Bug 1388638 - Use RAII class for StartBatchChanges/EndBatchChanges. r=masayuki
CompositionTransaction forgets to call EndBatchChanges when GetSelectionController returns error, so we should use RAII class instead.

MozReview-Commit-ID: HI9kutRVzx6

--HG--
extra : rebase_source : d276f4349c5a64d4610581ae1a76d160841f7d7b
2017-08-09 18:06:36 +09:00
Masayuki Nakano
a2333fc4bb Bug 1060051 - Make editor related interfaces builtin classes if it's possible r=Ehsan,smaug
If we make nsIEditor a builtin class, that means that its instance can be only TextEditor or HTMLEditor.  Then, users of nsIEditor can use concrete classes such as EditorBase, TextEditor or HTMLEditor instead.  Then, the users can reduce unnecessary QI and a lot of virtual calls if we'll create non-virtual methods.

So, let's make editor related interfaces builtin classes.

MozReview-Commit-ID: 93WfsSDuJiJ

--HG--
extra : rebase_source : 39151eb4ffaaf195fec57234ea84c9f4066c58d1
2017-08-04 13:57:56 +09:00
Carsten "Tomcat" Book
e02df09b7c Merge mozilla-central to mozilla-inbound 2017-08-08 13:23:59 +02:00
Carsten "Tomcat" Book
0f16d437cc merge mozilla-inbound to mozilla-central a=merge 2017-08-08 13:18:14 +02:00
Nicholas Nethercote
1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Makoto Kato
e9bdbc5bb1 Bug 1387945 - Use nsIContent for CreateAnonymousElement. r=masayuki
CreateAnonymousElement still uses nsIDOMNode, but we should use nsIContent for it.

MozReview-Commit-ID: 2xgzlE6NVra

--HG--
extra : rebase_source : c93a9acb230604da391f705b0038e3cf7fbd4f23
2017-08-07 14:09:51 +09:00
Stone Shih
55c5359fa6 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Wes Kocher
7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Christoph Kerschbaumer
824e01cc12 Bug 1388142 - Convert editor/libeditor/tests/test_CF_HTML_clipboard.html to comply with new data: URI inheritance model. r=smaug 2017-08-07 21:21:59 +02:00
Cameron McCormack
536fe8ffa0 Bug 1387481 - Part 1: Don't eagerly style editor-created NAC if it's appended to an element in a display:none subtree. r=hiro
MozReview-Commit-ID: 7bucY7JKRS0

--HG--
extra : rebase_source : 8a4fd542fe72c6abc0636784841d3851c69b6fb4
2017-08-05 17:36:09 +08:00
Sebastian Hengst
765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Ehsan Akhgari
4c8d604bfc Bug 1386485 - Part 5: Avoid manipulating the refcount of all visited nodes in CreateBogusNodeIfNeeded(); r=masayuki 2017-08-04 03:47:14 -04:00
Ehsan Akhgari
4018b56c7c Bug 1386485 - Part 4: Devirtualize and inline EditorBase::IsEditable(); r=masayuki 2017-08-04 03:47:14 -04:00
Ehsan Akhgari
c6b7fe866d Bug 1386485 - Part 3: Devirtualize EditorBase::AsTextEditor()/AsHTMLEditor(); r=masayuki 2017-08-04 03:47:14 -04:00
Ehsan Akhgari
b638df20b4 Bug 1386485 - Part 2: Hoist the body editablity check out of the loop; r=masayuki 2017-08-04 03:47:13 -04:00
Ehsan Akhgari
01af645785 Bug 1386485 - Part 1: Inline EditorBase::IsMozEditorBogusNode(); r=masayuki 2017-08-04 03:47:13 -04:00
Wes Kocher
e371c2bbf3 Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: AHCROxMdKPB
2017-08-03 18:13:23 -07:00
Wes Kocher
2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Ehsan Akhgari
cf4e6a817c Bug 1386411 - Part 7: Inline EditorBase::GetSelection(); r=masayuki 2017-08-03 17:06:31 -04:00
Ehsan Akhgari
ad87011a1d Bug 1386411 - Part 5: Make BaseEditor::GetSelectionController() return nsISelectionController*, and inline it; r=masayuki
This method can be extremely hot, so we need to remove all sources of XPCOM
overhead from it.  This includes the usages of weak pointers (thanks to the
previous parts), refcounting, and QueryInterface.

I kept the callers hold the selection controller alive by assigning the
return value to an nsCOMPtr in places where the methods called on it could
have a remote chance of messing with the lifetime of objects.
2017-08-03 17:05:22 -04:00
Ehsan Akhgari
697fb3f83d Bug 1386411 - Part 4: Don't store the document as a weak reference on EditorBase; r=masayuki
This one also doesn't need to be a weak reference, and can be a strong
reference that the cycle collector knows about instead.
2017-08-03 17:05:21 -04:00
Ehsan Akhgari
ace85f9311 Bug 1386411 - Part 1: Don't store the selection controller as a weak reference on EditorBase; r=masayuki
This doesn't need to be a weak reference, and can instead be a simple strong
reference that we introduce to the cycle collector.
2017-08-03 17:05:15 -04:00
Jim Mathies
57d9bf0aee Bug 1360666 - Update IME state when nsObjectLoadingContent content changes type from 'loading' to a valid content type. r=masayuki
MozReview-Commit-ID: JC3YGS75gpN
2017-08-03 14:07:14 -05:00
Geoff Brown
d45ed676c8 Bug 1376382 - Skip test_bug586662.html for frequent intermittent failures; r=me,test-only 2017-08-03 09:20:56 -06:00
Ehsan Akhgari
34e6b544eb Bug 1386484 - Remove the SetTextTransaction class and embed its functionality into EditorBase::SetTextImpl(); r=masayuki
Besides some unnecessary copying and malloc overhead that this removes, it
also removes a call to dom::Text::GetData() which we used to only make to
get the old length of the text node before modifying it.  Turns out that
this old length was already obtained once in SetTextImpl().
2017-08-03 09:54:59 -04:00
Masayuki Nakano
e4fb1c57a7 Bug 1385905 - part2: HTMLEditRules::SplitParagraph() should insert normal <br> element rather than moz-<br> element if split element and/or new element is empty r=m_kato
Currently, HTMLEditRules::SplitParagraph() inserts moz-<br> element when split element and/or new element causes empty line.  However, PlaintextSerializer ignores moz-<br> elements.  Therefore, empty lines which are created by SplitParagraph() will be removed when it's converted to plaintext.

So, it should insert normal <br> element for placeholder of empty lines instead.  Note that moz-<br> elements are appeared as normal <br> elements in the result of Element.innerHTML.  Additionally, Chromium always inserts a <br> element for empty block elements which are created by Enter key press.  Therefore, using normal <br> element in this case shouldn't cause any compatibility problems.

MozReview-Commit-ID: FNV41zEFWqQ

--HG--
extra : rebase_source : ece6c2e275e2a75d9d2871d62ed4204115792b99
2017-08-01 22:38:50 +09:00
Masayuki Nakano
5051f16794 Bug 1385905 - part1: Add automated test to check if editor won't create mozBR element when typing Enter before invisible <br> element r=m_kato
MozReview-Commit-ID: AcHnK2LbTs1

--HG--
extra : rebase_source : a7a5ad16da227db53ab3e7324fa920a6b0276369
2017-08-01 18:07:08 +09:00
Wes Kocher
baf6cddc4c Merge inbound to central, a=merge
MozReview-Commit-ID: 9NFjSEt96iT
2017-08-02 17:11:51 -07:00
Olli Pettay
1c8b827d25 Bug 1371657 - Ensure editing UI is hidden when disabling editing. r=masayuki
--HG--
extra : rebase_source : cf83e8ac6662d15d15ca986f709d89edc87af28e
2017-08-02 14:04:05 -04:00
Makoto Kato
d7503476f0 Bug 699703 - Part 2. SetSelectionAfterTableEdit should check whether editor is destroyed. r=masayuki
After reframe, SetSelectionAfterTableEdit might be called from RAII class, so we should check whether editor is destroyed.

MozReview-Commit-ID: I4r6kvxgRDZ

--HG--
extra : rebase_source : 4bd71775f02f57573af0f0efd5c1946285e4e4f4
2017-08-01 16:34:17 +09:00
Makoto Kato
9b683468d5 Bug 699703 - Need reframe before calling SetSelectionAfterTableEdit. r=masayuki
HTMLEditor::TabInTable inserts row element, then it selects a cell.  But when enabling lazy frame construction for editable node, it selects invalid cell and table.

Because HTMLEditor::SetSelectionAfterTableEdit doesn't select cell correctly on InsertTableRow().

HTMLEditor::SetSelectionAfterTableEdit uses HTMLEditor::GetCellAt, so it depends on frame.  So we need flush frame before calling it.

Also, a comment of HTMLEditor::InsertTableRow is invalid now because we don't use nsresult version of CreateElementWithDefualts.

MozReview-Commit-ID: 698TvmMZgwB

--HG--
extra : rebase_source : 95df12f1f870a2c68d02b24b8758dfe6d381a416
2017-07-14 15:48:40 +09:00
Ehsan Akhgari
22aa56b6cd Bug 1386222 - Ensure that we always respect the undo/redo transaction history when modifying the <xul:textbox>.value dynamically through script; r=bzbarsky 2017-08-01 13:59:45 -04:00
Ehsan Akhgari
30d4df5778 Bug 1385538 - Avoid dynamic memory allocation for EditorBase::mSelState; r=masayuki 2017-07-31 14:13:47 -04:00
Ehsan Akhgari
f3a8bf3251 Bug 1385525 - Part 2: Make SetTextTransaction lighter weight by making it a normal C++ class allocated on the stack; r=masayuki
This avoids the cost of allocation on the heap and cycle collection,
and removes some dead code.
2017-07-31 14:12:12 -04:00
Ehsan Akhgari
18170165f0 Bug 1385525 - Part 1: Speed up EditorBase::SetTextImpl() by actually bypassing all of the editor transaction management machinery; r=masayuki 2017-07-31 14:10:50 -04:00
Ehsan Akhgari
e64f31b735 Bug 1385514 - Part 2: Replace 'spaz' with 'change' in the editor code 2017-07-31 11:20:38 -04:00
Ehsan Akhgari
5c7a6f8e12 Bug 1385514 - Part 1: Make SetTextTransaction a selection preserving transaction; r=masayuki
This makes the SetTextTransaction transaction behave more similarly to the rest of
the editor transactions, by making sure the inner transactions don't manipulate
the selections themselves and leave it up to the AfterEdit() method to take care of
adjusting the selection when the entire editing operation is finished.
2017-07-31 11:20:38 -04:00
Ehsan Akhgari
1eb17afc4f Bug 1385392 - Avoid needlessly looking up the selection twice when DoTransaction() is called from TextEditRules::WillSetText(); r=masayuki 2017-07-31 10:57:10 -04:00
Ehsan Akhgari
423b388329 Bug 1385384 - Don't store mPlaceholderTransactionWeak as a weak pointer; r=masayuki 2017-07-31 10:55:22 -04:00
Sebastian Hengst
915c63c332 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-07-31 11:28:37 +02:00
Nicholas Nethercote
72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote
d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote
581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Makoto Kato
2652b1c5d2 Bug 1385749 - Move test_bug795418-*.html to subsuite=clipboard. r=masayuki
test_bug795418-*.html depends on clipboard.  But these tests aren't subsuite=clipboard and are sometimes failure (bug 1334700, bug 1335221, bug 1339430, bug 1343883 and bug 1348093).  So we should move these to subsuite=clipboard to try fixing this.

MozReview-Commit-ID: 1m5dFGZ18a

--HG--
extra : rebase_source : 847b1b7842c32e93c61b8ee572cff16c70adc323
2017-07-31 11:58:41 +09:00
Makoto Kato
3d4f2d6fdc Bug 1383755 - Part 2. Add crash test for object resizer. r=masayuki
MozReview-Commit-ID: WLyLl5vIj0

--HG--
extra : rebase_source : c1166eefe7787761346e6bad069b34dcb42c94e7
2017-07-27 18:21:27 +09:00
Makoto Kato
44c1ed6949 Bug 1383755 - Part 1. NAC property might be removed by nsIDocument::AdoptNode. r=masayuki
nsIDocument::AdoptNode might to remove all properties.  So before destroying editor, NAC property might be already removed.  So we have to consider that NAC is removed.

MozReview-Commit-ID: DakRRqrzEtF

--HG--
extra : rebase_source : ce972f1b42b6ff7efdf09b9a70cc1a9d27f128fb
2017-07-31 12:56:34 +09:00
Kyle Machulis
d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Christoph Kerschbaumer
db40f0ec94 Bug 1385240 - Update editor/libeditor/tests/test_bug635636.html to comply with new data: URI inheritance model. r=masayuki 2017-07-28 13:34:24 +02:00
Carsten "Tomcat" Book
892bedca2e merge mozilla-inbound to mozilla-central a=merge 2017-07-28 15:24:39 +02:00
Sebastian Hengst
d7527a414d Backed out changeset 07b534f44740 (bug 1384835) for failing xpcshell's security/manager/ssl/tests/unit/test_cert_sha1.js checkCertErrorGenericAtTime on Linux x64 debug. r=backout 2017-07-28 10:30:29 +02:00
Sebastian Hengst
1d708511f0 Backed out changeset 5df4d8778602 (bug 1384835) 2017-07-28 10:29:29 +02:00
Sebastian Hengst
744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Carsten "Tomcat" Book
28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book
2ff6df9177 Backed out changeset 5198322f7a62 (bug 1351148) 2017-07-28 09:20:20 +02:00
Carsten "Tomcat" Book
6aa98d7df0 Merge mozilla-central to autoland 2017-07-28 09:50:36 +02:00
Nicholas Nethercote
200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Nicholas Nethercote
0574a6b496 Bug 1384835 (part 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
Because we want to remove nsAdoptingString. We have other variants that don't
use nsAdoptingString, which can be used instead. There are three basic
patterns.

1. The easiest case is when we don't check for success.

> nsAdoptingString s = Preferences::GetString("foo");
> foo(s);

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> foo(s);

2. The next case is when we check if the result is empty.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s.IsEmpty()) { ... }

becomes:

> nsAutoString s;
> Preferences::GetString("foo", s);
> if (s.IsEmpty()) { ... }

3. The final case is when we null check the result.

> nsAdoptingString s = Preferences::GetString("foo");
> if (s) { ... }

becomes:

> nsAutoString s;
> nsresult rv = Preferences::GetString("foo", s);
> if (NS_SUCCEEDED(rv)) { ... }

The patch also avoids some UTF8/UTF16 conversions in a few places.

--HG--
extra : rebase_source : f339b1a3dda4dc93979d38c30c001fbe77485b55
2017-07-25 20:36:14 +10:00
Nicholas Nethercote
f314cbcbe5 Bug 1384835 (part 1) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
This is basically a cosmetic change; references are the normal way to do string
outparams.

--HG--
extra : rebase_source : ffc5945f269bdcd3d4116755b56713e87a44b6cd
2017-07-25 19:12:56 +10:00
Julian Seward
408d24da56 Bug 1382563 - Remove ns*String::AssignWithConversion. r=erahm.
This patch replaces four functions of the name AssignWithConversion which
are essentially wrappers around CopyASCIItoUTF16 and LossyCopyUTF16toASCII
with direct calls to the latter two functions.  The replaced functions are:

  void nsCString::AssignWithConversion( const nsAString& aData )
  void nsString::AssignWithConversion( const nsACString& aData )

  void nsTString_CharT::AssignWithConversion(
                            const incompatible_char_type* aData,
                            int32_t aLength = -1);

The last of the three exists inside the double-included nsTString* world and
so describes two functions, giving four in total.

This has two advantages:

* it removes code

* at the call points, it makes clear (from the replacement name) which
  conversion is being carried out.  The generic name "AssignWithConversion"
  doesn't make that obvious -- one had to infer it from the types.

The patch also removes two commented out lines from
editor/composer/nsComposerCommands.cpp, that appear to be related.  They are
at top level, where they would never have compiled.  They look like
leftovers from some previous change.

--HG--
extra : rebase_source : fb47bf450771c3c9ee3341dd14520f5da69ec4f5
2017-07-24 19:23:52 +02:00
J. Ryan Stinnett
c79cb3fbb1 Bug 1380053 - Stylo reftest annotations for all OSes. r=manishearth
MozReview-Commit-ID: JNsNUOZfd2e

--HG--
extra : rebase_source : 05a71f9a0fe484c93931fb230cf0752a3b1b8b00
2017-07-20 22:02:00 -05:00
Bevis Tseng
95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Ehsan Akhgari
b0411401ec Bug 1386480 - Make RangeItem a non-cycle-collectable type; r=masayuki 2017-08-14 12:14:34 -04:00
Ehsan Akhgari
3e77f9859e Bug 1387522 - Avoid using nsINode::GetChildAt() in HTMLStyleEditor.cpp; r=masayuki
This method will become a lot slower when bug 651120 lands.
2017-08-14 12:02:33 -04:00
Bobby Holley
1bd3bc937c Bug 1386110 - Use a smart pointer to reliably de-register NAC regardless of how it goes away. r=masayuki
MozReview-Commit-ID: HTSu5BjxD8I
2017-08-03 20:26:11 -07:00
Xidorn Quan
137ea130e8 Bug 1383780 - Avoid adding anonymous editor element into non-HTML element. r=masayuki
It is mainly for avoiding other anonymous element being inserted into
<svg:use>, but in general we probably don't want to insert some random
HTML anonymous element into a non-HTML element.

MozReview-Commit-ID: J5kCUzA7K90

--HG--
extra : rebase_source : 1d38cd9297071b9ba8151eb27d74b56ad540cc49
2017-08-03 14:23:38 +10:00
Carsten "Tomcat" Book
679210723b merge mozilla-inbound to mozilla-central a=merge 2017-07-25 14:27:17 +02:00
Cameron McCormack
7b2f841ea9 Bug 1383988 - stylo: Ensure editor handle elements are styled before attempting to construct frames for them. r=hiro
MozReview-Commit-ID: 2T0ZjP00U7A

--HG--
extra : rebase_source : 02e527baac50c2267afb3ed199aee91e72a08b02
2017-07-25 14:08:19 +08:00
Yoshi Huang
7036b3761f Bug 1382531 - Part 1: rewrite crashtest for data: URI is unique opaque origin. r=smaug 2017-07-25 09:56:02 +08:00
Wes Kocher
d45eb771f0 Merge m-c to inbound, a=merge
MozReview-Commit-ID: Ah48RzFU8Mt
2017-07-21 18:20:46 -07:00
Wes Kocher
051dc17e6c Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: GYc8r8gnS0j
2017-07-21 18:12:55 -07:00
Ryan VanderMeulen
f4e3a91992 Merge m-c to inbound. a=merge 2017-07-21 09:40:28 -04:00
Sylvestre Ledru
7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
Ehsan Akhgari
2ee7157f0e Bug 1383079 - Don't AddRef() the editor root node in TextEditRules::WillOutputText(); r=masayuki 2017-07-21 13:37:47 -04:00
Makoto Kato
256e9a6424 Bug 1359345 - HTMLEditor::IsVisBreak() should be renamed to HTMLEditor::IsVisibleBRElement(). r=masayuki
MozReview-Commit-ID: 2KqRauu10QE

--HG--
extra : rebase_source : 36a42d6c7d13d1eb9ba570fc0e99fcd2570e6f9b
2017-07-21 16:10:10 +09:00
Stone Shih
a5bccae405 Bug 1351148 Part4: Revise those test cases that have some tasks have to be processed before or after the synthesized key events. r=smaug.
Make sure input events are processed before or after the dependent tasks.

MozReview-Commit-ID: 8KfZnT2wjJR
2017-06-07 14:28:16 +08:00
Masayuki Nakano
2f92264fb7 Bug 1377978 - Make nsRange use uint32_t to offset r=smaug
DOM Standard defines that offset of Range is unsigned long.  However, nsRange uses int32_t to them.

This patch makes nsRange use uint32_t instead.  However, this patch does NOT allow to set over INT32_MAX as offset values since a lot of users of nsRange cannot treat the values as over INT32_MAX because a lot of internal APIs take int32_t as offsets.

For easier to search such points, this patch adds static_cast<int32_t> to uint32_t variables when they are used for int32_t arguments.

And note that nsContentUtils::ComparePoints() behaves odd.  It accepts negative offset and compares such value with valid offset simply.  This patch still uses int32_t offset variables in nsRange::CompareNodeToRange() even though it may be negative value if nsINode::IndexOf() returns -1 because the caller of it depends on this behavior.

MozReview-Commit-ID: 8RbOgA86JuT

--HG--
extra : rebase_source : 46d526c6d50dfa2f104439b19b8691477b17a4af
2017-07-19 22:49:52 +09:00
Christoph Kerschbaumer
0d84b0bb91 Bug 1380717 - Updates more tests within editor/ to comply with new data: URI inheritance model. r=masayuki 2017-07-14 12:14:23 +02:00
Jorg K
4c39632f57 Bug 1397412 - Implement Mochitest for EditorBase::FindBetterInsertionPoint() in plaintext editor. r=ehsan 2017-09-07 12:36:00 -04:00
Sebastian Hengst
01d8f75040 Backed out changeset f42e4a61d6a5 (bug 1397656) for failing modified mochitest test_bug966552.html. r=backout 2017-09-07 22:59:03 +02:00
Christoph Kerschbaumer
1514476a89 Bug 1397656 - Update tests within editor/ to comply with new toplevel data: URI navigation policy. r=masayuki 2017-09-07 12:51:08 +02:00
Carsten "Tomcat" Book
0edfa97e38 merge mozilla-inbound to mozilla-central a=merge 2017-07-12 11:07:09 +02:00
Yoshi Huang
71b8c7686e Bug 1377492 - fix mochitest-1 failure in docshell when data: URI is a unique origin. r=smaug
When we turn on the pref security.data_uri.unique_opaque_origin to make
data URI is unique origin, the following tests will fail because now
data document is treated as cross origin, so we replace data URIs with
seperate files, hence it will still in the same origin.
2017-07-12 10:35:54 +08:00
Makoto Kato
86506e2303 Bug 1345015 - Part 3. Add crash test. r=masayuki
Add minimal crash test for this.  When removing a line, this doesn't occur.

MozReview-Commit-ID: JqS2E8q47ML

--HG--
extra : rebase_source : 322a77cbc49e29bbd6b705650485634dd4801b8b
2017-06-19 16:52:05 +09:00
Makoto Kato
80cc72a583 Bug 1345015 - Part 2. Don't promote range when selection node isn't content. r=masayuki
When using EditAction::insertBreak action, if selection node isn't content, this crash occurs.  So we should reject to promote range when it isn't content node.

MozReview-Commit-ID: AJ4oEOmRTgm

--HG--
extra : rebase_source : 04c4e4a2e04a0d0a058eb86fdfde0005edb681a9
2017-07-10 16:17:06 +09:00
Makoto Kato
67b25bae62 Bug 1345015 - Part 1. Clean up GetPromotedPoint. r=masayuki
GetPromotedPoint still uses nsIDOMNode, so we should use nsINode etc instead for clean up.

MozReview-Commit-ID: 4efe46iU7lC

--HG--
extra : rebase_source : bb13c4531fb76684d4baf13e24dc777d79c2ad61
2017-07-10 17:35:26 +09:00
Olli Pettay
e0ed9babb5 Bug 1376382, key event handling is asynchronous, try to fix test to be more async too, r=masayuki 2017-07-08 17:23:08 +03:00
Christoph Kerschbaumer
7e850103a5 Bug 1377861 - Update reftests to comply with new data: URI inheritance model. r=smaug 2017-07-07 11:27:36 +02:00
Masayuki Nakano
33d778a999 Bug 1377989 - part12: Rename local variables, |endParent| which is set to start container of nsRange to |endContainer| r=smaug
This does NOT change variable names like |endNode| because it's not odd and somebody use it for nsINode and endContent for nsIContent.  So, changing them needs more work.

MozReview-Commit-ID: 22imUltlu5R

--HG--
extra : rebase_source : 6c93069d0586b37c5084eaa71861085c01da7a7d
2017-07-12 00:08:37 +09:00
Masayuki Nakano
3fd54e5d5f Bug 1377989 - part11: Rename local variables, |startParent| which is set to start container of nsRange to |startContainer| r=smaug
This does NOT change variable names like |startNode| because it's not odd and somebody use it for nsINode and startContent for nsIContent.  So, changing them needs more work.

MozReview-Commit-ID: H19pTDprRuT

--HG--
extra : rebase_source : 7a7454ac14da48a597ff19a50c863d04dcaddd6e
2017-07-12 00:02:14 +09:00
Masayuki Nakano
b1f8f6d611 Bug 1377989 - part10: Rename local variables, |parent| which is set to container of nsRange to |container| r=smaug
MozReview-Commit-ID: 9w3O7MJEDBS

--HG--
extra : rebase_source : 92194bd18c9e79210c7cb4e9835a528d51e8ba7a
2017-07-11 23:52:39 +09:00
Masayuki Nakano
8ac3f6520d Bug 1377989 - part9: Rename aEndParent and aEndNode related to nsRange to aEndContainer r=smaug
MozReview-Commit-ID: 8XJbHfsg2hu

--HG--
extra : rebase_source : 0ee22f0b0cf5fd8c0a8fea610c54be8492436488
2017-07-12 00:09:37 +09:00
Masayuki Nakano
4af6e5d4a7 Bug 1377989 - part8: Rename aStartParent and aStartNode related to nsRange to aStartContainer r=smaug
MozReview-Commit-ID: H3wzW7eaQBg

--HG--
extra : rebase_source : 90aa8e2a20a0de27a1598925d8c70186463333cf
2017-07-11 23:10:42 +09:00
Masayuki Nakano
dd7bcc05ab Bug 1377989 - part6: Rename mEndParent of nsRange and similar members of similar objects to mEndContainer r=smaug
MozReview-Commit-ID: KOcajaTv5ga

--HG--
extra : rebase_source : c1fac0fd8aebf02d0623eb291d914b4ac1fd7065
2017-07-11 22:57:55 +09:00
Masayuki Nakano
4ff0c2334b Bug 1377989 - part5: Rename mStartParent of nsRange and similar members of similar objects to mStartContainer r=smaug
MozReview-Commit-ID: 5QJahMKnKEJ

--HG--
extra : rebase_source : 0b4aee62fcd70574b3dc44e05392b2a8d6ff6ee5
2017-07-11 22:46:11 +09:00
Masayuki Nakano
4ee17d1b8c Bug 1377989 - part2: Rename nsRange::GetEndParent() to nsRange::GetEndContainer() r=smaug
MozReview-Commit-ID: K4qPjtZ62yO

--HG--
extra : rebase_source : 8653db98b9bd70c77a6aac8d906f401f0222c58a
2017-07-11 21:11:37 +09:00
Masayuki Nakano
2f2ce53be5 Bug 1377989 - part1: Rename nsRange::GetStartParent() to nsRange::GetStartContainer() r=smaug
Web standards use "Container" instead of "Parent".  So, nsRange shouldn't use "Parent" for its members and methods.

MozReview-Commit-ID: Ho6N0diuWtE

--HG--
extra : rebase_source : ee4eb7068a68b118c7fe98e9e9e7fa9c9e7f13e2
2017-07-11 20:53:04 +09:00
Sebastian Hengst
7b9c3ddcde Backed out changeset 7529213e3375 (bug 1377861) for failing reftest iframe-border-radius.html on Windows 8 x64. r=backout 2017-07-06 20:45:40 +02:00
Christoph Kerschbaumer
7231e26c2e Bug 1377861 - Update reftests to comply with new data: URI inheritance model. r=smaug 2017-07-06 14:45:56 +02:00
Carsten "Tomcat" Book
b72c4833d5 merge mozilla-inbound to mozilla-central a=merge 2017-07-05 13:01:22 +02:00
Cameron McCormack
fdb731a4d4 Bug 1377256 - Part 1: Don't pass parent explicitly into HTMLEditor::DeleteRefToAnonymousNode. r=m_kato
MozReview-Commit-ID: HUySaoG07jg

--HG--
extra : rebase_source : adb3a65387eb209073d95211fa185bcab2791b0f
2017-07-04 17:01:32 +08:00
Kartikaya Gupta
1db3c10cac Bug 1360948 - Fix incorrect/accidental change to assertion count in cset 435db45b79 of bug 1351548. r=me
MozReview-Commit-ID: 7pcp3SYJmmS
2017-07-04 09:47:12 -04:00
Christoph Kerschbaumer
e82e0967b4 Bug 1377748 - Updates tests within editor/ to comply with new data: URI inheritance model. r=masayuki 2017-07-02 05:23:34 -07:00
Carsten "Tomcat" Book
1367c473cd Merge mozilla-central to mozilla-inbound 2017-06-29 15:49:39 +02:00
Carsten "Tomcat" Book
5f00ae3a8b merge mozilla-inbound to mozilla-central a=merge 2017-06-29 15:47:04 +02:00
Olli Pettay
da0ec0a364 Bug 1375491, make child process to cache ime properties only at animation tick time, r=masayuki
--HG--
extra : rebase_source : 6f13f4d91fc4873d135824431adb4b0b2843b738
2017-06-29 14:46:11 +03:00
Makoto Kato
48c416047f Bug 1375910 - Don't remove text node when setting value is empty string. r=masayuki
When setting empty value by input.value, we remove text node and insert bogus node.  But creating and removing node are expensive.  So we should keep text node for performance if possible.

Now, DocumentIsEmpty only checks bogus node to detect empty.  So, keeping text node change causes that document cannot detect as empty.  If root has only text node and all is empty, we should detect empty document.

This change should be only plain text editor.  HTML editor already allows multiple text nodes, so we should keep old behaviour on HTML editor.


MozReview-Commit-ID: Gt8GmdWAA3E

--HG--
extra : rebase_source : 4c5deba024cab3d7e2e1e2a8ec53a29f2fdf8cd9
2017-06-28 07:42:09 +09:00
Cameron McCormack
e86592ca35 Bug 1374999 - stylo: Iterate over manually created editor NAC. r=bholley
MozReview-Commit-ID: 1CiWVfYbxaJ

--HG--
extra : rebase_source : 48ea8a0f1cb0a4072632f706ffd99529bb4447b1
2017-06-27 17:34:48 -07:00
Carsten "Tomcat" Book
4e00eff077 merge mozilla-inbound to mozilla-central a=merge 2017-06-27 10:56:41 +02:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00