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

78035 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez eaf7063698 Bug 1762018 - Reftest. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D142622
2022-04-01 11:19:00 +00:00
Iulian Moraru 097ed2afc5 Backed out changeset 4d65383640b4 (bug 1762018) for causing reftest failures on no-system-colors-color-scheme.html. CLOSED TREE 2022-04-01 11:12:37 +03:00
Emilio Cobos Álvarez f0ef75ed5b Bug 1762018 - Reftest. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D142622
2022-04-01 04:59:33 +00:00
Emilio Cobos Álvarez e47024038c Bug 1762018 - Derive a color scheme when forcing preference colors. r=morgan
This patch is a bit bigger than I'd like, but it's mostly moving code
around to centralize the color/color-scheme decisions we make when
forcing colors.

In practice, the only behavior change should be that when "use system
colors" is false and we force colors, we force a color-scheme that
matches the user-chosen background (via the LookAndFeel::IsDarkColor
check).

That should make sure that text from system colors is light and matches
the user expectations.

Before this patch, we used to force the color-scheme to light, but that
was just so that we ended up looking at mLightColors. Instead, we
achieve that via a separate bit (mForcedLightColorSet, naming up for
debate, not a fan), so that we can use the right system colors
otherwise.

Another alternative I considered is making all non-link system colors
return mDefaultBackground / mDefault depending on whether they are
background / foreground colors. That seemed a lot more work and
potentially a regression in various ways. I think this should be
strictly an improvement instead.

Differential Revision: https://phabricator.services.mozilla.com/D142423
2022-04-01 01:21:22 +00:00
Cristian Tuns da85cd4a66 Backed out changeset 5d97c7b1b9b5 (bug 1762018) for causing mochitest failures in test_bug232227.html CLOSED TREE 2022-03-31 19:12:48 -04:00
Emilio Cobos Álvarez b9e7c7653c Bug 1762088 - Implement parsing / serialization for container{,-type,-name} CSS properties. r=firefox-style-system-reviewers,layout-reviewers,boris
Two noteworthy details that may seem random otherwise:

 * Moving values around in nsStyleDisplay is needed so that the struct
   remains under the size limit that we have to avoid jumping allocator
   buckets.

 * All the test expectation churn is because tests depend on
   `container-type: size` parsing to run, and now they run. Tests for
   the relevant bits I implemented are passing, with the only exception
   of some `container-name-computed.html` failures which are
   https://github.com/w3c/csswg-drafts/issues/7181. Safari agrees with
   us there.

Other notes when looking at the spec and seeing how it matches the
implementation:

 * `container` syntax doesn't match spec, but matches tests and sanity:
   https://github.com/w3c/csswg-drafts/issues/7180

 * `container-type` syntax doesn't _quite_ match spec, but matches tests
   and I think it's a spec bug since the definition for the missing
   keyword is gone:
   https://github.com/w3c/csswg-drafts/issues/7179

Differential Revision: https://phabricator.services.mozilla.com/D142419
2022-03-31 22:56:20 +00:00
Emilio Cobos Álvarez 0555de1ae2 Bug 1762018 - Derive a color scheme when forcing preference colors. r=morgan
This patch is a bit bigger than I'd like, but it's mostly moving code
around to centralize the color/color-scheme decisions we make when
forcing colors.

In practice, the only behavior change should be that when "use system
colors" is false and we force colors, we force a color-scheme that
matches the user-chosen background (via the LookAndFeel::IsDarkColor
check).

That should make sure that text from system colors is light and matches
the user expectations.

Before this patch, we used to force the color-scheme to light, but that
was just so that we ended up looking at mLightColors. Instead, we
achieve that via a separate bit (mForcedLightColorSet, naming up for
debate, not a fan), so that we can use the right system colors
otherwise.

Another alternative I considered is making all non-link system colors
return mDefaultBackground / mDefault depending on whether they are
background / foreground colors. That seemed a lot more work and
potentially a regression in various ways. I think this should be
strictly an improvement instead.

Differential Revision: https://phabricator.services.mozilla.com/D142423
2022-03-31 22:03:09 +00:00
Emilio Cobos Álvarez bf2d51b0a5 Bug 1761839 - Allow user-select: none to override modal dialog selectability. r=sefeng
Instead of enforcing it in C++ use a UA rule instead, so that authors
can override it if needed.

Depends on D142582

Differential Revision: https://phabricator.services.mozilla.com/D142583
2022-03-31 19:49:53 +00:00
Emilio Cobos Álvarez 84f5a800f6 Bug 1761839 - Prevent undesired interactions between backdrop and selection. r=sefeng
Our selection code doesn't deal too well with pseudo frames in the top
layer. This prevents the bad interaction.

