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

8118 Коммитов

Автор SHA1 Сообщение Дата
Marco Castelluccio f19a57edb0 Bug 1413013 - Remove unused nsITransactionList. r=masayuki
--HG--
extra : rebase_source : de3c858298d63d5658f38fc135ab1f2955dc834a
2017-10-30 20:35:00 +00:00
Chris Peterson 1df202b177 Bug 1412048 - Replace NS_RUNTIMEABORT("...") with MOZ_CRASH("..."). r=froydnj
And remove unreachable code after MOZ_CRASH().

MozReview-Commit-ID: 6ShBtPRKYlF

--HG--
extra : rebase_source : 0fe45a59411bda663828336e2686707b550144ae
extra : source : 8473fd7333d2abe1ea1cc176510c292a5b34df45
2017-10-24 23:30:31 -07:00
Masayuki Nakano f802692190 Bug 1411687 - part 2: Rewrite the check to insert a <br> element in HTMLEditRules::WillInsertBreak() r=m_kato
Currently, HTMLEditRules::WillInsertBreak() checks if the editing host can
contain a <p> element as a child or a descendant.  However, this is not enough.
If an inline element has a block element which can contain a <p> element,
current implementation considers to insert a <br>.  This is possible when
* The editing host is an unknown element including user defined element.
* The editing host is an inline element and its children and/or descendants
  were added by JS.  E.g., <span contenteditable> element can have <div>
  element.

I think that we should consider to insert a <br> element when:
- There is no block ancestors in the editing host.
- The editing host is the only block element and it cannot contain <p> element
  or the default paragraph separator is <br> element.
- The nearest block ancestor isn't a single-line container declared in the
  execCommand spec and there are no block elements which can contain <p>
  element.

Note that Chromium checks if CSS box of ancestors is block too.  However,
it must be out of scope of this bug.

MozReview-Commit-ID: HdjU9t83Nd1

--HG--
extra : rebase_source : 7030671268a610613359b5d8ae5d126e120f59bd
2017-10-27 01:27:44 +09:00
Masayuki Nakano 2b96b7532a Bug 1411687 - part 1: HTMLEditor::GetBlockNodeParent() and HTMLEditor::GetBlock() should take an ancestor limiter node optionally r=m_kato
Perhaps, most callers don't need parent block outside active editing host.
Therefore, callers of these methods should be able to specify the editing
host for making those methods stop looking for a block ancestor.

Then, callers can avoid using EditorUtils::IsDescendantOf() and
nsContentUtils::IsContentDescendantOf().

MozReview-Commit-ID: 7IK4gAVHY5d

--HG--
extra : rebase_source : 31cd55026f0ce005d906499de4ebe5d1c39555e9
2017-10-26 22:54:30 +09:00
Masayuki Nakano bb82521595 Bug 1411687 - part 0: Get rid of HTMLEditor::GetBlockNodeParent(nsIDOMNode*) r=m_kato
Currently, HTMLEditor::GetBlockNodeParent(nsIDOMNode*) is used only by
HTMLEditor::DoInsertHTMLWithContext() and there is a variable of nsINode*.

So, we don't need to keep it anymore.

MozReview-Commit-ID: LEWaiR5BEB9

--HG--
extra : rebase_source : 64ef772f3b7883bd4aae48dec737663e6036553b
2017-10-26 22:37:45 +09:00
Makoto Kato 146232dd0d Bug 748315 - Part 5. Update browserscope test result. r=masayuki
MozReview-Commit-ID: KIC7OcDe2i6

--HG--
extra : rebase_source : 8a7dbd1467b975f4adb5b35ea854d7035900c96a
2017-10-25 16:13:10 +09:00
Makoto Kato 0bb92c4869 Bug 748315 - Part 3. Use SetAttributeOrEquivalent even if HTMLEditor::IsCSSEnabled() is false. r=masayuki
SetAttributeOrEquivalent can remove CSS property that is same behaviour by
part 2.  So we should use it instead of SetAttribute.

MozReview-Commit-ID: InCZQVdbDRm

--HG--
extra : rebase_source : d746b07bcfffc752ad90b9e1504e2f0afc23d457
2017-10-29 23:05:16 +09:00
Makoto Kato 390c0cb048 Bug 748315 - Part 2. SetAttributeOrEquivalent should remove CSS property when HTMLEditor::IsCSSEnabled() is false. r=masayuki
SetAttributeOrEquivalent sets element's attribute when
HTMLEditor::IsCSSEnabled() is false.  It should remove the CSS property that is
same behaviour too.

