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

178 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Watt 3183f85bc5 Bug 1559096. Rename SVGObserverUtils::mInObserverList. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D34852

--HG--
extra : rebase_source : dd5459aebc8a2355e141b306bf226835c88afb68
extra : amend_source : 4b407c19cc3940e8a030f887d11b9ebe3166d271
2019-06-06 11:12:21 -07:00
Andrew Osmond 774c428cae Bug 1550523 - Ensure that decoding methods for frozen images request the correct frame. r=tnikkel
With WebRender, we had observed that the print preview for animated
images was not displaying correctly. It should display the first frame
but it was showing nothing the first time the preview was opened. Once
the decoded image was available in the cache, it would display
correctly if the preview was reloaded.

The StartDecoding and RequestDecode variants always requested
FRAME_CURRENT for animated images. They should use FRAME_FIRST for
static requests / FrozenImage. Correcting this fixes the print preview.


Differential Revision: https://phabricator.services.mozilla.com/D32033
2019-05-22 06:22:50 -04:00
Emilio Cobos Álvarez b3863ed908 Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29244

--HG--
extra : moz-landing-system : lando
2019-05-02 23:28:21 +00:00
Emilio Cobos Álvarez 3e1e7ce302 Bug 1547138 - IntrinsicSize shouldn't use nsStyleCoord. r=dholbert
We have a better type to represent "a coord or nothing", and that's Maybe.

This code is shorter, and I think reads generally better / is less easy to
misuse.

I wrote this on top of bug 1547126 so there shouldn't be conflicts.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 23:48:14 +00:00
Masayuki Nakano 2933c032e7 Bug 1545342 - part 3: Move remaining public enum of nsIPresShell to mozilla namespace in mozilla/PresShellForwards.h and make them enum class r=smaug
This patch moves remaining public `enum` of `nsIPresShell` to `mozilla`
namespace in `mozilla/PresShellForwards.h` and make them `enum class`es.

