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

51 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 81272b8d66 Bug 1753453 - Remove unused nsImageRenderer::IsAnimatedImage. r=aosmond
Drive-by cleanup.

Depends on D137762

Differential Revision: https://phabricator.services.mozilla.com/D137764
2022-02-03 17:31:41 +00:00
Matt Woodrow 5fa3be57b1 Bug 1728925 - Convert IsImageContainerAvailable to use WindowRenderer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124427
2021-09-05 22:36:45 +00:00
Andrew Osmond e9c57362fa Bug 1728890 - Remove unused ImageContainer related image code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124396
2021-09-02 21:46:14 +00:00
Miko Mynttinen 76c9644105 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-19 11:28:20 +00:00
Alexandru Michis fbd939b860 Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen ffc501ddc9 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +00:00
Emilio Cobos Álvarez 1cdf344860 Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-05 09:41:24 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00
Emilio Cobos Álvarez 11ad9c7bcd Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-04 10:24:07 +00:00
Emilio Cobos Álvarez 8e47e5abc2 Bug 1705877 - image-set() should influence intrinsic size of the image. r=dholbert,layout-reviewers
https://drafts.csswg.org/css-images-4/#image-set-notation has:

> [...] it also specifies the image’s natural resolution, overriding any other
> source of data that might supply a natural resolution.

Astounding that there was literally no WPT for this at all. I added three: one
for backgrounds, one for list-style-image, and one for `content`. Cursor is not
handled on this patch because that one requires a fair amount of extra work.

Differential Revision: https://phabricator.services.mozilla.com/D112474
2021-04-19 19:55:27 +00:00
Botond Ballo e6c29de3e7 Bug 1667594 - Move nsLayoutUtils::SurfaceFromElementResult to its own file. r=emilio
Along with a dependent struct DirectDrawInfo.

This allows nsImageRenderer.h and CanvasRenderingContext2D.h to
avoid including nsLayoutUtils.h.

For nsImageRenderer.h in particular, a forward declaration is
not sufficient as nsImageRenderer stores SurfaceFromElementResult
by value.

A couple of method definitions elsewhere are moved out of line
to keep things compiling without including nsLayoutUtils.h in
additional headers.

Differential Revision: https://phabricator.services.mozilla.com/D91684
2020-09-30 21:05:34 +00:00
Andrew Osmond a70c654c29 Bug 1550710 - Make vector images enable high quality scaling for embedded raster images. r=tnikkel
We did not pass FLAG_HIGH_QUALITY_SCALING down to the document used to
rasterize the SVG to a surface, resulting in embedded raster images to
not use high quality downscaling.

Differential Revision: https://phabricator.services.mozilla.com/D56422
2020-06-23 12:43:21 +00:00
Emilio Cobos Álvarez 006e5cca66 Bug 1614198 - Use cbindgen instead of nsStyleImage. r=aosmond
The trickier part is that we represent -moz-image-rect as a Rect() type instead
of image with non-null clip-rect. So we need to add a bit of code to
distinguish "image request types" from other types of images.

But it's not too annoying, and we need to do the same for fancier images like
image-set and such whenever we implement it, so seems nice to get rid of
most explicit usages of nsStyleImage::GetType().

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

--HG--
extra : moz-landing-system : lando
2020-02-11 20:56:20 +00:00
Andrew Osmond e501ee889d Bug 1409773 - Use WebRender instead of fallback for border raster images. r=jrmuizel
Before this patch, we would use fallback for all border images. Now for
all but vector images we will use the WebRender border images
primitives. Vector images are an exception because the fallback is
clever in that it upscales the vector image and clips to only draw the
region it requires. This avoids artifacting but to do something similar
for WebRender as it is currently defined, we would increase our CPU and
memory footprint as we would need to produce the entire vector image
upscaled, not just the parts we need. In the future we should change
WebRender to accept different image resources for each of the segments.

