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

14 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Andi-Bogdan Postelnicu 38afb32dc5 Bug 1626555 - Make `dom/base` buildable outside of `unified-build` environment. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D69183
2020-04-29 09:02:05 +00:00
Eric Rahm a7947848a0 Bug 1626448 - Remove nsAutoPtr usage from dom/base. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D69119

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:29 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Eric Rahm 6d75492859 Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag
This removes various unused `#include "nsAutoPtr.h"` in `xpcom/`. Additionally
adds a few includes to the media stack.

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

--HG--
extra : moz-landing-system : lando
2020-01-07 00:06:01 +00:00
Daniel Holbert d55c8c26d0 Bug 1590639 part 4: Fix non-unified build issues in layout/style. r=emilio
This patch:

- Gives layout/generic/AnonymousContentKey.h an include for `<stdint.h>` to
  provide the uint8_t type, and TypedEnumBits.h to provide the
  MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS macro. (This is a change in another
  directory, but it's needed in order for layout/style/ServoStyleSet.cpp to
  build successfully.)
- Adds a missing "nsINode" forward-decl to dom/base/IdentifierMapEntry.h,
  because it uses that type in function declarations.  (This change is needed
  in order for layout/style/CachedInheritingStyles.cpp to build successfully.)
- Gives CSSStyleRule.cpp an include for PseudoStyleType.h,
  nsCSSPseudoElements.h, and CSSEnabledState.h because it uses those types.
- Gives GeckoBindings.cpp an include for gfxTextRun.h, to provide the definition
  of type gfxFontGroup (so GeckoBindings can call GetFirstValidFont() on an
  object of that type).
- Gives Loader.h an include for nsIContentInlines.h, to provide the inline
  function IsInUAWidget().
- Gives Rule.cpp an include for HoldDropJSObjects.h, to provide DropJSObjects().
- Gives nsImageLoader.cpp an include for DocumentInlines.h (and Document.h for
  good measure), to provide the inline function GetPresContext().
- Gives nsStyleStruct.cpp an include for DocumentInlines.h, to provide inline
  function Document::GetPresContext().
- Gives nsStyleTransformMatrix.h an include for Units.h (instead of gfxPoint.h,
  which isn't useful) to provide the CSSPoint type.
- Gives nsStyleTransformMatrix.h an include for ServoStyleConsts.h, to provide
  LengthPercentage and the various StyleRotate/StyleScale/StyleTransform/etc
  types. (These can't be easily forward-declared, because some of them are
  legitimate types whereas others are type aliases. We could theoretically
  forward-declare all of the underlying types and then repeat the type aliases,
  but that'd be verbose and unmaintainable.)

Depends on D50165

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

--HG--
extra : moz-landing-system : lando
2019-10-23 08:14:54 +00:00
Edgar Chen 07c5d9bb1b Bug 1298509 - Notify identifier map entries if they get removed via DestroyElementMaps; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D43154

--HG--
extra : moz-landing-system : lando
2019-08-30 11:52:32 +00:00
Boris Zbarsky c7017dbe7d Bug 1577560. Change the key setup for the document's id and name table to not copy string keys on lookup. r=mccr8.
In the old setup, a lookup with an nsAString key would implicitly construct an
AtomOrString, which would assign the key to an nsString.  This would lead to
copies and heap-allocations if the key was an autostring, which it typically is
when coming from bindings.

This fix improves the performance of the new window-named-property-get.html pref
reftest by about 20-30%, and improves the new getElementById-1.html test by 2-3x.

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

--HG--
extra : moz-landing-system : lando
2019-08-29 17:53:38 +00:00
Thomas Nguyen 32ab8293ff Bug 1528697 - Expose ReferrerPolicy.webidl and use referrerpolicy enum r=smaug
ReferrerPolicy gets tossed back and forth as a uint32_t and
ReferrerPolicy enum in header file. Expose ReferrerPolicyValues from
webidl file and use consistently in native code.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 13:24:45 +00:00
Emilio Cobos Álvarez cbd5883ebb Bug 1541016 - Add a generic TreeOrderedArray. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25756

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:34 +00:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Masayuki Nakano 2c46fac276 Bug 1518384 - Fix some lines which depend on |using namespace mozilla| and |using namespace mozilla::dom| in Document.cpp and Element.cpp r=smaug
After landing bug 1517241, some lines in Document.cpp and Element.cpp depend on
`using namespace mozilla` and `using namespace mozilla::dom` of *different*
cpp files.  Therefore, when you rename some cpp files in dom/base, you'll
hit compile error.

This patch fixes the dependency with moving some classes into mozilla namespace
and adding |mozilla::| or |dom::| to a couple of lines.

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

--HG--
rename : dom/base/nsIdentifierMapEntry.h => dom/base/IdentifierMapEntry.h
extra : moz-landing-system : lando
2019-01-08 10:15:55 +00:00