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

7745 Коммитов

Автор SHA1 Сообщение Дата
Makoto Kato 6a08daf67d Bug 1352799 - Part 2. Add test for changing maxlength dynamically. r=masayuki
MozReview-Commit-ID: 4DiE33eyBar

--HG--
extra : rebase_source : 38f57dbf55c8ed769ba5aab1e36ce91fb35cbad4
2017-04-20 10:23:38 +09:00
Wes Kocher 6d6d039d43 Backed out 4 changesets (bug 1358297) for hazard build failures a=backout
Backed out changeset 95211a496191 (bug 1358297)
Backed out changeset 3c1b426a5cce (bug 1358297)
Backed out changeset 9201d345a1d5 (bug 1358297)
Backed out changeset c926817dea60 (bug 1358297)

MozReview-Commit-ID: 874DF43K7Dp
2017-05-05 12:45:46 -07:00
Milan Sreckovic 196fb1a3bc Bug 1358297: Part 3. Create special case for stripping CR and LF on TSubstring, and use it in all the places that it is called. Use ASCIIMask to make it fast. r=froydnj
MozReview-Commit-ID: 3p97cCGfy6i

--HG--
extra : rebase_source : a91d9a5e6e61495cfe78b06959b200e48ca16535
2017-05-05 13:37:13 -04:00
Masayuki Nakano d04632f559 Bug 1342552 - IMEStateManager should cache nsIWidget for sPresContext and use it. r=smaug
IMEStateManager should cache nsIWidget for sPresContext at caching sPresContext.  Then, even if sPresContext has gone, IMEStateManager can clean up with the nsIWidget cache.

Unfortunately, editor has some bugs about calling IMEStateManager::UpdateIMEState().  That is, calling it *before* IMEStateManager::OnFocusChange().  In such case, this patch makes UpdateIMEState() ignore the call.

MozReview-Commit-ID: 1cydI03WyB8
2017-04-20 13:43:50 +09:00
Shing Lyu c46f5d5baf Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: 8LoQ9xNnDnj
2017-04-28 11:15:58 +08:00
Shing Lyu 435db45b79 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-28 11:15:50 +08:00
Makoto Kato 60ccf10a30 Bug 1360137 - Part 2. Reduce QueryInterface by NativeInit. r=masayuki
nsIDocumentEncoder has nativeInit for nsIDocumnet, we should use it to reduce QueryInterface.

MozReview-Commit-ID: Ffn19yf9jra

--HG--
extra : rebase_source : 37c8b27cc0eddd4f0501ec1e61ea27d74ee1e6f3
2017-04-27 17:41:26 +09:00
Makoto Kato ea65a415ff Bug 1360137 - Part 1. Use LowerCaseEqualsLiteral instead of ToLowerCase. r=masayuki
From profiling TextEditor::OutputToString, most of WillOutputText is ToLowerCase.  So, we should use LowerCaseEqualsLiteral instead.  It can reduce string copy.

MozReview-Commit-ID: LwqZtxIJTbW

--HG--
extra : rebase_source : 94da785d8288dfd93666a3dcb2d374874c79db89
2017-04-27 17:40:19 +09:00
Wes Kocher 5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Christoph Kerschbaumer 7711007990 Bug 1359092 - Extend loadURI within nsIWebNavigation.idl by a triggeringPrincipal argument. r=bz 2017-04-25 12:22:25 +02:00
Makoto Kato bba54a63e6 Bug 1359008 - Don't use nsIDOM* in TextEditRules's member. r=masayuki
To clean up TextEditRules, I would like to replace nsIDOMNode with nsINode and nsIContent in TextEditRules.

GetTopEnclosingPre is unused define, so I also remove it.

MozReview-Commit-ID: 6LraexH5t4m

--HG--
extra : rebase_source : 1037dcfd949d544282dc30360bd43773f21fd929
2017-04-24 19:40:12 +09:00
Emilio Cobos Álvarez d2f3dc13ec Bug 1357142: Kill PresShell::RecreateFramesFor. r=bz
It's not only inefficient, but also prone to buggyness. Since styles may not be
up-to-date when it happens.

Post a reconstruct instead, which ensures a style flush happens before running
frame construction.

