Commit Graph

3891 Commits

Author SHA1 Message Date
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
Boris Chiou
519e7347ed Bug 1717877 - Handle degenerate ratio and negative size attributes for intrinsic size calculation of SVG outer frames. r=emilio
Based on https://github.com/w3c/csswg-drafts/issues/6286, we fall back to the
viewport rect if
1. width/height is a degenerate ratio, or
2. width or height is a negative number.

Differential Revision: https://phabricator.services.mozilla.com/D118666
2021-06-24 20:27:31 +00:00
Luca Greco
665f72549b Bug 1710917 - Introduced internal:svgContextPropertiesAllowed webextension permission. r=dholbert,mixedpuppy
This patch does change the extension-related special case in SVGContextPaint::IsAllowedForImageFromURI
to check the "internal:svgContextPropertiesAllowed" extension permission, and move the existing
criteria in the Extension class (which takes care of adding the internal permission when those
criteria as met).

This patch does not contain yet a new explicit test case for the new internal permission (which is
part of the patch build on top of this one and attached to the same bugzilla issue), but it does
pass the existing mochitest-chrome (test_chrome_ext_svg_context_fill.html).

Differential Revision: https://phabricator.services.mozilla.com/D115835
2021-06-01 14:46:03 +00:00
Luca Greco
98af19631a Bug 1394579 - Allow SVG context-fill on privileged extensions. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D114957
2021-05-20 20:34:40 +00:00
Matt Woodrow
6543cd468c Bug 1540737 - Allow filter painting to take a callback for painting children. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D114670
2021-05-19 01:11:30 +00:00
Csoregi Natalia
1f3f5df2ce Backed out 8 changesets (bug 1540737) for causing graphics crashes in Bug 1711718. a=backout
Backed out changeset 37628894ffd5 (bug 1540737)
Backed out changeset 4b5f53d5127b (bug 1540737)
Backed out changeset a73e041f1f1d (bug 1540737)
Backed out changeset 81f1a9d1a5e1 (bug 1540737)
Backed out changeset b3d0cc460b24 (bug 1540737)
Backed out changeset f929de495b87 (bug 1540737)
Backed out changeset 2f5b8369d061 (bug 1540737)
Backed out changeset b4c93d182ef4 (bug 1540737)
2021-05-18 19:06:20 +03:00
Matt Woodrow
b6a2dc4721 Bug 1540737 - Allow filter painting to take a callback for painting children. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D114670
2021-05-17 23:53:42 +00:00
Noemi Erli
3b7364b1c1 Backed out changeset c9197b3a4ba0 (bug 1394579) for causing failures in test_ext_svg_context_fill.js CLOSED TREE 2021-05-14 15:35:16 +03:00
Luca Greco
a6c84fa24e Bug 1394579 - Allow SVG context-fill on privileged extensions. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D114957
2021-05-14 11:32:28 +00:00
Andrew Osmond
a140512abd Bug 1704792 - Part 7. Integrate use of ImageIntRegion with WebRender display lists. r=jrmuizel
This patch hooks up the ImageIntRegion to the blob recording and makes
any necessary adjusts to the display list creation to take advantage of
it.

Differential Revision: https://phabricator.services.mozilla.com/D114986
2021-05-13 16:24:08 +00:00
Andrew Osmond
879f78a8df Bug 1704792 - Part 5. Add plumbing to move/store ImageIntRegion. r=jrmuizel
This patch has no functional change beyond changing prototypes and
adding storage for ImageIntRegion for each ImageContainer.

Differential Revision: https://phabricator.services.mozilla.com/D114984
2021-05-13 16:24:07 +00:00
Andrew Osmond
c82b7d67c2 Bug 1704792 - Part 3. Make display list items request blobs for SVG images. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D111838
2021-05-13 16:24:07 +00:00
Emilio Cobos Álvarez
9e80cd9710 Bug 1708384 - Properly hide -moz-context-properties from content. r=dholbert
Depends on D114481

Differential Revision: https://phabricator.services.mozilla.com/D114482
2021-05-12 21:45:18 +00:00
Daniel Holbert
bba1038925 Bug 1706542: Add a short executeSoon delay to test_filter_crossorigin.html, as a possible workaround/diagnostic. r=emilio
This test has a fission-specific failure right now, where the failure looks
like a case where the cross-origin resource simply hasn't loaded, or hasn't
loaded *yet*.

