gecko-dev/dom/commandhandler
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ 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/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
..
moz.build Bug 1594981 - update Core::DOM* and Core::Storage* bugzilla product and component meta data in moz.build files after reorganization in bug 1594717. r=annevk 2019-11-08 12:17:57 +00:00
nsBaseCommandController.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan 2019-12-06 09:24:56 +00:00
nsBaseCommandController.h Bug 1542352 - Restore zero-argument constructor of nsBaseCommandController. r=bz 2019-04-05 12:55:00 +03:00
nsCommandManager.cpp Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan 2019-12-06 09:24:56 +00:00
nsCommandManager.h Bug 1599843 - nsCommandManager::CommandStatusChanged is infallible. r=masayuki 2019-11-28 02:22:29 +00:00
nsCommandParams.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsCommandParams.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
nsControllerCommandTable.cpp Bug 1550927. Stop using idl [array] for getting supported controller commands. r=masayuki 2019-05-21 17:06:06 +00:00
nsControllerCommandTable.h Bug 1540963 - Make nsIControllerCommandTable builtinclass and make its users use nsControllerCommandTable directly r=bzbarsky 2019-04-03 12:52:14 +00:00
nsICommandManager.idl Bug 1574627 - Fix some "disbaled" typos. DONTBUILD r=njn 2019-08-16 23:23:05 +00:00
nsICommandParams.idl
nsIControllerCommand.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIControllerCommandTable.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIControllerContext.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00