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

84 Коммитов

Автор SHA1 Сообщение Дата
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Masayuki Nakano f421d7b889 Bug 181137 - part 8: Make ContentIteratorBase and its subclasses non-refcountable r=smaug
This patch makes ContentIteratorBase, PostContentIterator, PreContentIterator
and ContentSubtreeIterator classes non-refcountable because most users can
create their instances in stack and such users may be in a hot path.  So,
we can save a lot of cost of instantiation.

Unfortunately, only ScriptableContentIterator creates one of the concrete
classes and needs to destroy it properly.  Therefore, its
EnsureContentIterator(), destructor, traverse and unlink code becomes messy.
However, ScriptableContentIterator was designed for automated tests and we
need to maintain it not so many times.  Therefore, improvement of other
users must be worthwhiler than this demerit.

Differential Revision: https://phabricator.services.mozilla.com/D15928

--HG--
extra : moz-landing-system : lando
2019-01-11 01:52:26 +00:00
Masayuki Nakano f5602b96ab Bug 181137 - part 4: Make all users of PreContentIterator treat it directly rather than via nsIContentIterator r=smaug
Now, all users of PreContentIterator can access it directly.  This patch makes
them use the concrete class directly.

Differential Revision: https://phabricator.services.mozilla.com/D15922

--HG--
extra : moz-landing-system : lando
2019-01-11 01:49:36 +00:00
Csoregi Natalia 13506c036a Backed out 8 changesets (bug 181137) for bustage on FragmentOrElement.cpp:1751. CLOSED TREE
Backed out changeset 99a977d519a0 (bug 181137)
Backed out changeset 65a4b245e851 (bug 181137)
Backed out changeset 5385d5fd9b8b (bug 181137)
Backed out changeset 83bec02c21d9 (bug 181137)
Backed out changeset b7ab59bf545e (bug 181137)
Backed out changeset b6fc7a332db7 (bug 181137)
Backed out changeset 654fdbad67db (bug 181137)
Backed out changeset 90a1ff49b6b1 (bug 181137)

--HG--
rename : dom/base/ContentIterator.h => dom/base/nsContentIterator.cpp
rename : editor/spellchecker/FilteredContentIterator.cpp => editor/spellchecker/nsFilteredContentIterator.cpp
rename : editor/spellchecker/FilteredContentIterator.h => editor/spellchecker/nsFilteredContentIterator.h
2019-01-10 11:42:27 +02:00
Masayuki Nakano 796ceb094f Bug 181137 - part 8: Make ContentIteratorBase and its subclasses non-refcountable r=smaug
This patch makes ContentIteratorBase, PostContentIterator, PreContentIterator
and ContentSubtreeIterator classes non-refcountable because most users can
create their instances in stack and such users may be in a hot path.  So,
we can save a lot of cost of instantiation.

Unfortunately, only ScriptableContentIterator creates one of the concrete
classes and needs to destroy it properly.  Therefore, its
EnsureContentIterator(), destructor, traverse and unlink code becomes messy.
However, ScriptableContentIterator was designed for automated tests and we
need to maintain it not so many times.  Therefore, improvement of other
users must be worthwhiler than this demerit.

Differential Revision: https://phabricator.services.mozilla.com/D15928

--HG--
extra : moz-landing-system : lando
2019-01-10 08:50:41 +00:00
Masayuki Nakano 6f5a9fb98a Bug 181137 - part 4: Make all users of PreContentIterator treat it directly rather than via nsIContentIterator r=smaug
Now, all users of PreContentIterator can access it directly.  This patch makes
them use the concrete class directly.

Differential Revision: https://phabricator.services.mozilla.com/D15922

--HG--
extra : moz-landing-system : lando
2019-01-10 08:46:25 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Eric Rahm e6b9a7e016 Bug 1491151 - Part 5: Convert content list to use MRU cache. r=smaug
--HG--
extra : rebase_source : eb2e545211a9b2cb91707cfe684565d96d92d5b1
2018-09-12 18:10:08 -07:00
Boris Zbarsky 295c5598a9 Bug 1487237. Add some content lists stored in DOM slots to memory reporting. r=smaug
This reports the memory as part of element-nodes, but I think that's OK for
now.  If we want to, we can try to add more nsWindowSizes buckets for this stuff.

Differential Revision: https://phabricator.services.mozilla.com/D4811

--HG--
extra : moz-landing-system : lando
2018-09-01 14:55:47 +00:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Olli Pettay a6044a582c Bug 1462746, ensure SubtreeRoot always returns non-null value, r=mrbkap
--HG--
extra : rebase_source : 969acaa902db68eff48f6849da849522f2043b4a
2018-06-01 00:11:45 +03:00
Boris Zbarsky bea3100e53 Bug 1455676 part 14. Remove most use of nsIDOMNode in dom/. r=qdot 2018-05-29 22:58:49 -04:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Adrian Wielgosik b3c501adc4 Bug 1447389 - Remove nsIDOMNodeList. r=bz
MozReview-Commit-ID: 11szZP6dS6V

