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

12 Коммитов

Автор SHA1 Сообщение Дата
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
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
longsonr 3de35fd000 Bug 1642234 - Convert various SVG methods to take a DOMMatrix2DInit r=emilio
See https://github.com/w3c/svgwg/issues/326

Differential Revision: https://phabricator.services.mozilla.com/D77618
2020-06-14 07:26:27 +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
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 30574c3d8b Bug 1522159 - Move nsSVGAttrTearOffTable to the mozilla namespace r=dholbert
--HG--
rename : dom/svg/nsSVGAttrTearoffTable.h => dom/svg/SVGAttrTearoffTable.h
2019-01-23 21:48:00 +00:00
longsonr 7072a2b798 Bug 1516551 - Part 2 rename nsSVGTransform to SVGTransform r=dholbert
--HG--
rename : dom/svg/nsSVGTransform.cpp => dom/svg/SVGTransform.cpp
rename : dom/svg/nsSVGTransform.h => dom/svg/SVGTransform.h
2018-12-29 09:15:40 +00:00
longsonr 2ea3c4dbf3 Bug 1516551 - Part 1 rename SVGTransform to DOMSVGTransform r=dholbert
--HG--
rename : dom/svg/SVGTransform.cpp => dom/svg/DOMSVGTransform.cpp
rename : dom/svg/SVGTransform.h => dom/svg/DOMSVGTransform.h
2018-12-28 17:20:15 +00:00