Commit Graph
245 Commits
Author SHA1 Message Date
Nicholas Nethercote 9fda5528d2 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
2017-09-26 08:33:21 +10:00
Phil Ringnalda cf0ba65c47 Backed out 6 changesets (bug 1302470) for mochitest-chrome failures
CLOSED TREE

Backed out changeset 3aab8b1494ef (bug 1302470)
Backed out changeset fdd40abac611 (bug 1302470)
Backed out changeset a67bc2f1b624 (bug 1302470)
Backed out changeset 160522290018 (bug 1302470)
Backed out changeset 6b948c533944 (bug 1302470)
Backed out changeset 399011313b3c (bug 1302470)

MozReview-Commit-ID: 2B3uMAkzNGv
2017-08-31 20:04:24 -07:00
Brad Werth 3e319e5ec3 Bug 1302470 Part 2: Branch IsRangeVisible to delegate to IsRangeRendered when range is in viewport. r=masayuki
MozReview-Commit-ID: LZyvt08I9vz
2017-04-20 10:21:52 -07:00
Brad Werth 86b1fcb248 Bug 1302470 Part 1: Create a IsRangeRendered function to test range visibility in the display list. r=mstange,smaug
MozReview-Commit-ID: u0N73luIz7
2017-03-24 14:45:41 -07:00
Nicholas Nethercote b7346a7502 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).

In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
2017-08-16 13:58:35 +10:00
Masayuki Nakano e600000538 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
2017-07-19 22:49:52 +09:00
Sylvestre Ledru 9d4a84d778 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG
2017-07-06 14:00:35 +02:00
Thomas Nguyen 4943e33df8 Bug 1363163 - Playing sound in a seperated thread to avoid jank r=masayuki
MozReview-Commit-ID: KYN7fhA541S
2017-06-08 11:08:49 +08:00
Paolo Amadini ee2775c0b1 Bug 1364050 - Part 3 - Remove obsolete code from the nsIDownloadManager implementation. r=mak
A missing dependency in "nsTypeAheadFind.h" is also fixed to allow the removal of the include files from "nsToolkitCompsModule.cpp".

MozReview-Commit-ID: EefZA9bEUW0
2017-05-15 11:55:50 +01:00
Sebastian Hengst 72c9604405 Backed out changeset f39e67694994 (bug 1302470) for failing mochitest test_bug263683.xul on opt-based builds on Linux and on debug on OSX, at least. r=backout 2017-04-21 19:09:12 +02:00
Sebastian Hengst 4ba7dc3992 Backed out changeset 572662b36c77 (bug 1302470) 2017-04-21 19:09:12 +02:00
Sebastian Hengst a52fe006fc Backed out changeset a5a77d4a3cf3 (bug 1302470) 2017-04-21 19:09:11 +02:00
Brad Werth b3f2d494ce Bug 1302470 Part 3: Branch IsRangeVisible to delegate to IsRangeRendered when range is in viewport. r=masayuki
MozReview-Commit-ID: LZyvt08I9vz
2017-04-20 10:21:52 -07:00
Brad Werth d6ee6743bd Bug 1302470 Part 2: Create a IsRangeRendered function to test range visibility in the display list. r=mstange,smaug
MozReview-Commit-ID: u0N73luIz7
2017-03-24 14:45:41 -07:00
Brad Werth a437a0209d Bug 1302470 Part 1: Remove trailing whitespace. r=mstange
MozReview-Commit-ID: 1vlEVEn07Qb
2016-11-09 13:46:17 -08:00
Carsten "Tomcat" Book 9a3c4bbe92 Backed out changeset a4212d9e1d0b (bug 1302470) for eslint failure 2017-04-21 17:11:02 +02:00
Carsten "Tomcat" Book 24301bf4a6 Backed out changeset 87ae43ab52ed (bug 1302470) 2017-04-21 17:10:46 +02:00
Carsten "Tomcat" Book 7b85b353af Backed out changeset 1d664865e8e2 (bug 1302470) 2017-04-21 17:10:43 +02:00
Brad Werth a523d4f9e8 Bug 1302470 Part 3: Branch IsRangeVisible to delegate to IsRangeRendered when range is in viewport. r=masayuki
MozReview-Commit-ID: LZyvt08I9vz
2017-04-20 10:21:52 -07:00
Brad Werth 83dd81ca27 Bug 1302470 Part 2: Create a IsRangeRendered function to test range visibility in the display list. r=mstange,smaug
MozReview-Commit-ID: u0N73luIz7
2017-03-24 14:45:41 -07:00
Brad Werth 65ddca1d11 Bug 1302470 Part 1: Remove trailing whitespace. r=mstange
MozReview-Commit-ID: 1vlEVEn07Qb
2016-11-09 13:46:17 -08:00
Sylvestre Ledru 7bcfd82de9 Bug 1338086 - Remove useless else blocks in order to reduce complexity in toolkit/components/typeaheadfind r=mstange
MozReview-Commit-ID: IdbRm6QFZb8
2017-02-09 10:57:07 +01:00
Cameron McCormack 5f9911da79 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
Wes Kocher e1b9233077 Backed out 5 changesets (bug 1302470) for causing bug 1323200 a=backout
Backed out changeset 005adbf78cd2 (bug 1302470)
Backed out changeset 113f7b13475c (bug 1302470)
Backed out changeset 3d2569996ebc (bug 1302470)
Backed out changeset b92b78271941 (bug 1302470)
Backed out changeset 5b92678afff8 (bug 1302470)