MozReview-Commit-ID: DrakHsJv5fY
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 11900af908654336cc2391ab9480542c5474e38f
2017-04-17 18:01:37 +02:00
Makoto Kato 1b58ce0000 Bug 1335880 - Adjust mouse position for dragstart. r=masayuki
On Ubuntu 16.04 TLS, test_dragdrop.html due to control margin.  So we should adjust the point of dragstart.

MozReview-Commit-ID: EPW2UnaIWRt

--HG--
extra : rebase_source : a97c66dc36328563497130aa7a3829bc8a9eb204
2017-05-08 14:06:29 +09:00
Kartikaya Gupta 1e6be2a645 Bug 1362424 - Skip a spellchecking reftest that is now permafailing on QuantumRender builds. r=jrmuizel
This test is failing intermittently even on non-QuantumRender builds, and bug
1361820 is tracking that issue. Once that is fixed we should be able to re-enable
this test.

MozReview-Commit-ID: HANsz08bujB

--HG--
extra : rebase_source : 4500022a5ffbac6bbd4de3e61c3dc3bba3881b1f
2017-05-08 17:08:34 -04:00
Aryeh Gregor 3a32e91a42 Bug 1355792 - Consider invisible nodes to be editable; r=masayuki
We can't depend on information from layout to be correct unless we've
flushed pending notifications, which we can't do at every editability
check.  So let's forget about layout.  Nobody knows why editability ever
depended on visibility in the first place.

This allows us to revert the additions from bug 795418 as well.

The original test-case submitted on the bug report was very big and
complicated, so I have a minimal test-case instead.  This might not
exactly correspond to the originally reported bug, but this fix works for
both the original and minimal test case.

MozReview-Commit-ID: LOKjlgiAEOT

--HG--
extra : rebase_source : 5aaeae87fdc0dd78cb6f1060399c09d2945f8e08
2017-04-19 16:53:24 +03:00
Aryeh Gregor fdf415af45 Bug 1357998 - Make editing tests independent of default defaultParagraphSeparator; r=masayuki
Now that this is a pref that is different in different versions, tests
have to work no matter what the pref's value is.  For tests that
actually tested line-breaking-related behavior, I made them test all
three separator values.  For tests that tested something else and only
incidentally depend on the default paragraph separator, I set
defaultParagraphSeparator to "div".

MozReview-Commit-ID: 8m7eoFRXpEy

--HG--
extra : rebase_source : dc664e87f7ce4f621aa48639cef6e754793e8ab4
2017-04-20 21:10:23 +03:00
Manish Goregaokar ff68276c10 Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-21 15:40:49 -07:00
Carsten "Tomcat" Book d32c8f24cc Backed out changeset 49c8dc08ff64 (bug 1349417) 2017-04-19 08:31:48 +02:00
Manish Goregaokar f1cf1ffa2a Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-18 21:36:48 -07:00
Iris Hsiao 2f57ea5bb4 Backed out 3 changesets (bug 1349417) for build bustage
Backed out changeset e6a9aaf8c102 (bug 1349417)
Backed out changeset fbdddabe4c8d (bug 1349417)
Backed out changeset c1ead1f0ab71 (bug 1349417)
2017-04-19 11:03:13 +08:00
Manish Goregaokar cb05d3003e Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-18 19:31:07 -07:00
Aryeh Gregor bf0619d365 Bug 1354060 - Put defaultParagraphSeparator default change behind pref; r=masayuki
This is regression-prone, so dev.platform discussion concluded we want
it behind a pref.  We might turn the pref off for beta and/or release
for now as well.

MozReview-Commit-ID: 2H2et3RElZx

--HG--
extra : rebase_source : baf7e679ca1ee16016666d7697990c4f64ecf83e
2017-04-06 15:02:42 +03:00
Aryeh Gregor 47530382e3 Bug 1353695 - Sometimes Enter is ignored in editor; r=masayuki
When defaultParagraphSeparator is not "br", and we hit Enter on a line
that is not contained in any block element, we first create a new <div>
(or <p>) wrapper to hold the line's contents.  If creating this wrapper
fails for some reason, we go ahead and insert a <br> instead.

