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

38 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Brendan Dahl eafc9e3293 Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

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

--HG--
rename : xpfe/appshell/nsXULWindow.cpp => xpfe/appshell/AppWindow.cpp
rename : xpfe/appshell/nsXULWindow.h => xpfe/appshell/AppWindow.h
rename : xpfe/appshell/nsIXULWindow.idl => xpfe/appshell/nsIAppWindow.idl
extra : moz-landing-system : lando
2019-11-05 17:56:28 +00:00
Mihai Alexandru Michis b819bd25aa Backed out 2 changesets (bug 1470510) for causing bustages in widget/cocoa/nsChildView.mm CLOSED TREE
Backed out changeset a343f30c34a3 (bug 1470510)
Backed out changeset 4da64790094d (bug 1470510)

--HG--
rename : xpfe/appshell/nsIAppWindow.idl => xpfe/appshell/nsIXULWindow.idl
rename : xpfe/appshell/AppWindow.cpp => xpfe/appshell/nsXULWindow.cpp
rename : xpfe/appshell/AppWindow.h => xpfe/appshell/nsXULWindow.h
2019-11-05 09:24:26 +02:00
Brendan Dahl 0c0da7791e Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

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

--HG--
rename : xpfe/appshell/nsXULWindow.cpp => xpfe/appshell/AppWindow.cpp
rename : xpfe/appshell/nsXULWindow.h => xpfe/appshell/AppWindow.h
rename : xpfe/appshell/nsIXULWindow.idl => xpfe/appshell/nsIAppWindow.idl
extra : moz-landing-system : lando
2019-11-04 23:37:31 +00:00
Dorel Luca 0207ce5451 Backed out 2 changesets (bug 1470510) for build bustage on /build/src/widget/cocoa/nsChildView.mm. CLOSED TREE
Backed out changeset 5967bf633574 (bug 1470510)
Backed out changeset 067a556bb614 (bug 1470510)

--HG--
rename : xpfe/appshell/nsIAppWindow.idl => xpfe/appshell/nsIXULWindow.idl
rename : xpfe/appshell/AppWindow.cpp => xpfe/appshell/nsXULWindow.cpp
rename : xpfe/appshell/AppWindow.h => xpfe/appshell/nsXULWindow.h
extra : amend_source : 752d828c6a0726c3f2df57a25741e38b36b75d6b
2019-11-04 19:18:56 +02:00
Brendan Dahl 247b257cfa Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

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

--HG--
rename : xpfe/appshell/nsXULWindow.cpp => xpfe/appshell/AppWindow.cpp
rename : xpfe/appshell/nsXULWindow.h => xpfe/appshell/AppWindow.h
rename : xpfe/appshell/nsIXULWindow.idl => xpfe/appshell/nsIAppWindow.idl
extra : moz-landing-system : lando
2019-11-04 16:52:35 +00:00
Gabriele Svelto 10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Boris Zbarsky d0bcf72821 Bug 1543564 part 2. Get rid of pointless nsPIDOMWindowInner::AsInner methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27027

--HG--
extra : moz-landing-system : lando
2019-04-11 14:12:43 +00:00
Boris Zbarsky 6d78fdff25 Bug 1543564 part 1. Get rid of pointless nsPIDOMWindowOuter::AsOuter() methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27026

--HG--
extra : moz-landing-system : lando
2019-04-11 12:12:04 +00:00
James Willcox 6314eb8c80 Bug 1514360 - Add nsIWindowMediator.getMostRecentBrowserWindow() r=Ehsan
We currently don't use 'navigator:browser' for GeckoView windows because
we need an easy way to disambiguate from Fennec windows. Instead, we use
'navigator:geckoview' for those windows. This adds a method that falls
back to that automatically, useful in cases where you want it to work on
both Desktop/Fennec and GeckoView.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 22:53:21 +00: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
Dão Gottwald 29ff9599f4 Bug 1489833 - Remove nsIWindowMediator::getZOrderDOMWindowEnumerator. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12530

--HG--
extra : moz-landing-system : lando
2018-11-21 16:56:10 +00:00
Catalin Badea ec64c538e5 Bug 1445792 - Merge nsIWindowMediator_44 back into nsIWindowMediator. r=dbaron 2018-03-20 05:27:00 -04:00
Gijs Kruitbosch ffc0ed12d2 Bug 1425363 - remove onWindowTitleChanged given that nobody uses it, r=bgrins
MozReview-Commit-ID: ALslAwZo4K9

