Граф коммитов

7795 Коммитов

Автор SHA1 Сообщение Дата
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
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
Masatoshi Kimura b515c9c804 Bug 1373984 - Turn nsIDocument::mCharacterSet into mozilla::NotNull<const mozilla::Encoding*>. r=hsivonen
MozReview-Commit-ID: GF0YXDwfA14

--HG--
extra : rebase_source : fdae0046f882d47fb539a7f882364e5c5caafdcd
extra : source : 49249788c0dee331ac2989dc39f0505d965a7bd8
2017-06-18 20:37:50 +09:00
Olli Pettay 70cd98776b Bug 1375484 - ScrollSelectionIntoViewEvent should be called during refresh driver tick, r=ehsan 2017-06-25 00:38:42 +03:00
Nicholas Nethercote fe9268c4cd Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj.
All the instances are converted as follows.

- nsAFlatString  --> nsString
- nsAFlatCString --> nsCString

--HG--
extra : rebase_source : b37350642c58a85a08363df2e7c610873faa6e41
2017-06-20 19:19:05 +10:00
Carsten "Tomcat" Book 7fa56f5378 Merge mozilla-central to autoland 2017-06-22 14:11:46 +02:00
Florian Quèze 66f6d259bc Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Masayuki Nakano 5af13a8f29 Bug 1374207 - part5: nsTextControlFrame should use TextEditor instead of nsIEditor r=smaug
MozReview-Commit-ID: Eh6Cp546bXT

--HG--
extra : rebase_source : 1bb83361b72af61434a91eb08aba09e79a1dd976
2017-06-19 23:47:02 +09:00
Masayuki Nakano c5fbe1617e Bug 1374207 - part3: Editor classes should use concrete classes instead of nsI*Editor r=m_kato
HTMLEditor inherits some interface classes.  Therefore, CachedWeakPtr is confused at ambiguous conversion from HTMLEditor to nsISupports.  Therefore, this patch adds second parameter to the template class.

MozReview-Commit-ID: KGSYJHfp1L5

--HG--
extra : rebase_source : 7189372c4c06218c3040701196eac51ded85d3fa
2017-06-22 15:02:59 +09:00
Masayuki Nakano 583dafd5d4 Bug 1374207 - part2: TextComposition, IMEContentObserver and IMEStateManager should use EditorBase instead of nsIEditor r=m_kato
MozReview-Commit-ID: IdHmseTiv2t

--HG--
extra : rebase_source : b2f9f42dee97e1ba2cc081014d1696506088d375
2017-06-20 19:23:44 +09:00
Masayuki Nakano 7ad4ad3aab Bug 1374207 - part1: nsTextEditorState should use mozilla::TextEditor instead of editor interfaces r=smaug
Using concrete class rather than interface classes (nsI*Editor) will allow to reduce QI and some virtual calls.  Therefore, Editor classes should be used as concrete class as far as possible.

Unfortunately, if classes referring editor are initialized via scriptable interface, we cannot do this because nsI*Editor is still not marked as builtinclass.  Therefore, their editor may be implemented by JS.  E.g., inline nsIInlineSpellChecker.init() and nsIDocShell.editor.  Such remaining cases should be fixed after nsI*Editor classes are marked as builtinclass.

Note that this patch also creates nsIdentifierMapEntry.h which is separated from nsDocument.h because ShadowRoot.h needs the class but exposing nsDocument.h to the global and includes it causes bustage on Linux and Android.  Therefore, for fixing the include hell, this patch touches them and ContentChild.cpp.

MozReview-Commit-ID: i6fLWw6Qeo

--HG--
rename : dom/base/nsDocument.h => dom/base/nsIdentifierMapEntry.h
extra : rebase_source : c57bdfc1c13775acdcfd4732d8157d04d6b6613f
2017-06-20 22:57:08 +09:00
Makoto Kato 31c7043d79 Bug 1375131 - Part 3. Use stack class to save ranges before using on loop. r=masayuki
We have a possible loop like this bug.  So we should use stack class for loop.

MozReview-Commit-ID: LQb9w8LEtbx

--HG--
extra : rebase_source : 67c40a0f2e3528d58fe7d0ea6ca290bbc136c6d1
2017-06-23 16:46:54 +09:00
Makoto Kato 82d2f60a4d Bug 1375131 - Part 2. Add crash test. r=masayuki
MozReview-Commit-ID: DxYWPNcb7jK

