Commit Graph

79 Commits

Author SHA1 Message Date
Boris Zbarsky
b94366962a Bug 1447889 part 6. Remove nsIDOMRange::SetStart/End. r=mystor
MozReview-Commit-ID: 8yOZMWBexsN
2018-03-27 00:35:21 -04:00
Boris Zbarsky
d03d46b01e Bug 1447889 part 5. Remove nsIDOMRange::GetCommonAncestorContainer. r=mystor
MozReview-Commit-ID: 18bnPYjRld5
2018-03-27 00:35:21 -04:00
Boris Zbarsky
696d273ef4 Bug 1447889 part 4. Remove nsIDOMRange::GetStart/EndContainer/Offset. r=mystor
I got a bit carried away with fixing up consumers to use nsINode...  But as a
result removing these methods all together made sense.

MozReview-Commit-ID: 2z9Q6D7GY92
2018-03-27 00:35:21 -04:00
Boris Zbarsky
2ad0b16a31 Bug 1447889 part 3. Use Selection and nsRange more in nsDocumentEncoder. r=mystor
MozReview-Commit-ID: 2PYuoa1PFKL
2018-03-27 00:35:20 -04:00
Boris Zbarsky
5abddeaf58 Bug 1447889 part 2. Remove the XPCOM goop for creating Selection. r=mystor
It's unused; we never create these things by contract or classid.

MozReview-Commit-ID: 3Jsyb6QHlJt
2018-03-27 00:35:20 -04:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Boris Zbarsky
0678b901b6 Bug 1446533 part 4. Remove nsIDOMCharacterData::SubstringData. r=mystor
FromContent will be renamed to FromNode in bug 1447098.

MozReview-Commit-ID: DhiN6mCOb34
2018-03-19 15:18:07 -04:00
Boris Zbarsky
12ef963787 Bug 1446599 part 1. Stop using nsIDOMProcessingInstruction in serializers. r=mystor
MozReview-Commit-ID: loUmk0rNYV
2018-03-19 15:15:39 -04:00
Boris Zbarsky
4fa4d2a7f5 Bug 1446598 part 2. Get rid of nsIDOMComment. r=mystor
MozReview-Commit-ID: GGXPQnlwuUM
2018-03-19 15:15:39 -04:00
Boris Zbarsky
51c87c6d96 Bug 1446598 part 1. Stop using nsIDOMComment in serializers. r=mystor
MozReview-Commit-ID: IBVkQJOi6O7
2018-03-19 15:15:39 -04:00
Boris Zbarsky
46cdbdc51b Bug 1433566 part 13. Remove nsIDOMText. r=mystor
MozReview-Commit-ID: DvaZ96j5exf
2018-03-19 15:15:39 -04:00
Boris Zbarsky
7bbb9b0ced Bug 1445140 part 3. Pass a DocumentType to nsIContentSerializer::AppendDoctype. r=mystor
MozReview-Commit-ID: 5UjRSP6MoDI
2018-03-13 16:24:01 -04:00
Henri Sivonen
f82f215fea Bug 1425520. r=smaug.
MozReview-Commit-ID: IoZeR5BGjmQ
2018-03-01 10:15:28 +02:00
Boris Zbarsky
f60fd673d6 Bug 1432186 part 19. Remove the nsIDOMNode::*_NODE constants. r=mccr8
MozReview-Commit-ID: KvKjeKIOB9K
2018-01-29 23:10:53 -05:00
Boris Zbarsky
4d88c28e4d Bug 1432186 part 17. Remove nsIDOMNode's parentNode attribute. r=mccr8
MozReview-Commit-ID: 4xzDwwEqnvE
2018-01-29 23:10:52 -05:00
Boris Zbarsky
87cd3b385a Bug 1432186 part 14. Remove nsIDOMNode's childNodes attribute. r=mccr8
MozReview-Commit-ID: JyQjEYngKAT
2018-01-29 23:10:51 -05:00
Ehsan Akhgari
de3684029d Bug 1433563 - Remove nsIDOMCDATASection; r=qdot 2018-01-26 17:52:44 -05:00
Andrea Marchesini
b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Andrea Marchesini
205d40e2d7 Bug 1425440 - Get rid of GetChildAt_Deprecated in nsDocumentEncoder, r=catalinb 2018-01-15 17:18:03 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Andrea Marchesini
00e79ef07b Bug 1425321 - Renaming nsINode::GetChildAt to GetChildAt_Deprecated, r=catalinb
We want to deprecate nsINode::GetChildAt as the first step of removing DOM node
child array storage. See bug 651120.
2018-01-03 13:59:54 +01:00
Emilio Cobos Álvarez
1cda1ad876 Bug 1427511: Make GetFlattenedTreeParent more straight-forward. r=smaug
Now that accessing nsIContent slots is not a blob of virtual function calls, we
should be able to unify logic here, and speed up the not-so-rare case for
chrome, while keeping the usual case fast.