Differential Revision: https://phabricator.services.mozilla.com/D37093
2019-07-08 12:54:44 -04:00
Gurzau Raul 5f41be0510 Backed out changeset 9ad9e16d94d9 (bug 1409773) for crashtest failures at 640272.html 2019-07-06 23:36:12 +03:00
Andrew Osmond d20b5cb84b Bug 1409773 - Use WebRender instead of fallback for border raster images. r=jrmuizel
Before this patch, we would use fallback for all border images. Now for
all but vector images we will use the WebRender border images
primitives. Vector images are an exception because the fallback is
clever in that it upscales the vector image and clips to only draw the
region it requires. This avoids artifacting but to do something similar
for WebRender as it is currently defined, we would increase our CPU and
memory footprint as we would need to produce the entire vector image
upscaled, not just the parts we need. In the future we should change
WebRender to accept different image resources for each of the segments.

Differential Revision: https://phabricator.services.mozilla.com/D37093
2019-07-06 14:20:48 -04:00
Emilio Cobos Álvarez 67c30d05d2 Bug 1557212 - Use cbindgen for gradients. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D33901

--HG--
extra : moz-landing-system : lando
2019-06-07 14:13:17 +00: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
scharing 87df459a63 Bug 1528464 - Convert NS_STYLE_MASK_MODE_* to enum class r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D20063

--HG--
extra : moz-landing-system : lando
2019-02-19 16:54:52 +00:00
Doug Thayer a848222b53 Bug 1441308 - Split out document pieces of WebRenderLayerManager r=jrmuizel
Per our discussion, this patch splits out the state management bits of
WebRenderLayerManager, allowing for them to be maintained per-document.

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

--HG--
extra : moz-landing-system : lando
2019-01-07 21:33:10 +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
Miko Mynttinen b7eaedb6ea Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 20:46:21 +00:00
Csoregi Natalia 5984db0879 Backed out 2 changesets (bug 1484966) for bustage on RefPtr.h:42. CLOSED TREE
Backed out changeset 7b246c8f9de8 (bug 1484966)
Backed out changeset 399158a0a9b3 (bug 1484966)
2018-09-04 23:42:36 +03:00
Miko Mynttinen bb2d78e17e Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 17:21:36 +00:00
Miko Mynttinen 2f3ec8cc90 Bug 1484966 - Part 1: Fix most clang-tidy warnings for layout/painting/ r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D3869

--HG--
extra : moz-landing-system : lando
2018-09-04 17:19:36 +00:00
Andi-Bogdan Postelnicu 163724eccf Bug 1453795 - Layout/Painting - Initialize member fields in classes/ structures. r=stange
--HG--
extra : amend_source : 11dc03533fdbc3924f0145481733d46293d528e2
2018-06-15 19:13:05 +03: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
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E) 6c72d34781 Bug 1404222 Part 1: Implement shape-outside: <image>. r=dbaron,dholbert
When creating ImageShapeInfo, it's likely that the image is still decoding.
Part 2 will add mechanism to trigger reflow after the image is ready.
2018-01-25 14:55:18 +08:00
Ryan VanderMeulen e5ec40f40c Backed out 11 changesets (bug 1404222) for static analysis failures on a CLOSED TREE.
Backed out changeset a6a99136300c (bug 1404222)
Backed out changeset 7183b8104399 (bug 1404222)
Backed out changeset a1e4294c1c59 (bug 1404222)
Backed out changeset b79d6e8318db (bug 1404222)
Backed out changeset 0450620fdabd (bug 1404222)
Backed out changeset 026c74a92d04 (bug 1404222)
Backed out changeset 50ac4167f702 (bug 1404222)
Backed out changeset 59038f2db68a (bug 1404222)
Backed out changeset f6b9096da915 (bug 1404222)
Backed out changeset 4e0baffdd79b (bug 1404222)
Backed out changeset 57eeb849ab88 (bug 1404222)
2018-04-02 17:57:27 -04:00
Ting-Yu Lin ext:(%2C%20Brad%20Werth%20%3Cbwerth%40mozilla.com%3E) 8efec59d87 Bug 1404222 Part 1: Implement shape-outside: <image>. r=dbaron,dholbert
When creating ImageShapeInfo, it's likely that the image is still decoding.
Part 2 will add mechanism to trigger reflow after the image is ready.
2018-01-25 14:55:18 +08:00
Xidorn Quan e2d3edd426 Bug 1325940 part 2 - Converted NS_STYLE_BORDER_IMAGE_REPEAT_* to an enum class. r=emilio
MozReview-Commit-ID: Kdzm5D8Dpv

