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

7496 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 74577df24b Backed out changeset 016b31e0631f (bug 1269209)
MozReview-Commit-ID: FjxnOGL1u2a
2016-10-28 00:38:01 +02:00
Sebastian Hengst 4bd0a3ef40 Backed out changeset bc025cccc7fb (bug 1269209)
MozReview-Commit-ID: 6pYIMGGUqai
2016-10-28 00:37:57 +02:00
Sebastian Hengst 60e55fd4f8 Backed out changeset dc9d739edd0f (bug 1269209)
MozReview-Commit-ID: FyJ0wypywng
2016-10-28 00:37:53 +02:00
Sebastian Hengst 32b1c62a71 Backed out changeset 1b9719af21a2 (bug 1269209)
MozReview-Commit-ID: HiRfHGgLsuS
2016-10-28 00:37:49 +02:00
Sebastian Hengst 9d3acef348 Backed out changeset d6701dc311d0 (bug 1269209)
MozReview-Commit-ID: 2Vg2oalCgvo
2016-10-28 00:37:45 +02:00
Sebastian Hengst 8b31046df0 Backed out changeset e77b8468e140 (bug 1269209)
MozReview-Commit-ID: CKyQPo2BPT2
2016-10-28 00:37:41 +02:00
Sebastian Hengst 7cf51c45ad Backed out changeset faf627174b48 (bug 1269209)
MozReview-Commit-ID: A7oK2jlMuXo
2016-10-28 00:37:37 +02:00
Sebastian Hengst 06c15394c4 Backed out changeset eac4a21c91f3 (bug 1269209)
MozReview-Commit-ID: KBo6scQvIke
2016-10-28 00:37:32 +02:00
Sebastian Hengst 59fa0eaa9d Backed out changeset 0e23de3de2ed (bug 1269209)
MozReview-Commit-ID: 1k72iduYwye
2016-10-28 00:37:28 +02:00
Aryeh Gregor 3330f68ce5 Bug 1269209 - .ini cleanup; r=masayuki
MozReview-Commit-ID: ISJBtyiuNfV

--HG--
extra : rebase_source : e58827d6ed0bb1dcf3fe4251560f32394b262ee7
2016-08-22 21:25:33 +03:00
Aryeh Gregor 8612495f59 Bug 1269209 - Port test_bug1257363.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 1KcoAHEsDwB

--HG--
extra : rebase_source : 90d548c0af3914e006c1bf8fa1509428daf4b30e
2016-08-22 21:24:12 +03:00
Aryeh Gregor 09461ca50e Bug 1269209 - Port test_bug1250010.html from chrome to plain; r=masayuki
MozReview-Commit-ID: AerXvBRSmqN

--HG--
extra : rebase_source : 68901551ae2603ed80f11396758820cea97cfca9
2016-08-22 21:23:13 +03:00
Aryeh Gregor f5b843f27c Bug 1269209 - Port test_bug1154791.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 8MmrfEJXFb9

--HG--
extra : rebase_source : 922e5f1b58222cc3017a9b2c792d87cf3eb58a25
2016-08-22 21:22:13 +03:00
Aryeh Gregor 8015667d53 Bug 1269209 - Port test_bug1140105.html from chrome to plain; r=masayuki
MozReview-Commit-ID: BfdjmtEdwX4

--HG--
extra : rebase_source : 9511095055c4a66cf45c82d909c8eaeb7103850c
2016-08-22 21:21:18 +03:00
Aryeh Gregor cf68de1927 Bug 1269209 - Port test_bug1100966.html from chrome to plain; r=masayuki
MozReview-Commit-ID: BlAIUibApXY

--HG--
extra : rebase_source : ffd3721942ce7c17752215444d6f190417d5fb4b
2016-08-22 21:20:05 +03:00
Aryeh Gregor d77c622ef5 Bug 1269209 - Port test_bug1053048.html from chrome to plain; r=masayuki
MozReview-Commit-ID: ECNH5u4S4QR

--HG--
extra : rebase_source : a7c72ce5ecc9422a5661cb10bb4ec61c7a4dfc51
2016-08-22 21:18:43 +03:00
Aryeh Gregor 17e1475d15 Bug 1269209 - Port test_bug830600.html from chrome to plain; r=masayuki
Fails in e10s.  mrbkap said he has no idea why without debugging it
(comment 8 in bug).

MozReview-Commit-ID: 6vG0czg6Vpv

--HG--
extra : rebase_source : 1ef955889b331352870542b5362c8368c6ed290f
2016-08-22 21:17:49 +03:00
Aryeh Gregor 57d3061a3c Bug 1269209 - Port test_bug635636.html from chrome to plain; r=masayuki
MozReview-Commit-ID: KoJbPZ85emj

--HG--
extra : rebase_source : df1f1d5dd8c02d6d00821ba0171d8e7697d3d789
2016-08-22 21:16:52 +03:00
Aryeh Gregor 4c585dd3d0 Bug 1269209 - Port test_bug483651.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 1320m72F2lz

--HG--
extra : rebase_source : 729e1bca03be68e66e9c67d68f2824079d395695
2016-08-22 21:13:37 +03:00
Aryeh Gregor 4e7480d417 Bug 1269209 - Port test_bug471319.html from chrome to plain; r=masayuki
MozReview-Commit-ID: E8CBXZLPBPC

--HG--
extra : rebase_source : 23d2cd5787d87ae3d8c31265af4f2aeef9f57032
2016-08-22 21:12:45 +03:00
Aryeh Gregor eacd1f594c Bug 1269209 - Port test_bug366682.html from chrome to plain; r=masayuki
MozReview-Commit-ID: EB8je1gkEwM

--HG--
extra : rebase_source : 3157a34cc5906146d24925256433e06041c36dd3
2016-08-22 21:11:37 +03:00
Aryeh Gregor 918902dabb Bug 1269209 - Port test_bug46555.html from chrome to plain; r=masayuki
MozReview-Commit-ID: J7YdJAIzvR9

--HG--
extra : rebase_source : 6b9af9ca7b3bc7018bea6fb9a499c843f0b648be
2016-08-22 21:10:39 +03:00
Aryeh Gregor 84f4bfb68c Bug 1269209 - Port test_bug1205983.html from chrome to plain; r=masayuki
MozReview-Commit-ID: FPFRvbOftw4

--HG--
extra : rebase_source : e476b38c53c07e7c5a0b6fa468aa16f66ac45a79
2016-08-22 21:08:52 +03:00
Aryeh Gregor 7d10038ed6 Bug 1269209 - Port test_bug1200533.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 2CrI1aTjaYJ

--HG--
extra : rebase_source : 9aa79d9ca17f1cd9205001394a8d11062e97730c
2016-08-22 21:07:52 +03:00
Aryeh Gregor ad70bfa1ca Bug 1269209 - Port test_bug1204147.html from chrome to plain; r=masayuki
MozReview-Commit-ID: KBeFI73j1Jx

--HG--
extra : rebase_source : 8f498011aa015474704ade718556b6d2896da8c6
2016-08-22 21:06:41 +03:00
Aryeh Gregor 013f27422c Bug 1269209 - Port test_bug717433.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 426kBYZCCWy

--HG--
extra : rebase_source : a2ca84e14b4d94712cad6985b403cc665e13518e
2016-08-22 21:05:29 +03:00
Aryeh Gregor e2c71b973f Bug 1269209 - Port test_bug697981.html from chrome to plain; r=masayuki
MozReview-Commit-ID: IrnlEWhIBzk

--HG--
extra : rebase_source : 2126f778124279d1987cc5712852e295619f9753
2016-08-22 21:04:30 +03:00
Aryeh Gregor 31005c9468 Bug 1269209 - Port test_bug678842.html from chrome to plain; r=masayuki
MozReview-Commit-ID: LUSLjnMYl1I

--HG--
extra : rebase_source : 1d41fc571c47bba436e99b7239e6b7f4f4df25bc
2016-08-22 21:03:23 +03:00
Aryeh Gregor 9f27fa1dd2 Bug 1269209 - Port test_bug338427.html from chrome to plain; r=masayuki
MozReview-Commit-ID: HiDXAKaZlQA

--HG--
extra : rebase_source : 69b4d87f6c31de8208d3e400f6bf0a2c38616d78
2016-08-22 21:02:11 +03:00
Aryeh Gregor 84e7b9c6b9 Bug 1269209 - Port test_async_UpdateCurrentDictionary.html from chrome to plain; r=masayuki
MozReview-Commit-ID: 3dneNqKrYCe

--HG--
extra : rebase_source : c3bb5488705e02c7802412e19c516c1a446c883d
2016-08-22 21:00:48 +03:00
Aryeh Gregor 8155affd0b Bug 1269209 - DOS -> Unix newlines; r=masayuki
MozReview-Commit-ID: 3StxlnmY1A1

--HG--
extra : rebase_source : e2eec74a7a730b03f3b1c5bd6afb9d4086956262
2016-05-08 15:50:44 +03:00
Aryeh Gregor 5a872fcc34 Bug 1269209 - Fix incorrect bug number in test; r=masayuki
MozReview-Commit-ID: Kk1BIx6wDXI

--HG--
extra : rebase_source : ebf9eab60a0896a9b9dfd8bfe3c1157ede5c80f6
2016-05-05 13:52:22 +03:00
Carsten "Tomcat" Book 9031c83f32 Merge mozilla-central to autoland 2016-10-26 17:14:27 +02:00
Masayuki Nakano 7999bc1f16 Bug 1311621 Fix odd indent of editor/composer/nsComposerRegistration.cpp r=smaug
MozReview-Commit-ID: L4y0UNS6xFb

--HG--
extra : rebase_source : 116b2c82384ae03d23d243fe2a41e50c7012f4f9
2016-10-25 15:07:42 +09:00
Masayuki Nakano 3f9cd43050 Bug 1312451 Remove unnecessary empty line from .cpp files under editor/txmgr r=smaug
The .cpp files under editor/txmgr have a lot of unnecessary empty lines and they make reading the code more difficult because fewer lines can be displayed in screen.  This patch removes such unnecessary lines and C like variable declarations at start of some methods because they also waste lines and make them unclear where is the first user of them.

MozReview-Commit-ID: GXGkdoLJ4Jw

