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

1011 Коммитов

Автор SHA1 Сообщение Дата
Robert Longson 46d24ea87e Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 05:10:29 +00:00
Cosmin Sabou 52b7bc2fa6 Backed out changeset 136b9329a6f7 (bug 1581691) for failures on svg/styling/presentation-attributes-relevant.html. 2020-04-18 06:15:10 +03:00
Robert Longson 650b69563f Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 01:32:40 +00:00
Emilio Cobos Álvarez f37620df43 Bug 612118 - Make .getBBox() on a non-rendered element not throw. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D71228
2020-04-17 00:28:52 +00:00
Cameron McCormack 60ff2bc9ec Bug 1513603 - Remove SVG tearoff objects from the table when they are unlinked. r=longsonr
The only three types that can hit the PreservedWrapper() assertion
currently, and which this patch avoids, are DOMSVGPathSegList,
DOMSVGPointList, and DOMSVGStringList.

This is because these are the only types that are implemented as proxies
(due to having e.g. indexed getters on them, and thus have the offending
DOMProxyHandler::GetExpandoObject() call in their bindings) and which we
store in tearoff tables.

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

--HG--
extra : moz-landing-system : lando
2020-04-09 12:50:28 +00:00
Edgar Chen 6a2699f75b Bug 1128054 - Part 3: Invalid tabindex attribute should not make an element focusable; r=smaug
See https://html.spec.whatwg.org/#attr-tabindex.

Depends on D68209

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

--HG--
extra : moz-landing-system : lando
2020-04-04 20:03:09 +00:00
Sylvestre Ledru 0aa6f03cf3 Bug 1519636 - Reformat recent changes to the Google coding style r=jgilbert
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-04-05 13:34:58 +00:00
Sean Feng 20800c5a3c Bug 1377999 - Make SVG nodes to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57701

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:16 +00:00
Kartikaya Gupta e0866e73e4 Bug 1622445 - Don't cache the SVGGeometryElement's Path with OMTP rendering. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D66955

--HG--
extra : moz-landing-system : lando
2020-03-16 15:15:40 +00:00
Boris Zbarsky 4e0a47195b Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 04:25:34 +00:00
Mihai Alexandru Michis 795c7787a3 Backed out changeset 3552ac882d4f (bug 1621835) for causing bustages.
CLOSED TREE
2020-03-12 04:15:33 +02:00
Boris Zbarsky e5766424b8 Bug 1621835. Make imgINotificationObserver::Notify a void method, since no one examines its return value anyway. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D66513

--HG--
extra : moz-landing-system : lando
2020-03-12 01:46:16 +00:00
Andrew Osmond 91b071ed14 Bug 1618345 - Enforce proper color management by splitting gfx::Color into sRGBColor and DeviceColor types. r=jrmuizel
gfx::Color is currently misused in many places. The DrawTargets expect
the color space to be in device space, e.g. what we are actually going
to draw using. Everything sitting above generally deals with sRGB, as
specified in CSS. Sometimes we missed the conversion from sRGB to device
space when issuing draw calls, and similarly sometimes we converted the
color to device space twice.

This patch splits the type in two. sRGBColor and DeviceColor now
represent sRGB and device color spaces respectively. DrawTarget only
accepts DeviceColor, and one can get a DeviceColor from an sRGBColor via
the ToDeviceColor helper API. The reftests now pass with color
management enabled for everything (e.g. CSS) instead of just tagged
raster images.

There will be a follow up patch to enable color management everywhere by
default on all supported platforms.

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

--HG--
extra : moz-landing-system : lando
2020-03-09 14:16:17 +00:00
Mark Banner 15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Boris Zbarsky 00cd5d4380 Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 21:08:02 +00:00
Boris Zbarsky c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Philipp Zech 05f68040bd Bug 1617644 - Convert color-interpolation #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64813

--HG--
extra : moz-landing-system : lando
2020-02-29 15:41:13 +00:00
Christoph Kerschbaumer de17388af5 Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug,annevk
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-29 12:35:46 +00:00
cbrewster ac38c6d0ab Bug 1596513: Part 2: Allow for floating point dx/dy on feDropShadow attributes r=nical
WebRender expects drop shadow dx/dy to be in user space, which is a floating point value.
Before this, a dx/dy such as (0.2, 0.2) was truncated to (0, 0) resulting in no offset of the shadow.

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