MozReview-Commit-ID: ChKjlB7wI0Z

--HG--
extra : rebase_source : c31b940394750757b2393a6876534590410d9398
2017-10-25 16:13:09 +09:00
Makoto Kato ec0a31ac6a Bug 748315 - Part 1. Consider text-align property even if HTMLEditor::IsCSSEnabled() is false. r=masayuki
Actually, we don't consider CSS property to get alignment when IsCSSEnabled()
is false. For WebKit and Blink compatibility, we should consider this situation.

MozReview-Commit-ID: 9ORntUmbIbf

--HG--
extra : rebase_source : 21d27f34cf1331bd2fee097c5c445dc16c453d4e
2017-10-25 16:13:02 +09:00
Emilio Cobos Álvarez d454491418 Bug 1410074: Load input.css from a chrome uri, so windows reftests can use system metric media queries. r=bz,xidorn
This requires exposing the reftest chrome package to content, but that should be
OK, and this seems to work...

MozReview-Commit-ID: EWkwqTHW3dg

--HG--
extra : rebase_source : 12cabe4389375ac4c3abd0a9327baf268aab7c1a
2017-10-06 20:16:43 +02:00
Emilio Cobos Álvarez dd634e3981 Bug 1411612: Kill nsINode::eCONTENT. r=bz
MozReview-Commit-ID: ESlOqlwhcHI

--HG--
extra : rebase_source : fe6a02469dca1e50c24ba166e15e39160ab4551b
2017-10-25 17:19:11 +02:00
Xidorn Quan b5008d1736 Bug 1408811 followup 2 - Swap the annotation of empty-1.xul.
MozReview-Commit-ID: 70FJ2D8HrAY
2017-10-25 14:47:11 +11:00
Xidorn Quan 44b3247164 Bug 1408811 followup - Disable empty-1.xul for stylo windows.
MozReview-Commit-ID: Cx6rhArQm2j
2017-10-25 11:01:50 +11:00
Sebastian Hengst 24b7b2eb7c merge mozilla-central to autoland. r=merge a=merge 2017-10-24 23:59:14 +02:00
Xidorn Quan 2797a4fa56 Bug 1408811 - Update test expectation for this bug. r=emilio
on a CLOSED TREE

MozReview-Commit-ID: H4glCWmL2vc
2017-10-24 21:16:52 +02:00
Masayuki Nakano d7d7a3bbb9 Bug 1409520 - part 1: WSRunObject::InsertText() should update aInOutChildAtOffset after it might be modified r=m_kato
WSRunObject::InsertText() may delete given child node at offset with calling
DeleteChars() or CheckLeadingNBSP() before calling HTMLEditor::InsertTextImpl().

Therefore, even though using nsINode::GetChildAt() is slow, it needs to update
aInOutChildAtOffset after calling them.

MozReview-Commit-ID: AbTTfNAjMIK

--HG--
extra : rebase_source : b4282e8dc6e395acc89d7c155bfeae46e7c41e4a
2017-10-23 21:47:56 +09:00
Masayuki Nakano 558978b80b Bug 1409520 - part 0: Add automated test r=m_kato
The bug is a report for hitting MOZ_ASSERT, but we should also check the result
of the call of execCommand.

MozReview-Commit-ID: FydZKAjI2Rl

--HG--
extra : rebase_source : 327988cea366474cbe659a3b80c09ce7ceef0005
2017-10-23 22:01:58 +09:00
Sebastian Hengst 57cc14513b Backed out changeset 3aff5bcb5816 (bug 1402196) for misconfig in editor/libeditor/crashtests/crashtests.list line 91: unknown test type 1402196.html. r=backout
--HG--
extra : amend_source : 436179c20baf507bbcad66a6983c8b1cbba64859
2017-10-24 09:42:17 +02:00
Sebastian Hengst deaafcf713 Backed out changeset 10e5f407149d (bug 1402196) 2017-10-24 09:42:12 +02:00
Makoto Kato 49057375bb Bug 1402196 - Part 2. Add crashtest. r=masayuki
MozReview-Commit-ID: IF6UsY3QR1A

--HG--
extra : rebase_source : b1642b53a11c4b696b52c36264c9f4550131811a
2017-10-23 12:24:04 +09:00
Makoto Kato 719f303c40 Bug 1402196 - Part 1. Don't add null range to aArrayOfRanges. r=masayuki
RangeItem::GetRange can return null, so we shouldn't add null range to
aArrayOfRanges.

MozReview-Commit-ID: Ci5VHeqE8km

