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

11 Коммитов

Автор SHA1 Сообщение Дата
longsonr 75df4a9a49 Bug 1658778 - Convert typedef enum to enum class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D86840
2020-08-12 23:54:29 +00:00
longsonr 5221ba1823 Bug 1524314 - Use RAII notifier classes to simplify code r=dholbert
Also converts some of the RAII notifier classes to templates where they are doing the same notifications so we get more code reuse.

Differential Revision: https://phabricator.services.mozilla.com/D84229
2020-08-03 09:32:36 +00:00
Dorel Luca 04fc1721e0 Backed out changeset 07a20e5f68e3 (bug 1524314) for Build bustage in dom/svg/DOMSVGPointList.h. a=backout 2020-08-03 01:20:49 +03:00
longsonr e1f94afeec Bug 1524314 - Use RAII notifier classes to simplify code r=dholbert
Also converts some of the RAII notifier classes to templates where they are doing the same notifications so we get more code reuse.

Differential Revision: https://phabricator.services.mozilla.com/D84229
2020-08-01 22:22:52 +00:00
Eric Rahm 02784ee81c Bug 1617771 - Remove nsAutoPtr usage from svg. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D63984

--HG--
extra : moz-landing-system : lando
2020-02-25 20:03:26 +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
Masayuki Nakano 487e463bb5 Bug 1543315 - part 21: Mark `PresShell::DidCauseReflow()` as `MOZ_CAN_RUN_SCRIPT` r=smaug
It removes a script blocker.  Therefore, although it depends on the caller
whether it causes running script or not.  However, we should mark it as
`MOZ_CAN_RUN_SCRIPT` for safer code.

It's called only by the destructor of `nsAutoCauseReflowNotifier`.  Therefore,
this patch also marks its constructor as `MOZ_CAN_RUN_SCRIPT` for making
each creator method marked as `MOZ_CAN_RUN_SCRIPT` or
`MOZ_CAN_RUN_SCRIPT_BOUNDARY`.

Most of the creators is mutation listener methods.  However, `PresShell`
does nothing after destroying `nsAutoCauseReflowNotifier`.  Therefore,
this patch does not change the callers in MutationObserver.cpp to use
`RefPtr<PresShell>` at calling them because changing it may cause performance
regression.

Perhaps, we should create another methods of `WillCauseReflow()` and
`DidCauseReflow()` to avoid unnecessary `MOZ_CAN_RUN_SCRIPT` marking.
However, I'm not sure whether most callers may run script or not because
of outside of my knowledge.

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

--HG--
extra : moz-landing-system : lando
2020-01-17 10:00:28 +00:00
longsonr 160c161d5f Bug 1551030 - Merge all SVGRect classes r=dholbert 2019-06-20 07:03:54 -07:00
longsonr 866f2126b4 Bug 1540408 Part 3 - Rename SVGViewBoxRect to SVGViewBox r=dholbert 2019-04-10 05:08:14 +01:00
longsonr bff06425af Bug 1540408 Part 1 - Move most internal attribute representation classes to be of the form SVGAnimated. r=dholbert
--HG--
rename : dom/svg/SVGBoolean.cpp => dom/svg/SVGAnimatedBoolean.cpp
rename : dom/svg/SVGBoolean.h => dom/svg/SVGAnimatedBoolean.h
rename : dom/svg/SVGClass.cpp => dom/svg/SVGAnimatedClass.cpp
rename : dom/svg/SVGClass.h => dom/svg/SVGAnimatedClass.h
rename : dom/svg/SVGEnum.cpp => dom/svg/SVGAnimatedEnumeration.cpp
rename : dom/svg/SVGEnum.h => dom/svg/SVGAnimatedEnumeration.h
rename : dom/svg/SVGInteger.cpp => dom/svg/SVGAnimatedInteger.cpp
rename : dom/svg/SVGInteger.h => dom/svg/SVGAnimatedInteger.h
rename : dom/svg/SVGIntegerPair.cpp => dom/svg/SVGAnimatedIntegerPair.cpp
rename : dom/svg/SVGIntegerPair.h => dom/svg/SVGAnimatedIntegerPair.h
rename : dom/svg/SVGNumberPair.cpp => dom/svg/SVGAnimatedNumberPair.cpp
rename : dom/svg/SVGNumberPair.h => dom/svg/SVGAnimatedNumberPair.h
rename : dom/svg/SVGOrient.cpp => dom/svg/SVGAnimatedOrient.cpp
rename : dom/svg/SVGOrient.h => dom/svg/SVGAnimatedOrient.h
rename : dom/svg/SVGString.cpp => dom/svg/SVGAnimatedString.cpp
rename : dom/svg/SVGString.h => dom/svg/SVGAnimatedString.h
rename : dom/svg/SVGViewBox.cpp => dom/svg/SVGAnimatedViewBox.cpp
rename : dom/svg/SVGViewBox.h => dom/svg/SVGAnimatedViewBox.h
2019-04-04 18:40:56 +01:00