--HG--
extra : moz-landing-system : lando
2020-02-28 17:10:17 +00:00
shindli f5511fecc8 Backed out changeset ec4c2b2a561b (bug 1374612) for causing wpt permafails in /html/dom/reflection-metadata.html CLOSED TREE 2020-02-27 22:46:44 +02:00
Christoph Kerschbaumer 00976af48c Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 18:08:54 +00:00
Dorel Luca 2e1e470d9e Backed out changeset 59fe98b41d80 (bug 1374612) for WPT failures in /html/dom/idlharness.https.html. CLOSED TREE
--HG--
extra : amend_source : a537237327643c365f02c0bfbed643b0d54cf1d5
2020-02-27 14:08:48 +02:00
Christoph Kerschbaumer ec996a7e9d Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 09:32:04 +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
Andreea Pavel 1f0dedc29d Backed out 2 changesets (bug 1596513) for webrender wrench bustages on a CLOSED TREE
Backed out changeset 49e61b566da1 (bug 1596513)
Backed out changeset 889cee140af8 (bug 1596513)
2020-02-25 09:37:45 +02:00
cbrewster b11401a6e1 Bug 1596513: Part 2: Allow for floating point dx/dy on feDropShadow attributes r=nical
WebRender expects drop shadow dx/dy to be in user space, which is a floating point value.
Before this, a dx/dy such as (0.2, 0.2) was truncated to (0, 0) resulting in no offset of the shadow.

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

--HG--
extra : moz-landing-system : lando
2020-02-25 06:05:36 +00:00
Emilio Cobos Álvarez 843a0e51f0 Bug 1610171 - Fix SVGAnimatedTransformList optimization to avoid pathological frame reconstruction. r=jwatt
The optimization here was trying to avoid reconstructing in some cases when we
started animating a transform. Unfortunately it wasn't handling the transform
animations properly, which means that once it decided that _adding_ the
transform value needed a reconstruction, it was deciding that _changing_ it also
needed.

Which means that we reconstructed the frames once per animation frame, which is
pretty sad.

While fixing the optimization, also use a more comprehensive change hint, the
one that we use for transform property changes as well.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 00:13:41 +00:00
Emilio Cobos Álvarez 1b99376255 Bug 1610171 - Clear animated paths when SVG lengths change. r=jwatt
If we reconstruct frames due to some other reason, we will never get to the
DidSetComputedStyle bit that would clear it for us on change.

This is all in all very unfortunate, since I think the fact that we reconstruct
frames so aggressively is a bug anyway (this comes from this bit in
SVGAnimatedTransformList):

  https://searchfox.org/mozilla-central/rev/a37fc61f172b432e7ae0b6b4c4a12cac2a787a0f/dom/svg/SVGAnimatedTransformList.h#108

I think we are supposed to reconstruct only once at most, but I may be crazy :^)

Will look at that in a separate bug though, this is the most minimal change that
addresses the regression.

An alternative (equally low-risk) would be to clear cached paths also in the
case where there's no old computed style in nsSVGGeometryFrame...

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

--HG--
extra : moz-landing-system : lando
2020-02-24 01:52:52 +00:00
Emilio Cobos Álvarez 71cc1a2c62 Bug 1617425 - Use cbindgen for SVG lengths. r=jwatt
Depends on D63777

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

--HG--
extra : moz-landing-system : lando
2020-02-23 15:43:03 +00:00
Boris Zbarsky 99d4eaa3ed Bug 1614546 part 2. Give SVGLengthList an indexed setter. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D62400

--HG--
extra : moz-landing-system : lando
2020-02-19 21:58:31 +00:00
Boris Zbarsky bb356d988d Bug 1614546 part 1. Get rid of SVG uses of NS_ERROR_DOM_TYPE_ERR. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D62399