Additionally, some methods which use the moving `enum`s from `nsIPresShell`
to `PresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 05:04:23 +00:00
Andrew Osmond a63289a9f0 Bug 1543584 - Always rasterize SVGs but clamp the maximum size. r=tnikkel
SVG performance with the fallback path with WebRender is very bad. This
patch avoids fallback by always producing a rasterized surface we store
in SurfaceCache, but also clamping the size consistently to a configured
maximum. This will cause us to upscale rasterized SVGs which is
undesirable visually but is a lower risk change that we can uplift to
beta than fixing the underlying performance issue.

Differential Revision: https://phabricator.services.mozilla.com/D27159
2019-04-18 14:35:58 -04:00
Masayuki Nakano 60e014c55e Bug 1544215 - Make nsIContentVewer::GetPresShell() return mozilla::PresShell instead of nsIPresShell r=bzbarsky
Additionally, this patch makes `nsDocumentViewer` which is the only
implementation of `nsIContentViewer` use `mozilla::PresShell` directly
rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 02:47:26 +00:00
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Andrew Osmond dbfad894d9 Bug 1501794 - Implement img decode API. r=bzbarsky,tnikkel
The img decode API allows a web author to request that an image be
decoded at its intrinsic size and be notified when it has been
completed. This is useful to ensure an image is ready to display before
adding it to the DOM tree -- this will help reduce flickering.

Differential Revision: https://phabricator.services.mozilla.com/D11362
2019-04-02 08:56:54 -04:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Olli Pettay cf64822527 Bug 1519567, use medium high priority queue for imglib notifications, r=tnikkel
--HG--
extra : rebase_source : e78679b1bec411508291c7ce5f9c2600d1fe5c90
2019-03-01 15:11:56 +02:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Andrew Osmond bc9d7000be Bug 1527085 - Ensure we invalidate when the image request changes. r=jrmuizel
When the underlying image request (imgIRequest) changes for an image, we
need to ensure that we invalidate the cached WebRenderImageData such that
the image container stored therein is updated to be for the correct
image. This gets a little tricky because some display items store both
the current and previous images, and choose to display the latter if the
former is not yet ready. We also don't know what image the image
container belongs to. As such, we now compare the producer ID of the
current frame in the image container, to the expected producer ID of the
current image request. If they don't match, we must regenerate the
display list.

Differential Revision: https://phabricator.services.mozilla.com/D19699
2019-02-15 09:24:21 -05:00
Bas Schouten 0e3eeed1c7 Bug 1521027: Use the correct targets in ImageLib, allowing optimal behavior with OMTP. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D16945

--HG--
extra : rebase_source : 4f98c97faa9194494b47d28ef4a913b271fb4866
2019-01-18 07:56:43 +01:00
Andrew Osmond ddb99ba9af Bug 1510139 - Part 2. Do not invalidate vector image containers synchronously. r=tnikkel
Originally we would invalidate image containers synchronously when
SVGRootRenderingObserver::OnRenderingChange was called. However at this
point in time, the layout tree is in the middle of updating its own
state, and triggering a paint will be problematic. Animated vector
images did not suffer from this problem because they would defer to the
next refresh tick, but non-animated do not receive refresh tick events.
As such, we should just defer the invalidation to immediately after the
layout tree has finished updating itself.

Differential Revision: https://phabricator.services.mozilla.com/D15668
2019-01-15 09:37:27 -05:00
Andrew Osmond 2d6036e804 Bug 1510139 - Part 1. Ensure we honor invalidations if using vector image containers. r=tnikkel
If a vector image has an image container, it is unlikely the caller will
call VectorImage::Draw (and thus Show indirectly) to display the image.
As such, WebRender was missing subsequent invalidations and not
regenerating the rasterized surface as expected. Thus we now resume
honoring the invalidations if we updated the image container.

Differential Revision: https://phabricator.services.mozilla.com/D15667
2019-01-15 09:37:27 -05:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez 006a4ab94a Bug 1516366 - Move nsOnloadBlocker and nsDocumentOnStack to nsDocument.cpp, and shrink nsDocument.h to the minimmum. r=smaug
This needs to add a few of includes in other places which were relying on the
massive (now gone) list in nsDocument.h.

I also needed to move an AnimationTimeline destructor out of line because it
relied on dom::Animation being defined, yet Animation.h includes
AnimationTimeline.h, so include hell.

Differential Revision: https://phabricator.services.mozilla.com/D15366
2018-12-29 20:41:42 +01:00
Cameron McCormack 115eddc306 Bug 1515800 - Rename some more GetCurrentTime methods to avoid winbase.h bustage r=birtles,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D15167

--HG--
extra : moz-landing-system : lando
2018-12-21 05:37:58 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky 71db58cf83 Bug 1507540 part 2. Use more notxpcom attributes in docshell/. r=smaug 2018-11-19 20:17:53 -05:00
Markus Stange e10ccdacff Bug 1505180 - Add an SVG image drawing profiler label. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D11110

--HG--
extra : moz-landing-system : lando
2018-11-07 01:47:08 +00:00
Andrew Osmond 379404ac50 Bug 1428558 - Part 8. Integrate SharedSurfacesAnimation with the rest of imagelib. r=nical
This patch makes ImageContainer create a SharedSurfacesAnimation object
when it detects that we are using shared surfaces and are producing full
frames.

Differential Revision: https://phabricator.services.mozilla.com/D7505
2018-11-02 09:09:52 -04:00
Timothy Nikkel 6a62719550 Bug 1256603. Make aMarkUsed parameters required everywhere. r=aosmond 2018-10-13 00:31:03 -05:00
Jonathan Watt 1afc0b4ff4 Bug 1495851. Comment why StopObserving is called in SVGRenderingObserver base class dtors. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7525

--HG--
extra : rebase_source : 136b2757f572b42b89af23554da3d93822b140f8
2018-09-25 10:40:12 +01:00
Narcis Beleuzu 010feac062 Backed out 2 changesets (bug 1495562, bug 1495554) for crashes on [@ CrashReporter::TerminateHandler()] . CLOSED TREE
Backed out changeset ec5d3c12ad4c (bug 1495562)
Backed out changeset 28792d9adea2 (bug 1495554)
2018-10-02 02:58:09 +03:00
Jonathan Watt 930cf1de0f Bug 1495554. Call StopObserving in SVGRenderingObserver's dtor instead of individual subclasses' dtors. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7328

--HG--
extra : rebase_source : 8cf78efc46d4e94d0328742e836fefab3c977060
2018-09-21 21:16:49 +01:00
Jonathan Watt 7b3a3b2d10 Bug 1494953 p1. Rename lots of SVGObserverUtils functions. r=longsonr
The lack of clarity over which functions initiate observing and which don't
is a headache since it makes it hard to reason about what's going on. This
rename makes it explicit in the function names.

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

--HG--
extra : rebase_source : 1f2f86423a9bee7843533c09b3ea78416b233bcd
extra : amend_source : a89125d6a3b7b75a4056c4d600de74a5386ac4ff
2018-09-04 10:04:07 +01:00
Andrew Osmond cee95ec8de Bug 1456558 - Part 3. Implement factor of 2 scaling support for SVGs in VectorImage. r=tnikkel
If FLAG_HIGH_QUALITY_SCALING is used, we should use
SurfaceCache::LookupBestMatch just like how it is done in RasterImage.
This may provide an alternative size at which we should rasterize the
SVG instead of the requested size. Since SurfaceCache imposes a maximum
size for which it will permit rasterized SVGs, we should also bypass the
cache entirely if we are well above that and simply draw directly to the
draw target in such cases.

With WebRender, it is somewhat more complicated. We will now return
NOT_SUPPORTED if the size is too big, and this should trigger fallback
to blob images. This should only produce drawing commands for the
relevant region and save us the high cost of rasterized a very large
surface on the main thread, which at the same time, looking as crisp as
a user would expect.
2018-09-20 20:22:06 -04:00
Andreea Pavel 3805f6a285 Backed out 3 changesets (bug 1456558) for crashtest assertion failures on a CLOSED TREE
Backed out changeset 70d8f11cf6e8 (bug 1456558)
Backed out changeset af9fc3daf97c (bug 1456558)
Backed out changeset f209a9d848f4 (bug 1456558)
2018-09-21 02:13:41 +03:00
Andrew Osmond 73e08d1bf5 Bug 1456558 - Part 3. Implement factor of 2 scaling support for SVGs in VectorImage. r=tnikkel
If FLAG_HIGH_QUALITY_SCALING is used, we should use
SurfaceCache::LookupBestMatch just like how it is done in RasterImage.
This may provide an alternative size at which we should rasterize the
SVG instead of the requested size. Since SurfaceCache imposes a maximum
size for which it will permit rasterized SVGs, we should also bypass the
cache entirely if we are well above that and simply draw directly to the
draw target in such cases.

With WebRender, it is somewhat more complicated. We will now return
NOT_SUPPORTED if the size is too big, and this should trigger fallback
to blob images. This should only produce drawing commands for the
relevant region and save us the high cost of rasterized a very large
surface on the main thread, which at the same time, looking as crisp as
a user would expect.
2018-09-20 18:15:34 -04:00
Andrew Osmond e9f7db43b8 Bug 1446309 - Part 1. Return draw result from imgIContainer::GetImageContainerAtSize. r=tnikkel
In addition to the image container, the draw result can also be useful
for callers to know whether or not the surface(s) in the container are
fully decoded or not. This is used in subsequent parts to avoid
flickering in some cases.
2018-09-13 19:48:21 -04:00
Jonathan Watt b5333d12ac Bug 1488700 p2. Rename nsSVGRenderingObservers to SVGRenderingObservers. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5023

--HG--
extra : rebase_source : 97181ea49b14c2d478a20828ef3c5974e04e526c
2018-08-09 11:29:01 +02:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Andi-Bogdan Postelnicu 7f8217a2ea Bug 1453795 - Image - Initialize member fields in classes/ structures. r=tnikkel 2018-06-14 08:21:37 +03:00
Lee Salzman d273b4ddcc Bug 1467552 - make VectorImage::Show force OP_OVER. r=bas 2018-06-08 12:38:13 -04:00
Andrew Osmond ce228623ab Bug 920630 - Part 3. Change Image/ImageResource and derived classes to use nsIURI directly instead of ImageURL. r=tnikkel 2018-06-05 20:42:56 -04:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Emilio Cobos Álvarez 0faef276ec Bug 1455885: Make the SVG context paint not use a node property, but a member in SVGDocument. r=jwatt
MozReview-Commit-ID: H6SRTsDL5Rh
2018-04-26 17:07:39 +02:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Andrew Osmond 4986917db0 Bug 1435291 - Part 2. Make background SVGs use WebRender instead of fallback. r=jrmuizel 2018-03-14 14:19:13 -04:00
Andrew Osmond c887fd120c Backed out changeset 7f0409a405f2 (bug 1435291). 2018-03-13 16:03:59 -04:00