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

16872 Коммитов

Автор SHA1 Сообщение Дата
Sonia Singla 28ced48ac1 Bug 1659266 - Remove layout.css.prefixes.columns. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120057
2021-07-19 09:20:14 +00:00
Butkovits Atila df5b6f3929 Backed out 13 changesets (bug 1709640, bug 1718341) for causing android build bustages. CLOSED TREE
Backed out changeset 20645ae32b84 (bug 1709640)
Backed out changeset 7c45682a8f98 (bug 1709640)
Backed out changeset 667e768fd75e (bug 1709640)
Backed out changeset f072adb45b85 (bug 1718341)
Backed out changeset cf443dddb5f5 (bug 1718341)
Backed out changeset 09d3d3e4ce7d (bug 1718341)
Backed out changeset 2b47cc469477 (bug 1718341)
Backed out changeset 8ec277361e46 (bug 1718341)
Backed out changeset b6c4c82d3efc (bug 1718341)
Backed out changeset 8afb8fcd0dc3 (bug 1718341)
Backed out changeset 7723d3a9ba7f (bug 1718341)
Backed out changeset f33b120a77d0 (bug 1718341)
Backed out changeset e7bf6deac270 (bug 1718341)
2021-07-17 01:02:51 +03:00
Agi Sferro fa3a9445b3 Bug 1718341 - Generate Android AVD in TL job instead of using tooltool r=aklotz,nalexander
Tooltool images are hard to update because we don't provide a script to
generate the image and documentation is often inaccurate.

This patch makes it so we generate the AVD in the android-sdk TL job instead.

Differential Revision: https://phabricator.services.mozilla.com/D119221
2021-07-16 17:49:54 +00:00
Iulian Moraru a6eeed2022 Backed out changeset ff3b52062c5a (bug 1659266) for causing build bustages on WebIDLPrefs. CLOSED TREE 2021-07-16 16:02:09 +03:00
Sonia Singla 0200117fc5 Bug 1659266 - Remove layout.css.prefixes.columns. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120057
2021-07-16 12:17:49 +00:00
Sandor Molnar c40ce62c3c Backed out 10 changesets (bug 1718341) for causing wrench bustages. CLOSED TREE
Backed out changeset e5bd150a58b2 (bug 1718341)
Backed out changeset e82e752b8f44 (bug 1718341)
Backed out changeset d9462c727c8f (bug 1718341)
Backed out changeset 2bd647754780 (bug 1718341)
Backed out changeset 31dfce45985f (bug 1718341)
Backed out changeset 03266cea345d (bug 1718341)
Backed out changeset 3920b27acecb (bug 1718341)
Backed out changeset 2b17603c5e65 (bug 1718341)
Backed out changeset ebc0d5d4f537 (bug 1718341)
Backed out changeset 1c8844157b8d (bug 1718341)
2021-07-16 03:40:56 +03:00
Agi Sferro 164fc2191d Bug 1718341 - Generate Android AVD in TL job instead of using tooltool r=aklotz,nalexander
Tooltool images are hard to update because we don't provide a script to
generate the image and documentation is often inaccurate.

This patch makes it so we generate the AVD in the android-sdk TL job instead.

Differential Revision: https://phabricator.services.mozilla.com/D119221
2021-07-15 23:22:15 +00:00
Florian Quèze c4c51c4002 Bug 1720358 - Make AutoProfilerLabel available even when MOZ_GECKO_PROFILER is not defined, and remove ifdefs, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119795
2021-07-15 22:04:22 +00:00
Butkovits Atila 433d514141 Backed out 4 changesets (bug 1718755) for causing Reftest failures. CLOSED TREE
Backed out changeset f2cc4fb3caa8 (bug 1718755)
Backed out changeset babc4fdcd08c (bug 1718755)
Backed out changeset 4566477a7075 (bug 1718755)
Backed out changeset 3cc5fcf9aeb6 (bug 1718755)
2021-07-14 18:36:32 +03:00
Emilio Cobos Álvarez 0d448eff03 Bug 1718755 - Fix the SpecialPowers pref code to deal with ui / font prefs correctly after the previous change. r=kmag
This allows us to remove the timeout (which was there for these prefs)
and makes the code a bit more explicit.

Unconditionally making all tests wait for rAF causes some timing changes
which cause some tests to time out / fail, see:

  https://treeherder.mozilla.org/jobs?repo=try&revision=3aef4c168c6ab7d762dd360f49d4f56dff686c03

So this only does it when changing the prefs that care about it. Fix
some tests that were relying on the timeout to get this green.

Differential Revision: https://phabricator.services.mozilla.com/D119040
2021-07-14 11:29:25 +00:00
Adam Bruce dbfecb35ea Bug 1713527 - Removed else after return in nsCSSProps::GetStringValue. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119764
2021-07-14 09:11:31 +00:00
Dorel Luca d1e1f219ba Backed out changeset 0e17878eeb86 (bug 1711437) for causing Bug 1719963. a=backout DONTBUILD 2021-07-14 00:36:05 +03:00
Emilio Cobos Álvarez 241951bce9 Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-07-12 16:02:58 +00:00
Alexandru Michis 6550c23862 Backed out changeset 998af7ced46f (bug 1711437) for causing Bug 1719963. a=backout 2021-07-10 12:44:08 +03:00
Emilio Cobos Álvarez 3de336bbc1 Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-07-09 16:25:54 +00:00
Emilio Cobos Álvarez ca8a794bb9 Bug 1719824 - Inline GeckoNode::prev_sibling. r=smaug
It's very hot when matching some kind of selectors like the ones in bug
1717267, and the two function calls show up in the profiles.