--HG--
extra : rebase_source : 449e191553cff8c875565802d930abe2a6dba4a6
2016-10-25 14:57:10 +09:00
Masayuki Nakano b83f17b535 Bug 1311606 Rename |result| of nsresult variants to |rv| in editor r=smaug
For conforming to our coding rules, |result| of nsresult variants should be renamed to |rv|.

MozReview-Commit-ID: Bk8CyLAnvXQ

--HG--
extra : rebase_source : dd3dc34a032f22abf3fd7f85556b47ffbeec55b2
2016-10-25 00:43:49 +09:00
Makoto Kato c4eee3e2b8 Bug 1312936 - Part 2. Use nsAutoCString for nsITranserable.getAnyTransferData into editor. r=masayuki
Also, replace nsCRT::strcmp with EqualsLiteral.  nsCRT::strcmp is deprecated API.

MozReview-Commit-ID: KZ4xfk7bhH3

--HG--
extra : rebase_source : dace79aea16c53ed48bcd47a62bf5ca7b36d2a3c
2016-10-26 11:10:29 +09:00
Carsten "Tomcat" Book e3e8571c53 merge mozilla-inbound to mozilla-central a=merge 2016-10-24 16:55:47 +02:00
Masayuki Nakano a6c4cf07dc Bug 1309413 part.4 Get rid of NS_ENSURE_* from SetDocumentTitleTransaction r=ehsan
NS_ENSURE_* are deprecated.  So, let's rewrite them with NS_WARN_IF().

MozReview-Commit-ID: 1lqUhfLrncJ
2016-10-15 00:51:48 +09:00
Masayuki Nakano 41708ec80f Bug 1309413 part.3 Fix some nits in SetDocumentTitleTransaction.cpp r=ehsan
SetDocumentTitleTransaction.cpp was written a long time ago.  So, it doesn't use our modern coding style.  Let's fix it.

MozReview-Commit-ID: LhgMbv8dqKm
2016-10-14 18:43:25 +09:00
Masayuki Nakano 81b72e056d Bug 1309413 part.2 Rename the variable in SetDocumentTitleTransaction::SetDomTitle() from "res" to "rv" r=ehsan
MozReview-Commit-ID: CMZbBIpq8y2
2016-10-14 18:37:00 +09:00
Masayuki Nakano f0796a5d35 Bug 1309413 part.1 SetDocumentTitleTransaction::SetDomTitle() should retry to get head element before inserting new title element r=ehsan
When there is no title element, SetDocumentTitleTransaction::SetDomTitle() creates title element and try to insert it to the head element.  However, it might be swapped during modifying existing title element or head element.

Therefore, after modifying the tree, SetDocumentTitleTransaction::SetDomTitle() should forget the retrieved head element and when it needs to refer current head element, it should retry to get the head element again.

MozReview-Commit-ID: 59BxEwrflye
2016-10-14 18:06:21 +09:00
Masayuki Nakano bea2eb150e Bug 1309413 part.0 Add automated test to test SetDocumentTitleTransaction::SetDomTitle() r=ehsan
For detecting regressions, SetDocumentTitleTransaction::SetDomTitle() should be tested.

The transaction is created only when nsIHTMLEditor::setDocumentTitle().  Therefore, it needs to be a chrome mochitest.

MozReview-Commit-ID: 4UjAJ8zNPBP
2016-10-15 00:38:42 +09:00
Masayuki Nakano 6bc92def07 Bug 1311240 Fix odd "{" and "}" of control statements in editor for conforming to our coding rules r=smaug
Currently, editor code uses following style (or similar style) in a lot of places:

if (foo)
{

}
else
{

}

This patch fixes this as conforming to our coding rules, i.e., it becomes:

if (foo) {

} else {

}

Additionally, this fixes other odd control statements in the files which include above issue because it's difficult to find following issues with searching the files:

* if (foo) bar;
* if (foo) { bar; }
* if (foo)
    bar;

Finally, if it becomes much simpler than current code, this patch rewrites existing code with "early return style". But this case is only a few places because this is risky.

MozReview-Commit-ID: 2Gs26goWXrF

--HG--
extra : rebase_source : 603f9003a3566b3203bdeb27dc73ac33502d2853
2016-10-24 11:27:45 +09:00
Eric Rahm a2f7bff287 Bug 1311759 - Remove unused references to nsISupportsArray. r=froydnj
This removes various references to nsISupportsArray throughtout the tree that
aren't used.

MozReview-Commit-ID: EtgD1DRwY8e
2016-10-21 16:34:42 -07:00
Masayuki Nakano 2773c4d0ef Bug 1310618 Replace nsresult variables |res| with |rv| under editor/ r=Ehsan
In our coding rules, variable names of nsresult should be rv.  Indeed, when you see |rv| in the code, you must assume that its type if nsresult.

However, a lot of code under editor/ uses |res| for the variables of nsresult.  Let's replace |res| with |rv|.

And this patch improves following points:

1. When |rv| is set in both |if| and |else| block and they are check outside of them, this moves the check into each |if| and |else| block because even if the failure is notified with warning, you cannot see which case was performed and failed.  This change makes it clear.

2. When |return rv;| returns non-error code because |rv| is checked with NS_ENSURE_SUCCESS() immediately before, setting replacing it with |return NS_OK;| is clearer.

3. Move declaration of |nsresult rv| into smaller scope as far as possible.  This prevents setting rv to unexpected value and easier to check its value at reading the code.

MozReview-Commit-ID: 9MAqj7sFey3

--HG--
extra : rebase_source : 0fd316b851ea616b3a95d8c1afc111ff55e11993
2016-10-19 18:09:33 +09:00
Masayuki Nakano 701f3b7c7a Bug 1311235 part.3 Rename NS_EDITOR_ELEMENT_NOT_FOUND to NS_SUCCESS_EDITOR_ELEMENT_NOT_FOUND r=Ehsan
MozReview-Commit-ID: KBeqo2WwOBY

--HG--
extra : rebase_source : b8263ea2bbad63bcbea056b1c11240a28bb4bfb2
2016-10-19 14:35:21 +09:00
Masayuki Nakano 015e1b9d89 Bug 1311235 part.2 Rename NS_FOUND_TARGET to NS_EDITOR_FOUND_TARGET and make it a success code r=Ehsan
NS_FOUND_TARGET is now declared as an error code.  However, making it as a success code makes the code simpler.

First, this patch renames it to NS_SUCCESS_EDITOR_FOUND_TARGET because it's usual naming rule (according to the other declarations).

Next, FindTargetNode() should return it when a nest call of itself returns NS_SUCCESS_EDITOR_FOUND_TARGET as it does now.

Finally, removing the code overwriting NS_FOUND_TARGET with NS_OK from HTMLEditor::CreateDOMFragmentFromPaste() since it doesn't cause hitting NS_ENSURE_SUCCESS() and the variable, rv, will be overwritten with other method's result.

MozReview-Commit-ID: 6GgZptrXXQa

--HG--
extra : rebase_source : 79418fc83fb087e559221f895c59c7c334980456
2016-10-19 14:15:24 +09:00
Makoto Kato 167407b34f Bug 850043 - Part 2. Add test. r=masayuki
MozReview-Commit-ID: 9iY6udNCQdL

--HG--
extra : rebase_source : 4d9ec835c619afa2fc2b8157118e31ee5ab9e0d0
2016-10-17 14:24:47 +09:00
Makoto Kato d4e1205058 Bug 850043 - Part 1. Looking for better insertion point when using plain text editor. r=masayuki
When typing character, current selection node might be anonymous DIV, not text node.  So even if plain text, we might not get it.

We should get text node correctly when using plain text editor.

MozReview-Commit-ID: LmfYa7BqZnC

--HG--
extra : rebase_source : d08c74c8cc5fdec4d19772f112e54a08b95afeb3
2016-10-17 14:22:46 +09:00
Xidorn Quan 05ef8466c6 Bug 1309109 part 5 - Store ServoDeclarationBlock rather than RawServoDeclarationBlock in nsAttrValue. r=heycam
MozReview-Commit-ID: HWqgjwif1qF

--HG--
extra : source : cf3b1baff3d1d6233c72e32cf01cd28a2b344ebf
2016-10-18 15:29:03 +11:00
Olli Pettay d04af0658f Bug 1309720, ensure expected DOM tree operations when calling insertBefore, r=ehsan
--HG--
extra : rebase_source : 9583d0f4aa9c395c3615f17244c4531a9d441534
2016-10-14 15:33:42 +03:00
Ehsan Akhgari 430e61c30f Bug 1248148 - Disable firing selection events during HTML editor initialization; r=mystor
This is similar to what we do for the plaintext editor initialization.
2016-10-13 13:46:40 -04:00
Makoto Kato 626a2cfaa9 Bug 1309117 - Make ImgFromData fallible. r=masayuki
When pasting large image, it may cause OOM when generating base64 data.  So we should use fallible allocator instead.

Also, base64 is ASCII, so we should use AppendASCIItoUTF16 instead of AppendUTF8toUTF16.

MozReview-Commit-ID: 8yWPxfEcEwv

--HG--
extra : rebase_source : 6c2c3144d4413017b4861443c945aeb0d6d995ef
2016-10-11 19:28:30 +09:00
Boris Zbarsky a3ba31e74a Bug 1308287 part 2. Make DataTransfer.types use [NeedsSubjectPrincipal]. r=mystor 2016-10-10 21:07:48 -04:00
Boris Zbarsky bae20efd7f Bug 1298243 part 7. Change DataTransfer.types from being a DOMStringList to being a frozen array. r=mystor,gijs 2016-10-10 21:07:47 -04:00
Xidorn Quan 2f49a48a09 Bug 1304302 part 10 - Replace all uses of StyleSheetHandle. r=heycam
This commit is generated by the following commands with some minor
manual adjustment:

find . \( -name '*.h' -or -name '*.cpp' \) -not -path './layout/style/StyleSheet*' -exec sed -i -b \
  -e '/^\(#include\|using\)/s/StyleSheetHandle/StyleSheet/g' \
  -e 's/\(mozilla::\)\?StyleSheetHandle::RefPtr/RefPtr<\1StyleSheet>/g' \
  -e 's/StyleSheetHandle()/nullptr/g' \
  -e 's/->AsStyleSheet()//g' \
  -e 's/StyleSheetHandle/StyleSheet*/g' {} +