--HG--
extra : rebase_source : 9acfb352750e53d3b36684fa945a18e817c9b82e
2018-04-25 23:01:30 +02:00
Emilio Cobos Álvarez 83fd987aec Bug 1454233: Remove nsINode::eDOCUMENT. r=bz
MozReview-Commit-ID: ItjdI79zme7
2018-04-20 01:30:11 +02:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Adrian Wielgosik af8740d569 Bug 1447392 - Remove all members from nsIDOMNodeList. r=bz
MozReview-Commit-ID: 68xF7CTMpKB

--HG--
extra : rebase_source : 28b9c5e31d1c93b5c56743e12909eb749e8688f9
2018-03-20 19:02:08 +01:00
Boris Zbarsky d5f5a95c81 Bug 1415588 part 2. Move the .images, .embeds, .plugins, .forms, .scripts, .applets getters from HTMLDocument to Document. r=mystor
MozReview-Commit-ID: Db7iazZUz8g
2018-03-12 21:44:56 -04:00
Emilio Cobos Álvarez 2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

Differential Revision: https://phabricator.services.mozilla.com/D664

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Adrian Wielgosik 35f8ed790f Bug 1440741 - Remove all members from nsIDOMHTMLFormElement. r=qdot
MozReview-Commit-ID: 2UcUy4MkVsM

--HG--
extra : rebase_source : ddc6c18c5015ebc5569defa09b32c40e83939886
2018-02-23 19:28:08 +01:00
Boris Zbarsky 9da3878bc9 Bug 1418076 part 11. Eliminate the nsIDOMHTMLDocument interface. r=mystor
MozReview-Commit-ID: 4lEcUeenbg3
2018-01-26 01:03:25 -05:00
Emilio Cobos Álvarez c8eb630ebe Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez ffdf5d2cb5 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez c0959b2955 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W

--HG--
extra : rebase_source : 09b82acb4f3d69e8a4345457ab217443bc28d6e2
2017-12-07 19:13:50 +01:00
Boris Zbarsky 87c6b14c1a Bug 1415677 part 6. Remove nsIDOMHTMLCollection. r=qdot
MozReview-Commit-ID: E8P9o0bv63L
2017-11-13 10:41:33 -05:00
Boris Zbarsky ee1bca0ce2 Bug 1415677 part 2. Remove nsIDOMHTMLCollection::Item. r=qdot
MozReview-Commit-ID: AQUjBQhXLHE
2017-11-13 10:39:02 -05:00
Boris Zbarsky 76943406f3 Bug 1415677 part 1. Remove nsIDOMHTMLCollection::NamedItem. r=qdot
MozReview-Commit-ID: EppP6KSYSn6
2017-11-13 10:38:59 -05:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Catalin Badea f8162c4bfd Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
John Dai c891a377df Bug 1401726 - Fix crash in nsLabelsNodeList::PopulateSelf. r=smaug 2017-09-21 02:06:00 -04:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Ehsan Akhgari d4f7cc1e85 Bug 1392891 - Part 1: Make it possible to create nsContentList objects that don't observe DOM mutations; r=smaug 2017-08-29 07:30:22 -04:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
Jessica Jong bf07c0c605 Bug 1376695 - Part 2: Avoid rebuilding the list returned by getElementsByName when not needed. r=ehsan
The list returned by getElementsByName is cached, however, it's rebuilt
frequently due to content mutations. We can avoid rebuilding the list when
the attribute changed is not the name attribute. We can also speed up the
name matching process by skipping the elements that do not have a name
attribute.

MozReview-Commit-ID: 9TUPaQonjHz
2017-07-26 02:34:00 -04:00
Catalin Badea a330125123 Bug 1375050 - Fix crash in nsLabelsNodeList::MaybeResetRoot r=jdai 2017-07-13 13:58:04 +01:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Olli Pettay 39697929f3 Bug 1376936 - nsContentLists should stop observing mutations when their refcnt drops to 0, r=ehsan 2017-06-29 13:25:15 +03:00
John Dai 005cba50ea Bug 556743 - Implement the labels attribute. r=smaug 2017-06-15 20:04:00 -04:00
Boris Zbarsky cce1668e68 Bug 1332322 part 2. Rename nsWrapperCache::IsBlack to nsWrapperCache::HasKnownLiveWrapper. r=mccr8 2017-01-24 20:38:58 -05:00
Cameron McCormack babad063ff Bug 1328832 - Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Olli Pettay 0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Boris Zbarsky 59de5a530f Bug 1270349 part 5. Use LegacyUnenumerableNamedProperties instead of passing flags to GetSupportedNames to determine whether named props on DOM proxies should be reflected in ownPropertyKeys. r=peterv 2016-05-09 22:25:40 -04:00
Nicholas Nethercote d376f9f82e Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().

--HG--
extra : rebase_source : f4409784f931616cbc300591e6b843d30805c273
2016-03-29 10:09:43 +11:00
Nicholas Nethercote a2f068b2ad Bug 1253085 - Remove the |PLDHashTable*| argument from PLDHash{HashKey,MatchEntry}. r=froydnj.
This is easy because it's never needed.

--HG--
extra : rebase_source : 78830dab41c40a1544fa55fc69ca9c1c6709d767
2016-03-16 15:33:44 +11: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
Boris Zbarsky e7df3e8700 Bug 1236329. Back out the patch for bug 492933 (revision d8012b35413b) because it's not web-compatible in practice. r=smaug 2016-01-05 15:05:23 -05:00