Differential Revision: https://phabricator.services.mozilla.com/D119505
2021-07-09 15:22:59 +00:00
Sandor Molnar 320d01b1d8 Backed out 2 changesets (bug 1718755) for causing build bustages. CLOSED TREE DONTBUILD
Backed out changeset eae7bcfd58c9 (bug 1718755)
Backed out changeset 6ad9e60bc38e (bug 1718755)
2021-07-08 12:55:09 +03:00
Emilio Cobos Álvarez 2cdef2f45e Bug 1718755 - Fix the SpecialPowers pref code to deal with ui / font prefs correctly after the previous change. r=kmag
This allows us to remove the timeout (which was there for these prefs)
and makes the code a bit more explicit.

Unconditionally making all tests wait for rAF causes some timing changes
which cause some tests to time out / fail, see:

  https://treeherder.mozilla.org/jobs?repo=try&revision=3aef4c168c6ab7d762dd360f49d4f56dff686c03

So this only does it when changing the prefs that care about it. Fix
some tests that were relying on the timeout to get this green.

Differential Revision: https://phabricator.services.mozilla.com/D119040
2021-07-08 09:23:36 +00:00
Hiroyuki Ikezoe b2ae79bc94 Bug 1716410 - Enable test_bug1451199-1.html and test_bug1451199-2.html on fis-xorig. r=emilio
The failure cause was fixed in bug 1717983.

Differential Revision: https://phabricator.services.mozilla.com/D119130
2021-07-07 22:47:37 +00:00
Narcis Beleuzu 1b3ee0f17f Backed out changeset 66a484400799 (bug 1718934) for mochitest failures on test_value_computation.html . CLOSED TREE 2021-07-08 00:37:51 +03:00
Emilio Cobos Álvarez b63ea5363d Bug 1718934 - Parse -webkit-focus-ring-color (computing to black). r=mstange,geckoview-reviewers,aklotz
Some pages use this to hide the focus outline. On Blink it seems black,
WebKit uses it to expose the OS accent color. Make it black, which is
the default when the color isn't implemented on a given platform.

Differential Revision: https://phabricator.services.mozilla.com/D119036
2021-07-07 19:24:29 +00:00
Paul Zuehlcke 6eb0d4fb20 Bug 1714608 - Cleaned up partitionKey base domain helpers. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D118724
2021-07-07 16:05:06 +00:00
Emilio Cobos Álvarez e54b955075 Bug 1718337 - More fine-grained viewport units invalidation. r=layout-reviewers,jfkthame
This should speed up window resize significantly.

Differential Revision: https://phabricator.services.mozilla.com/D118878
2021-07-07 11:16:20 +00:00
Hiroyuki Ikezoe dbebe9220b Bug 1716410 - Regenerate the target element for OMTA tests. r=boris
nsIDOMWindowUtils.getOMTAStyle is for querying an in-progress animating value
running on the compositor thread. The key to query the value is stored in the
target nsIFrame of the animating element, and the key is basically based on
the display item (type) in question, DisplayItemType::TYPE_TRANSFORM in cases of
transform animations, etc. So if getOMTAStyle gets called for an element
where
 a) an animation is running on the compositor
 b) a new animation is just created

then, it's possible that getOMTAStyle queries a)'s animation value instead of
b)'s.

Differential Revision: https://phabricator.services.mozilla.com/D119127
2021-07-07 07:11:34 +00:00
Jonathan Kew 81b88e2c93 Bug 1719239 - Disable support for content:none on elements due to webcompat issues. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D119188
2021-07-06 15:39:06 +00:00
Niklas Goegge a83ee58b03 Bug 1714645: Use nsSimpleURI instead of NullPrincipalURI. r=ckerschb,nika
Differential Revision: https://phabricator.services.mozilla.com/D118489
2021-07-06 08:23:11 +00:00
Matt Woodrow 9abbb5ba9f Bug 1717161 - Clamp perspective() values to a minimum of 1px. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D118250
2021-07-05 05:19:15 +00:00
Jonathan Kew b9ae2c638e Bug 1717029 - Clean up status checks in FontFaceSet::CheckLoadingFinished(). r=layout-reviewers,emilio
No functional change, this just makes it more explicit that each possible status
value is being considered, and unifies the handling of the two arrays.

Differential Revision: https://phabricator.services.mozilla.com/D118200
2021-06-26 14:40:53 +00:00
Michelle Goossens fc09f27525 Bug 1714462 - Part 2: Remove CSS rules using "not (-moz-proton)" in miscellaneous files r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D118594
2021-06-24 15:42:03 +00:00
Emilio Cobos Álvarez 6030c95608 Bug 1585397 - Disable test_import_preload on Android. r=apavel DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118454
2021-06-24 05:27:38 +00:00
Boris Chiou 4b9b20cfc8 Bug 1716675 - Set 'display:none' with important rule for audio element without controls. r=emilio,botond
If the audio element doesn't have controls attribute, it is not exposing a
user interface, so the user agent is expected to force its display property
to compute to none, irrespective fo CSS rules.

This patch makes sure Gecko's behavior matches other browsers.

spec: https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules

Differential Revision: https://phabricator.services.mozilla.com/D118093
2021-06-23 20:02:20 +00:00
Mats Palmgren e0fbda09f4 Bug 1699964 - [css-content] Implement 'content: none' for elements. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114130
2021-06-23 02:52:42 +00:00
Mats Palmgren c019c6f680 Bug 1605473 - Implement 'content: none' for ::marker. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D111707
2021-06-23 02:52:42 +00:00
Marian-Vasile Laza 75ddec20d3 Backed out 2 changesets (bug 1716675) for causing mochitest failures on test_group_touchevents-2.html. CLOSED TREE
Backed out changeset 9c31f03fa2ba (bug 1716675)
Backed out changeset 041fb25cf007 (bug 1716675)
2021-06-22 10:08:24 +03:00
Butkovits Atila 8a0cd56061 Backed out changeset b7e1a728dfd2 (bug 1717161) for causing failures at perspective-zero-2.html. CLOSED TREE 2021-06-22 05:07:47 +03:00
Matt Woodrow 711df33fa5 Bug 1717161 - Clamp perspective() values to a minimum of 1px. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D118250
2021-06-22 00:49:54 +00:00
Boris Chiou 4ed41cabbb Bug 1716675 - Set 'display:none' with important rule for audio element without controls. r=emilio
If the audio element doesn't have controls attribute, it is not exposing a
user interface, so the user agent is expected to force its display property
to compute to none, irrespective fo CSS rules.