In some cases, we would get confused and think we didn't create the
block element when really we did.  We would insert a <br>, and
afterwards something would get rid of the empty block element.  In a
corner case where the line only consisted of a <br> to start with, this
would result in nothing happening, because the original <br> was removed
when creating the block element, and only one <br> was inserted to
replace it.

The correct fix is to just not get confused!

MozReview-Commit-ID: 1U8KHC71bfw

--HG--
extra : rebase_source : 50640615a3a652c3a74c1aef5412eb82daf8c5fb
2017-04-05 20:40:13 +03:00
Makoto Kato 0410282e88 Bug 1352882 - Part 3. Cache nsIDocumentEncoder into TextEditor. r=masayuki
All editor code gets nsIDocumentEncoder from TextEditor::GetAndInitDocEncoder(), so we can have a cache into TextEditor, then return cached object.

MozReview-Commit-ID: IEoOvz7BG7T

--HG--
extra : rebase_source : 1b30325c99fbc43dc77453325e97e88b439285e2
2017-04-17 17:29:46 +09:00
Makoto Kato b24e38d3fc Bug 1356496 - Don't use nsIDOM* in ConfirmSelectionInBody. r=masayuki
ConfirmSelectionInBody uses a lot of QI and TextEditUtils::IsBody call to check body element.  So we shouldn't use nsIDOM* to avoid QI and EditorBase::GetTag().

Also, if did not found body element, it calls collapse to set caret.  If collapse is successful, we might not have to check end selection...  How do you think?

MozReview-Commit-ID: F7FhPrlEpCc

--HG--
extra : rebase_source : 85b5c99be0085dd579a9b650207c876cd17a2410
2017-04-14 14:54:03 +09:00
Florian Queze 37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze 95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Xidorn Quan d8c29760a1 Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G

--HG--
extra : rebase_source : 568218d415642f1088c82d4b2e03d5885067b162
2017-04-13 16:17:03 +08:00
Makoto Kato a8f8cbc728 Bug 1056322 - Don't run DictionaryFetcher when spllchecker isn't initialized. r=masayuki
When CanSpellCheck isn't called yet, mSpellChecker won't be initialized.  So we should check it before running DictionaryFetcher.

I think that UpdateCurrentDictionary is called by OnFocus as long as nsEditorSpellCheck::InitSpellChecker isn't called.  But I cannot find test case to reproduce this...

MozReview-Commit-ID: 5H1pJ0AnX5X

--HG--
extra : rebase_source : 5f2a59261c67a7f8f363588c7596e68f6debff9e
2017-04-12 17:43:51 +09:00
Dan Banner cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Makoto Kato 6ed44d9df6 Bug 1330912 - Part 4. Update some tests to wait updating dictionary. r=masayuki
Since Part 2 improves foucs performance, these tests will be failed because spellchecker works later.  So using UpdateCurrentDictionary, dictionary is updated before test.


MozReview-Commit-ID: 69aC1rQd4LY

--HG--
extra : rebase_source : 50e0449b727352ff2f8e2a08605cc3f9d933d6d9
2017-04-10 14:44:49 +09:00
Makoto Kato c61434ef9b Bug 1330912 - Part 3. Don't update dictionary during onfocus when spellcheck is unnecessary. r=masayuki
Such as <input type=password>, focused element doesn't use spellchecker, we should not call UpdateCurrentDictionary.  Also, when the attribute is changed, we should call UpdateCurrentDictionary if uninitialized.

MozReview-Commit-ID: LSfDTAszviE

--HG--
extra : rebase_source : a3fe944099c625b7f525d33eae06a7b8e8992729
2017-04-11 16:51:04 +09:00
Makoto Kato 694268f807 Bug 1330912 - Part 2. Use async version on UpdateCurrentDictionary. r=masayuki
Now, mozInlineSpellChecker::UpdateCurrentDictionary will use sync IPC messages via nsEditorSpellCheck::DictionaryFetched.

Part 1 adds async API to set current dictionary.  So we should use it on nsEditorSpellCheck::DictionaryFetched instead of sync API.

MozReview-Commit-ID: 5gl2eQpzKm1