This patch adds a short delay (60 "executeSoon" ticks, each of which spin the
event loop). This doesn't make the test take appreciably longer on my machine,
but it does introduce a short delay. If it helps, it'll let us know that
there's simply a race condition which is causing this test's snapshots to be
taken before its iframes' resources are ready.

Differential Revision: https://phabricator.services.mozilla.com/D114285
2021-05-05 21:23:47 +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
Daniel Holbert
d61bfa64b7 Bug 1703735: Use a different iframe for each tested scenario in test_context_properties_allowed_domains.html. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112479
2021-04-18 00:05:31 +00:00
Daniel Holbert
a91dffbb23 Bug 1703735: Adjust test_context_properties_allowed_domains.html to wait for a paint inside its iframe document before taking a snapshot. r=emilio
I'm hoping this will address the intermittent failures (which seem to suggest
that we were taking the snapshot too early).

Differential Revision: https://phabricator.services.mozilla.com/D112409
2021-04-16 21:13:56 +00:00
Emilio Cobos Álvarez
988bc29033 Bug 1704742 - Fix percent basis of shape radii. r=TYLin
Matches other browsers, and the spec, as per
https://drafts.csswg.org/css-shapes/#basic-shape:

    All the lengths expressed in percentages are resolved from the used
    dimensions of the reference box.

Differential Revision: https://phabricator.services.mozilla.com/D111790
2021-04-14 09:29:37 +00:00
Daniel Holbert
52208dc702 Bug 1703735: Adjust test_context_properties_allowed_domains.html to wait for two rAFs (i.e. at least one paint) before taking screenshot of iframe. r=emilio
Previously this test was waiting for the iframe's load event; now it will wait
for one additional paint (two rAF ticks).

This should hopefully allow the iframe enough time to paint after its load
event has fired, so that we can usefully snapshot it.

Differential Revision: https://phabricator.services.mozilla.com/D111940
2021-04-13 22:45:37 +00:00
Emilio Cobos Álvarez
a9c33bfa5b Bug 1703735 - Use assertSnapshots to get the screenshots when the test fails. r=Gijs
This should allow us to diagnose why is it failing.

Differential Revision: https://phabricator.services.mozilla.com/D111646
2021-04-12 15:48:05 +00:00
Emilio Cobos Álvarez
071bf77adf Bug 1703987 - Measure percentage stroke-widths on text/non-text svg content. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D111353
2021-04-09 13:07:07 +00:00
Mike Conley
9278500d2d Bug 1699892 - Allow the Firefox Accounts avatar server to use SVG context properties. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D111169
2021-04-08 01:48:07 +00:00
Markus Stange
a28f1eda7b Bug 1701121 - Make aFromComputedStyle parameter a const pointer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109829
2021-03-26 02:11:13 +00:00
Simon Giesecke
628cc55f22 Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 17:56:46 +00:00
Csoregi Natalia
f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke
c73f87b72b Bug 708901 - Migrate to nsTHashSet in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D108597
2021-03-24 16:58:58 +00:00
Emilio Cobos Álvarez
5a6212f1ce Bug 1700478 - Make IsTransformed cheaper for non-transformed frames. r=longsonr
Remove a bit of the aStyleDisplay gunk that shouldn't be needed because
of two reasons:

 * Stylo is faster / has the style display one pointer-chase away, as
   opposed to the old style system.

 * We now check the MAY_BE_TRANSFORMED bit first now, and we deal with
   SVG-transformed frames, so for non-transformed frames IsTransformed
   should just be a bit-check now.

Differential Revision: https://phabricator.services.mozilla.com/D109511
2021-03-23 22:01:25 +00:00
Simon Giesecke
ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
longsonr
b7e4cc0df4 Bug 1695490 - Remove svg.text-spacing.enabled pref r=emilio
Backs out bug 1599173 which landed in Firefox 72. The pref has been enabled since bug 1600855 which landed in Firefox 73