--HG--
extra : rebase_source : 83abb5f4ea405c360e63b7ed73530a7321a2a1e5
2017-10-23 12:22:45 +09:00
Makoto Kato 6190312b6f Bug 1402196 - Part 2. Add crashtest. r=masayuki
MozReview-Commit-ID: IF6UsY3QR1A

--HG--
extra : rebase_source : 9369e9888d436881e5d718666d2c560707f92f57
2017-10-23 12:24:04 +09:00
Makoto Kato 9a392d11a1 Bug 1402196 - Part 1. Don't add null range to aArrayOfRanges. r=masayuki
RangeItem::GetRange can return null, so we shouldn't add null range to
aArrayOfRanges.

MozReview-Commit-ID: Ci5VHeqE8km

--HG--
extra : rebase_source : 34f5e98de680ffe588d64244592f775450ce98cf
2017-10-23 12:22:45 +09:00
Masatoshi Kimura dbd92543c6 Bug 1313150 - Remove |weak| parameter from nsIMutableArray methods. r=froydnj
MozReview-Commit-ID: 7JoD4VYzZp3

--HG--
extra : rebase_source : 5db437f1c34608aa223916874d62b48c59baeae8
2017-10-21 23:53:02 +09:00
Makoto Kato 4324707ac3 Bug 1394649 - Use nsGkAtoms on nsTextServiceDocument. r=masayuki
It is no reason to use custom atom instead of nsGkAtoms now, so we should
use nsGkAtoms instead.

MozReview-Commit-ID: 9slsZtLDNKH

--HG--
extra : histedit_source : 8ad70ff1adfa145bc0e8da3c6f43f3dba9b558f1
2017-10-23 13:09:49 +09:00
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
Nicholas Nethercote ed06034e3c Bug 1410294 (part 2) - Use a macro to declare the atoms in nsTextServicesDocument. r=froydnj.
MozReview-Commit-ID: LZjDrROmPC7

--HG--
extra : rebase_source : 8da8ecc8a0a24c212d1528bf8d23fbbf0942f757
2017-10-20 14:04:52 +11:00
Nicholas Nethercote 074a872086 Bug 1410294 (part 1) - Rename nsStaticAtom as nsStaticAtomSetup. r=froydnj.
Because it's the type we use to set up static atoms at startup, not the static
atom itself.

The patch accordingly renames some parameters, variables, and NS_STATIC_ATOM,
for consistency.

MozReview-Commit-ID: 1a0KvhYNNw2

--HG--
extra : rebase_source : 5c66e5b2dfe053a368bf3584d957198aec4cce91
2017-10-20 14:04:47 +11:00
Jason Kratzer 735da145f2 Bug 1344097 - Add crashtest. r=me
--HG--
extra : rebase_source : 9789bb530c86279907b5abbd8fd1c8e1929e5af1
2017-10-20 08:36:12 -04:00
Masayuki Nakano eb5a65e869 Bug 1407966 - part 2: EditorBase::InsertTextImpl() shouldn't assume that aInOutChildAtOffset is never nullptr r=m_kato
Since if the container is not a container node like a text node or the offset
is same as the length, child at the offset can be nullptr.

MozReview-Commit-ID: DCnFwUjNgk7

--HG--
extra : rebase_source : 48823390645d79db391dcaf64dab59e754b680a5
2017-10-17 01:59:28 +09:00
Masayuki Nakano 33a8e2ee5e Bug 1407966 - part 1: Update |selChild| when HTMLEditRules::WillInsertText() updates |curNode| and |curOffset| r=m_kato
|selChild| should be a node which is at |curOffset| in |curNode|, however,
it's not updated when |curOffset| is updated by a call of CreateBRImpl().  So,
it should be next sibling of the created br node.

MozReview-Commit-ID: IVfTjVMp3lB

--HG--
extra : rebase_source : fbc355e3c0425a495c78c3c028308dac26617283
2017-10-17 01:17:07 +09:00
Boris Zbarsky 661d20b507 Bug 1409162. Make nsTableCellFrame::GetColIndex/GetRowIndex faster. r=mats 2017-10-17 15:39:36 -04:00
Sebastian Hengst 32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02:00
Kris Maglione 4a767c7e6e Bug 1404198: Part 2j - Switch to NS_NewTimer* everywhere else. r=njn
MozReview-Commit-ID: LmGIgfmNSmk

--HG--
extra : rebase_source : bf34e852beb0c8f6eafd09184c2e0cda95f95f83
2017-09-24 19:57:48 -07:00
Makoto Kato 52ae993a2a Bug 1407924 - Avoid conversion from nsAtom to string if possible. r=masayuki
Editor sometimes extracts atom to string to compare element name.
It is unnecessary to use atom directly.