sed -i -b 's/sheet->AsVoidPtr()/sheet.get()/' layout/style/Loader.cpp
sed -i -b 's/AsHandle()/this/' layout/style/StyleSheet.cpp

MozReview-Commit-ID: 7abdvlKHukd

--HG--
extra : source : e5682242db07203b5a91810fe1e243c955310588
2016-09-26 22:03:25 +10:00
Carsten "Tomcat" Book 36f1fe4e63 Bug 972110 - fix test_bug674770-1.html after merge conflict a=me
--HG--
extra : amend_source : 8616390a1773b278f52691300128d15d7b55de98
2016-09-23 12:14:13 +02:00
Carsten "Tomcat" Book a65e4225ef merge mozilla-inbound to mozilla-central a=merge 2016-09-23 12:05:53 +02:00
Masayuki Nakano c29d9ac401 Bug 972110 Rewrite editor/libeditor/test_bug674770-1.html without setTimeout() for avoiding intermittent failure r=smaug
We can assume that if middle button's click event on a link isn't consumed by any event handlers including system event group's, it will cause open new tab.  With this assumption, we can avoid using setTimeout which causes random orange.

However, unfortunately, in e10s mode, the default is NOT consumed at window in bubbling phase but consumed at that time. So, when not working the link is expected, we cannot check Event.defaultPrevented.  But fortunately, we can check if the page is loaded after that.

Note that for testing this, the test needs to check if an event handler which is either in default group or system group consumed a click event.  However, this runs as mochitest-plain.  Therefore, Event.defaultPrevented returns false if the event is consumed only in the system group's event listener.  For avoiding this issue, this patch adds defaultPreventedInAnyGroups() into SpecialPowers.  In SpecialPowers, Event.defaultPrevented is accessed from chrome context.  Therefore, we can get the result what this test needs.

MozReview-Commit-ID: Cfn4lFR1dfI

--HG--
extra : rebase_source : 51feb768bd38f62cc19c2f4aecaaea0135190599
2016-09-22 10:54:51 +09:00
aceman 8667dcbcb6 Bug 1273001 - convert HTMLEditor::getLinkedObjects() to nsIArray. r=masayuki 2016-09-20 12:47:00 +02:00
Gabor Krizsanits af105a9c64 Bug 1301340 - Force single process in some tests. r=mrbkap 2016-09-22 09:24:31 +02:00
Shing Lyu 74414dd285 Bug 1302993 - Update some stylo reftest expectations; r=heycam
MozReview-Commit-ID: 5UUDlAUfBYP

--HG--
extra : rebase_source : c8aff1382e492bc07c59becc697abfb4f7bd8f95
2016-09-12 11:05:21 +05:30
aceman 8577dea451 Bug 1272893 - Remove nsISupportsArray from GetEmbeddedObjects() in editor. r=masayuki
--HG--
extra : amend_source : 2e47d294e70be626e77f5b46614c907e17ac5ba5
2016-09-15 04:33:00 +02:00
Manish Goregaokar aad318e17a Bug 1300337 - Replace None_ variants from nsStyleConsts.h with None; r=heycam,TYLin
MozReview-Commit-ID: CxHzbEzjLxT

--HG--
extra : rebase_source : 232f90b8b107f7fb49f47a29a4e493660b8a7d87
2016-09-04 00:16:58 +05:30
Shing Lyu db11558e50 Bug 1288350 - Temporary reftest list for Stylo vs Gecko test r=heycam,manishearth
--HG--
extra : rebase_source : 4772418bd2813d4e79643a833eb09e47fe893d84
2016-09-05 11:45:39 +08:00
Carsten "Tomcat" Book d98e95abb8 Merge mozilla-central to autoland 2016-09-08 12:51:52 +02:00
Ting-Yu Lin 6f82a72d0c Bug 1301325 - Remove text_caret*.png under editor/composer/res/. r=mtseng
MozReview-Commit-ID: 5UQ65KIOxW8

--HG--
extra : rebase_source : f3606c754227f894eb674f6dfd16eac78236c0a3
2016-09-08 16:54:15 +08:00
Thomas Wisniewski 2b28c5e2a9 Bug 1069012 - Unprefix ::placeholder pseudo-element. r=bz 2016-09-07 19:38:38 -04:00
Michael Layzell 5d1745c161 Bug 1018486 - Part 2: Changes in editor/, r=masayuki
MozReview-Commit-ID: JA7UCVXEd8j
2016-09-07 10:50:37 -04:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Emilio Cobos Álvarez 619cb14d87 Bug 1299066: Make NS_STYLE_DISPLAY_* an enum class. Prefer indexing instead of linear search in the frame constructor r=heycam,bz
The main renaming was generated with the following python script:

```

import sys
import re

CAMEL_CASE_REGEX = re.compile(r"(^|_|-)([A-Z])([A-Z]+)")
DISPLAY_REGEX = re.compile(r"\bNS_STYLE_DISPLAY_([^M][A-Z_]+)\b")

def to_camel_case(ident):
  return re.sub(CAMEL_CASE_REGEX,
                lambda m: m.group(2) + m.group(3).lower(), ident)

def constant_to_enum(constant):
  return "StyleDisplay::" + to_camel_case(constant) + ("_" if constant == "NONE" else "")

def process_line(line):
  return re.sub(DISPLAY_REGEX,
                lambda m: constant_to_enum(m.group(1)), line)

lines = []
with open(sys.argv[1], "r") as f:
  for line in f:
    lines.append(process_line(line))

with open(sys.argv[1], "w") as f:
  for line in lines:
    f.write(line)
```

And the following shell commands:

```
find . -name '*.cpp' -exec python display.py {} \;
find . -name '*.h' -exec python display.py {} \;
```

MozReview-Commit-ID: 91xYCbLC2Vf
2016-09-01 20:41:17 -07:00
Aryeh Gregor 76862dadad Bug 1299453 - Stop using createEvent("DragEvents"/"KeyEvents") internally; r=smaug
They are non-standard aliases for "DragEvent" and "KeyboardEvent" that
are not supported by any other UA, and we would like to drop support.
So first let's stop using them ourselves, so we can use telemetry to see
if any sites are using them.

MozReview-Commit-ID: ICC33ORa2st
2016-08-31 20:38:50 +03:00
Ou Shinjo 2e390f8812 Bug 1266165 - CompositionTransaction::SetIMESelection() should not hide caret when redo r=masayuki
CompositionTransaction::SetIMESelection() is also called when user redos the committed composition.  In such case, it doesn't have ranges, but DoTransaction() tries to restore selection ranges with no ranges.  That causes hiding caret because when there is no caret range in the ranges, SetIMESelection() hides the caret as IME requested.

So, for redo, SetIMESelection() shouldn't hide caret when there are no ranges (i.e., the composition was already committed).
2016-08-27 13:26:42 +09:00
Aryeh Gregor f3e54042f1 Bug 1271115 - Merge ChromeUtils.js into EventUtils.js; r=jmaher
This allows plain mochitests to use the functions as well, which is
necessary to get them to work with e10s.

MozReview-Commit-ID: J4um2mliJcZ
2016-08-25 16:57:09 +03:00
Aryeh Gregor f5cce8463c Bug 1250805 - Respect type-in state when caching inline styles; r=masayuki
MozReview-Commit-ID: OZCUbNUvmz
2016-08-25 14:43:21 +03:00
Lee Salzman ac99e35d5f Bug 1278957 - enable Skia content for Linux and Android. r=mchang
MozReview-Commit-ID: KFb81rVM0ik
2016-08-23 13:55:14 -04:00
Aryeh Gregor f6c34fc75b Bug 748308 - Support insertParagraph and insertLineBreak per spec/Blink/WebKit; r=masayuki
Previously we supported insertParagraph as a synonym for formatBlock
"p", which is both useless and incompatible with all other browsers.
Edge's behavior doesn't look useful and looks redundant with insertHTML
(although it matches the name nicely, probably because they invented
the command).  Blink/WebKit treat it the same as hitting Enter, which is
useful for cross-browser testing until we get synthesizeKey() in wpt.

At the same time, I added insertLineBreak, which Blink/WebKit support
with the same functionality as pressing Shift-Enter.

The new event.html failures are spurious -- we used to pass by mistake
because we didn't support insertlinebreak at all.  insertlinebreak.html
has only new passes, no new failures, although it's not clear on the
diff.

MozReview-Commit-ID: 16oPcxXwGcj
2016-08-23 14:13:17 +03:00
Aryeh Gregor a97d9af06f Bug 1295563 - Assert that editors can't be reinitialized during an edit action; r=masayuki
Many HTMLEditRules methods use the pattern of
  nsCOMPtr<nsIEditor> kungFuDeathGrip(mHTMLEditor);
at the beginning of the method, followed by using mHTMLEditor freely.
If Init() is then called on the editor, mHTMLEditor is set to null, so
it will crash.  Other bad stuff will probably happen too.

MozReview-Commit-ID: gUtaTAQJIh
2016-08-23 14:13:16 +03:00
Aryeh Gregor dfe0b2fb6c Bug 1265800 part 3 - Move cursor into all adjacent nodes after delete; r=masayuki
When deleting, we previously would only move the cursor back into the
previous block if the last leaf node was a text node, for some reason.
We should move into the previous block in other cases as well, like if
the leaf node is a collapsed <br>.  (Probably it's not correct to move
backward into tables, but that already was happening if the table had
text at the end.  There may be other cases where this is wrong.)

MozReview-Commit-ID: 8e0dTU3lNYO
2016-08-22 14:27:17 +03:00
Aryeh Gregor 2a778fda0b Bug 1265800 part 2 - Don't place cursor after invisible break; r=masayuki
If the user tries to insert text without moving the cursor, the
invisible break will become visible, which from the user's perspective
means an extra line break was inserted for no reason.

The IsVisBreak change here is a bit scary, because it may result in
unexpected behavior changes, but it seems to improve correctness.  If it
turns out to cause problems, it can be added as a special case to
GetGoodSelPointForNode instead.