--HG--
extra : rebase_source : 7c6ed8d2e777c7fa07b0486147c48bd98cc477a5
2017-12-21 16:16:40 +11:00
Samathy Barratt d8ba79a56b Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r+tnikkel r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : dbf645574aff7eefe65fa81809d6c07cb5800ec6
2017-12-11 15:37:59 +00:00
Ciure Andrei b8d4330b53 Backed out changeset 8e33d0ce108c (bug 1351447) for failing /builds/worker/workspace/build/src/widget/cocoa/nsCocoaUtils on OS X r=backout a=backout on a CLOSED TREE
--HG--
rename : image/ImgDrawResult.h => image/DrawResult.h
2017-12-12 09:49:59 +02:00
Samathy Barratt 0749baf2d8 Bug 1351447 - Rename imagelib's DrawResult to ImgDrawResult r=tnikkel
Renamed to imgDrawResult

MozReview-Commit-ID: 5ESSgIhhU41

--HG--
rename : image/DrawResult.h => image/ImgDrawResult.h
extra : rebase_source : 4fba109b84ef456126d50e0d5e525f29f944a46d
2017-12-11 15:37:59 +00:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Kartikaya Gupta 2f1948343f Bug 1403915 - Remove the WebRender*Layer classes and functions that refer to them. r=jrmuizel
MozReview-Commit-ID: 2syFwMc7j3r

--HG--
extra : rebase_source : 9a3852506820eb09328d91007581d74786eba9b0
2017-10-03 16:31:08 -04:00
Nicolas Silva 61546da339 Bug 1393031 - Remove unused nsTArray<WebRenderParentCommand>& parameter all over the place. r=jrmuizel 2017-09-20 13:36:53 +02:00
Nicolas Silva 9ffda11244 Bug 1393031 - Use IpcResourceUpdateQueue in more places. r=jrmuizel 2017-09-20 10:56:20 +02:00
Morris Tseng 506acb1953 Bug 1376855 - Support nsDisplayBackgroundImage in layers free mode. r=kats
MozReview-Commit-ID: KaIAVfNB4E5

--HG--
extra : rebase_source : a7797ce7ef8439780c2f61f7edf68f26c654c9ae
2017-06-28 15:07:45 -07:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Kartikaya Gupta 0ec3e2d4dd Bug 1360246 - Propagate the StackingContextHelper to the rest of the displaylist-building code. r=nical
This propagates the StackingContextHelper to the rest of the code that
builds WR display items, because we will need it in future patches to
stop using RelativeToParent.

MozReview-Commit-ID: 3PlQrJRhH36
2017-05-03 08:48:08 -04:00
Ethan Lin 2b6ab30c4d Bug 1359360 - Handle draw result for webrender background image layer. r=mattwoodrow 2017-04-26 15:31:49 +08:00
Morris Tseng 5cb5800c6b Bug 1347469 - Add support for gradient border. r=mattwoodrow
MozReview-Commit-ID: 7RfVsPFWhlo
2017-04-10 17:27:30 +08:00
Ethan Lin 0834f181db Bug 1351242 - Add webrender support for nsDisplayBackgroundImage image type. r=mchang 2017-04-07 14:53:16 +08:00
Ryan Hunt cb1eb2c5ce Bug 1341101 part 5 - Support building WR DisplayItems for BackgroundImageLayers that are gradients r=mattwoodrow
MozReview-Commit-ID: BNLT8Wbp672

--HG--
extra : rebase_source : c02a356e37f906a505992493730255161862960b
2017-03-20 19:31:39 -04:00
Ethan Lin 803515ec05 Bug 1347871 - Do not create webrender commands if the image renderer doesn't have image container. r=mattwoodrow
--HG--
extra : rebase_source : 4b796a83e76b0dc812208a408570a63618ef47a1
2017-03-20 16:27:55 +08:00
cku e17dd9d6ff Bug 1346265 - Part 2. Pass gfxContext to nsImageRenderer::DrawableForElement. r=mstange
It's ok to pass aRenderingContext to DrawableForElement, since DrawableForElement
only use aRenderingContext to create a similiar draw target. Replace
aRenderingContext by ctx make code more consistent since the draw call
bellow(nsLayoutUtils::DrawImage) use ctx.

MozReview-Commit-ID: 6n0nYfcFPui

--HG--
extra : rebase_source : 1374c8b5be9fe5351a5a126e39773c9493cf233d
2017-03-17 12:05:51 +08:00