This patch makes sure Gecko's behavior matches other browsers.

spec: https://html.spec.whatwg.org/multipage/rendering.html#embedded-content-rendering-rules

Differential Revision: https://phabricator.services.mozilla.com/D118093
2021-06-21 22:36:15 +00:00
Emilio Cobos Álvarez fb069248c0 Bug 1716045 - Unify font-family storage. r=mats,jfkthame
This changes font-family storage to reuse the rust types, removing a
bunch of code while at it. This allows us to, for example, use a single
static font family for -moz-bullet and clone it, rather than creating a
lot of expensive copies.

Differential Revision: https://phabricator.services.mozilla.com/D118011
2021-06-18 19:35:50 +00:00
Emilio Cobos Álvarez 94ce0999ad Bug 1716045 - Optimize ArcSlice equality operator for pointer equality. r=jfkthame
Just drive-by, but seems reasonable to avoid the per-element comparison
if the pointers are the same.

Depends on D118015

Differential Revision: https://phabricator.services.mozilla.com/D118016
2021-06-18 19:35:49 +00:00
Emilio Cobos Álvarez 96038c61cc Bug 1716045 - Implement ArcSlice copy/move-assignment operators. r=jfkthame
We're going to use them.

Differential Revision: https://phabricator.services.mozilla.com/D118015
2021-06-18 19:35:49 +00:00
Andrew Halberstadt 7a16af4434 Bug 1700781 - Skip failing mochitest-plain tests with fission + xorigin, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D117704
2021-06-15 18:24:18 +00:00
Emilio Cobos Álvarez 14d63a75c3 Bug 1715984 - Remove -moz-outline-radius. r=TYLin
It does nothing since 88 and we unshipped it in 89.

Differential Revision: https://phabricator.services.mozilla.com/D117532
2021-06-15 04:16:46 +00:00
Emilio Cobos Álvarez d28e1b36bf Bug 1715748 - Expose text selection foreground / background colors to chrome code. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D117417
2021-06-14 15:01:26 +00:00
Emilio Cobos Álvarez a8f090b432 Bug 1715748 - Add an internal -moz-system-color() function to expose both light and dark system colors. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D117416
2021-06-14 15:01:25 +00:00
Jonathan Kew 00a8f91ec3 Bug 1711479 - Implement CSS support for the optional adjustment-basis metric keywords for the font-size-adjust property (enabled on Nightly only for now). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D115596
2021-06-14 12:32:36 +00:00
Mats Palmgren ee53823e0f Bug 1542807 part 6 - Update test expectations and fix tests that unintentionally depend on bullet ::marker font metrics. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D111696
2021-06-14 01:22:07 +00:00
Mats Palmgren 58a3ef1c19 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts.  The document certainly has no authority
to block those from loading.  (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Differential Revision: https://phabricator.services.mozilla.com/D111695
2021-06-14 01:22:06 +00:00
Mats Palmgren 14bc280a27 Bug 1542807 part 4 - Exclude fonts loaded from User and UserAgent origin sheets from 'document.fonts'. r=jfkthame
Per https://github.com/w3c/csswg-drafts/issues/6126 these were
never intended to be included in the first place so this is just
fixing a bug.  Note that I'm leaving them in the mRuleFaces array
so that the font loading machinery works the same as before.
I'm just excluding them when queried by document.fonts.

Differential Revision: https://phabricator.services.mozilla.com/D111694
2021-06-14 01:22:06 +00:00
Mats Palmgren e4d7dd995a Bug 1542807 part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image. r=emilio
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those.  Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).

When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.

We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons.  Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome.  We used to
ignore these for list-style-type:<string> too.)

Differential Revision: https://phabricator.services.mozilla.com/D111693
2021-06-14 01:22:06 +00:00
Mats Palmgren a901b05850 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-14 01:22:04 +00:00
Ting-Yu Lin 817d1855e5 Bug 1716046 - Add "left" and "right" as invalid values to align-* and place-* properties in property_database.js. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117556
2021-06-11 23:05:02 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Michelle Goossens e4e6b27045 Bug 1714349 - Remove browser.proton.modals.enabled pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D116903
2021-06-11 18:14:26 +00:00
Mats Palmgren 0b9e531f56 Bug 1542807 part 6 - Update test expectations and fix tests that unintentionally depend on bullet ::marker font metrics. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D111696
2021-06-11 18:10:40 +00:00
Mats Palmgren 2047e29464 Bug 1542807 part 5 - Don't apply CSP rules for the document to fonts loaded from User and UserAgent origin sheets. r=ckerschb
As for document.fonts, I don't think we intentionally meant to apply
CSP to User/UserAgent fonts.  The document certainly has no authority
to block those from loading.  (We already have a separate principal
for these which is further evidence that this was unintentional
and we can use the same bit (mUseOriginPrincipal) to avoid CSP.)

Differential Revision: https://phabricator.services.mozilla.com/D111695
2021-06-11 18:10:39 +00:00
Mats Palmgren 204b70d75a Bug 1542807 part 4 - Exclude fonts loaded from User and UserAgent origin sheets from 'document.fonts'. r=jfkthame
Per https://github.com/w3c/csswg-drafts/issues/6126 these were
never intended to be included in the first place so this is just
fixing a bug.  Note that I'm leaving them in the mRuleFaces array
so that the font loading machinery works the same as before.
I'm just excluding them when queried by document.fonts.