MozReview-Commit-ID: 7SRQYHYtJvF
2016-08-22 14:27:08 +03:00
Aryeh Gregor 09a3b26740 Bug 1265800 part 1 - Small unrelated cleanup patch; r=masayuki
MozReview-Commit-ID: CmyOTeFgKtS
2016-08-22 14:26:52 +03:00
Sebastian Hengst 6568eeec5b Backed out changeset e3b15fe52734 (bug 1265800) for failing added wpt /XMLHttpRequest/event-error.html. r=backout 2016-08-21 23:48:54 +02:00
Sebastian Hengst 9df7aba907 Backed out changeset bba587e03e0b (bug 1265800) 2016-08-21 23:42:45 +02:00
Sebastian Hengst 73836dc023 Backed out changeset da1cdd000993 (bug 1265800) 2016-08-21 23:42:41 +02:00
Aryeh Gregor aeca189ce4 Bug 1265800 part 3 - Move cursor into all adjacent nodes after delete; r=masayuki
When deleting, we previously would only move the cursor back into the
previous block if the last leaf node was a text node, for some reason.
We should move into the previous block in other cases as well, like if
the leaf node is a collapsed <br>.  (Probably it's not correct to move
backward into tables, but that already was happening if the table had
text at the end.  There may be other cases where this is wrong.)

MozReview-Commit-ID: 8e0dTU3lNYO
2016-08-21 18:13:49 +03:00
Aryeh Gregor c0a463e1dd Bug 1265800 part 2 - Don't place cursor after invisible break; r=masayuki
If the user tries to insert text without moving the cursor, the
invisible break will become visible, which from the user's perspective
means an extra line break was inserted for no reason.

The IsVisBreak change here is a bit scary, because it may result in
unexpected behavior changes, but it seems to improve correctness.  If it
turns out to cause problems, it can be added as a special case to
GetGoodSelPointForNode instead.

MozReview-Commit-ID: 7SRQYHYtJvF
2016-08-21 18:13:49 +03:00
Aryeh Gregor 7c39888a95 Bug 1265800 part 1 - Small unrelated cleanup patch; r=masayuki
MozReview-Commit-ID: CmyOTeFgKtS
2016-08-21 18:13:47 +03:00
Aryeh Gregor e576cbacce Bug 1295150 - Fix incorrectly skipped test; r=mats
Bug 1268736 inadvertently put a new test before a skip-if line, which
makes the new test skipped instead of the preexisting one.

MozReview-Commit-ID: 20SuUc3IhiG
2016-08-21 16:06:13 +03:00
Jonathan Chan 4b87f11bd9 Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-16 18:37:48 -07:00
Gregory Szorc 1794619188 Backed out changesets dcdb85fc5517, 702bca0deee2, 9cKX8gC1ATA (bug 1293739) for build bustage; a=bustage
The merge from inbound to central conflicted with the merge from
autoland to central, it appears. Per tree rules, the commit from the
autoland repo wins and the inbound commit gets backed out.

CLOSED TREE

--HG--
extra : amend_source : 927e1cdfa8e55ccbd873d404d905caf6871c8c4f
extra : histedit_source : 07095868c3f767258e1d7d2645193bf4811b13bb%2Ca49ae5a28bf6e67298b6208ee9254c25a2539712
2016-08-16 17:50:40 -07:00
Wes Kocher 48b8d407c8 Merge inbound to central, a=merge
a=release to get around the webidl hook for a comment-only change

--HG--
extra : amend_source : f7e57101e1a25d3cf3536a256898ec2a21c54b38
2016-08-16 17:05:30 -07:00
Jonathan Chan 9c62a2c11c Bug 1293739 - Part 1: Rename nsCSSProperty to nsCSSPropertyID. r=dholbert
This patch is generated by the following commands (note: if you're running
using OS X's sed, which accepts slightly different flags, you'll have to
specify an actual backup suffix in -i, or use gsed from Homebrew):

  hg stat -c \
  | cut -c 3-  \
  | tr '\n' '\0' \
  | xargs -0 -P 8 gsed --follow-symlinks 's/\bnsCSSProperty\b/nsCSSPropertyID/g' -i''

Then:

  hg mv layout/style/nsCSSProperty.h layout/style/nsCSSPropertyID.h

... and finally, manually renaming nsCSSProperty in the include guard in
nsCSSProperty.h.

MozReview-Commit-ID: ZV6jyvmLfA

--HG--
rename : layout/style/nsCSSProperty.h => layout/style/nsCSSPropertyID.h
2016-08-09 16:28:19 -07:00
Joel Maher 37e7cf1020 Bug 1291015 - move more clipboard tests and plugin tests to the hardware based m-cl job. r=RyanVM
MozReview-Commit-ID: HJHdiFrNRWM

--HG--
extra : rebase_source : e211c8f0751c7f3a58fac0430bb63c18023c3c07
2016-08-03 15:07:39 -04:00
Wes Kocher 46da1ae628 Backed out changeset cc88b920a387 (bug 1278957) for making browser_notifications.js permafail on linux64 debug a=backout CLOSED TREE 2016-08-10 15:36:45 -07:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Lee Salzman dfa9fefa78 Bug 1278957 - enable Skia content for Linux and Android. r=mchang
MozReview-Commit-ID: KFb81rVM0ik
2016-08-09 15:56:28 -04:00
Wes Kocher e4976889e3 Backed out changeset 05bc24cabedf (bug 1278957) for pgo m(oth) failures 2016-08-09 11:44:12 -07:00
Lee Salzman bf9dba5653 Bug 1278957 - enable Skia content for Linux and Android. r=mchang
MozReview-Commit-ID: KFb81rVM0ik
2016-08-09 05:33:15 -04:00
Carsten "Tomcat" Book 1315140dfb Backed out changeset 33b8617a7233 (bug 1278957) for linux pgo reftest failures 2016-08-09 09:15:40 +02:00
Lee Salzman 1881a1669c Bug 1278957 - enable Skia content for Linux and Android. r=mchang
MozReview-Commit-ID: KFb81rVM0ik
2016-08-08 14:26:26 -04:00
Kartikaya Gupta 30bfd9e7af Bug 1195722 - Follow-up to keep the accessible caret disabled on some reftests that require it. r=me on a CLOSED TREE
MozReview-Commit-ID: nugmHgzU1v
2016-08-03 15:59:04 -04:00
David Zbarsky e0691abc04 Bug 824592 part 3. Get rid of nsIDOMElementCSSInlineStyle. r=peterv 2016-08-02 11:05:38 -07:00
Makoto Kato 40fe35f309 Bug 1266815 - Part 2. Add editing session test. r=masayuki
Use Promiose instead of setTimeout

MozReview-Commit-ID: HwgorIZbZpM

--HG--
extra : rebase_source : 9177c825d5492c0a04e4a9361b3a8e1702082655
2016-07-29 12:39:59 +09:00
Makoto Kato 51fc874636 Bug 1266815 - Part 1. Unnecessary DetachEditorFromWindow call from nsEditingSession. r=masayuki
nsIContent::GetDesiredIMEState sets IMEState::DISABLED, so IME doesn't work well.

Actually, DetachEditorFromWindow is called twice.  One is from nsEditingSession::StartDocumentLoad, and another is from nsDocShell::FirePageHideNotification.

When navigating to next, OnStateChange(..., STATE_START) is called.  Even if next page is external viewer such as launching another application, STAT_START is called. So even if launching external application, DetachEditorFromWindow is called.  So it means that editor is detached from docshell.

nsIContent::GetDesiredIMEState uses nsIEditor, but editor is detached state, so it cannot get nsIEditor.

When navigating to next content on internel viewer such HTML, nsDocShell::CreateContentViewer is called, then FirePageHideNotification is called.

So it is unnecessary to call DetachEditorFromWindow from nsEditorSession.  And its call causes this issue.

MozReview-Commit-ID: Lf5Rhzm1PNF

--HG--
extra : rebase_source : c452e9ea0fc01670b49cd76e17fb782aef3a5c20
2016-07-25 14:43:58 +09:00
Xidorn Quan 31f5ebf083 Bug 1287706 part 1 - Make CallbackObjectHolder movable (and actually move-only). r=smaug
So that we can avoid unnecessary refcount changes.

MozReview-Commit-ID: 4Mk9SJTj6AS

--HG--
extra : source : c35643f76ef33b6cdce115c8de0dfae8abccd644
2016-07-28 12:00:06 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Olli Pettay f8d35b16d1 Bug 1283497, unbind editor created native anonymous content properly, r=wchen 2016-07-14 13:41:14 +03:00
Andrew McCreight 28d5875cc9 Bug 1284963 - Make CreateBR return already_AddRefed. r=masayuki
Returning already_AddRefed rather than a raw pointer makes it harder
to make mistakes with refcounting like the one seen in bug 1266882.
2016-07-12 08:58:13 -07:00
Jimmy Wang af06755ad8 Bug 1162050 - Remove instances of eLegacyDragGesture and draggesture. r=enn
MozReview-Commit-ID: 8kP1AY4peos

--HG--
extra : rebase_source : 0f64e55770c2b9cfd9737f8da53111bad007dca6
2016-05-27 14:32:59 -04:00
Carsten "Tomcat" Book d2e362e983 Backed out changeset f8fe3acf2e78 (bug 1162050) 2016-07-11 11:18:48 +02:00
Jimmy Wang 209f78f925 Bug 1162050 - Remove instances of eLegacyDragGesture and draggesture. r=enn
MozReview-Commit-ID: 8kP1AY4peos

--HG--
extra : transplant_source : XY2kY%87%AE%2A%C8%E8MV%86L%22%0B%21%5C%90%1B
2016-05-27 14:32:59 -04:00
Masayuki Nakano fb4dd2591f Bug 1260651 part.61 Replace "etc" with "etc." r=mccr8
MozReview-Commit-ID: JFgd0t2bqzu
2016-07-08 14:15:21 +09:00
Masayuki Nakano 7f30e926b8 Bug 1260651 part.60 editor/libeditor should export some headers which are required by other modules and other modules shouldn't use local include for them r=mccr8
MozReview-Commit-ID: FZSExwkHH2B
2016-07-08 14:03:31 +09:00
Masayuki Nakano f382711dc3 Bug 1260651 part.59 Rename nsEditor to mozilla::EditorBase (and also their file names) r=mccr8
This patch also renames:

EditorInputEventDispatcher -> mozilla::EditorInputEventDispatcher

And some variable names are renamed from aEditor or mEditor to aEditorBase or mEditorBase for making their types clearer.

MozReview-Commit-ID: 2FCXWpLMn8e

--HG--
rename : editor/libeditor/nsEditor.cpp => editor/libeditor/EditorBase.cpp
rename : editor/libeditor/nsEditor.h => editor/libeditor/EditorBase.h
2016-07-08 13:10:13 +09:00
Masayuki Nakano a4ac19d311 Bug 1260651 part.58 Rename nsPlaintextEditor to mozilla::TextEditor (and their file names too) r=mccr8
This patch renames nsPlaintextEditor to mozilla::TextEditor.

Additionally, renames TextEditRules::mEditor to TextEditRules::mTextEditor for making its type clearer.

Finally, renaming following files:

nsPlaintextEditor.h -> TextEditor.h (exposed as mozilla/editor/TextEditor.h)
nsPlaintextEditor.cpp -> TextEditor.cpp
nsPlaintextDataTransfer.cpp -> TextEditorDataTransfer.cpp

MozReview-Commit-ID: Lw8oJi4WglA

--HG--
rename : editor/libeditor/nsPlaintextEditor.cpp => editor/libeditor/TextEditor.cpp
rename : editor/libeditor/nsPlaintextEditor.h => editor/libeditor/TextEditor.h
rename : editor/libeditor/nsPlaintextDataTransfer.cpp => editor/libeditor/TextEditorDataTransfer.cpp
2016-07-09 11:54:50 +09:00
Masayuki Nakano f20dd4bac0 Bug 1260651 part.57 Move classes in nsHTMLObjectResizer.h into mozilla namespace and its file name should be HTMLEditorObjectResizerUtils.h r=mccr8
This patch renames:

ResizerSelectionListener -> mozilla::ResizerSelectionListener
ResizerMouseMotionListener -> mozilla::ResizerMouseMotionListener
DocumentResizeEventListener -> mozilla::DocumentResizeEventListener

And making the header file name HTMLEditorObjectResizerUtils.h because it doesn't define specific class related to its file name and should be clearer that it's related to HTMLEditor.

MozReview-Commit-ID: GOJyEwtFdJV

--HG--
rename : editor/libeditor/nsHTMLObjectResizer.h => editor/libeditor/HTMLEditorObjectResizerUtils.h
2016-07-07 19:49:07 +09:00
Masayuki Nakano 9b6e26f0bb Bug 1260651 part.56 Rename nsHTMLEditor to mozilla::HTMLEditor and related stuff r=mccr8
This patch renames classes/structs as:

nsHTMLEditor -> mozilla::HTMLEditor
nsHTMLEditor::BlobReader -> mozilla::HTMLEditor::BlobReader
SetSelectionAfterTableEdit -> mozilla::AutoSelectionSetterAfterTableEdit

nsHTMLEditor.h -> HTMLEditor.h (exposed as mozilla/editor/HTMLEditor.h)
nsHTMLAbsPosition.cpp -> HTMLAbsPositionEditor.cpp
nsHTMLAnonymousUtils.cpp -> HTMLAnonymousNodeEditor.cpp
nsHTMLDataTransfer.cpp -> HTMLEditorDataTransfer.cpp
nsHTMLEditorStyle.cpp -> HTMLStyleEditor.cpp
nsHTMLInlineTableEditor.cpp -> HTMLInlineTableEditor.cpp
nsHTMLObjectResizer.cpp -> HTMLEditorObjectResizer.cpp
nsTableEditor.cpp -> HTMLTableEditor.cpp

These new file names are clearer names which related to HTMLEditor than old names.

MozReview-Commit-ID: DTWaoFvy0DF

--HG--
rename : editor/libeditor/nsHTMLAbsPosition.cpp => editor/libeditor/HTMLAbsPositionEditor.cpp
rename : editor/libeditor/nsHTMLAnonymousUtils.cpp => editor/libeditor/HTMLAnonymousNodeEditor.cpp
rename : editor/libeditor/nsHTMLEditor.cpp => editor/libeditor/HTMLEditor.cpp
rename : editor/libeditor/nsHTMLEditor.h => editor/libeditor/HTMLEditor.h
rename : editor/libeditor/nsHTMLDataTransfer.cpp => editor/libeditor/HTMLEditorDataTransfer.cpp
rename : editor/libeditor/nsHTMLObjectResizer.cpp => editor/libeditor/HTMLEditorObjectResizer.cpp
rename : editor/libeditor/nsHTMLInlineTableEditor.cpp => editor/libeditor/HTMLInlineTableEditor.cpp
rename : editor/libeditor/nsHTMLEditorStyle.cpp => editor/libeditor/HTMLStyleEditor.cpp
rename : editor/libeditor/nsTableEditor.cpp => editor/libeditor/HTMLTableEditor.cpp
2016-07-09 11:42:33 +09:00
Masayuki Nakano 9e30876e77 Bug 1260651 part.55 Rename nsEditorEventListeners to mozilla::EditorEventListener (and their file names) r=mccr8
MozReview-Commit-ID: HqUUCZkaFTT

--HG--
rename : editor/libeditor/nsEditorEventListener.cpp => editor/libeditor/EditorEventListener.cpp
rename : editor/libeditor/nsEditorEventListener.h => editor/libeditor/EditorEventListener.h
2016-07-07 19:40:51 +09:00
Masayuki Nakano 729e312242 Bug 1260651 part.54 Rename nsHTMLEditorEventListeners to mozilla::HTMLEditorEventListener (and their file names) r=mccr8
MozReview-Commit-ID: DFW3E2WfXzJ

--HG--
rename : editor/libeditor/nsHTMLEditorEventListener.cpp => editor/libeditor/HTMLEditorEventListener.cpp
rename : editor/libeditor/nsHTMLEditorEventListener.h => editor/libeditor/HTMLEditorEventListener.h
2016-07-07 19:36:53 +09:00
Masayuki Nakano 5c69175a0a Bug 1260651 part.53 Rename nsRulesInfo to mozilla::RulesInfo and rename nsEditRules.h to nsIEditRules.h r=mccr8
MozReview-Commit-ID: LGqyvjv9pr6

--HG--
rename : editor/libeditor/nsEditRules.h => editor/libeditor/nsIEditRules.h
2016-07-07 19:33:32 +09:00
Masayuki Nakano baafefc66e Bug 1260651 part.52 Rename nsAutoLockListener to mozilla::AutoLockListener r=mccr8
MozReview-Commit-ID: 728oPlrpb3Q
2016-06-24 21:22:26 +09:00
Masayuki Nakano d8f7c7cf33 Bug 1260651 part.51 Rename nsAutoLockRulesSniffing to mozilla::AutoLockRulesSniffing r=mccr8
MozReview-Commit-ID: BnZ1Y3YXfMK
2016-06-24 21:19:18 +09:00
Masayuki Nakano a0b8f02f00 Bug 1260651 part.50 Rename nsTextRulesInfo to mozilla::TextRulesInfo r=mccr8
MozReview-Commit-ID: Iny5k7WQlbS
2016-06-24 21:12:16 +09:00
Masayuki Nakano 94713accb3 Bug 1260651 part.49 Rename nsTextEditRules to mozilla::TextEditRules (and also their file names) r=mccr8
MozReview-Commit-ID: DzNeLcT1r1e

--HG--
rename : editor/libeditor/nsTextEditRules.cpp => editor/libeditor/TextEditRules.cpp
rename : editor/libeditor/nsTextEditRules.h => editor/libeditor/TextEditRules.h
rename : editor/libeditor/nsTextEditRulesBidi.cpp => editor/libeditor/TextEditRulesBidi.cpp
2016-07-09 11:34:41 +09:00
Masayuki Nakano b4d7fe3219 Bug 1260651 part.48 Rename nsHTMLEditRules to mozilla::HTMLEditRules (and also their file names) r=mccr8
This patch changes following classes/structs:

nsHTMLEditRules -> mozilla::HTMLEditRules
StyleCache -> mozilla::StyleCache
nsTableCellAndListItemFunctor -> mozilla::TableCellAndListItemFunctor
nsBRNodeFunctor -> mozilla::BRNodeFunctor
nsEmptyEditableFunctor -> mozilla::EmptyEditableFunctor
nsUniqueFunctor -> mozilla::UniqueFunctor

MozReview-Commit-ID: KBjfFmnF5p1

--HG--
rename : editor/libeditor/nsHTMLEditRules.cpp => editor/libeditor/HTMLEditRules.cpp
rename : editor/libeditor/nsHTMLEditRules.h => editor/libeditor/HTMLEditRules.h
2016-07-07 19:05:51 +09:00
Masayuki Nakano 395775be56 Bug 1260651 part.47 Rename nsWSRunObject to mozilla::WSRunObject (and also their file names) r=mccr8
Perhaps, there may be better name like WhitespaceRunObject or something, however, for now keep using the term because I don't understand well what it does.

With this patch, following objects are renamed:

nsWSRunObject -> mozilla::WSRunObject
WSType -> mozilla::WSType
nsWSRunObject::WSFragment -> mozilla::WSRunObject::WSFragment
nsWSRunObject::WSPoint -> mozilla::WSRunObject::WSPoint

MozReview-Commit-ID: JgAWiPjOtMW

--HG--
rename : editor/libeditor/nsWSRunObject.cpp => editor/libeditor/WSRunObject.cpp
rename : editor/libeditor/nsWSRunObject.h => editor/libeditor/WSRunObject.h
2016-07-07 19:00:51 +09:00
Masayuki Nakano 240f5eb68d Bug 1260651 part.46 Rename nsHTMLURIRefObject to mozilla::HTMLURIRefObject (and also their file names) r=mccr8
This patch also fixes new bustage of nsHTMLEditRules.cpp and nsWSRunObject.cpp.

MozReview-Commit-ID: 5xgZDP7d6wy