--HG--
extra : rebase_source : 1fabc4abdd170494f1804ad875a181e652ea66a0
2017-04-11 17:05:19 +09:00
Makoto Kato 55e9044079 Bug 1330912 - Part 1. Add async version of SetCurrentDictionary using list. r=Ehsan
Now, mozInlineSpellChecker::UpdateCurrentDictionary uses several sync IPC message to update spellcheck dictionary.  So I want async IPC to set dictionary.

Also, since nsEditorSpellCheck::DictionaryFetched calls SetCurrentDictionary several times (max: 6 times), so to reduce calls, we should use list of dictionary.

MozReview-Commit-ID: EVMAJxpMT2X

--HG--
extra : rebase_source : 5a1ed28bd6eb1dd9d3a6a634a286531b7ebb32c7
2017-04-10 18:29:16 +09:00
Brian Birtles 33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00
Wes Kocher bceaacd2b8 Merge inbound to central, a=merge 2017-04-04 11:25:13 -07:00
Aryeh Gregor a334ab0dad Bug 1297414 - Change default paragraph separator to <div>; r=masayuki
This matches Blink/WebKit, and is more similar to Edge than before, but
may cause compat problems for Gecko-only code or code paths.  Sites can
revert to old behavior with:
document.execCommand("defaultparagraphseparator", false, "br").

This regresses test_bug430392.html on one test ("adding returns") and I
don't know why.  The test involves embedded non-editable content and we
already have a lot of todos in that file, so I think it's tolerable.

MozReview-Commit-ID: Dml0bXxgu87
2017-04-04 13:49:38 +03:00
Aryeh Gregor 3611697a7f Bug 1297414 - Support <div> separator in ReturnIn(Header|ListItem); r=masayuki
MozReview-Commit-ID: EkvFpyTmXDc
2017-04-04 13:49:38 +03:00
Aryeh Gregor 7c603e0235 Bug 1297414 - Support <div>/<p> separators in WillInsertBreak; r=masayuki
*aHandled was previously always set to true in WillMakeBasicBlock, which
was probably a bug but is not addressed in this commit.

MozReview-Commit-ID: 41JSmptVc0l
2017-04-04 13:49:38 +03:00
Aryeh Gregor a7ed0e7cf4 Bug 1297414 - formatBlock should move non-editable nodes; r=masayuki
Before this change, if you did formatBlock on "a<span
contenteditable=false>b</span>c", it would become "acb", because the "a"
and "c" would be moved to the front of the node, and the "b" would be
left alone at the end because the editing code doesn't want to move it.
Now we will move the "b" as well, even though it's not editable, so that
the node remains "abc".  The rule is that a non-editable element cannot
have its attributes or children changed, but it can have its parent
changed, so there's nothing wrong with moving it here.

On the way, I fixed an exception in insert*List if there was an
uneditable inline node around.  I don't intend to fix all the todo's in
the test, but now it should have better coverage, at least.

MozReview-Commit-ID: 3okcGq4an3f
2017-04-04 13:47:28 +03:00
Aryeh Gregor e3c9b3f2de Bug 1297414 - Treat <div> like <p> for break insertion; r=masayuki
I don't personally agree with this behavior (although I did spec it some
years ago), but it's the behavior of all other UAs, so we should do it
anyway.

MozReview-Commit-ID: IiIg41kMJIU
2017-04-04 13:47:28 +03:00
Aryeh Gregor c442eea5f2 Bug 1297414 - Support execCommand("defaultParagraphSeparator"); r=masayuki
Later commits will add the actual functionality.

MozReview-Commit-ID: 6Ac9V6MjZpa
2017-04-04 13:47:28 +03:00
Aryeh Gregor 5575caf994 Bug 1297414 - Send eTypedBR in plaintext mode too; r=masayuki
This is what test_htmleditor_keyevent_handling.html expects.  It
historically made no difference in the case tested there, because we
inserted a <br> either way, but now it will make a difference.  I don't
know what an HTML editor in plaintext mode even means, so I don't know
if this change is actually the intended behavior.

MozReview-Commit-ID: 64w6bb9Q1pD
2017-04-04 13:44:53 +03:00
Aryeh Gregor 8f79d37004 Bug 1352144 - document.execCommand("inserttext", false, "") should work r=masayuki
Behavior per spec and Chrome is to just delete the selection.  We
already do this for insertHTML.