MozReview-Commit-ID: 87iY5Cbhx4T
2018-01-02 18:00:25 +01:00
Jorg K
8ed13df845 Bug 1423990 - Follow-up for conditionally compiled code for Thunderbird. r=smaug
--HG--
extra : amend_source : e1e50e7e55d2c014b2ae8487f2cf9b7299da5879
2017-12-26 02:58:00 +02:00
Henri Sivonen
009840a99b Bug 1409951 - Use a stack to end serializer contexts instead of recomputing them. r=smaug
MozReview-Commit-ID: FOd8AUmtYyA
2017-12-01 10:45:25 -05: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
Nicholas Nethercote
2ef37710e7 Bug 1395828 (part 4) - Remove nsIParserService/nsParserService. r=mrbkap.
It a stateless wrapper around static methods in nsHTMLTags and nsHTMLElement,
and hence an unnecessary layer of indirection that just adds complexity and
slowness. This patch removes it, cutting almost 300 lines of code.

This requires making nsElementTable.h an exported header, to expose the
nsHTMLElement methods.

--HG--
extra : rebase_source : abbcb8e5001389affbf717092213b898673db07f
2017-09-05 20:19:06 +10:00
Henri Sivonen
057b37715a Bug 1385272 - Make plaintext serializer not crash when a <tr> is a child of a <tr>. r=Ehsan
MozReview-Commit-ID: CMNIWYX8R07

--HG--
extra : rebase_source : 0b245f01c4c7aa4b78853534584876a23689826c
2017-08-14 14:24:51 +03:00
Masayuki Nakano
2f92264fb7 Bug 1377978 - Make nsRange use uint32_t to offset r=smaug
DOM Standard defines that offset of Range is unsigned long.  However, nsRange uses int32_t to them.

This patch makes nsRange use uint32_t instead.  However, this patch does NOT allow to set over INT32_MAX as offset values since a lot of users of nsRange cannot treat the values as over INT32_MAX because a lot of internal APIs take int32_t as offsets.

For easier to search such points, this patch adds static_cast<int32_t> to uint32_t variables when they are used for int32_t arguments.

And note that nsContentUtils::ComparePoints() behaves odd.  It accepts negative offset and compares such value with valid offset simply.  This patch still uses int32_t offset variables in nsRange::CompareNodeToRange() even though it may be negative value if nsINode::IndexOf() returns -1 because the caller of it depends on this behavior.

MozReview-Commit-ID: 8RbOgA86JuT

--HG--
extra : rebase_source : 46d526c6d50dfa2f104439b19b8691477b17a4af
2017-07-19 22:49:52 +09:00
Masayuki Nakano
33d778a999 Bug 1377989 - part12: Rename local variables, |endParent| which is set to start container of nsRange to |endContainer| r=smaug
This does NOT change variable names like |endNode| because it's not odd and somebody use it for nsINode and endContent for nsIContent.  So, changing them needs more work.

MozReview-Commit-ID: 22imUltlu5R

--HG--
extra : rebase_source : 6c93069d0586b37c5084eaa71861085c01da7a7d
2017-07-12 00:08:37 +09:00
Masayuki Nakano
3fd54e5d5f Bug 1377989 - part11: Rename local variables, |startParent| which is set to start container of nsRange to |startContainer| r=smaug
This does NOT change variable names like |startNode| because it's not odd and somebody use it for nsINode and startContent for nsIContent.  So, changing them needs more work.

MozReview-Commit-ID: H19pTDprRuT

--HG--
extra : rebase_source : 7a7454ac14da48a597ff19a50c863d04dcaddd6e
2017-07-12 00:02:14 +09:00
Masayuki Nakano
4ee17d1b8c Bug 1377989 - part2: Rename nsRange::GetEndParent() to nsRange::GetEndContainer() r=smaug
MozReview-Commit-ID: K4qPjtZ62yO

--HG--
extra : rebase_source : 8653db98b9bd70c77a6aac8d906f401f0222c58a
2017-07-11 21:11:37 +09:00
Masayuki Nakano
2f2ce53be5 Bug 1377989 - part1: Rename nsRange::GetStartParent() to nsRange::GetStartContainer() r=smaug
Web standards use "Container" instead of "Parent".  So, nsRange shouldn't use "Parent" for its members and methods.

MozReview-Commit-ID: Ho6N0diuWtE

--HG--
extra : rebase_source : ee4eb7068a68b118c7fe98e9e9e7fa9c9e7f13e2
2017-07-11 20:53:04 +09:00
Masatoshi Kimura
838ccc4108 Bug 1369025 - Remove mozilla::dom::EncodingUtils. r=hsivonen
MozReview-Commit-ID: 5O5WtxbmATQ