Differential Revision: https://phabricator.services.mozilla.com/D111694
2021-06-11 18:10:39 +00:00
Mats Palmgren 0372796619 Bug 1542807 part 3 - Add some style quirks for legacy ::markers created from list-style-type/list-style-image. r=emilio
Specifically:
For "bullets", i.e. 'list-style-type:disc|circle|square|
disclosure-closed|disclosure-open', we use a built-in font
(-moz-bullet-font, which has glyphs for those symbols + space) to
retain mostly backwards compatible rendering for those.  Authors may
override that with an explicit 'font-family' ::marker style though.
We also use this font for 'list-style-image' in case it would
fallback to one of the above when the image fails to load (so that
we get the same width space).

When the -moz-bullet-font is used we also set 'font-synthesis' to
avoid synthesizing italic/bold for this font. Authors may override
this with an explicit ::marker declaration.

We also set 'letter-spacing' and 'word-spacing' to the initial value
for bullets for web-compat reasons.  Again, authors may override
this with an explicit ::marker declaration. (This breaks backwards-
compat slightly but makes us compatible with Chrome.  We used to
ignore these for list-style-type:<string> too.)

Differential Revision: https://phabricator.services.mozilla.com/D111693
2021-06-11 18:10:39 +00:00
Mats Palmgren 906fd4d388 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-11 18:10:38 +00:00
Jonathan Kew a74bd20f2b Bug 737785 - Un-prefix -moz-tab-size (keeping the prefixed version as an alias for now). r=layout-reviewers,dholbert
This results in lots of new WPT test passes.

There were also a couple of WPT tests that turned out to be broken;
tab-size-inline-001 and -002 had errors in their reference files such
that they'd never pass anywhere. So those are fixed here.

Depends on D117331

Differential Revision: https://phabricator.services.mozilla.com/D117332
2021-06-10 09:19:24 +00:00
Boris Chiou 5918c183ff Bug 1340422 - Part 7: Notify style system when SMIL animation changes d attribute. r=emilio
So we update d property in the style system as well. This makes sure we
have the correct computed style and the correct rendering result.

Differential Revision: https://phabricator.services.mozilla.com/D115570
2021-06-09 21:17:23 +00:00
Boris Chiou d61e621388 Bug 1340422 - Part 1: Add SVG d property in CSS. r=emilio
Add d property for style system. d property only supports path() for now
and it has the functional notation without fill rule.

https://github.com/w3c/svgwg/issues/320#issuecomment-414462645

Differential Revision: https://phabricator.services.mozilla.com/D81237
2021-06-09 21:17:21 +00:00
Nazım Can Altınova 872a50072b Bug 1690624 - Replace the old profiler thread registration FFIs with the new API in servo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D116517
2021-06-09 11:22:56 +00:00
Dorel Luca 816a6098d2 Backed out 3 changesets (bug 1714349) for Browser-chrome failures in browser/components/places/tests/browser/browser_addBookmarkForFrame.js. CLOSED TREE
Backed out changeset 598f8e7d73ef (bug 1714349)
Backed out changeset cc7365aacdbb (bug 1714349)
Backed out changeset f0f942a93495 (bug 1714349)
2021-06-09 04:48:41 +03:00
Michelle Goossens 6e11a4ab14 Bug 1714349 - Fix test failures on test_chrome_only_media_queries.html
Differential Revision: https://phabricator.services.mozilla.com/D117249
2021-06-09 00:02:38 +00:00
Xidorn Quan 9c0abd4b0f Bug 1714445 - Take negative sign into account when calculating padding. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D116935
2021-06-08 06:55:55 +00:00
Boris Chiou b65c4b45ec Bug 1312588 - Part 2: Support fit-content() in style. r=emilio
Support fit-content for preferred size, min size, and max size. This
patch only implement the style system. For layout part, we will do that
in the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D107161
2021-06-08 05:05:50 +00:00
Michelle Goossens 1895a736f3 Bug 1714352 - Remove browser.proton.doorhangers.enabled pref r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D117091
2021-06-08 00:41:43 +00:00
Emilio Cobos Álvarez 488d88625c Bug 1713787 - Fix whitespace handling inside CSS variables. r=xidorn
As per w3c/csswg-drafts#881 and w3c/csswg-drafts#774.

Differential Revision: https://phabricator.services.mozilla.com/D116459
2021-06-07 10:16:39 +00:00
Csoregi Natalia 1fa90cf8b2 Backed out 5 changesets (bug 1711479) for multiple failures e.g. test_css-properties-db.js. CLOSED TREE
Backed out changeset f1b19a0463cd (bug 1711479)
Backed out changeset 3d1d2b4a2713 (bug 1711479)
Backed out changeset 4e689776fe5d (bug 1711479)
Backed out changeset 85b6b2648f60 (bug 1711479)
Backed out changeset a15cec1f0554 (bug 1711479)
2021-06-07 13:55:29 +03:00
Jonathan Kew 57c18282b4 Bug 1711479 - Implement CSS support for the optional adjustment-basis metric keywords for the font-size-adjust property (enabled on Nightly only for now). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D115596
2021-06-07 08:58:12 +00:00
Narcis Beleuzu 11da6949ee Backed out 2 changesets (bug 1713787) for wpt failures on declarations-trim-whitespace.html . CLOSED TREE
Backed out changeset 1ddacb243ae6 (bug 1713787)
Backed out changeset 2dc1eff1effd (bug 1713787)
2021-06-06 17:16:55 +03:00
Emilio Cobos Álvarez 3b7b6c1d1a Bug 1713787 - Fix test_variable_serialization_computed.html
MANUAL PUSH: Orange fix CLOSED TREE
2021-06-06 15:24:09 +02:00
Emilio Cobos Álvarez e3a7c5102a Bug 1713787 - Fix whitespace handling inside CSS variables. r=xidorn
As per w3c/csswg-drafts#881 and w3c/csswg-drafts#774.