MozReview-Commit-ID: FEvyiIeaozs

--HG--
extra : rebase_source : 4418d0c82fa4fedd814b914f2cf3a86d74ad9835
2017-10-12 16:28:28 +09:00
Sebastian Hengst caf5b99a30 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8Qk2qoQvP0g
2017-10-14 11:49:31 +02:00
Kyle Machulis 1cc8b01353 Bug 1406224 - Remove nsIDOMHTMLImageElement; r=bz
MozReview-Commit-ID: GCATWRt6qMo

--HG--
extra : rebase_source : 29854f1374c6ad318da0b5b68be23507667c3be4
2017-10-06 13:27:23 -07:00
Sebastian Hengst 8975678533 Backed out changeset febed94fa592 (bug 1408227) for asserting at editor/libeditor/EditorBase.cpp:2513 during execution of web-platform-test /editing/run/inserttext.html. r=backout on a CLOSED TREE 2017-10-13 19:48:22 +02:00
Ryan VanderMeulen a74ce78a81 Bug 1407866 - Update test_bug1385905.html to work whether editor.use_div_for_default_newlines is set or not. r=masayuki 2017-10-13 12:48:06 -04:00
Ehsan Akhgari 5e34d765c7 Bug 1408227 - Correctly update the child at offset pointer across calls to WSRunObject::InsertBreak(); r=masayuki 2017-10-13 10:42:27 -04:00
Ehsan Akhgari b62ea76a52 Bug 1408290 - Avoid calling nsINode::IndexOf() in HTMLEditRules::CheckForInvisibleBR(); r=masayuki 2017-10-13 10:28:50 -04:00
Ehsan Akhgari 62a148cc7c Bug 1408286 - Avoid calling nsINode::IndexOf() for block parents whose grant parents are lists in HTMLEditRules::CheckForEmptyBlock(); r=masayuki 2017-10-13 10:25:21 -04:00
Ehsan Akhgari 8dc357ab3c Bug 1408285 - Avoid calling nsINode::IndexOf() for list items in HTMLEditRules::CheckForEmptyBlock(); r=masayuki 2017-10-13 10:23:20 -04:00
Ehsan Akhgari 1349bede70 Bug 1408170 - Set child correctly in HTMLEditRules::GetPromotedPoint(); r=masayuki 2017-10-13 02:23:12 -04:00
Jesse Schwartzentruber beb397098f Bug 1274050 - Add crashtest. r=me 2017-10-12 22:41:14 -04:00
Sebastian Hengst c2f23c4622 merge mozilla-central to mozilla-inbound. r=merge a=merge
--HG--
rename : browser/base/content/test/general/browser_bug585558.js => browser/base/content/test/tabs/browser_positional_attributes.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm_dollar.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_dollar.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-621644-jsterm-dollar.html => devtools/client/webconsole/new-console-output/test/mochitest/test-jsterm-dollar.html
rename : dom/media/doctor/DDLogClass.cpp => dom/media/doctor/DDLogCategory.cpp
rename : dom/media/doctor/DDLogClass.h => dom/media/doctor/DDLogCategory.h
rename : mobile/android/app/src/main/res/drawable-hdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-hdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-hdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-hdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-large-xxhdpi-v11/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/find_prev.png => mobile/android/app/src/photon/res/drawable-xhdpi/find_prev.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xhdpi/url_bar_entry_pressed_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_default_pb.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed.9.png
rename : mobile/android/app/src/main/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png => mobile/android/app/src/photon/res/drawable-xxhdpi/url_bar_entry_pressed_pb.9.png
extra : rebase_source : 0cff6fa99d9ea3c6ce0bfb1604d4e9533f63ce63
2017-10-13 00:55:27 +02:00
Sebastian Hengst 5c00b8540d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: AlcL6XYDkf
2017-10-12 23:58:31 +02:00
Sebastian Hengst f7efb5fc2c Merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-12 12:03:15 +02:00
Ehsan Akhgari 0e0b35e1aa Bug 1407854 - Part 3: Pass the child node at the offset as an extra argument where possible to CreateNode(); r=masayuki
This patch converts almost all of the call sites over to passing
the extra argument explicitly.
2017-10-12 17:13:56 -04:00
Ehsan Akhgari bf1f474a3d Bug 1407854 - Part 2: Add an optional argument to CreateNode() to allow callers to pass the child node when they know it; r=masayuki 2017-10-12 17:13:55 -04:00