Differential Revision: https://phabricator.services.mozilla.com/D142582
2022-03-31 19:49:52 +00:00
Ryan VanderMeulen b9254aeca4 Bug 1762393 - Fix --disable-accessibility bustage in PresShell.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142552
2022-03-31 17:14:53 +00:00
Emilio Cobos Álvarez 881f8f938a Bug 1762109 - Make the XLink setup a bit saner. r=smaug
Make Link and SVGAElement agree on XLink handling, and make it more
explicit that SVGAElement needs to be a bit more special for SMIL.

Remove dead MathML XLink code.

Differential Revision: https://phabricator.services.mozilla.com/D142546
2022-03-31 14:33:57 +00:00
Emilio Cobos Álvarez 7e23a4287f Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-30 18:51:58 +00:00
Emilio Cobos Álvarez ea070a59f9 Bug 277178 - Move focus to a fragment identifier (#fragment) if it's focusable. r=smaug
Co-authored-by: Takeshi Kurosawa <taken.spc@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D141824
2022-03-30 18:01:48 +00:00
Emilio Cobos Álvarez 1ce0975b8e Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Mark Banner dba5767239 Bug 1762232 - Fix interface typo in QI definition in printpreview_bug482976_helper.xhtml. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D142473
2022-03-30 17:14:30 +00:00
Andreea Pavel 0fb4d3993c Bug 1642198 - update linux condition and disable test_filter_crossorigin.html on win10_2004 r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D142295
2022-03-30 06:05:01 +00:00
David Shin 3de9753ec9 Bug 1758723 - Suppress `column-span:all` for descendants of a containing block element for fixed-position descendants r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142355
2022-03-29 20:56:57 +00:00
Iulian Moraru 7a3ed2ce2a Backed out changeset d42d7505c9cf (bug 1760836) for causing mochitest failures on browser_print_stream.js. CLOSED TREE 2022-03-29 23:32:39 +03:00
Emily McDonough 89c541dbc7 Bug 1760378 Part 4 - Add tests for CSS named page fragmentation with display:none, and with the same page-name on multiple elements r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D141672
2022-03-29 18:18:48 +00:00
Emily McDonough 51a80e3d97 Bug 1760378 Part 3 - Add ref case and updated reftest.list for generated page-name reftests r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142001
2022-03-29 18:18:48 +00:00
Emily McDonough f6897bd7b4 Bug 1760378 Part 2 - Add generated page-name reftests r=dholbert
To run the script to generate test cases:
python layout/reftests/css-page/generate-page-name-two-page-test.py

This should work with Python 2 or Python 3, and from any working directory.

Differential Revision: https://phabricator.services.mozilla.com/D141671
2022-03-29 18:18:47 +00:00
Emily McDonough 329ea0d28b Bug 1760378 Part 1 - Add script that generates various frame tree structures to create some basic CSS named page fragmentation reftests r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D141670
2022-03-29 18:18:47 +00:00
Emilio Cobos Álvarez b0fb172236 Bug 1760836 - Support printing to an nsIOutputStream. r=jfkthame,jrmuizel,webdriver-reviewers,geckoview-reviewers,agi
The trickiest bits are the PrintTargetCG ones, the rest is just plumbing
and cleanups and tests, but let me know if you want those to be split
out, can do.

The GTK change to nsPrintSettingsGTK::GetResolution is a no-op (we only
read resolution on windows), but I did that because we assume that it
doesn't fail and GTK returns a sane default anyways.

Differential Revision: https://phabricator.services.mozilla.com/D142199
2022-03-29 17:50:58 +00:00
Nicolas Silva ee545aca41 Bug 1761770 - Adjust item activity decisions. r=jrmuizel
Instead of reasoning about whether items should be active with a yes/no granularity, we consider whether it could/should be and have some logic to weight that against the risk of causing extra layerization when making containers active.
For example a small image *could* be made active, but we might not make it so if it causes extra layerization in cases where larger images would have been made active.

Differential Revision: https://phabricator.services.mozilla.com/D142213
2022-03-29 13:34:28 +00:00
Henri Sivonen 8dca2aaa89 Bug 1712928 - Gather telemetry about encoding-unlabeled pages and about Repair Text Encoding usage situations. r=emk
In particular, gather telemetry to evaluate the impact of unlabeled UTF-8
and how detector-triggered reloads would change if ASCII-only at initial
guess was treated as UTF-8.

Differential Revision: https://phabricator.services.mozilla.com/D140818
2022-03-29 08:04:25 +00:00
David Shin 093b63fe3c Bug 1755770 - Ensure `TextRenderedRun::GetRunUserSpaceRect` casts float to int without invoking Undefined Behavior r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142223
2022-03-28 21:07:58 +00:00
Emilio Cobos Álvarez eb1bf035fd Bug 1761611 - Make <dialog> styles use system colors. r=morgan
To be landed when https://github.com/whatwg/html/issues/7754 has a resolution,
but I think it should be uncontroversial.

Differential Revision: https://phabricator.services.mozilla.com/D142170
2022-03-28 19:15:46 +00:00
stransky 9cac822f97 Bug 1761435 [Wayland] Store only move-to-rect popup size r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142048
2022-03-28 10:13:40 +00:00
Hiroyuki Ikezoe 25d4e998dd Bug 1760222 - Ignore unchanged property for scroll-linked effect detector. r=hiro
I think this is cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D141737
2022-03-27 23:40:24 +00:00
Hiroyuki Ikezoe 6b7b8b0942 Bug 1760222 - Detect scroll-linked effects only in the same refresh driver's timestamp. r=botond
With this change, `has-scroll-linked-effect` flag won't persist so that we can
avoid choosing either the one-frame delayed scroll offset or the latest scroll
offset in cases where there's no longer effective scroll linked effect. It will
mitigate scroll jittering.

Differential Revision: https://phabricator.services.mozilla.com/D141457
2022-03-27 23:40:24 +00:00
Hiroyuki Ikezoe 8143bad0eb Bug 1760222 - Make disable-apz-for-sle-pages.html work with the new ScrollLinkedEffectDetector. r=botond
In subsequent commits, our ScrollLinkedEffectDetector is changed to;

 1. Don't consider having scroll linked effect if changing properties values
    are not going to be changed, we don't currently check whether the value is
    changed or not.
 2. Consider having scroll linked effect per refresh driver's most recent time
    stamp

With these changes, a reftest, disable-apz-for-sle-pages.html will no longer
work as it is. Fortunately our new ScrollLinkedEffectDetector is still per
document basis. So to make it work as expected, we need to;

 1. Add a new invisible scrollable element
 2. Keep listening scroll events for the element
 3. Invoke scrolling the element
 4. Change one of scroll linked effect CSS properties in the listener

Then our new ScrollLinkedListener still considers the document has a scroll
linked effect all the time.

This revised reftest fails with apz.disable_for_scroll_linked_effects=false,
which means it works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D142010
2022-03-27 23:40:23 +00:00
Timothy Nikkel a87e2f808f Bug 1761239. Use an EnumSet for nsIScrollableFrame::IsScrollAnimating. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D141960
2022-03-26 02:22:57 +00:00
David Shin 62a0b1786f Bug 1757110: Refactor `BCCorners::corners` and `BCCellBorders::borders` to use `mozilla::UniquePtr` r=dholbert
Depends on D142080

Differential Revision: https://phabricator.services.mozilla.com/D142081
2022-03-25 19:19:15 +00:00
David Shin 54dcf4ac97 Bug 1757110: Refactor `nsTableFrame::mCellMap, mTableLayoutStrategy` to use `mozilla::UniquePtr` r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D142080
2022-03-25 19:19:14 +00:00
Emilio Cobos Álvarez 1162a3c578 Bug 1666059 - Really honor background-color: transparent in HCM even for form controls. r=morgan
I forgot we were doing this "revert-or-initial" shenanigans (which is needed
for stuff like link colors to be honored), so we need to early-return.

Use a more explicit test rather than a reftest for this.

Differential Revision: https://phabricator.services.mozilla.com/D142063
2022-03-25 18:15:43 +00:00
Emilio Cobos Álvarez dd020d602a Bug 1760342 - Remove :-moz-lwtheme-{brighttext,darktext}. r=dao,Gijs
They are just convenience for :root[lwthemetextcolor="light"] (and dark,
respectively), but they generally shouldn't be used for dark mode
theming. In the past it was the only way to do it but now we have
prefers-color-scheme.

While at it, change lwthemetextcolor to be "lwtheme-brighttext" for
consistency with similar code we have for popups etc, and move it to
_setDarkModeAttributes.

While at it, remove layout.css.moz-lwtheme.content.enabled (which is
false always, we unshipped these from content successfully).

Differential Revision: https://phabricator.services.mozilla.com/D141593
2022-03-25 14:58:59 +00:00
stransky 588b7423e7 Bug 1760276 [Wayland] Fix loop in popup move-to-rect resizes r=emilio
Use mMoveToRectPopupRect popup constrains in nsMenuPopupFrame::SetPopupPosition only and make it pernament.
In such setup works as screen size constraints.

Don't call SetPopupPosition from move-to-rect callback and let layout code to handle that.

Remove MoveToRectPopupRectClear() as it's not needed, we keep mMoveToRectPopupRect
in nsMenuPopupFrame as well as we keep screen sizes there.

Differential Revision: https://phabricator.services.mozilla.com/D141602
2022-03-25 11:15:39 +00:00
Norisz Fay d29d98d869 Backed out 3 changesets (bug 1760276) for causing build bustages on nsMenuPopupFrame.cpp CLOSED TREE
Backed out changeset e98dce4c58db (bug 1760276)
Backed out changeset 3d351d90db7b (bug 1760276)
Backed out changeset e8e0571ab13b (bug 1760276)
2022-03-25 12:02:18 +02:00
stransky 0226068db9 Bug 1760276 [Wayland] Fix loop in popup move-to-rect resizes r=emilio
Use mMoveToRectPopupRect popup constrains in nsMenuPopupFrame::SetPopupPosition only and make it pernament.
In such setup works as screen size constraints.

Don't call SetPopupPosition from move-to-rect callback and let layout code to handle that.

Remove MoveToRectPopupRectClear() as it's not needed, we keep mMoveToRectPopupRect
in nsMenuPopupFrame as well as we keep screen sizes there.

Differential Revision: https://phabricator.services.mozilla.com/D141602
2022-03-25 09:33:18 +00:00
dshin c5750e817c Bug 1757110 - Refactor `BCPaintBorderIterator::mBlockDirInfo` to use `mozilla::UniquePtr` r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D141989
2022-03-24 20:49:20 +00:00
Olli Pettay 8b56e95458 Bug 1760007, use less frequent painting during page load only if there is something else to do. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D141923
2022-03-24 18:48:52 +00:00
Brad Werth ca24fb4eb2 Bug 1751217 Part 5: Update test expectations. r=emilio
In addition to adding test support for dynamic-range and video-dynamic-range,
this expands tests of pixelDepth and colorDepth to allow 30 as an acceptable
value.

Differential Revision: https://phabricator.services.mozilla.com/D141307
2022-03-24 18:19:50 +00:00
Brad Werth ac55f07b1b Bug 1751217 Part 4: Make macOS declare video-dynamic-range: high with new-enough OS. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D141056
2022-03-24 18:19:50 +00:00
Brad Werth 66f5f1c938 Bug 1751217 Part 2: Change nsDeviceContext::GetDepth to eliminate the outparam. r=emilio
This function always succeeds so there's no reason to maintain an nsresult.

Differential Revision: https://phabricator.services.mozilla.com/D141407
2022-03-24 18:19:49 +00:00
Brad Werth 99d39f2636 Bug 1751217 Part 1: Support media queries for dynamic-range and video-dynamic-range. r=emilio
This is a stub that only matches "standard" for all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D141053
2022-03-24 18:19:49 +00:00
Miko Mynttinen f617868c63 Bug 1736069 - Unconditionally create nsDisplayStickyPosition items r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D141925
2022-03-24 17:40:32 +00:00
Emilio Cobos Álvarez 597c2fe947 Bug 1758223 - Use atomic ops to read / write node flags from stylo. r=nika
The flags stylo cares about reading and writing potentially at the same
time are disjoint, so there's no need for any strong memory ordering.

Differential Revision: https://phabricator.services.mozilla.com/D141829
2022-03-24 10:03:12 +00:00
Cristian Tuns f0ccbd470c Backed out 4 changesets (bug 1760222) for causing reftest failures on disable-apz-for-sle-pages.html CLOSED TREE
Backed out changeset 1bf5e1ca3746 (bug 1760222)
Backed out changeset aff6bf37365d (bug 1760222)
Backed out changeset e9b3e3f52aec (bug 1760222)
Backed out changeset f65d2d719277 (bug 1760222)
2022-03-24 02:36:42 -04:00
Butkovits Atila 004df17a21 Backed out changeset 8a3be63619de (bug 1758223) for causing bustages. CLOSED TREE 2022-03-24 06:31:29 +02:00
Emilio Cobos Álvarez ec82ced641 Bug 1758223 - Use atomic ops to read / write node flags from stylo. r=nika
The flags stylo cares about reading and writing potentially at the same
time are disjoint, so there's no need for any strong memory ordering.

Differential Revision: https://phabricator.services.mozilla.com/D141829
2022-03-24 04:08:18 +00:00