--HG--
extra : rebase_source : f5c5ca6d6fb4c3bb276398b08c81eda1a72b84ae
2017-06-23 16:45:50 +09:00
Makoto Kato db293de97e Bug 1375131 - Part 1. Store ranges before using on loop. r=masayuki
This crash occurs that range is nullptr.

DeleteNonTableElements will update selection and range, so we shouldn't use range count before modifying selection.  So we should save range data for loop.

MozReview-Commit-ID: C9c4TZqRvUc

--HG--
extra : rebase_source : cbadc6d6d82e1c904c20309f2e82f2b6c2f438e7
2017-06-27 17:34:18 -07:00
Makoto Kato a7f8e06327 Bug 1343918 - Add crash test for document.execCommand('italic'). r=masayuki
Although this crash doesn't occur after landing bug 1369140, we should add this test to crashtest.

MozReview-Commit-ID: mRm4P876zg

--HG--
extra : rebase_source : 9a85c8ba3a5652000512d165b82df9aa2c8176e1
2017-06-20 14:46:28 +09:00
Masayuki Nakano 7231604754 Bug 596501 TextEditRules::WillOutputText() should handle itself if it can return only the text of first text node r=m_kato
TextEditor::OutputToString() uses DocumentEncoder if TextEditRules::WillOutputText() doesn't handle it.  However, TextEditRules::WillOutputText() doesn't handle it even if it's really simple case of <input type="text"> and <textarea>.
This patch makes TextEditRules::WillOutputText() handle it if DOM tree in the editor root element is expected and there is no special flag which requires complicated handling.

MozReview-Commit-ID: 3HvdTAWRpw0

--HG--
extra : rebase_source : ab3e630faa95ce8d4c1e9eb1786b7ece7212e38f
2017-06-16 19:08:10 +09:00
Wes Kocher 976d5437f9 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 6A96Fe0GPjw
2017-06-19 17:37:53 -07:00
Masayuki Nakano f337b95b60 Bug 1372829 - part2: mozilla::EditorBase should cache raw pointer of nsISelectionController and nsIDocument with nsWeakPtr r=froydnj,m_kato
mozilla::EditorBase stores nsISelectionController and nsIDocument with nsWeakPtr.  However, nsWeakPtr requires QI to retrieve actual pointer and it makes some damage to the performance.  If mozilla::WeakPter were available for them, it'd be great.  However, it's not available with nsISelectionController nor nsIDocument because it's possible to implement SupportsWeakPtr only with their subclasses but the subclasses shouldn't be referred by editor.  Therefore, this patch creates mozilla::CachedWeakPtr<class T> which stores both raw pointer (as cache) and nsWeakPtr and when its cache is requested, it checks if the object referred by nsWeakPtr is still alive.

Additionally, this patch hides the members from subclasses of EditorBase for reducing the maintenance cost.

MozReview-Commit-ID: FvtM7453Vv8

--HG--
extra : rebase_source : a524a8ea327c3993645fafa81db8aef65090f1e0
2017-06-20 00:55:00 +09:00
Masayuki Nakano 46f0810215 Bug 1372829 - part1: Make mozilla::PlaceholderTransaction inherit mozilla::SupportsWeakPtr instead of nsSupportsWeakReference r=m_kato
EditorBase stores PlaceholderTransaction with nsWeakPtr.  However, retrieving its pointer requires a QI.  So, for reducing the QI cost, EditorBase should use WeakPtr instead and PlaceholderTransaction needs to inherit SupportsWeakPtr instead of nsSupportsWeakReference.

MozReview-Commit-ID: IYwSTbJebMk

--HG--
extra : rebase_source : fa728b09afa826506befbeb46aba54075ecf4787
2017-06-14 19:05:48 +09:00
Carsten "Tomcat" Book b6627b974a Merge mozilla-central to mozilla-inbound 2017-06-19 14:48:12 +02:00
Olli Pettay 33c9c232a2 Bug 1374116, avoid some extra QIs in EditorBase::GetFocusedContent(), r=masayuki
--HG--
extra : rebase_source : c4d9898073d62c6aa8d9926f9a4785d39c90760f
2017-06-19 14:57:09 +03:00
Ehsan Akhgari 147a0e6607 Bug 1373762 - Make editor mochitests correctly wait for spell checking to finish; r=mystor 2017-06-16 14:41:02 -04:00