Differential Revision: https://phabricator.services.mozilla.com/D116459
2021-06-06 12:10:28 +00:00
Emilio Cobos Álvarez 53804f0e05 Bug 1714631 - Move an NS_ASSERTION to the right place so it doesn't fire incorrectly.
MANUAL PUSH: Orange fix on a CLOSED TREE.
2021-06-06 12:32:27 +02:00
Emilio Cobos Álvarez a2c035d932 Bug 1714631 - Fix test_placeholder_restrictions.html
MANUAL PUSH: Orange fix on a CLOSED TREE
2021-06-06 11:55:44 +02:00
Emilio Cobos Álvarez 3530449855 Bug 1714631 - Make input placeholder line-height declaration important, to match other engines. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D116907
2021-06-06 08:49:29 +00:00
Emilio Cobos Álvarez 36c0f0db2b Bug 1467309 - Fix test_css_supports_variables.html.
MANUAL PUSH: Orange fix CLOSED TREE
2021-06-04 13:33:43 +02:00
Emilio Cobos Álvarez a92eb7c353 Bug 1714357 - Use a nicer media query for proton context menus. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D116736
2021-06-03 17:51:48 +00:00
Paul Zuehlcke 8e5f5e55fc Bug 1705032 - Added CSSCacheCleaner deleteByBaseDomain. r=emilio,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D114518
2021-05-27 12:37:03 +00:00
Emilio Cobos Álvarez a701adee41 Bug 1677555 - Always release imgRequestProxy async. r=tnikkel
In this particular case the issue wouldn't end up in any sort of memory
corruption if we didn't safely crash, but these are quite tricky to
reason about, so it's better to avoid the reentrancy altogether if
possible.