MozReview-Commit-ID: AWZhH6lIwuO

--HG--
extra : rebase_source : 353c3b628eb6a609de121e25bb7a11e579d29400
2017-03-30 21:04:09 +03:00
Makoto Kato cd753d1158 Bug 1351074 - Part 2. Use testing-common for AsyncSpellCheckTestHelper.jsm. r=masayuki
TESTING_JS_MODULES uses testing-common, not gre.  So we should replace gre with testing-common for mochitest.

MozReview-Commit-ID: BqsS2D3IGR6

--HG--
extra : rebase_source : a8553684f8f106c1dfb6e2d9b51df7ebeb15275d
2017-03-29 15:34:49 +09:00
Makoto Kato 9daa6911b7 Bug 1351074 - Part 1. AsyncSpellCheckTestHelper.jsm should not be shipped. r=masayuki
AsyncSpellCheckTestHelper.jsm uses on mochitest and reftest, so we shouldn't ship it in release package

MozReview-Commit-ID: CT8f8DRVwb

--HG--
extra : rebase_source : 4cd803fed4f9215f5237996c83128f5434aaad88
2017-03-31 14:17:26 +09:00
Aryeh Gregor c9cfbcf638 Bug 1130651 - Don't throw IndexSizeError from insertText command r=masayuki
MozReview-Commit-ID: 7AXGvenAfWv

--HG--
extra : rebase_source : ff4f263468ea424a2e818d768727b1672da8b5f2
2017-03-30 18:36:17 +03:00
Phil Ringnalda 7ac3bd5b7e Backed out 3 changesets (bug 1351074) for reftest harness and browser_all_files_referenced.js bustage
CLOSED TREE

Backed out changeset 941e0f9ff9a7 (bug 1351074)
Backed out changeset 4fdf3b87a70b (bug 1351074)
Backed out changeset 586428f69838 (bug 1351074)
2017-04-02 19:46:49 -07:00
Makoto Kato cd8761e0f4 Bug 1351074 - Part 2. Use testing-common for AsyncSpellCheckTestHelper.jsm. r=masayuki
TESTING_JS_MODULES uses testing-common, not gre.  So we should replace gre with testing-common for mochitest.

MozReview-Commit-ID: BqsS2D3IGR6

--HG--
extra : rebase_source : 2143fcdf33c428c82c6b2e00b542649b958aeccc
2017-03-29 15:34:49 +09:00
Makoto Kato 8426259e4a Bug 1351074 - Part 1. AsyncSpellCheckTestHelper.jsm should not be shipped. r=masayuki
AsyncSpellCheckTestHelper.jsm uses on mochitest and reftest, so we shouldn't ship it in release package

MozReview-Commit-ID: CT8f8DRVwb

--HG--
extra : rebase_source : fec37ae258f7c0d8ff76143da79ca182b66f0a52
2017-03-31 14:17:26 +09:00
Aryeh Gregor 20a011132c Bug 1314388 - Fix bustage on CLOSED TREE
MozReview-Commit-ID: GDVevocsKaG
2017-04-02 14:11:48 +03:00
Aryeh Gregor 4a039c1336 Bug 1314388 - Remove SVGZoomEvent; r=longsonr,smaug
Some code in SVGSVGElement.cpp might be unnecessary now, but Robert said
to leave it for a followup.

MozReview-Commit-ID: 8PpRGeGrREJ
2017-04-02 13:51:33 +03:00
Olli Pettay d47c995985 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : b7d76ce3321ea0d622da74a72b7278fd0fa63310
2017-03-31 22:49:00 -04:00
Olli Pettay 31b1f5cc92 Backout Bug 1351860, r=backout 2017-03-31 16:55:32 -04:00
Olli Pettay b84c192a09 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : 5f2cac2c4e944e2c9f2f1acf0d3064e153c40451
2017-03-31 13:13:36 -04:00
Aryeh Gregor f889daf2b4 Bug 1175418 - Don't create unnecessary text nodes in editor; r=masayuki
MozReview-Commit-ID: LnioO8XoGQT