--HG--
rename : editor/libeditor/nsHTMLURIRefObject.cpp => editor/libeditor/HTMLURIRefObject.cpp
rename : editor/libeditor/nsHTMLURIRefObject.h => editor/libeditor/HTMLURIRefObject.h
2016-07-07 18:40:45 +09:00
Masayuki Nakano 0f406c126d Bug 1260651 part.45 Rename nsHTMLCSSUtils to mozilla::CSSEditUtils (and also their file names) r=mccr8
This patch also renames nsHTMLEditor::mHTMLCSSUtils to nsHTMLEditor::mCSSEditUtils.

MozReview-Commit-ID: 1ZZBTqkVOm9

--HG--
rename : editor/libeditor/nsHTMLCSSUtils.cpp => editor/libeditor/CSSEditUtils.cpp
rename : editor/libeditor/nsHTMLCSSUtils.h => editor/libeditor/CSSEditUtils.h
2016-07-07 18:35:13 +09:00
Masayuki Nakano 0306bbfb8d Bug 1260651 part.44 Rename nsAutoMoveNodeSelNotify to mozilla::AutoMoveNodeSelNotify r=mccr8
MozReview-Commit-ID: Bahm520giss
2016-06-24 15:24:44 +09:00
Masayuki Nakano b5223c28f5 Bug 1260651 part.43 Rename nsAutoInsertContainerSelNotify to mozilla::AutoInsertContainerSelNotify r=mccr8
MozReview-Commit-ID: GEfM8GJO3xd
2016-06-24 15:21:35 +09:00
Masayuki Nakano 35be83ddea Bug 1260651 part.42 Rename nsAutoRemoveContainerSelNotify to mozilla::AutoRemoveContainerSelNotify r=mccr8
MozReview-Commit-ID: GyU26vXBGyt
2016-07-07 18:27:18 +09:00
Masayuki Nakano ae63c1d600 Bug 1260651 part.41 Rename mozilla::dom::AutoReplaceContainerSelNotify to mozilla::AutoReplaceContainerSelNotify r=mccr8
MozReview-Commit-ID: 2EB2yQOpjO9
2016-06-24 15:14:16 +09:00
Masayuki Nakano bc3f10f5dc Bug 1260651 part.40 Rename nsAutoTrackDOMPoint to mozilla::AutoTrackDOMPoint r=mccr8
MozReview-Commit-ID: 775stH3pteA
2016-06-24 15:08:16 +09:00
Masayuki Nakano 452819e0f2 Bug 1260651 part.39 Rename nsRangeUpdater to mozilla::RangeUpdater r=mccr8
MozReview-Commit-ID: 8xPhGbSSOjx
2016-06-24 15:01:40 +09:00
Masayuki Nakano 06439489fa Bug 1260651 part.38 Rename nsRangeStore to mozilla::RangeItem because the instances called 'item' in many places r=mccr8
MozReview-Commit-ID: BUU44fpTNyW
2016-06-24 14:44:14 +09:00
Masayuki Nakano 70604c32d8 Bug 1260651 part.37 Rename nsSelectionState to mozilla::SelectionState (and their file names too) r=mccr8
Note that this fixes some new bustage of nsHTMLEditor.

nbsp is conflict with nsWSRunObject.cpp's same name constant.  Therefore, I moved it into nsHTMLEditor and rename it to kNBSP.

And including some missing header files.

MozReview-Commit-ID: hwL8BIbSMQ

--HG--
rename : editor/libeditor/nsSelectionState.cpp => editor/libeditor/SelectionState.cpp
rename : editor/libeditor/nsSelectionState.h => editor/libeditor/SelectionState.h
2016-07-07 18:15:53 +09:00
Masayuki Nakano ef78093cc5 Bug 1260651 part.36 Rename nsInternetCiter to mozilla::InternetCiter (and their files too) r=mccr8
MozReview-Commit-ID: IGznbRrkf23

--HG--
rename : editor/libeditor/nsInternetCiter.cpp => editor/libeditor/InternetCiter.cpp
rename : editor/libeditor/nsInternetCiter.h => editor/libeditor/InternetCiter.h
2016-07-07 18:00:19 +09:00
Masayuki Nakano 4b7aede741 Bug 1260651 part.35 Move PorpItem and TypeInState from global namespace to mozilla namespace r=mccr8
Moving PropItem and TypeInState into mozilla namespace. I.e., these names are:
PropItem -> mozilla::PropItem
TypeInState -> mozilla::TypeInState

Although, there might be better names for them.  They are too general names.

MozReview-Commit-ID: By9CX1KlAaU
2016-07-08 11:51:46 +09:00
Masayuki Nakano 26f08a9046 Bug 1260651 part.34 Rename editor command classes and their file names r=mccr8
This patch renames editor command classes listed below:

* nsBaseEditorCommand -> mozilla::EditorCommandBase
* nsUndoCommand -> mozilla::UndoCommand
* nsRedoCommand -> mozilla::RedoCommand
* nsClearUndoCommand -> mozilla::ClearUndoCommand
* nsCutCommand -> mozilla::CutCommand
* nsCutOrDeleteCommand -> mozilla::CutOrDeleteCommand
* nsCopyCommand -> mozilla::CopyCommand
* nsCopyOrDeleteCommand -> mozilla::CopyOrDeleteCommand
* nsCopyAndCollapseToEndCommand -> mozilla::CopyAndCollapseToEndCommand
* nsPasteCommand -> mozilla::PasteCommand
* nsPasteTransferableCommand -> mozilla::PasteTransferableCommand
* nsSwitchTextDirectionCommand -> mozilla::SwitchTextDirectionCommand
* nsDeleteCommand -> mozilla::DeleteCommand
* nsSelectAllCommand -> mozilla::SelectAllCommand
* nsSelectionMoveCommands -> mozilla::SelectionMoveCommands
* nsInsertPlaintextCommand -> mozilla::InsertPlaintextCommand
* nsPasteQuotationCommand -> mozilla::PasteQuotationCommand

MozReview-Commit-ID: Lf6Lc39FpqM

--HG--
rename : editor/libeditor/nsEditorCommands.cpp => editor/libeditor/EditorCommands.cpp
rename : editor/libeditor/nsEditorCommands.h => editor/libeditor/EditorCommands.h
2016-06-24 11:45:22 +09:00
Masayuki Nakano d074a31e51 Bug 1260651 part.33 Rename nsEditorController to mozilla::EditorController (and their files too) r=mccr8
MozReview-Commit-ID: 5xedcGTDlq1

--HG--
rename : editor/libeditor/nsEditorController.cpp => editor/libeditor/EditorController.cpp
rename : editor/libeditor/nsEditorController.h => editor/libeditor/EditorController.h
2016-07-08 14:26:02 +09:00
Masayuki Nakano 5fb3db78b5 Bug 1260651 part.32 Rename EditTxn to mozilla::EditTransactionBase r=mccr8
This patch also renames NS_DECL_EDITTXN to NS_DECL_EDIT_TRANSACTION_BASE.

MozReview-Commit-ID: 29TQbKBBEhD

--HG--
rename : editor/libeditor/EditTxn.cpp => editor/libeditor/EditTransactionBase.cpp
rename : editor/libeditor/EditTxn.h => editor/libeditor/EditTransactionBase.h
2016-07-08 09:48:34 +09:00
Masayuki Nakano fb4c83aca3 Bug 1260651 part.31 Rename AddStyleSheetTxn and RemoveStyleSheetTxn to mozilla::AddStyleSheetTransaction and mozilla::RemoveStyleSheetTransaction r=mccr8
This patch also moves ImplCycleCollectionTraverse() and ImplCycleCollectionUnlink() to mozilla namespace for avoiding bustage due to confusion caused by "using namespace" in other unified cpp files.

MozReview-Commit-ID: GekPlZnqLs9

--HG--
rename : editor/libeditor/nsStyleSheetTxns.cpp => editor/libeditor/StyleSheetTransactions.cpp
rename : editor/libeditor/nsStyleSheetTxns.h => editor/libeditor/StyleSheetTransactions.h
2016-07-07 17:20:22 +09:00
Masayuki Nakano 68abedfd73 Bug 1260651 part.30 Rename EditAggregateTxn to mozilla::EditAggregateTransaction (and their files too) r=mccr8
MozReview-Commit-ID: TPiBS0eEI4

--HG--
rename : editor/libeditor/EditAggregateTxn.cpp => editor/libeditor/EditAggregateTransaction.cpp
rename : editor/libeditor/EditAggregateTxn.h => editor/libeditor/EditAggregateTransaction.h
2016-07-07 17:11:30 +09:00
Masayuki Nakano 15b7d9237f Bug 1260651 part.29 Rename mozilla::dom::SplitNodeTxn to mozilla::SplitNodeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: 5guZsO9XGLY

--HG--
rename : editor/libeditor/SplitNodeTxn.cpp => editor/libeditor/SplitNodeTransaction.cpp
rename : editor/libeditor/SplitNodeTxn.h => editor/libeditor/SplitNodeTransaction.h
2016-07-07 16:59:55 +09:00
Masayuki Nakano 12a3eb5576 Bug 1260651 part.28 Rename SetDocTitleTxn to mozilla::SetDocumentTitleTransaction (and their files too) r=mccr8
MozReview-Commit-ID: GmVEYr3ZJEl

--HG--
rename : editor/libeditor/SetDocTitleTxn.cpp => editor/libeditor/SetDocumentTitleTransaction.cpp
rename : editor/libeditor/SetDocTitleTxn.h => editor/libeditor/SetDocumentTitleTransaction.h
2016-07-07 16:50:17 +09:00
Masayuki Nakano 9a3758b103 Bug 1260651 part.27 Rename PlaceholderTxn to mozilla::PlaceholderTransaction (and their files too) r=mccr8
MozReview-Commit-ID: F6DeWadjTmP

--HG--
rename : editor/libeditor/PlaceholderTxn.cpp => editor/libeditor/PlaceholderTransaction.cpp
rename : editor/libeditor/PlaceholderTxn.h => editor/libeditor/PlaceholderTransaction.h
2016-07-07 16:27:23 +09:00
Masayuki Nakano 658478a3fc Bug 1260651 part.26 Rename mozilla::dom::JoinNodeTxn to mozilla::JoinNodeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: ChcoinM0sfU

