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

291 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight ea6021b769 Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:43 +00:00
Nicholas Nethercote 534cc02919 Bug 1488628 - Change nsIWebBrowsing.searchString to an AString. r=froydnj
--HG--
extra : rebase_source : b7c2bdded7dbd278bfbb2297c0d1ea6c4ca4934c
2018-09-05 13:38:51 +10:00
Adrian Wielgosik be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Robert Bartlensky 71c71f1730 Bug 1475283: Fix DEAD_STORE reported by infer in nsTypeAheadFind.cpp. r=froydnj
MozReview-Commit-ID: 720l6iKMVGl

--HG--
extra : rebase_source : 84b2eb1a3b807cc30ad4d77e946dc0c0aff17176
2018-07-16 18:38:16 +01:00
Mike de Boer d3b8d2bdfe Bug 1463860 - Don't play a beep when the find string is not find when Whole Word matching is enabled; it simply beeps too much. r=Ehsan
MozReview-Commit-ID: S6dvbV5Q5d

--HG--
extra : rebase_source : 5852765bee02e4fae1370050db84b608dea3c0da
2018-07-13 13:25:02 +02:00
Emilio Cobos Álvarez e4e136455f Bug 1455891: Don't return NAC as the first visible node in nsTypeAheadFind. r=heycam
This fixes all few test failures without this patch.