Differential Revision: https://phabricator.services.mozilla.com/D106731
2021-02-28 21:52:21 +00:00
Simon Giesecke
cb60a86c2d Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in layout. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106099
2021-02-26 11:36:41 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
longsonr
f3136a33fd Bug 1693032 - SVG text reflow can flow through multiple outer svg elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D105350
2021-02-17 14:51:47 +00:00
Butkovits Atila
5d9332dfde Backed out changeset 4b9a80f187e8 (bug 1693032) for causing failures on 1693032.html 2021-02-17 00:09:08 +02:00
longsonr
9b5e3f031e Bug 1693032 - SVG text reflow can flow through multiple outer svg elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D105350
2021-02-16 21:06:55 +00:00
Simon Giesecke
9ab4b4f5d3 Bug 1693001 - Remove redundant nullptr checks of return value of infallible new in layout/. r=emilio
Depends on D105289

Differential Revision: https://phabricator.services.mozilla.com/D105290
2021-02-16 15:52:09 +00:00
longsonr
17abb2b7e9 Bug 1691659 - don't re-enter ScheduleReflowSVG r=emilio
The testcase in the bug does assert under a debug Firefox here: https://searchfox.org/mozilla-central/source/layout/svg/SVGUtils.cpp#156 presumably fuzz testing has not uncovered this because of the mouse over part. I don't know how to write an automated test for this.

Note that scheduling a reflow will cause a repaint especially as we're setting state bits so we don't need to do a paint notify too.

Differential Revision: https://phabricator.services.mozilla.com/D104564
2021-02-13 07:45:31 +00:00
Miko Mynttinen
cf0c7ae9e3 Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-06 22:30:37 +00:00
Noemi Erli
1ea87269a8 Backed out 4 changesets (bug 1534549) for causing mochitest failures in test_group_wheelevents.html CLOSED TREE
Backed out changeset a03c745620d6 (bug 1534549)
Backed out changeset 2ac9c5dbe9f5 (bug 1534549)
Backed out changeset dabd0c5d21cf (bug 1534549)
Backed out changeset f1b390459263 (bug 1534549)
2021-02-05 02:41:19 +02:00
Miko Mynttinen
63a9dd596a Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-04 22:19:56 +00:00
Emilio Cobos Álvarez
4b58806ec7 Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar
We had different rules with the same declarations for all namespaces, so
simplify that setup by having a single rule.

Remove redundant *|* from selectors while at it (there's no default
namespace in ua.css, so there's no need to do that).

Differential Revision: https://phabricator.services.mozilla.com/D103753
2021-02-03 10:25:21 +00:00
Emilio Cobos Álvarez
217ddbe75f Bug 1690225 - Remove focus-visible feature flag. r=edgar
This shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.

Differential Revision: https://phabricator.services.mozilla.com/D103752
2021-02-02 23:45:25 +00:00
Mihai Alexandru Michis
ac5549ffd4 Backed out 2 changesets (bug 1690225) for causing multiple bc failures.
CLOSED TREE

Backed out changeset 381ee01f5034 (bug 1690225)
Backed out changeset cde1d10aae1c (bug 1690225)
2021-02-03 01:42:37 +02:00
Emilio Cobos Álvarez
63fd5123dd Bug 1690225 - Unify focus-visible rules in ua.css. r=edgar
We had different rules with the same declarations for all namespaces, so
simplify that setup by having a single rule.

Remove redundant *|* from selectors while at it (there's no default
namespace in ua.css, so there's no need to do that).

Depends on D103752

Differential Revision: https://phabricator.services.mozilla.com/D103753
2021-02-02 22:32:14 +00:00
Emilio Cobos Álvarez
df079e8f9d Bug 1690225 - Remove focus-visible feature flag. r=edgar
This shipped in 85, we can remove the feature flag now. Keep
:-moz-focusring as an alias to :focus-visible at parse time.

Differential Revision: https://phabricator.services.mozilla.com/D103752
2021-02-02 22:28:40 +00:00
longsonr
c04dd7eafa Bug 1689799 - Ensure we move to the next path when displaying multiple adjacent textPaths r=emilio
reverts part of bug 1678756

Differential Revision: https://phabricator.services.mozilla.com/D103558
2021-01-30 21:35:17 +00:00