I tried to convert the fuzzer test-case in a crashtest but failed (as
in, it didn't crash without the patch under the test harness).

Differential Revision: https://phabricator.services.mozilla.com/D115943
2021-05-26 11:08:10 +00:00
Noemi Erli 9469a9b825 Backed out changeset 4c53c4da7ece (bug 1677555) for causing multiple failures in imgRequestProxy.cpp CLOSED TREE 2021-05-26 04:34:26 +03:00
Emilio Cobos Álvarez 5b5089618f Bug 1677555 - Always release imgRequestProxy async. r=tnikkel
In this particular case the issue wouldn't end up in any sort of memory
corruption if we didn't safely crash, but these are quite tricky to
reason about, so it's better to avoid the reentrancy altogether if
possible.

I tried to convert the fuzzer test-case in a crashtest but failed (as
in, it didn't crash without the patch under the test harness).

Differential Revision: https://phabricator.services.mozilla.com/D115943
2021-05-26 00:05:45 +00:00
Butkovits Atila 95df13ddf8 Backed out changeset f7944c3f9e5b (bug 1711437) for causing mochitest failures. CLOSED TREE 2021-05-25 18:56:00 +03:00
Emilio Cobos Álvarez 4da4bb9699 Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-05-25 13:23:35 +00:00
Kris Wright 5e37146c9f Bug 1692068 - Disable broken crashtests on tsan. r=necko-reviewers,decoder,dragana
These tests either cause frequent or permanent failures on TSan.

Differential Revision: https://phabricator.services.mozilla.com/D110371
2021-05-25 01:15:49 +00:00
Dorel Luca 08f063f4c8 Backed out changeset 2c95330ad7c7 (bug 1711437) for Devtools failures in devtools/client/inspector/markup/test/browser_markup_shadowdom.js. CLOSED TREE 2021-05-24 23:01:46 +03:00
Emilio Cobos Álvarez 510cae01ca Bug 1711437 - Don't EnsureUniqueInner from the cssRules getter. r=layout-reviewers,jfkthame
Instead, fix up the various content data structures when the stylesheet
is mutated. This makes reading a stylesheet not disable style sharing.

Differential Revision: https://phabricator.services.mozilla.com/D115203
2021-05-24 17:18:44 +00:00
Andi-Bogdan Postelnicu 1cf28e7475 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D115804
2021-05-24 15:08:47 +00:00
Emilio Cobos Álvarez f06a044edd Bug 1710969 - Use an enum class for nsDOMCSSDeclaration::Operation. r=TYLin
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D115038
2021-05-13 01:26:35 +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
Emilio Cobos Álvarez 41179cf5d6 Bug 1708384 - Properly hide -moz-control-character-visibility from content. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D114481
2021-05-12 21:45:18 +00:00
Emilio Cobos Álvarez e2075d6bdd Bug 1710643 - Remove support for unused gtk infobar widget and colors. r=stransky
Presumably they were for notifications and now we use native notifications?

Differential Revision: https://phabricator.services.mozilla.com/D114874
2021-05-12 19:13:21 +00:00
Emilio Cobos Álvarez 6fc419fb56 Bug 1707170 - Fix unused variable in opt builds.
MANUAL PUSH: Trivial fixup CLOSED TREE
2021-05-10 15:45:43 +02:00
Emilio Cobos Álvarez c8aa59aaae Bug 1707170 - Will-change should only create stacking contexts / containing blocks / etc if the property it'd change would apply. r=miko
As per https://drafts.csswg.org/css-will-change/#will-change.

> If any non-initial value of a property would cause the element to
> generate a containing block for absolutely positioned elements,
> specifying that property in will-change must cause the element to
> generate a containing block for absolutely positioned elements.

But in this case the transform property wouldn't apply to the element so
there's no reason to create a stacking-context.

Differential Revision: https://phabricator.services.mozilla.com/D114121
2021-05-10 13:09:42 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Emilio Cobos Álvarez 68a7c365ec Bug 1680387 - Fix interaction with src-set() / image-set(), and enable the feature by default. r=tnikkel
As discussed here: https://github.com/whatwg/html/pull/5574#issuecomment-826347560

This matches other browsers.

Depends on D113265

Differential Revision: https://phabricator.services.mozilla.com/D113267
2021-05-05 09:41:24 +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 27cc12171b Bug 1680387 - Fix interaction with src-set() / image-set(), and enable the feature by default. r=tnikkel
As discussed here: https://github.com/whatwg/html/pull/5574#issuecomment-826347560

This matches other browsers.

Depends on D113265

Differential Revision: https://phabricator.services.mozilla.com/D113267
2021-05-04 10:24:08 +00: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 530681a3d5 Bug 1708291 - Enable accent color in some tests. r=aryx
Tests switched to run with activated, Nightly-only preference.

Differential Revision: https://phabricator.services.mozilla.com/D114071
2021-05-03 13:47:16 +00:00
Xidorn Quan 083983b7f0 Bug 1708897 - Remove layout.css.ruby.position-alternate.enabled pref. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D114044
2021-05-02 03:27:50 +00:00
Csoregi Natalia a76b78d543 Backed out changeset e01ec8694924 (bug 1700957) as requested. CLOSED TREE 2021-04-28 18:09:01 +03:00
imoraru 29587fe8d1 Backed out changeset d3056dc50fe3 (bug 1707614) for causing devtools failures at browser_rules_colorpicker-release-outside-frame.js . CLOSED TREE 2021-04-28 16:08:31 +03:00
Emilio Cobos Álvarez 175fe1b124 Bug 1707614 - Don't use -moz-devtools-highlighted for background contrast checks in the accessibility inspector. r=nchevobbe
It's the wrong pseudo-class name! Plus, it's not really needed, just
override the page styles temporarily.

Remove the pseudo-class, since it's its only remaining usage.

Differential Revision: https://phabricator.services.mozilla.com/D113374
2021-04-28 10:01:23 +00:00
Emma Malysz ce84c86379 Bug 1700957, graduate browser.proton.doorhangers.enabled pref to main proton pref r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D110135
2021-04-28 03:17:56 +00:00
Emilio Cobos Álvarez 9402e09c63 Bug 1707895 - Make the -moz-toolbar-prefers-color-scheme a tri-state. r=mstriemer
This will allow detecting the system theme, which allows fixing some of
the blocked bugs.

Note that when using the system theme we will still match light or dark
appropriately, so this shouldn't change behavior just yet.

Differential Revision: https://phabricator.services.mozilla.com/D113516
2021-04-27 16:20:35 +00:00
Emilio Cobos Álvarez 34a9a0f457 Bug 1705605 - Implement accent-color in nsNativeBasicTheme. r=mstange
This is a new addition for CSS UI Level 4:

  https://drafts.csswg.org/css-ui-4/#widget-accent

I want to provide feedback on some spec issues, and thought it was a
kinda neat thing to prototype (it also makes testing contrast and such
with random GTK themes easier).

For now enable for Nightly only.

Differential Revision: https://phabricator.services.mozilla.com/D112312
2021-04-27 10:41:00 +00:00
Emilio Cobos Álvarez 38251f50b8 Bug 1707070 - Tweak text/number/search control anonymous tree DOM / paint order. r=dholbert
So that we hit-test the spinners even if they overlap with the editor
root's padding.

Differential Revision: https://phabricator.services.mozilla.com/D113251
2021-04-26 16:55:32 +00:00
Joel Maher 78eb68ea37 Bug 1703894 - s/requestIdleCallback/setTimeout/ for frequent OSX timeouts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112984
2021-04-21 19:50:34 +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
Mark Striemer 209f987106 Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-18 22:22:49 +00:00
Tom Schuster 0b5bbb2cf5 Bug 1695404 - follow-up: More tiny cleanup. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112491
2021-04-18 19:30:26 +00:00
Emilio Cobos Álvarez dffb321319 Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
There's no reason to require a null-terminated string in imgLoader.

Differential Revision: https://phabricator.services.mozilla.com/D112478
2021-04-17 22:21:19 +00:00
Pierre TALLOTTE 6a6e08264c Bug 1695404 - Support the type() function in image-set. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D109201
2021-04-16 20:58:59 +00:00
Noemi Erli f90389736b Backed out changeset 1c9943dacbdb (bug 1701691) for causing failures in browser_toolbar_prefers_color_scheme.js CLOSED TREE 2021-04-16 05:29:10 +03:00
Emilio Cobos Álvarez b42ccb7de0 Bug 1705509 - Hide -moz-outline-radius behind a pref. r=mstange
This property does nothing since bug 315209 got implemented.

Every single user that I checked was doing the same math by hand, so
hooray for good defaults :-)

Differential Revision: https://phabricator.services.mozilla.com/D112253
2021-04-16 01:01:45 +00:00
Mark Striemer 53099a968e Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-16 00:43:46 +00:00
Csoregi Natalia 5cfbff72cd Backed out changeset 79c1392f7c43 (bug 1701691) for failures on browser_toolbar_prefers_color_scheme.js. CLOSED TREE 2021-04-15 22:18:09 +03:00
Mark Striemer 67dde35bda Bug 1701691 - -moz-toolbar-prefers-color-scheme for dark theme detection r=desktop-theme-reviewers,emilio,harry
This adds a new @media query -moz-toolbar-prefers-color-scheme which works like
prefers-color-scheme but is set based on the browser theme rather than the OS
theme. The background colour of the toolbar is used to determine the theme
dark/light preference. This will be used for in-content common.css pages and
other UI elements that include that stylesheet in the browser-chrome through
shadow DOM.

The end result is that about: pages, infobars, and modals will now "match" the
browser theme (just light/dark mode, not LWT theming support).

Differential Revision: https://phabricator.services.mozilla.com/D111486
2021-04-15 18:17:07 +00:00
Emilio Cobos Álvarez 2bf7e6cfc9 Bug 1704179 - Add a CSS error to the console when using non-featureless :host selectors. r=boris
(which would never match by definition).

Differential Revision: https://phabricator.services.mozilla.com/D111610
2021-04-15 09:33:58 +00:00
Morgan Reschenberg 26ebc62e3a Bug 1705168: Enable forced-colors in UA and chrome always r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D112069
2021-04-14 21:33:11 +00:00
Emilio Cobos Álvarez 2d921c7e9c Bug 1704551 - Make nsMappedAttributes more similar to AttrArray. r=smaug
I need to use these from Rust to insert mapped attribute names in the
bloom filter, and this would save me handrolling even more bindings :)