They happen because we were returning a <resizer> frame for a <textarea> instead
of the textarea itself, which means that due to the order AllChildrenIterator
iterates (non-anonymous, then anonymous), we'll never find the actual
non-anonymous node if reaching this code path (since this is computing the point
we'll start iterating from).

MozReview-Commit-ID: 4kEzDddxDN7
2018-07-06 06:53:22 +02: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
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Boris Zbarsky ddf179a7a7 Bug 1465875 part 3. Eliminate C++ use of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:22 -04:00
Boris Zbarsky ce1b5e3b44 Bug 1455676 part 13. Remove use of nsIDOMNode from toolkit/. r=mossop
This needs pretty careful review for the update service changes, though I think
they're pretty mechanical and safe.
2018-05-29 22:58:49 -04:00
Boris Zbarsky 2e09ba1f75 Bug 1377980 part 2. Remove most C++ use of nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Boris Zbarsky 40d2bf9d7f Bug 1377980 part 1. Remove use of nsIDOMRange in xpidl. r=mcc8 2018-05-17 12:01:37 -04:00
Adrian Wielgosik c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Boris Zbarsky 1fb03996f4 Bug 1387143 part 29. Remove nsISelection. r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky b47b72dae9 Bug 1387143 part 23. Remove nsISelection collapse* methods. r=mats 2018-05-08 13:52:41 -04:00
Boris Zbarsky f992e7ed0d Bug 1387143 part 22. Remove nsISelection isCollapsed/collapsed bits. r=mats 2018-05-08 13:52:39 -04:00
Boris Zbarsky 46cae9462a Bug 1387143 part 3. Stop using nsISelection in nsISelectionController. r=mats 2018-05-08 13:52:36 -04:00
Brad Werth 4545ac6dc8 Bug 1436431 Part 2: Change nsTypeAheadFind::IsRangeVisible to additionally check for visibility of range rects; not just the range's primary frame. r=bz
MozReview-Commit-ID: EQFyRswqy5L

Since a range rect can be considerably smaller than the rect of its
containing frame, this change avoids an unpleasant false-negative for
find-in-page. Without this change, if a frame is reported as visible,
but none of the range rects are visible, the later call to isRangeRendered
will report the text as not findable, even though it could be scrolled
into view. With this change, the text in such a case is reported as
findable, but just out of view, and the find-in-page logic will scroll
it into view as needed.

--HG--
extra : rebase_source : 387a597710a90dcbf3bb54ca39fb3704e7b9457c
2018-04-25 12:28:57 -07:00
Boris Zbarsky 786ad6bda7 Bug 1455674 part 11. Remove nsIDOMElement use from xpidl in toolkit. r=mossop 2018-04-26 23:36:30 -04:00
Boris Zbarsky ffa08d7425 Bug 1455674 part 9. Remove nsIDOMElement use from nsIFocusManager. r=qdot 2018-04-26 23:35:19 -04:00
Boris Zbarsky dac6314cb8 Bug 1456588 part 2. Change nsIFocusManager::MoveFocus to take Element. r=enndeakin 2018-04-26 10:37:47 -04:00
Boris Zbarsky 8a0b50bea8 Bug 1456588 part 1. Change nsIFocusManager::SetFocus to take Element. r=enndeakin 2018-04-26 10:37:46 -04:00
Boris Zbarsky df07d2d834 Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor
MozReview-Commit-ID: EeMje9KW6An
2018-03-27 00:35:23 -04:00
Boris Zbarsky 54d1f87ff4 Bug 1447890 part 1. Remove nsISelection::AddRange. r=mystor
MozReview-Commit-ID: 1JNLZp7tbII
2018-03-27 00:35:22 -04:00
Boris Zbarsky cffc291dfc Bug 1447889 part 11. Remove nsIDOMRange::CloneRange. r=mystor
The GetSelection changes are so we have a Selection that we can get an nsRange
from via GetRangeAt, so we can call nsRange::CloneRange.

MozReview-Commit-ID: 6rqdJ29Yyuc
2018-03-27 00:35:21 -04:00
Boris Zbarsky 1731f12f9d Bug 1447889 part 9. Remove nsIDOMRange::CompareBoundaryPoints. r=mystor
MozReview-Commit-ID: 29swD9AoqoF
2018-03-27 00:35:21 -04:00
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 7c392f077e Bug 1418085 part 6. Remove nsIDOMHTMLElement. r=mystor
MozReview-Commit-ID: 5QUyFeAQYZQ
2018-01-30 00:25:36 -05:00
Boris Zbarsky 8c61d57bca Bug 1276438 part 6. Stop using nsIDOMHTMLDocument::GetBody. r=mystor
MozReview-Commit-ID: EcDTnByuZsm
2018-01-26 00:53:35 -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 37aaea3c1f Bug 1432186 part 16. Remove nsIDOMNode's ownerDocument attribute. r=mccr8
MozReview-Commit-ID: JqfAFxPBz41
2018-01-29 23:10:52 -05:00
Brad Werth fc1561531d Bug 1430187 Part 1: Allow find-in-page to unilaterally find text that's out of view in a scrollable container. r=mikedeboer
MozReview-Commit-ID: KBh9PxuUWhT

--HG--
extra : rebase_source : 7b7dfa628bdee936a8f7df30e61ea4a1e3a77789
2018-01-19 15:58:03 -08:00
Andrea Marchesini 88f737d012 Bug 1425440 - Get rid of GetChildAt_Deprecated in nsTypeAheadFind, r=catalinb 2018-01-12 15:33:14 +01: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 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
Nicholas Nethercote 9252435548 Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm.
This makes the code nicer. In particular, it removes many getter_Copies()
calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will
avoid heap allocation in the common case.

The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because
it's actually getting a string, not a char, and that matches the existing
GetCString() and GetDefaultCString() methods. Correspondingly, it also renames
PREF_SetCharPref() as PREF_SetCStringPref().

The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they
almost always involve passing in C string literals, and passing "foo" is much
nicer than passing NS_LITERAL_CSTRING("foo").

It's worth noting that early versions of this patch used |AUTF8String| instead
of |ACString|. But it turns out that libpref stores prefs internally as Latin1.
And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because
non-ASCII Latin1 strings are not valid UTF-8!

MozReview-Commit-ID: D3f7a1Vl1oE

--HG--
extra : rebase_source : e6e4b15d6d210cfd93686f96400281f02bd1d06b
2017-10-27 10:30:33 +11:00
Brad Werth fa4459596a Bug 1407987 Part 1: Change isRangeVisible to only use isRangeRendered for text within the viewport. r=mikedeboer
MozReview-Commit-ID: BUlZ5SGTiSR

--HG--
extra : rebase_source : 9addc94c32521923300b9a80e1ded8792370d482
2017-10-12 15:49:18 -07:00
Sebastian Hengst 1bb5155c5c Backed out changeset ed9097c98efa (bug 1407987) for failing eslint at toolkit/modules/tests/browser/browser_Finder_offscreen_text.js. r=backout
--HG--
extra : amend_source : f3893dbe5e77479ffdb92fe18db238f42727d6e7
2017-10-17 18:59:51 +02:00
Brad Werth 312bfcae03 Bug 1407987 Part 1: Change isRangeVisible to only use isRangeRendered for text within the viewport. r=mikedeboer
MozReview-Commit-ID: BUlZ5SGTiSR

--HG--
extra : rebase_source : 2811a240a3a25052ea639288b289edc1284d50aa
2017-10-12 15:49:18 -07:00
Brad Werth 1d1d5af74a Bug 1302470 Part 2: Branch IsRangeVisible to delegate to IsRangeRendered when range is in viewport. r=masayuki
MozReview-Commit-ID: LZyvt08I9vz

--HG--
extra : rebase_source : b99e68b3a201f2251302d2ce68459b782af20459
2017-04-20 10:21:52 -07:00
Brad Werth f9bcc75af9 Bug 1302470 Part 1: Create a IsRangeRendered function to test range visibility in the display list. r=mstange,smaug
MozReview-Commit-ID: u0N73luIz7

--HG--
extra : rebase_source : aad334c6cd0d163e380d9c1289c2bdc5dab35d63
2017-03-24 14:45:41 -07: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
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
Phil Ringnalda b8183bc0b4 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 5b7e6137de Bug 1302470 Part 2: Branch IsRangeVisible to delegate to IsRangeRendered when range is in viewport. r=masayuki
MozReview-Commit-ID: LZyvt08I9vz

--HG--
extra : rebase_source : f6cb05812523f70877db8b6af35861a29767491c
2017-04-20 10:21:52 -07:00
Brad Werth bef81140eb Bug 1302470 Part 1: Create a IsRangeRendered function to test range visibility in the display list. r=mstange,smaug
MozReview-Commit-ID: u0N73luIz7

--HG--
extra : rebase_source : 962cf842a56ab650c4ee67d09060c034937d651e
2017-03-24 14:45:41 -07:00