Commit Graph

4260 Commits

Author SHA1 Message Date
Sebastian Hengst
7d3fa0e8a7 Backed out changeset e71532f2babd (bug 1269209) for various test failures. r=backout a=backout
MozReview-Commit-ID: FIO8a5T5iaH
2016-10-28 00:39:52 +02:00
Sebastian Hengst
7d4a382a0a Backed out changeset cea0421beffa (bug 1269209)
MozReview-Commit-ID: K2h53eVFx72
2016-10-28 00:38:17 +02:00
Sebastian Hengst
2c7c46521a Backed out changeset ecf28a55600f (bug 1269209)
MozReview-Commit-ID: 8b32exDhjlc
2016-10-28 00:38:13 +02:00
Sebastian Hengst
ae4944d68e Backed out changeset a3d0e9ed7d85 (bug 1269209)
MozReview-Commit-ID: 44w6YVdBpNw
2016-10-28 00:38:09 +02:00
Sebastian Hengst
1cec747683 Backed out changeset b74022c44df0 (bug 1269209)
MozReview-Commit-ID: 7eQIKVrJVzo
2016-10-28 00:38:05 +02:00
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
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
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
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
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
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