--HG--
rename : dom/encoding/encodingsgroups.properties => intl/locale/encodingsgroups.properties
extra : rebase_source : 13143b43ee745b618e05ed1b6991d69781c2767d
2017-06-17 11:54:40 +09:00
Henri Sivonen
432653453a Bug 1261841 part 2 - Use encoding_rs instead of uconv. r=emk,mystor.
MozReview-Commit-ID: 15Y5GTX98bv
2017-06-13 13:23:23 +03:00
Ehsan Akhgari
7f656414b1 Bug 1370737 - Track seen preformatted elements in the document encoder to maintain stack balance correctly irrespective of element visibility; r=bzbarsky 2017-06-13 00:30:36 -04:00
Makoto Kato
5de0b5ae57 Bug 1358979 - nsPlainTextSerializer should be cycle collection. r=smaug
nsPlainTextSerializer holds Element, so it should use cycle collection class.

MozReview-Commit-ID: ELykrDQaCei

--HG--
extra : rebase_source : b711fe051297f3cfbee603cd2f785dbc21dfc59b
2017-04-24 19:17:17 +09:00
Makoto Kato
1fe25a1f0d Bug 1358979 - nsDocumentEncoder with RequiresReinitAfterOutput should reset some strong pointers. r=smaug
We should release strong pointers into nsDocumentEncoder with RequiresReinitAfterOutput option to avoid holding dom node.

Also, mStream and mUnicodeEncoder will release into EncodeToStream, so it is unnecessary to clear it.

MozReview-Commit-ID: Ll8jFmMj4Ps

--HG--
extra : rebase_source : 243e428a56ee498459d06035f4d3f4812041a166
2017-04-24 18:14:53 +09:00
Makoto Kato
da147c947a Bug 1352882 - Part 1. Add releasing nsIDocument option to recycle nsIDocumentEncoder. r=smaug
Editor uses weak reference for nsIDocument.  But nsDocumentEncoder has strong reference of nsIDocument. So to recycle nsIDocumentEncoder, editor wants the option that nsIDocumentEncoder releases nsIDocument into nsDocumentEncoder after EncodeTo* is called.

MozReview-Commit-ID: K3E9XhgD8FY

--HG--
extra : rebase_source : d37983705d574a2443c8f7504c7f5e3f35470ef1
2017-04-17 19:49:52 +09:00
Mats Palmgren
f33f3cd648 Bug 1341137 part 2 - Provide a way to add ranges to Selection objects that aren't associated with a shell/nsFrameSelection. r=smaug 2017-02-25 11:33:34 +01:00
Wes Kocher
2391738b66 Backed out 3 changesets (bug 1341137) for wpt failures in addRange-00.html a=backout
Backed out changeset 343d11a33afe (bug 1341137)
Backed out changeset ac44e1e713e1 (bug 1341137)
Backed out changeset 6f32de880c77 (bug 1341137)

MozReview-Commit-ID: 26CQIfTXLRI
2017-02-24 16:28:17 -08:00
Mats Palmgren
867bc229d0 Bug 1341137 part 2 - Provide a way to add ranges to Selection objects that aren't associated with a shell/nsFrameSelection. r=smaug 2017-02-25 00:26:18 +01:00
L. David Baron
03d6962a30 Bug 1320815 - DeCOMtaminate nsIFrame::IsSelectable by returning boolean instead of nsresult. r=xidorn
MozReview-Commit-ID: EBxBcEgIvp7

--HG--
extra : rebase_source : 49e5a370df86baec014e99be56b05d451d5ee78c
2016-11-28 15:31:29 -08:00
Jorg K
4bb58198d9 Bug 1263357 - When the caret is placed after visible line break, associate caret with frame on the next line instead. r=mats
--HG--
extra : amend_source : a0068b0c841189204e07cc6c0a19f83d5dac8da3
2016-10-14 14:21:00 -04:00
Michael Layzell
b258dfaa89 Bug 1297802 - Remove unused RefPtr<> and COMPtr<> types in dom/, r=baku
MozReview-Commit-ID: CLUJZdbN7sW
2016-08-29 11:40:02 -04: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
Jorg K
af4cfedcf9 Bug 1230163 - White-space copy issue: Add conditional compile also for SeaMonkey. r=ehsan 2016-02-09 06:47:00 +01:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Ting-Yu Lin
2d02ad0652 Bug 1227927 Part 3 - Use ranged-based for-loop to rewrite some simple loops in part 2. r=mats
--HG--
extra : commitid : CcdpGdlMNIk
extra : rebase_source : 9c184cb8107bf6276c237d03d240f8755fd61553
2016-01-29 22:42:15 +08:00