Differential Revision: https://phabricator.services.mozilla.com/D111731
2021-04-13 10:53:40 +00:00
Mats Palmgren 2b3dbc5dc2 Bug 1696712 - [css-pseudo] Use 'white-space: pre' by default in ::marker. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D107359
2021-04-11 20:42:30 +00:00
Emilio Cobos Álvarez a4272ff381 Bug 1704332 - Move moz-control-character-visibility out of mako, and remove support for gecko_pref_controlled_initial_value. r=xidorn
No behavior change, just cleanup. Actually seem this technically _adds_ some code even
though it's a cleanup, but that's mostly because of the wrapping of the
derive list.  The resulting code is simpler (more in-line with our usual
things, so I think it's an improvement).

Differential Revision: https://phabricator.services.mozilla.com/D111551
2021-04-11 17:39:12 +00:00
Emilio Cobos Álvarez 97ec9ca623 Bug 1704332 - Remove various image-orientation related prefs. r=tnikkel
These shipped in 77.

Differential Revision: https://phabricator.services.mozilla.com/D111550
2021-04-11 17:39:12 +00:00
Mark Striemer fa48ebee58 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-11 17:28:02 +00:00
Emilio Cobos Álvarez 30483671c1 Bug 1703984 - Clean up text-justify, and make distribute a parse-time alias. r=xidorn
Since it's simpler, as discussed in the CSSWG issue.

Differential Revision: https://phabricator.services.mozilla.com/D111346
2021-04-10 03:45:51 +00:00
Marco Bonardo 2c982d3c01 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 18:20:21 +00:00
Dorel Luca 7c6d9844e5 Backed out 8 changesets (bug 1702330)for Browser-chrome failures in est/popups/browser_popup_blocker.js. CLOSED TREE
Backed out changeset b81511f8e157 (bug 1702330)
Backed out changeset 15f60f1d3f14 (bug 1702330)
Backed out changeset 809af1f94b4b (bug 1702330)
Backed out changeset 63cec3eadb4f (bug 1702330)
Backed out changeset b9964fb4dd70 (bug 1702330)
Backed out changeset 1e5ccb47056e (bug 1702330)
Backed out changeset 65faaeeb2339 (bug 1702330)
Backed out changeset e72fb8b52609 (bug 1702330)
2021-04-09 20:21:35 +03:00
Mark Striemer 7f49e59cfb Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-09 15:26:25 +00:00
Cosmin Sabou 13826a4c50 Backed out changeset bd396182f84a (bug 1703274) for causing wpt failures on shape-outside-shape-arguments-000.html. CLOSED TREE 2021-04-09 17:51:48 +03:00
Marco Bonardo af19ef5dc4 Bug 1703274 - Enable Proton Urlbar. r=jaws,extension-reviewers,zombie,rpl
Differential Revision: https://phabricator.services.mozilla.com/D110998
2021-04-09 11:05:17 +00:00
Alexandru Michis b40e464292 Backed out 5 changesets (bug 1702330) for causing failures in browser_aboutNewTab_defaultBrowserNotification.js
CLOSED TREE

Backed out changeset 365fd1bb6dde (bug 1702330)
Backed out changeset eba73c72be18 (bug 1702330)
Backed out changeset e1277c21543f (bug 1702330)
Backed out changeset 907e4fcda266 (bug 1702330)
Backed out changeset eb2a8569ed02 (bug 1702330)
2021-04-09 03:34:23 +03:00
Mark Striemer 77be5a8d55 Bug 1702330 - Remove -moz-proton-infobars media query support r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D110963
2021-04-08 22:25:05 +00:00
Hiroyuki Ikezoe b22b1a8297 Bug 1703420 - Use SpecialPowers.spawnChrome to query the top level content document's location to run the test on Fission+XOrig. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D111026
2021-04-07 01:27:29 +00:00
Hubert Boma Manilla 7f97d78756 Bug 1638259 - Notify devtools when style resources blocked on CSP r=necko-reviewers,valentin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D102599
2021-04-06 22:40:26 +00:00
Jonathan Kew 87da9bf675 Bug 1694123 - Pass userfont source index to font loader and decoder tasks, to avoid potential race with the field in the gfxUserFontEntry being reset on the main thread. r=layout-reviewers,emilio
This is a preliminary step that is needed in order for the following patch to be safe. (It's
mostly just plumbing, although the patch looks big because we need to pass the index through
so many functions.)

The issue is that loading a font resource involves a couple of tasks that happen asynchronously -
fetching the data from the network, and decoding/sanitizing the font data. We have an implicit
assumption that once a font load has been initiated, the state of the associated gfxUserFontEntry
will not change; in particular, we depend on mSrcIndex remaining constant, because we may use it
to index into the mSrcList array and access the gfxFontFaceSrc record again in the various
completion tasks that are executed after the async steps finish.

But the following patch breaks this assumption, because it may reset mSrcIndex at arbitrary times
when we discover that we need to re-resolve the @font-face to potentially recognize a src:local()
resource that was earlier in the list, but was previously unavailable. If this happens while
a font-load is doing its off-main-thread work, then when it completes, it will end up accessing
the wrong gfxFontFaceSrc record, which would result at least in incorrect behavior, but can also
result in a crash (e.g. if the record is of the wrong type altogether, such as trying to use the
principal or URI fields from a record of type src:local).

To avoid this problem, we should pass the source index at the time the font load is initiated
through to the OMT tasks and back to their main-thread completion routines, so that we do not
depend on the field in the gfxUserFontEntry remaining frozen. This makes the loading process
safe even if the source index in the entry gets reset while loading tasks are in progress.

Differential Revision: https://phabricator.services.mozilla.com/D110911
2021-04-06 16:23:17 +00:00
Emilio Cobos Álvarez 41920e2eaf Bug 1703018 - Remove now unused variable which causes gcc to complain.
MANUAL PUSH: Base toolchains bustage CLOSED TREE
2021-04-06 14:01:39 +02:00
Emilio Cobos Álvarez 7a2c22ce65 Bug 1703018 - Reduce boilerplate needed to add system-metric media features. r=boris
There's no reason we can't just query LookAndFeel and we need to use
sSystemMetrics. In the past, LookAndFeel queries were not cached, but
this is no longer the case, so perf wise should be pretty equivalent.

Note that we don't need the NS_SUCCEEDED checks because the default
value from GetInt if the platform doesn't support it is 0 anyways.

Differential Revision: https://phabricator.services.mozilla.com/D110805
2021-04-06 09:55:01 +00:00
Emilio Cobos Álvarez 5ddee7313f Bug 1698132 - Convert proton pref checks from @supports rules to media features. r=Gijs
This means that dynamic changes will be handled correctly, we can use
StaticPrefs, etc.

Differential Revision: https://phabricator.services.mozilla.com/D110816
2021-04-05 20:48:05 +00:00
Timothy Nikkel 6420ad52a1 Bug 1700535. Make textareas inline block by default. r=emilio
This matches Chrome and Safari, as well as what we do for all other <input>s.

<input>s were changed to inline block in 1539469 with a couple of font inflation reftests marked as failing to follow up on. https://hg.mozilla.org/mozilla-central/rev/a1201db1b8cc is the follow up which made inputs not be font inflation containers. The same change for textarea fixes similar reftest failures for textarea. I read through the commit message for the change and doing the same for textareas seems to make sense but I don't understand it in detail.

Differential Revision: https://phabricator.services.mozilla.com/D109603
2021-04-02 23:34:47 +00:00
Emilio Cobos Álvarez ad97f9755b Bug 1702676 - Fix PreferenceSheet colors, which I forgot to push phab.
MANUAL PUSH: Orange CLOSED TREE
2021-04-02 17:23:12 +02:00
Emilio Cobos Álvarez 390c6943fe Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 12:22:14 +00:00
Narcis Beleuzu e9fb777466 Backed out changeset 597b9606c3ca (bug 1702676) for reftest failures on mq_prefers_reduced_motion_reduce.html CLOSED TREE 2021-04-02 09:34:53 +03:00
Emilio Cobos Álvarez f7f84a3c53 Bug 1702676 - Change public LookAndFeel API to accept a color scheme. r=mstange
This shouldn't change behavior, but is the biggest cross-platform part
of the change so I'd like to get it landed sooner rather than later.

The two calls like:

  GetColor(ColorID::TextSelectBackground, color);
  if (color == 0x000000) {
    mColorTextSelectForeground = NS_RGB(0xff, 0xff, 0xff);
  } else {
    mColorTextSelectForeground = NS_DONT_CHANGE_COLOR;
  }

that I'm removing are just broken. They were calling the version of
GetColor the function that took a default value when the color wasn't
available, not the version of the color with the outparam.

To prevent such mistakes, add two signatures, GetColor(), returning a
Maybe<nscolor> and Color(), returning a color with a fallback.

Differential Revision: https://phabricator.services.mozilla.com/D110651
2021-04-02 00:21:37 +00:00
Daniel Holbert 0414682ea1 Bug 1701510: Zero out the 'body' margin for all ImageDocuments (including iframes and printed images). r=emilio
This makes us match Blink and WebKit on how to render an iframe whose src
attribute is an image URL.  They seem to have always used 0 margin in this
case, and this seems preferable from an author's perspective (since the
standard HTML-body margin feels kind of arbitrary, when viewing an image).

Note that this change does also mean that images will be slightly closer to the
upper-left of the page, if they're viewed directly and then printed.  This
shouldn't cause them to be clipped or cause other issues; they'll still be
offset from the page edge by the printed-page margins, as well as any
unprintable areas that we get from the printer.

Differential Revision: https://phabricator.services.mozilla.com/D110294
2021-04-01 00:24:10 +00:00
Neil Deakin f625b71d78 Bug 1700148, add an appearance type that forces a dropshadow on menus on Windows, and uses SetWindowRgn to clip the popup to the border radius, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D109833
2021-04-01 00:13:09 +00:00
Darryl Pogue 42ac005810 Bug 1350237 - Make dialog display:block r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D110359
2021-03-31 16:12:31 +00:00
Emilio Cobos Álvarez 35b619041a Bug 1701792 - Also use standins for graytext with the non-native theme, as it's used for disabled controls. r=mstange
Also remove a fixed FIXME comment, while I was going through the select code to
fix browser_selectpopup_colors.

Differential Revision: https://phabricator.services.mozilla.com/D110154
2021-03-30 04:24:40 +00:00