--HG--
extra : moz-landing-system : lando
2020-02-19 22:06:09 +00:00
Ehsan Akhgari 340e730db7 Bug 1614329 - Fix the handling of the type attribute of HTMLStyleElement; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D62254

--HG--
extra : moz-landing-system : lando
2020-02-11 19:38:26 +00:00
Emilio Cobos Álvarez 0c5c683162 Bug 1614654 - Simplify property handling during adoption. r=smaug
We don't need to transfer all properties after adopt. Collecting all the nodes
with properties during adopt was needed because there used to be clone and adopt
user-data callbacks, see https://bugzilla.mozilla.org/show_bug.cgi?id=347524.

This ensures that NodeInfoChanged and similar callbacks can tweak node
properties, which is needed for bug 1542784.

Also simplify surrounding code. As far as I can tell we should always have
different documents if we get a NodeInfoManager object.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 16:38:18 +00:00
Emilio Cobos Álvarez b997cfcaf4 Bug 1614208 - Stop including PresShell.h and nsPresContext.h from Element.h. r=smaug
nsPresContext.h is only used for unit conversion, which can be done by Units.h
in a similar fashion.

PresShell.h was needed for some capturing-content stuff which can be moved out
of line.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:12 +00:00
Boris Zbarsky 4472ba99ca Bug 1614165 part 1. Improve error messages for SVG text. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62154

--HG--
extra : moz-landing-system : lando
2020-02-09 02:15:32 +00:00
Emilio Cobos Álvarez 86ca3370c2 Bug 1613349 - Rename nsINode::UnsetProperty to nsINode::TakeProperty. r=smaug
For consistency with the previous change for layout.

Depends on D61755

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

--HG--
extra : moz-landing-system : lando
2020-02-05 22:26:20 +00:00
Martin McNickle 56f3626ca9 Bug 1611044 - Convert stroke-linejoin #defines to an enum class. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60865

--HG--
extra : moz-landing-system : lando
2020-01-23 17:19:27 +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
Emilio Cobos Álvarez 5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Boris Zbarsky fcda062282 Bug 1609856. Stop using NS_ERROR_DOM_TYPE_ERR in SVGAnimatedEnumeration::SetBaseValue. r=heycam
It turns into a DOMException named 'TypeError' in the bindings, not into an actual TypeError.

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

--HG--
extra : moz-landing-system : lando
2020-01-19 05:40:34 +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
Boris Zbarsky 59239b7c5c Bug 1607918. Fix case handling for webkit-prefixed transition/animation event handlers. r=smaug.
The WPTs were cherrypicked from e05bdb8e0d

The issue in dom/events/test/test_bug1332699.html was discussed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c8 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c10 but Xidorn never quite
made it clear enough what the issue was, so it ended up making it into the tree.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:04:59 +00:00
Emilio Cobos Álvarez ba0cc69e47 Bug 1607049 - Pack LengthPercentage better. r=jwatt
So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.

This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 13:23:22 +00:00
Emilio Cobos Álvarez d10341c0bc Bug 1607049 - Split LengthPercentage again. r=boris
This is needed to support min() / max() / clamp(), etc, as those need to be a
tree of values and thus need heap storage.

This unfortunately grows LengthPercentage to be two pointers, which is bad as
it blows up the size of nsStylePosition enough to trigger the size assertions.

This patch comments out the assertion for now, the follow-up patches will
uncomment them.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 13:21:58 +00:00
Jonathan Kingston 84c462a2d0 Bug 1605814 - Don't capture CSP nonce when loading a child sheet. r=emilio,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D58686

--HG--
extra : moz-landing-system : lando
2020-01-13 11:47:25 +00:00
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

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

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Tom Schuster 989660da15 Bug 1605854 - Remove uneval/toSource from DOM tests. r=smaug
Using JSON.stringify in dom/tests/mochitest/chrome/test_clonewrapper.xhtml might not be the best solution, because
the testObject contains ImageData objects.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 13:09:27 +00:00
Chris Peterson 406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Mats Palmgren baaafd0dfa Bug 1604772 - Remove the eSVGGeometry IsFrameOfType bit. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D57622

--HG--
extra : moz-landing-system : lando
2019-12-18 16:06:29 +00:00