--HG--
extra : rebase_source : e85b99dc69912934f44c4e9dd9b17d23fe02bb09
2017-03-29 18:28:21 +03:00
Wes Kocher 8e0bc97954 Merge inbound to central, a=merge 2017-03-29 15:41:57 -07:00
Emilio Cobos Álvarez b6611188f1 Bug 1350140: more test expectation updates. r=heycam
MozReview-Commit-ID: 26ngAQoHC9T

--HG--
extra : rebase_source : 127b6a10f3f8e896cdf353305aa9d2ee8eab5ccb
2017-03-28 15:01:34 +02:00
Emilio Cobos Álvarez 55e9a2ee3f Bug 1350140: Update test expectations. r=emilio
MozReview-Commit-ID: 4ZTM0r5KJfn

--HG--
extra : rebase_source : 139db22ea2b38d796c6d99707818a897104e091e
2017-03-24 09:25:12 +01:00
Olli Pettay 93e93a4e02 Bug 1350926, label a runnable in editor, r=masayuki 2017-03-29 14:43:28 -04:00
Olli Pettay 25efa50e90 Bug 1350683 - Ensure the transaction processing. r=masayuki
--HG--
extra : rebase_source : 6053f4c943f1452a2728c209fbd8ebb225737cd3
2017-03-29 13:23:31 -04:00
Makoto Kato cc04eb51dc Bug 1349426 - Remove nsIHTMLObjectResizeListener. r=masayuki
m-c, c-c, addons and bluegriffon don't use this interface, so we can remove it.

MozReview-Commit-ID: I8sVLpDR2gx

--HG--
extra : rebase_source : f88633271bf61ccc55098593fedff0dd7a561f21
2017-03-27 15:16:40 +09:00
Makoto Kato 7b1f32af65 Bug 1350772 - Part 2. Add test. r=masayuki
MozReview-Commit-ID: 9jQyvpXFl1E

--HG--
extra : rebase_source : f1a2f9dcc74291c382bc106757b032d42da185be
2017-03-27 14:41:21 +09:00
Makoto Kato c013bde6aa Bug 1350772 - Part 1. Check whether node can be splited. r=masayuki
At first, HTMLEditor::GetActiveEditingHost might return null in this situation, we should check whether nullptr is returned.   At second, SplitNodeDeep returns error since curent is design mode and selection node has no parent.  So we should check error.

MozReview-Commit-ID: 2YlWXPNtf80

--HG--
extra : rebase_source : 5e9752353cdf8db906e94391e9660f61336a9614
2017-03-28 14:56:03 +09:00
Kartikaya Gupta ec69fdebcf Merge m-c to graphics
MozReview-Commit-ID: I4ehbSXNLmS
2017-03-27 09:18:34 -04:00
Kartikaya Gupta 3956a6bca3 Merge m-c to graphics
MozReview-Commit-ID: FT418lFT961
2017-03-24 10:10:11 -04:00
Carsten "Tomcat" Book 7419b36815 merge mozilla-inbound to mozilla-central a=merge 2017-03-24 14:24:21 +01:00
Mason Chang 373e07ac81 Bug 1350004. Expand number of allowed assertions because sometimes we get 3 instead of 2. r=masayuki
DONTBUILD because this is a backout and reland to fix bug number.

MozReview-Commit-ID: Fr5nbU3Hlj2
2017-03-23 22:28:44 -07:00
Kartikaya Gupta f672f579d0 Back out cset 4b47e1e71f37 for having the wrong bug number. r=backout 2017-03-24 10:01:06 -04:00
Mason Chang 46b188f51a Bug 1331357. Expand number of allowed assertions because sometimes we get 3 instead of 2. r=masayuki 2017-03-23 22:28:44 -07:00
Makoto Kato 8854f13fca Bug 1348851 - Part 2. Add crash test. r=masayuki
MozReview-Commit-ID: 9QPwtwYfNa7

--HG--
extra : rebase_source : bd740815d460b4a536a42cd40f72c7cead5118fe
2017-03-21 14:36:52 +09:00
Makoto Kato f09a0f4b5c Bug 1348851 - Part 1. Use new block when better selection isn't found. r=masayuki
This is a kind of regression of bug 1088054 part 6.  If new block doesn't have child node, GetLastEditableChild will return null after landing bug 1088054. So, we should use new block when GetLastEditableChild returns null.