--HG--
rename : editor/libeditor/JoinNodeTxn.cpp => editor/libeditor/JoinNodeTransaction.cpp
rename : editor/libeditor/JoinNodeTxn.h => editor/libeditor/JoinNodeTransaction.h
2016-07-07 16:16:12 +09:00
Masayuki Nakano 0818979e3d Bug 1260651 part.25 Rename mozilla::dom::InsertTextTxn to mozilla::InsertTextTransaction (and their files too) r=mccr8
MozReview-Commit-ID: wEBkU65pCM

--HG--
rename : editor/libeditor/InsertTextTxn.cpp => editor/libeditor/InsertTextTransaction.cpp
rename : editor/libeditor/InsertTextTxn.h => editor/libeditor/InsertTextTransaction.h
2016-07-07 16:06:41 +09:00
Masayuki Nakano 01f8fdf982 Bug 1260651 part.24 Rename mozilla::dom::InsertNodeTxn to mozilla::InsertNodeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: 1eF1DsxwZL6

--HG--
rename : editor/libeditor/InsertNodeTxn.cpp => editor/libeditor/InsertNodeTransaction.cpp
rename : editor/libeditor/InsertNodeTxn.h => editor/libeditor/InsertNodeTransaction.h
2016-07-07 15:56:16 +09:00
Masayuki Nakano f6a83f89e0 Bug 1260651 part.23 Rename mozilla::dom::IMETextTxn to mozilla::CompositionTransaction (and their files too) r=mccr8
This patch renames IMETextTxn to CompositionTransaction.  "Composition" is now used in some web standard specs, e.g., CompositionEvent defined by UI Events.

This patch also renames nsEditor::CreateTxnForIMEText() to nsEditor::CreateTxnForComposition().

MozReview-Commit-ID: JN0GgGdpAWG

--HG--
rename : editor/libeditor/IMETextTxn.cpp => editor/libeditor/CompositionTransaction.cpp
rename : editor/libeditor/IMETextTxn.h => editor/libeditor/CompositionTransaction.h
2016-07-07 15:42:08 +09:00
Masayuki Nakano c893a72e05 Bug 1260651 part.22 Rename mozilla::dom::DeleteTextTxn to mozilla::DeleteTextTransaction (and their files too) r=mccr8
MozReview-Commit-ID: 6WNiA7N3a9Y

--HG--
rename : editor/libeditor/DeleteTextTxn.cpp => editor/libeditor/DeleteTextTransaction.cpp
rename : editor/libeditor/DeleteTextTxn.h => editor/libeditor/DeleteTextTransaction.h
2016-07-07 15:20:22 +09:00
Masayuki Nakano aab723f475 Bug 1260651 part.21 Rename DeleteRangeTxn to mozilla::DeleteRangeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: IYFkzr95E6U

--HG--
rename : editor/libeditor/DeleteRangeTxn.cpp => editor/libeditor/DeleteRangeTransaction.cpp
rename : editor/libeditor/DeleteRangeTxn.h => editor/libeditor/DeleteRangeTransaction.h
2016-07-07 14:56:53 +09:00
Masayuki Nakano d96f9724ac Bug 1260651 part.20 Rename DeleteNodeTxn to mozilla::DeleteNodeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: ID8DUm0LoD5

--HG--
rename : editor/libeditor/DeleteNodeTxn.cpp => editor/libeditor/DeleteNodeTransaction.cpp
rename : editor/libeditor/DeleteNodeTxn.h => editor/libeditor/DeleteNodeTransaction.h
2016-07-07 15:08:33 +09:00
Masayuki Nakano d46dfe7402 Bug 1260651 part.19 Rename mozilla::dom::CreateElementTxn to mozilla::CreateElementTransaction (and their files too) r=mccr8
MozReview-Commit-ID: 7RckfPHq1Y

--HG--
rename : editor/libeditor/CreateElementTxn.cpp => editor/libeditor/CreateElementTransaction.cpp
rename : editor/libeditor/CreateElementTxn.h => editor/libeditor/CreateElementTransaction.h
2016-07-07 14:33:56 +09:00
Masayuki Nakano f5aee941e2 Bug 1260651 part.18 Rename mozilla::dom::ChangeStyleTxn to mozilla::ChangeStyleTransaction (and their files too) r=mccr8
MozReview-Commit-ID: KQn4f35WjvT

--HG--
rename : editor/libeditor/ChangeStyleTxn.cpp => editor/libeditor/ChangeStyleTransaction.cpp
rename : editor/libeditor/ChangeStyleTxn.h => editor/libeditor/ChangeStyleTransaction.h
2016-07-07 14:23:25 +09:00
Masayuki Nakano c191da4516 Bug 1260651 part.17 Rename mozilla::dom::ChangeAttributeTxn to mozilla::ChangeAttributeTransaction (and their files too) r=mccr8
MozReview-Commit-ID: B15OBauxqSN

--HG--
rename : editor/libeditor/ChangeAttributeTxn.cpp => editor/libeditor/ChangeAttributeTransaction.cpp
rename : editor/libeditor/ChangeAttributeTxn.h => editor/libeditor/ChangeAttributeTransaction.h
2016-07-07 14:12:30 +09:00
Masayuki Nakano 379230116b Bug 1260651 part.16 Rename nsHTMLEditUtils to mozilla::HTMLEditUtils (and their files too) r=mccr8
MozReview-Commit-ID: DABzQHszB0c

--HG--
rename : editor/libeditor/nsHTMLEditUtils.cpp => editor/libeditor/HTMLEditUtils.cpp
rename : editor/libeditor/nsHTMLEditUtils.h => editor/libeditor/HTMLEditUtils.h
2016-07-07 14:01:12 +09:00
Masayuki Nakano 67850b72d7 Bug 1260651 part.15 Rename nsAutoEditInitRulesTrigger to mozilla::AutoEditInitRulesTrigger r=mccr8
MozReview-Commit-ID: Hp2BfbbGckt
2016-06-23 19:18:13 +09:00
Masayuki Nakano 8d5be47714 Bug 1260651 part.14 Rename nsTextEditUtils to mozilla::TextEditUtils (and their files too) r=mccr8
MozReview-Commit-ID: DZ3SAOTNuZx

--HG--
rename : editor/libeditor/nsTextEditUtils.cpp => editor/libeditor/TextEditUtils.cpp
rename : editor/libeditor/nsTextEditUtils.h => editor/libeditor/TextEditUtils.h
2016-07-07 13:44:32 +09:00
Masayuki Nakano 28ebbbd99b Bug 1260651 part.13 Rename nsAutoPlaceHolderBatch to mozilla::AutoPlaceHolderBatch r=mccr8
MozReview-Commit-ID: E8IlZjFSFRU
2016-06-23 18:51:19 +09:00
Masayuki Nakano 59116ec004 Bug 1260651 part.12 Rename nsAutoEditBatch to mozilla::AutoEditBatch r=mccr8
MozReview-Commit-ID: 2hoz88UAS6w
2016-06-23 18:46:58 +09:00
Masayuki Nakano 647af800b3 Bug 1260651 part.11 Rename nsAutoSelectionReset to mozilla::AutoSelectionRestorer r=mccr8
MozReview-Commit-ID: LA4ou7vnVXG
2016-07-07 13:27:31 +09:00
Masayuki Nakano 04f769e958 Bug 1260651 part.10 Rename nsAutoRules to mozilla::AutoRules r=mccr8
MozReview-Commit-ID: u3MVijmoBv
2016-06-23 18:15:42 +09:00
Masayuki Nakano 6e4532ff79 Bug 1260651 part.9 Rename nsAutoTxnsConserveSelection to mozilla::AutoTransactionsConserveSelection r=mccr8
MozReview-Commit-ID: JEJkPY36vfF
2016-06-23 18:01:23 +09:00
Masayuki Nakano 7f703927e1 Bug 1260651 part.8 Rename nsAutoUpdateViewBatch to mozilla::AutoUpdateViewBatch r=mccr8
MozReview-Commit-ID: GsisMrwLlET
2016-07-07 13:09:51 +09:00
Masayuki Nakano 7796d97cfc Bug 1260651 part.7 Rename nsBoolDomIterFunctor to mozilla::BoolDomIterFunctor r=mccr8
MozReview-Commit-ID: EFQMDbDMLmT
2016-06-23 17:39:47 +09:00
Masayuki Nakano 111252de4a Bug 1260651 part.6 Rename nsDOMIterator to mozilla::DOMIterator r=mccr8
MozReview-Commit-ID: 6wBVUivS4xY
2016-06-23 17:30:39 +09:00
Masayuki Nakano 2997e5fed4 Bug 1260651 part.5 Rename nsDOMSubtreeIterator to mozilla::DOMSubtreeIterator r=mccr8
MozReview-Commit-ID: EGb5Lx4teaS
2016-06-23 17:25:03 +09:00
Masayuki Nakano 009f9d9992 Bug 1260651 part.4 Rename nsTrivialFunctor to mozilla::TrivialFunctor r=mccr8
MozReview-Commit-ID: B37mZ5otKHU
2016-06-23 17:19:35 +09:00
Masayuki Nakano caafdafcc5 Bug 1260651 part.3 Rename DOMPoint to mozilla::EditorDOMPoint because same name class is used in other modules widely r=mccr8
MozReview-Commit-ID: 9ZyVTv7veuK
2016-06-23 17:13:03 +09:00
Masayuki Nakano c4605a4cb2 Bug 1260651 part.2 Rename nsEditorHookUtils to mozilla::EditorHookUtils r=mccr8
MozReview-Commit-ID: 1BRj1wcBljc
2016-06-23 16:59:15 +09:00
Masayuki Nakano 9771fba160 Bug 1260651 part.1 Rename nsEditorUtils to mozilla::EditorUtils (and their files too) r=mccr8
MozReview-Commit-ID: 7Z48LHQBRo7