MozReview-Commit-ID: FgeA5OQV8WP
2016-12-16 16:45:09 -08:00
Brad Werth ab4200f24a Bug 1302470 Part 4: Augment the IsRangeVisible function to test for opaque overdraw. r=mstange
MozReview-Commit-ID: F2qbu0WLl9O
2016-11-30 17:03:27 -08:00
Mike de Boer a8293a3ea3 Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Brad Werth 76d507cbfe Bug 1302470 Part 1: Remove trailing whitespace. r=mstange
MozReview-Commit-ID: 1vlEVEn07Qb
2016-11-09 13:46:17 -08:00
Sebastian Hengst 342871ce4f Backed out changeset e7c190a25bfa (bug 1302470)for failing bc browser_Finder.js and chrome test test_browserElement_inproc_Find.html. r=backout 2016-11-20 20:32:31 +01:00
Sebastian Hengst 1efa6af3c5 Backed out changeset cc04b61c9f23 (bug 1302470) 2016-11-20 20:31:31 +01:00
Sebastian Hengst 1430a521bb Backed out changeset 3ce8e7ccf045 (bug 1302470) 2016-11-20 20:31:26 +01:00
Brad Werth f284698647 Bug 1302470 Part 3: Augment the IsRangeVisible function to test for opaque overdraw. r=mstange
MozReview-Commit-ID: F2qbu0WLl9O
2016-11-09 16:08:56 -08:00
Mike de Boer 4a1caa283e Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Brad Werth c458bce0d8 Bug 1302470 Part 1: Remove trailing whitespace. r=mstange
MozReview-Commit-ID: 1vlEVEn07Qb
2016-11-09 13:46:17 -08:00
Sebastian Hengst 8fa54b2724 Backed out changeset a71cde237471 (bug 1302470) for failing mochitests browser_Finder.js and test_browserElement_inproc_Find.html and various test failures in mochitest c3 on Linux x64 asan and debug (at least). r=backout 2016-11-17 17:51:24 +01:00
Sebastian Hengst e1946ef759 Backed out changeset 8243da10a171 (bug 1302470) 2016-11-17 17:49:46 +01:00
Sebastian Hengst 383b0866ab Backed out changeset 811c1368e51b (bug 1302470) 2016-11-17 17:49:37 +01:00
Brad Werth 9544f23c6f Bug 1302470 Part 4: Augment the IsRangeVisible function to test for opaque overdraw. r=mstange
MozReview-Commit-ID: F2qbu0WLl9O
2016-11-09 16:08:56 -08:00
Mike de Boer f1cdd4359c Bug 1302470 Part 2: Use a hit-test method to determine if the rect of a range is visible on the page or not to the eye, for use in find-in-page. r=mstange,smaug
MozReview-Commit-ID: 9P7gf0GcREv
2016-11-09 15:09:36 -08:00
Brad Werth 49a281f7ec Bug 1302470 Part 1: Remove trailing whitespace. r=mstange
MozReview-Commit-ID: 1vlEVEn07Qb
2016-11-09 13:46:17 -08:00
Michael Layzell d32dafff26 Bug 1018486 - Part 8: Various other changes, r=smaug
MozReview-Commit-ID: B0dsomkWgEk
2016-09-07 10:50:45 -04:00
Tom Tromey 1b5a2bdb96 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
2016-07-14 10:16:42 -06:00
Mike de Boer 40aa390f52 Bug 269442 - whole word matching support for nsFind. r=ehsan,dao. ui-r=shorlander
MozReview-Commit-ID: KIDWHyjOSYL
2016-06-28 15:13:53 +02:00
Chris Peterson 1e35dbdf75 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Nicholas Nethercote 7f7c26ed62 Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().
2016-03-29 10:09:43 +11:00
Blake Kaplan 044aeb6502 Bug 1174036 - Handle dynamically-removed textareas gracefully. r=mikedeboer r=ehsan
Also, flush layout when starting a find in order to avoid racing with
textarea-hiding notifications and maintain JS type correctness when objects
are passed over IPC.
2016-03-28 11:12:31 -07:00
Kyle Huey a0484a65a6 Bug 1244798: Check for null before proceeding. r=smaug 2016-02-03 13:30:46 -08:00
Kyle Huey e95edb30a9 Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nathan Froyd 4e6d8f6705 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Chris Peterson 752223fd52 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Nicholas Nethercote 12fec02dfb Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00