MozReview-Commit-ID: Gzt1Xp3Sl47
***
P1

MozReview-Commit-ID: 8LVp5qGnme4

--HG--
extra : rebase_source : f0ed76b65517168b6b11edf96164b3e596038fc1
2017-03-24 10:30:21 +09:00
Masayuki Nakano e877ded333 Bug 1349138 Edit transactions should store their editor instance with strong reference r=smaug
Edit transactions should store their editor instance with strong reference and they should be released at destroying the editor.

MozReview-Commit-ID: D67KU8WFxyo

--HG--
extra : rebase_source : 28c8a37498cad9f2e308eb4416cef76cf395bb9c
2017-03-21 19:00:36 +09:00
Mats Palmgren 00b74113a3 Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 22:11:22 -07:00
Matt Brubeck ea53640d30 Bug 1337068 - stylo: Update test expectations. r=emilio
MozReview-Commit-ID: F8dogEQLdgt

--HG--
extra : rebase_source : 57e2ad20c9c13130239fc4d4b1ff537733a77577
extra : intermediate-source : abac6252e97f10b4c45223c5748f5a3bb59d86f2
extra : source : 4f1af10cb01e8b48da5e3ad8487487131fd51b1f
2017-03-18 11:53:44 -07:00
Zibi Braniecki 3d91da8726 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
2017-03-14 16:09:54 -07:00
Sebastian Hengst 0a04f3b9e2 Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
Zibi Braniecki c2cd68a689 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
2017-03-14 16:09:54 -07:00
Carsten "Tomcat" Book 62f6c37109 merge mozilla-inbound to mozilla-central a=merge 2017-03-22 14:26:27 +01:00
Boris Zbarsky ec233151ac Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
Masayuki Nakano 9a58410ee2 Bug 1349178 Make nsIEditor.transactionManager readonly r=m_kato
There are no app which replaces transaction manager of editor.  Additionally, replacing transaction manager of an editor with different editor or same editor but after initialized again due to some reasons may cause unexpected problems.

Therefore, this patch makes it readonly.

MozReview-Commit-ID: K7zepOjrzvC

--HG--
extra : rebase_source : ee1944af57c8102628b8cffbc720d2b8e5e9088d
2017-03-21 20:57:15 +09:00
Makoto Kato d8f81ffef5 Bug 1347818 - Part 2. Add documentCharacterSet test. r=masayuki
MozReview-Commit-ID: LvUNE7UNpik

--HG--
extra : rebase_source : b4174df48c243c782bdb5e62d4c83139040724ee
extra : histedit_source : b5f1ee924a820099b9131a6e4b67d71266d0ec74
2017-03-17 15:24:56 +09:00
Makoto Kato 243800123d Bug 1347818 - Part 1. Clean up documentCharacterSet not to use nsIDOM*. r=masayuki
I want to remove nsIDOMNodeList usages from editor excepting old debug code.

(BTW, we might have to change to <meta charset> instead of <meta http-equive>, but it should handle by another issue)

MozReview-Commit-ID: ArAVOHigKNW

--HG--
extra : rebase_source : 74ddcaa760c0cc80d6395acb3a6c9374a80dec25
extra : histedit_source : f582131f2b1d5cca8b024b0936ad04634566014e%2Ce95119c3c80903588b24fc66cd6a5b3a8e1458a9
2017-03-17 16:32:06 +09:00
Masayuki Nakano c75983c507 Bug 1347092 part.3 Make EditorBase::CreateTxnForDeleteSelection() return already_AddRefed<EditAggregateTransaction> r=m_kato
MozReview-Commit-ID: DEeRPbH9JJK

--HG--
extra : rebase_source : ea8bf90ca8d807884c5642d6df22bb7148949ac6
2017-03-15 14:35:43 +09:00
Masayuki Nakano 566d8c8f39 Bug 1347092 part.2 Make EditorBase::CreateTxnForDeleteInsertionPoint() return already_AddRefed<EditTransactionBase> r=m_kato
EditorBase::CreateTxnForDeleteInsertionPoint() appends DeleteTextTransaction or DeleteNodeTransaction to the given EditAggregateTransaction.  For consistency with other CreateTxnFor*() methods, this should just create a transaction and return it.  Then, the caller should append the transaction to EditAggregateTransaction.