--HG--
extra : rebase_source : ca1add0015eea86128c0c5f209252ebb6a228998
2017-12-14 21:55:44 -06:00
Nika Layzell ff8b5bd178 Bug 1414974 - Part 3: Move Get{Inner,Outer}WindowWithId onto the specific subclasses, r=smaug
These were originally exposed directly as static methods on nsGlobalWindow, but
as they are clearly associated with either the inner or outer window, it makes
more sense for them to be called as such.

MozReview-Commit-ID: LFq8EfnhDlo
2017-11-09 10:44:47 -05:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Nicholas Nethercote 3aa25724fe Bug 1402255 - Change nsIBaseWindow::title from wstring to AString. r=janv.
Because nsAString is nicer to work with than char16_t*. The patch relatedly
changes nsIEmbeddingSiteWindow::title and nsIWindowMediator::updateWindowTitle
as well.

--HG--
extra : rebase_source : 0bf332dec3e09af6c39c676f8795b368768a6046
2017-09-25 13:10:51 +10:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10: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
Eric Rahm 0b39451aa9 Bug 1307212 - Stop warning about z-levels. r=froydnj
MozReview-Commit-ID: 2OughbymcrU
2017-05-23 15:14:07 -07:00
Xidorn Quan db62454204 Bug 1344544 - Use nsTObserverArray for listeners of nsWindowMediator. r=erahm
MozReview-Commit-ID: 2PHwh4Htlhz

--HG--
extra : rebase_source : 540b7fd24298e552c2e30d1de12828da4127f32b
2017-03-06 12:50:52 +11:00
Xidorn Quan 148c3a3e9a Bug 1342303 part 5 - Remove nsCOMArray::EnumerateForwards uses in xpfe. r=erahm
MozReview-Commit-ID: j8csvjSYUM

--HG--
extra : rebase_source : bea5c441cb87645f53ea9f830cee020e24e3f14a
2017-02-24 22:01:42 +11:00
Wes Kocher 5bb9a497ef Backed out 6 changesets (bug 1342303) for build bustage a=backout
Backed out changeset 89137679a68c (bug 1342303)
Backed out changeset 20a1bcb47c33 (bug 1342303)
Backed out changeset bc3b2e7a383b (bug 1342303)
Backed out changeset bdc491b9ebde (bug 1342303)
Backed out changeset 5c6042dee665 (bug 1342303)
Backed out changeset b5de1dfff82f (bug 1342303)

MozReview-Commit-ID: BjlVAX480jI
2017-03-02 16:35:43 -08:00
Xidorn Quan c949dd86c9 Bug 1342303 part 5 - Remove nsCOMArray::EnumerateForwards uses in xpfe. r=erahm
MozReview-Commit-ID: j8csvjSYUM

--HG--
extra : rebase_source : 8f0b64f184f4cbe7fb3ee9d2d276cad33e3fdbf9
2017-02-24 22:01:42 +11:00
Andrea Marchesini 8c313db5c7 Bug 1252839 - Remove some if stmt after allocation with 'new' - patch 2, r=bz 2016-03-02 18:51:33 +01:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Catalin Badea 58a29eb2dd Bug 1221992 - Skip closed windows in GetMostRecentNonPBWindow. r=smaug 2015-12-11 13:32:15 -05:00
Catalin Badea 54a27691d4 Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-11 13:32:15 -05:00
Sebastian Hengst 114ca318d6 Backed out 2 changesets (bug 1221992) for almost permafailing M-e10s(2) on Linux debug. r=backout
Backed out changeset ad20808dd3c4 (bug 1221992)
Backed out changeset 7cdcda3e65fb (bug 1221992)
2015-12-05 21:13:41 +01:00
Catalin Badea b675b2325d Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-04 19:14:44 +02:00
Wes Kocher bfbadfd96d Backed out 2 changesets (bug 1221992) for windows debug assertions in browser_perf-categories-js-calltree.js
Backed out changeset bcd90e591038 (bug 1221992)
Backed out changeset 6affaa386b9b (bug 1221992)