--HG--
rename : editor/libeditor/nsEditorUtils.cpp => editor/libeditor/EditorUtils.cpp
rename : editor/libeditor/nsEditorUtils.h => editor/libeditor/EditorUtils.h
extra : rebase_source : e53301378ab6001cdb126c5cc8742b7cadfbbccc
extra : source : 0147a9c79800924614157f1fa74cda3b9397f688
2016-07-07 11:49:42 +09:00
Andrew McCreight bb74c333ca Bug 1266882 - Ensure the return value of CreateBR is addrefed in CopyLastEditableChildStyles. r=masayuki
Failure to increment the refcount to this BR node causes fatal cycle
collector assertions, and could lead to all sorts of other crashes.
This is a regression from bug 1156062, part 5.
2016-07-06 11:25:41 -07:00
Michael Layzell dde888ae28 Bug 906420 - Part 1: Implement DataTransferItem and DataTransferItemList, r=baku 2016-07-04 15:45:45 -04:00
Olli Pettay dea514fb53 Bug 1281873 - Null check PlaceholderTxn::mStartSel before traversing/unlinking it, r=khuey
--HG--
extra : rebase_source : f5d4023776f6da90a8c920a84f2df4cd9ac302f5
2016-06-24 01:24:57 +03:00
Blake Kaplan 70d89c7d92 Bug 1259517 - Make dropping images in editors work in e10s. r=baku 2016-06-21 15:17:37 -07:00
Masayuki Nakano 13d4f396fe Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() r=smaug
MozReview-Commit-ID: Gs3oiAgJFG9

--HG--
extra : rebase_source : a136405d99ff3361a595157986b3a33026bcd5f5
2016-06-17 22:32:49 +09:00
Astley Chen 1fcb0ee95d Bug 1277131 : Part 1 - rename nsTableOuterFrame to nsTableWrapperFrame. r=heycam
MozReview-Commit-ID: KrSHLbmovTM

--HG--
rename : layout/tables/nsTableOuterFrame.cpp => layout/tables/nsTableWrapperFrame.cpp
rename : layout/tables/nsTableOuterFrame.h => layout/tables/nsTableWrapperFrame.h
extra : rebase_source : 730a73b8439f1f5c5ccdb32b241deda5224c321c
2016-06-16 13:14:08 +01:00
Masayuki Nakano 10f047dba5 Bug 1278014 part.10 Rename SelectionType::SELECTION_IME_SELECTEDCONVERTEDTEXT to SelectionType::eIMESelectedClause r=smaug
MozReview-Commit-ID: 8v3mqcYorOI

--HG--
extra : rebase_source : a6823273c161eabbfa9e49e689154e547c14a106
2016-06-09 19:29:29 +09:00
Masayuki Nakano aa3d2a6ce9 Bug 1278014 part.9 Rename SelectionType::SELECTION_IME_CONVERTEDTEXT to SelectionType::eIMEConvertedClause r=smaug
MozReview-Commit-ID: 5UNqhB2ZEcZ

--HG--
extra : rebase_source : 74d41ddf5496bdc50306bf916251df4f8d65a65b
2016-06-09 19:14:17 +09:00
Masayuki Nakano ff86f10a4c Bug 1278014 part.8 Rename SelectionType::SELECTION_IME_SELECTEDRAWTEXT to SelectionType::eIMESelectedRawClause r=smaug
MozReview-Commit-ID: DgprOxg87K6

--HG--
extra : rebase_source : 2f655353845292c4e8028f6e43f0dbbbfea11b68
2016-06-09 19:03:40 +09:00
Masayuki Nakano 569677d2f1 Bug 1278014 part.7 Rename SelectionType::SELECTION_IME_RAWINPUT to SelectionType::eIMERawClause r=smaug
MozReview-Commit-ID: BRe10Lyx5mt

--HG--
extra : rebase_source : e57239239fe8029040ce49faff9e37c5ad0b8305
2016-06-09 18:51:49 +09:00
Masayuki Nakano d960ef26d5 Bug 1278014 part.5 Rename SelectionType::SELECTION_NORMAL to SelectionType::eNormal r=smaug
MozReview-Commit-ID: AAdxTTKEvrk

--HG--
extra : rebase_source : 82e10db6b8b17d4f571625e34bb3c8f1905ef58a
2016-06-09 18:35:22 +09:00
Masayuki Nakano 581b9986bb Bug 1278014 part.3 Define 2 constants for number of SelectionType and number of SelectionType except "none" r=smaug
This patch defines two constants kSelectionTypeCount and kPresentSelectionTypeCount.  The former is same as nsISelectionController::NUM_SELECTIONTYPES.  The latter is kSelectionTypeCount - 1 for excluding SELECTION_NONE.  The latter is useful in some loops which handle all selection types except SELECTION_NONE.

Note that this patch fixes a bug of nsFrameSelection.  That doesn't treat SELECTION_NONE as a selection (see the definition of index), however, it defines redundant item and doesn't use it actually.  Additionally, it computes invalid selection type in each loop.  Therefore, without this patch, debug build hits MOZ_ASSERT() in ToSelectionType(RawSelectionType).

Note that these constants are defined as anonymous enum because we cannot define as const (or static) even with extern.  If we'd try to do it, it caused link error or not available in nsFrameSelection.cpp as constant value since they were not initialized if they were initialized in nsSelection.cpp.  Therefore, these constants are defined as enum items but using "k" prefix.

MozReview-Commit-ID: H6sH7NBEXlE

--HG--
extra : rebase_source : fd517d5fc2e2d5dc2f96313e2802fd1719817af7
2016-06-11 11:12:26 +09:00
Masayuki Nakano 00591135a4 Bug 1278014 part.2 Define mozilla::SelectionType as an enum class and use it instead of RawSelectionType as far as possible r=smaug
This patch defines mozilla::SelectionType as an enum class.  This is safer than nsISelectionController::SELECTION_* since setting illegal value to its variable is checked at build time.  So, as far as possible, this should be used everywhere (but of course, this isn't available in scriptable interfaces).

And also this implements some useful methods for managing SelectionType and RawSelectionType which are implemented in layout/nsSelection.cpp because nsISelectionController is implemented by both PresShell and nsTextEditorState.  Therefore, implementing one of them may make hard to find them.  On the other hand, nsSelection.cpp is a better file name to look for them.

Note that this patch creates mozilla::Selection::RawType() for binding.  Native code should keep using Selection::Type() but the binding code needs to use RawType() due to impossible to convert from SelectionType to RawSelectionType without explicit cast.

MozReview-Commit-ID: 81vX7A0hHQN

--HG--
extra : rebase_source : d9f88e217c713c60d1c2578ce6421c73ccba8650
2016-06-11 11:06:37 +09:00
Masayuki Nakano 17f667a2e2 Bug 1278014 part.1 Rename SelectionType in nsISelectionController.idl to mozilla::RawSelectionType r=smaug
mozilla::SelectionType will be an enum class. Therefore, we need to rename SelectionType with a word "raw" since it's a type for raw nsISelectionController::SELECTION_*.

MozReview-Commit-ID: K8SO0bbpv0Y

--HG--
extra : rebase_source : 56e3ac852657ef4795d718d2da09b16903c2e66c
2016-06-07 22:42:06 +09:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Carsten "Tomcat" Book afff301b32 Backed out changeset 5c836acf3197 (bug 906420) on developer request by baku
--HG--
extra : rebase_source : 9f109cdb706feef6d2bcd9a2e71f8c4d3c17ebdf
2016-06-09 15:30:53 +02:00
Makoto Kato 4616a049e9 Bug 1257731 - Part 2. Don't use Win32 API on content process. r=masayuki
On content sandbox process, GetKeyboardState() API doesn't return current keyboard state.  So we shouldn't use it.

MozReview-Commit-ID: 4phnJf0sJFZ

--HG--
extra : rebase_source : ea52839d427431a2ba7624ef199f9842fe12f8ef
extra : histedit_source : f7905715eb4e09a0234b9f7717cec6161150a7f3
2016-06-08 13:23:11 +09:00
Michael Layzell c1e5ab59b6 Bug 1278412 - Disable warning in nsDeleteCommand::IsCommandEnabled, r=ehsan 2016-06-07 18:07:32 -04:00
Michael Layzell bd973fcaa4 Bug 906420 - Part 1: Implement DataTransferItem and DataTransferItemList, r=baku 2016-06-07 18:05:55 -04:00
Jet Villegas 6d95828266 merge from inbound 2016-06-04 03:33:38 -07:00
Jet Villegas a22a6660d7 Bug 1268736: An editable table cell means that both the cell and its contents are children of an editable node. r=mats 2016-06-04 03:23:56 -07:00
Masayuki Nakano 258c1f97d6 Bug 1277756 part.7 Rename TextRangeType::NS_TEXTRANGE_SELECTEDCONVERTEDTEXT to TextRangeType::eSelectedClause r=smaug
MozReview-Commit-ID: GyRYWzfeWrm

--HG--
extra : rebase_source : 8bebacaf675ec4a3cf91cfd434d07beeb7fb1567
2016-06-03 19:15:21 +09:00
Masayuki Nakano 3fa2003d17 Bug 1277756 part.6 Rename TextRangeType::NS_TEXTRANGE_CONVERTEDTEXT to TextRangeType::eConvertedClause r=smaug
MozReview-Commit-ID: 3mexBm278As

--HG--
extra : rebase_source : ef363b0ac50396631e9b145b7e869330509fe259
2016-06-03 19:05:32 +09:00
Masayuki Nakano 98f069e029 Bug 1277756 part.5 Rename TextRangeType::NS_TEXTRANGE_SELECTEDRAWTEXT to TextRangeType::eSelectedRawClause r=smaug
MozReview-Commit-ID: MbG4siLb4Q

--HG--
extra : rebase_source : 23c20c55c3936dc6af5f57414ef7630003480275
2016-06-03 18:57:21 +09:00
Masayuki Nakano f4254e7f7f Bug 1277756 part.4 Rename TextRangeType::NS_TEXTRANGE_RAWINPUT to TextRangeType::eRawClause r=smaug
MozReview-Commit-ID: KLC1VPiYTdz

--HG--
extra : rebase_source : 3f750e526bb04b26ed66d2c0fada14e7d5b43d73
2016-06-03 18:48:37 +09:00
Masayuki Nakano 6b5425853a Bug 1277756 part.3 Rename TextRangeType::NS_TEXTRANGE_CARETPOSITION to TextRangeType::eCaret r=smaug
MozReview-Commit-ID: CaqmOSxYYU7

--HG--
extra : rebase_source : 5820d491b97be7899150516d05f1426e74dab5b5
2016-06-03 18:40:06 +09:00