MozReview-Commit-ID: 6sqEijicFHE

--HG--
extra : rebase_source : 1443b3d9c8e90044994ad87965a26d76926e2c72
2017-03-14 22:01:36 +09:00
Masayuki Nakano 3f530e2fd9 Bug 1347092 part.1 Make EditorBase::CreateTxnForDeleteNode() return already_AddRefed<DeleteNodeTransaction> r=m_kato
MozReview-Commit-ID: CyvzpoZmRoO

--HG--
extra : rebase_source : 4015efbcb08fff55eae0d09385d96af771f1e8e1
2017-03-14 20:50:24 +09:00
David Major ed12ea611f Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg
MozReview-Commit-ID: DWDEDMIVKm7

--HG--
extra : rebase_source : 7fe8dc07c816dca234c67761e61cdee372a87e97
2017-03-10 15:17:23 +13:00
Makoto Kato c6bd345380 Bug 1347367 - Remove unimplemented FindUserSelectAllNode. r=masayuki
After bug 769967, FindUserSelectAllNode always returns nullptr.  So we get rid of this method.  Also, AreaRestriction is used by this, so it is unnecessary now.

MozReview-Commit-ID: HTc8PUCQmy5

--HG--
extra : rebase_source : 11b19a1976f6696e0d872c9020b90701dd22c8c0
2017-03-15 13:40:23 +09:00
Iris Hsiao 106889c6f6 Backed out 9 changesets (bug 1333482) for stylo test failures and this should be landed to autoland
Backed out changeset d8828e22dbaa (bug 1333482)
Backed out changeset a39aaecd10f7 (bug 1333482)
Backed out changeset c957d8c0281e (bug 1333482)
Backed out changeset d569fc566e43 (bug 1333482)
Backed out changeset 7e8c03090d34 (bug 1333482)
Backed out changeset c4511a175f2f (bug 1333482)
Backed out changeset 5483a82f7ce9 (bug 1333482)
Backed out changeset 4e7e5efb1bd8 (bug 1333482)
Backed out changeset 51d1accaeddb (bug 1333482)
2017-03-24 10:21:30 +08:00
Mats Palmgren c0c0e154ea Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 23:13:18 +01:00
Boris Zbarsky 15cb86a93f Bug 1349940. DeleteRangeTransaction should not keep its range alive longer than it needs to. r=masayuki, a=kwierso
MozReview-Commit-ID: 283P59EDFPW
2017-03-24 16:07:11 -04:00
Joel Maher 25d22c7560 Bug 1348754 - annotate reftests to allow stylo to run in e10s. r=xidorn 2017-03-24 09:51:42 -04:00
David Major 96a4158a43 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
Masayuki Nakano 6449c8aac8 Bug 1318312 part.3 Selection should move focus at every selection change when it's called by JS r=smaug
Selection may be changed by methods of Selection or methods of Range retrieved by Selection.getRangeAt().  Selection::NotifySelectionListeners() is called after every selection change of each of them, so, this method must be a good point to move focus.

If new common ancestor of all ranges is editable and in an editing host, we should move focus to it.  Otherwise, if an editing host has focus but new common ancestor is not editable, we should move focus from the editing host.

For consistency with the other browsers, this patch doesn't move focus to other focusable element.

MozReview-Commit-ID: 6sNsuzwqECX

--HG--
extra : rebase_source : 9ba52ab0bd1249abded81019847c85182ca1926e
2017-03-14 10:36:21 +09:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major e7336ecc95 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
Carsten "Tomcat" Book c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Wes Kocher 77632ccd1b Merge m-c to inbound, a=merge
MozReview-Commit-ID: JXQqoTEXxwz
2017-03-10 17:22:54 -08:00
Masayuki Nakano 63c152d62f Bug 1345690 part.4 Rename JoinNodeTransaction::CheckValidity() to JoinNodeTransaction::CanDoIt() for consistency with other transaction classes r=m_kato
MozReview-Commit-ID: 3a5QXiofEL2

--HG--
extra : rebase_source : 40425f274eb69deea3e65cf1cdd35d2630fe4011
2017-03-10 13:46:27 +09:00