--HG--
extra : commitid : 4w08gUrbqQr
2015-12-03 15:56:59 -08:00
Catalin Badea 889982d7af Bug 1221992 - Prevent ServiceWorkerClients.OpenWindow from opening tabs in private mode windows. r=smaug 2015-12-03 23:19:29 +02:00
Nathan Froyd 01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 4c7234747e Bug 1143651 - don't use CallQueryInterface when the compiler can do the cast for us; r=ehsan 2015-03-12 13:20:29 -04:00
Nathan Froyd b252a27930 Bug 1142503 - don't use QueryInterface when the compiler can do the cast for us; r=ehsan
Calling QueryInterface with a statically known IID should typically not
be necessary.  In those cases where it's not, the compiler can do the
cast for us, though we have to supply the reference-counting that
QueryInterface would do.

In passing, several redundant null-checks for the result of |new T| have
been deleted.
2015-03-12 09:43:50 -04:00
Brian Marshall 08a6fc02ef Bug 1074557 - Remove the lock in nsWindowMediator. r=Neil 2014-10-16 15:45:17 -07:00
Birunthan Mohanathas 29e62c0155 Bug 1047873 - Flatten xpfe/appshell/{public,src}/ directories. r=Neil
--HG--
rename : xpfe/appshell/public/nsAppShellCID.h => xpfe/appshell/nsAppShellCID.h
rename : xpfe/appshell/src/nsAppShellFactory.cpp => xpfe/appshell/nsAppShellFactory.cpp
rename : xpfe/appshell/src/nsAppShellService.cpp => xpfe/appshell/nsAppShellService.cpp
rename : xpfe/appshell/src/nsAppShellService.h => xpfe/appshell/nsAppShellService.h
rename : xpfe/appshell/src/nsAppShellWindowEnumerator.cpp => xpfe/appshell/nsAppShellWindowEnumerator.cpp
rename : xpfe/appshell/src/nsAppShellWindowEnumerator.h => xpfe/appshell/nsAppShellWindowEnumerator.h
rename : xpfe/appshell/src/nsChromeTreeOwner.cpp => xpfe/appshell/nsChromeTreeOwner.cpp
rename : xpfe/appshell/src/nsChromeTreeOwner.h => xpfe/appshell/nsChromeTreeOwner.h
rename : xpfe/appshell/src/nsContentTreeOwner.cpp => xpfe/appshell/nsContentTreeOwner.cpp
rename : xpfe/appshell/src/nsContentTreeOwner.h => xpfe/appshell/nsContentTreeOwner.h
rename : xpfe/appshell/public/nsIAppShellService.idl => xpfe/appshell/nsIAppShellService.idl
rename : xpfe/appshell/public/nsIPopupWindowManager.idl => xpfe/appshell/nsIPopupWindowManager.idl
rename : xpfe/appshell/public/nsIWindowMediator.idl => xpfe/appshell/nsIWindowMediator.idl
rename : xpfe/appshell/public/nsIWindowMediatorListener.idl => xpfe/appshell/nsIWindowMediatorListener.idl
rename : xpfe/appshell/public/nsIXULBrowserWindow.idl => xpfe/appshell/nsIXULBrowserWindow.idl
rename : xpfe/appshell/public/nsIXULWindow.idl => xpfe/appshell/nsIXULWindow.idl
rename : xpfe/appshell/src/nsWebShellWindow.cpp => xpfe/appshell/nsWebShellWindow.cpp
rename : xpfe/appshell/src/nsWebShellWindow.h => xpfe/appshell/nsWebShellWindow.h
rename : xpfe/appshell/src/nsWindowMediator.cpp => xpfe/appshell/nsWindowMediator.cpp
rename : xpfe/appshell/src/nsWindowMediator.h => xpfe/appshell/nsWindowMediator.h
rename : xpfe/appshell/src/nsXULWindow.cpp => xpfe/appshell/nsXULWindow.cpp
rename : xpfe/appshell/src/nsXULWindow.h => xpfe/appshell/nsXULWindow.h
rename : xpfe/appshell/src/test/chrome.ini => xpfe/appshell/test/chrome.ini
rename : xpfe/appshell/src/test/test_hiddenPrivateWindow.xul => xpfe/appshell/test/test_hiddenPrivateWindow.xul
2014-08-02 13:44:23 -07:00