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

76848 Коммитов

Автор SHA1 Сообщение Дата
Matt Woodrow fbef6fe2ee Bug 1728050 - Move opacity flattening to be part of WR DL serialization. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124005
2021-09-10 03:43:32 +00:00
Hiroyuki Ikezoe c7296ae56d Bug 1726261 - Replace GetCrossDocParentFrame in GetNearestScrollableFrameForDirection with GetCrossDocParentFrameInProcess. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D122910
2021-09-09 23:21:41 +00:00
Jonathan Kew 39811f1b68 Bug 1726416 - Update testcase for Arabic subtending marks (from bug 1599841) now that harfbuzz handles the number-directionality issue internally. r=emilio
We can no longer use direction overrides to create the test vs reference renderings here,
because of how harfbuzz now handles the numeral directionality internally. So it's difficult
to come up with a testcase that verifies the exact rendering of the subtending mark + digit(s)
combinations.

What we can do, though, is verify that a single digit combines with the subtending mark
without affecting its overall width; and that a double-digit number *does* increase the
width. These two conditions are unlikely to both hold unless the rendering is behaving
correctly.

(FWIW, Chrome Canary passes these new test versions, as it also uses a recent harfbuzz;
Safari currently fails, as Core Text doesn't support the subtending marks in the same
way, if at all.)

Differential Revision: https://phabricator.services.mozilla.com/D124902
2021-09-09 14:48:32 +00:00
Emilio Cobos Álvarez a480cfb732 Bug 1729477 - Tweak SubresourceCacheValidationInfo to account for chrome uris. r=tnikkel
Turns out my patch above causes some failures because chrome:// channels
don't have cache information, so we conservatively assume they always
expire, which causes some interesting timing issues in a single test.
Fun stuff.

Tweak the code so that SubresourceCacheValidationInfo has the
pre-existing data:// URI special-case and also special-cases chrome://
URIs.

Differential Revision: https://phabricator.services.mozilla.com/D124921
2021-09-09 09:32:11 +00:00
Tetsuharu Ohzeki ce8534e1aa Bug 1729824 - Remove unused layout.animated-image-layers.enabled. r=hiro,layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D125007
2021-09-09 09:23:35 +00:00
Cristian Tuns 8d028dff49 Backed out changeset b643b1b8a326 (bug 1729680) for causing Mochitest failures. CLOSED TREE 2021-09-09 04:50:28 -04:00
Timothy Nikkel 79dd816b81 Bug 1729680. Make mCumulativeResolution on FrameMetrics include css transform scale with webrender. r=botond
With non-wr cumulative resolution contained the presshell resolution, css transform scales, and so called extra resolution. The extra resolution came about from FrameLayerBuilder code called ChooseScale that sometimes chose to render at a larger resolution so that we didn't have to re-render on every frame for animating scales for example.

Bug 1485834 is responsible for the current code and it looks it was just getting zooming to work at all on android with webrender. It put the presshell resolution into mCumulativeResolution. This would make zooming work as before this mCumulativeResolution would be 1. This is because mCumulativeResolution came from the ContainerParameters, which are an implementation detail of non-wr that wr didn't have. So it looks like bug 1485834 just used what was handy (the presshell resolution) to get zooming to work.

Making this use GetTransformToAncestorScale means that we are the same as non-wr except for the extra resolution.

I'm not sure that non-wr should have used the extra resolution, I think it would have been better off using GetTransformToAncestorScale as well.

Using the scale from GetTransformToAncestorScale is what several other places do already: CalculateBasicFrameMetrics, and the code to compute our display port rect from the margins data, so this should be more consistent.

More generally speaking, I think that other than the notable exceptions below, mCumulativeResolution only needs to be set to the presshell resolution, and it is okay to include the css transform scale or extra resolution as long as we do apply and un-apply it consistently. Most places that use mCumulativeResolution multiply it in one place and then divide it in another.

The main exception to that is the display port size in the following places:

1. layer pixels computed using mCumulativeResolution are compared against prefs that are in layer pixels in ExpandDisplayPortToDangerZone

https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/gfx/layers/apz/src/AsyncPanZoomController.cpp#4072

2. GetDisplayportAlignmentMultiplier uses layer pixels computed using mCumulativeResolution to determine alignment

https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/gfx/layers/apz/src/AsyncPanZoomController.cpp#3969

3. CalculatePendingDisplayPort sets the final displayport margins in screen pixels computed using mCumulativeResolution

https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/gfx/layers/apz/src/AsyncPanZoomController.cpp#4171

4. GetDisplayPortFromMarginsData computes the actual displayport rect we use for painting using GetTransformToAncestorScale

https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/layout/base/DisplayPortUtils.cpp#296

Ideally this should match how we calculate the margins in CalculatePendingDisplayPort.

One will note that after this patch extra resolution is always 1 (I plan to remove it in a followup), one might wonder if that is true with webrender. It is true that webrender still has ChooseScale

https://searchfox.org/mozilla-central/rev/a166f59fba89fc70ebfab287f4edb8e05ed4f6da/gfx/layers/wr/StackingContextHelper.cpp#46

and it uses when it encounters content that it cannot natively render so it is rasterized or recorded in the content process. So content can get rasterized or recorded with extra resolution, however it doesn't make it to the wr side in a structured fashion. The items in question are sent to wr as "images" (blob images) with a rect that is equal to their layout rect, without any transforms, resolution, or extra resolution applied. The "images" themselves do contain the extra resolution but they would be drawn using that non-transformed layout rect, and in this case since they have a transform, that transform would be sent to wr on the stacking context pushed for that transform and then that transform would be applied. Wr would not except apz to know about this extra resolution and would not expect values it gets from apz to include this extra resolution.

Now inside wr it could also do something similar where it renders at a resolution that differs from the presshell resolution + css transform scale, but that too would have to be completely internal to wr and it could not expect anyone outside of wr to know about.

The other thing that simplifies this is that the only scrollframe that can have resolution (root content doc root scroll frame) cannot also be transformed. This means that when we are actually managing the zoom (on the rcd-rsf) we never have a css transform scale. And for subframes, other than the displayport sizing, we mostly just multiply and divide by cumulative resolution so it's specific value isn't that important.

Differential Revision: https://phabricator.services.mozilla.com/D124905
2021-09-09 05:11:48 +00:00
Sandor Molnar 870ff4f480 Backed out 3 changesets (bug 1729477) for causing devtools failures in browser_webconsole_sidebar_object_expand_when_message_pruned. CLOSED TREE
Backed out changeset 8cbf3101ed8a (bug 1729477)
Backed out changeset 7457834fb7d0 (bug 1729477)
Backed out changeset 1259d2d1f247 (bug 1729477)
2021-09-09 03:55:31 +03:00
Emilio Cobos Álvarez 2b47e33bec Bug 1729477 - Remove nsXULPrototypeCache::mStyleSheetTable. r=smaug
With a very simple tweak to SheetLoadDataHashKey::KeyEquals we should
get the same kind of caching but in a much simpler way.

Differential Revision: https://phabricator.services.mozilla.com/D124807
2021-09-08 21:03:02 +00:00
Emilio Cobos Álvarez d4d9525111 Bug 1729477 - Tweak SubresourceCacheValidationInfo to account for chrome uris. r=tnikkel
Turns out my patch above causes some failures because chrome:// channels
don't have cache information, so we conservatively assume they always
expire, which causes some interesting timing issues in a single test.
Fun stuff.

Tweak the code so that SubresourceCacheValidationInfo has the
pre-existing data:// URI special-case and also special-cases chrome://
URIs.

Differential Revision: https://phabricator.services.mozilla.com/D124921
2021-09-08 21:03:02 +00:00
Ben Hearsum 4ca3a60f1d Bug 1714200: annotate tests that fail in regular suites but pass when run in isolation. r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124907
2021-09-08 18:14:00 +00:00
Sebastian Hengst 43d8cf1386 Backed out changeset 5281f57107c7 (bug 1728423) for hangs in nsLayoutUtils::PaintFrame (bug 1729723). CLOSED TREE 2021-09-08 18:42:23 +02:00
Jonathan Kew 6701c71e0c Bug 1729450 - Remove obsolete pref settings from WPT css-text-decor metadata, as we ship these features by default. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124796
2021-09-08 12:39:40 +00:00
Jonathan Kew bfa1d70def Bug 1715501 - patch 2 - Pass the presContext to platform font lookup methods so they can query it for font visibility. r=emilio
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.

For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.

Depends on D124194

Differential Revision: https://phabricator.services.mozilla.com/D124195
2021-09-08 12:18:17 +00:00
Emilio Cobos Álvarez 597b7bc37d Bug 1729330 - Add a simple CSSLayerRule implementation. r=smaug
The specifics of how this is going to work are still getting spec'd /
discussed in https://github.com/w3c/csswg-drafts/issues/6576, but this
allows DevTools to work fine and the feature to be complete enough for
Nightly experimentation (with the other in-flight patches).

Otherwise devtools crashes when trying to inspect pages that use them.

Differential Revision: https://phabricator.services.mozilla.com/D124656
2021-09-08 11:18:32 +00:00
Cristian Tuns 9e1718d5a5 Backed out 4 changesets (bug 1715537, bug 1715507, bug 1715501) for causing mochitest failures on test_bug418986-2.html. CLOSED TREE
Backed out changeset fff777ea5637 (bug 1715537)
Backed out changeset 240308eb514d (bug 1715507)
Backed out changeset e3f8526e0e2a (bug 1715501)
Backed out changeset cfdd1c5d8d3f (bug 1715501)
2021-09-08 07:48:51 -04:00
Jonathan Kew 34bb52269d Bug 1715537 - Log a warning to the web console when a font request is blocked due to font-visibility restrictions. r=emilio
Depends on D124196

Differential Revision: https://phabricator.services.mozilla.com/D124345
2021-09-08 09:35:18 +00:00
Jonathan Kew 80199acf81 Bug 1715507 - Support different levels of font-visibility per context, depending on tracking/fingerprinting protection settings. r=emilio
Depends on D124195

Differential Revision: https://phabricator.services.mozilla.com/D124196
2021-09-08 09:35:17 +00:00
Jonathan Kew 20585f15c0 Bug 1715501 - patch 2 - Pass the presContext to platform font lookup methods so they can query it for font visibility. r=emilio
This does not in itself change user-visible behavior, but is a foundation for bug
1715507 where we will make the behavior per-context instead of global. This is basically
just plumbing, passing a pointer to the presContext that's asking for fonts to be
resolved all the way down to the gfx code that handles the font list and looks up
fonts.

For the immediate goal of making font visibility work per-context, it would be
sufficient to pass the desired visibility level in to the font-selection methods.
However, passing the actual presContext down (and not just its visibility level)
will enable us to report back via the dev console when a font is blocked (see bug
1715537), so the approach here provides the basis for that upcoming enhancement.

Depends on D124194

Differential Revision: https://phabricator.services.mozilla.com/D124195
2021-09-08 09:35:17 +00:00
Timothy Nikkel 409d2513b2 Bug 1729604. Remove unused aClipRect argument to nsLayoutUtils::ComputeScrollMetadata. r=hiro
Depends on D124871

Differential Revision: https://phabricator.services.mozilla.com/D124872
2021-09-08 04:20:56 +00:00
Timothy Nikkel 138d77c546 Bug 1729604. Remove unused ScrollFrameHelper::mAddClipRectToLayer. r=hiro
Depends on D124870

Differential Revision: https://phabricator.services.mozilla.com/D124871
2021-09-08 04:20:56 +00:00
Timothy Nikkel f06fa58321 Bug 1729604. Remove unused aClip parameter from ScrollFrameHelper::ComputeScrollMetadata. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D124870
2021-09-08 04:20:55 +00:00
Ting-Yu Lin 57b867e7ff Bug 1728708 Part 4 - Simplify WordBreaker::Next() and make it recognize the end of text a word break opportunity. r=jfkthame
A UAX29 compatible word breaker (like ICU4C) treat the end of text as a
word break opportunity (rule WB2 [1]), but currently lwbrk word breaker
doesn't.

The motivation of this patch is to make `WordBreaker::Next()` closer to
a UAX29 compatible one (at least for English text), and see if the
callers need to change. This should make the future integration of ICU4X
segmenter easier.

The only caller of WordBreaker::Next() is ClusterIterator's constructor.
This patch shouldn't change its behavior because we've already manually
assigned a word break point at the end of the line when `aContext` is
empty and `aDirection` is -1. This patch generalizes it to all
conditions.

Also, update TestPrintWordWithBreak() so that the result string makes
more sense.

[1] https://www.unicode.org/reports/tr29/#WB2

Differential Revision: https://phabricator.services.mozilla.com/D124304
2021-09-08 04:19:38 +00:00
Ting-Yu Lin 69a841c529 Bug 1728708 Part 2 - Rename WordBreaker::NextWord() to WordBreaker::Next(). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D124302
2021-09-08 04:19:37 +00:00
Cosmin Sabou ea371f72db Backed out 4 changesets (bug 1729450) for wr failures on text-emphasis-style. CLOSED TREE
Backed out changeset 798e26d71dfc (bug 1729450)
Backed out changeset 29f3f16dcd31 (bug 1729450)
Backed out changeset ed14cda4f033 (bug 1729450)
Backed out changeset e3ee29b05f7b (bug 1729450)
2021-09-07 22:42:43 +03:00
David Parks 45d0452571 Bug 1718629: Handle Windows WM_NCHITTEST message for maximize button r=emilio,cmartin
Windows 11's Snap Layouts feature generates a window of layout options when the maximize window button is moused over.  This requires the WM_NCHITTEST message to handle hit detection for the button.  Since WM_NCHITTEST messages are very common, although we limit them to no more than every 50ms, we don't want to do a full hit test each time.  Instead, we cache the maximize button rect in the widget when it is positioned during layout.

Differential Revision: https://phabricator.services.mozilla.com/D123982
2021-09-07 16:03:57 +00:00
Emilio Cobos Álvarez b2a2efeffa Bug 1716655 - Prevent creating print presentation for a destroyed content viewer. r=nika
nsDocumentViewer::mDocument ends up null because Destroy() is called
as a result of nsGlobalWindowOuter::SetNewDocument failing because of
the AncestorsAreCurrent check:

    https://searchfox.org/mozilla-central/rev/d6188c9ce02efeea309e7177fc14c9eb2f09db37/dom/base/Document.cpp#13026-13030
    https://searchfox.org/mozilla-central/rev/d6188c9ce02efeea309e7177fc14c9eb2f09db37/layout/base/nsDocumentViewer.cpp#1888
    https://searchfox.org/mozilla-central/rev/d6188c9ce02efeea309e7177fc14c9eb2f09db37/dom/base/nsGlobalWindowOuter.cpp#2089-2091

Just bail out if we don't have a document when creating the print
presentation, as that presentation won't be shown either way.

Differential Revision: https://phabricator.services.mozilla.com/D124742
2021-09-07 15:55:56 +00:00
Jonathan Kew bbe656b884 Bug 1729450 - Remove obsolete pref settings from WPT css-text-decor metadata, as we ship these features by default. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124796
2021-09-07 14:26:03 +00:00
Nika Layzell 66e5b6b669 Bug 1729092 - Remove dead nsPrintObject::mDidCreateDocShell, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124511
2021-09-07 14:22:42 +00:00
Masayuki Nakano 791b8c91ec Bug 1729385 - Port layout/generic/test_bug527306.html to WPT r=emilio
It's interesting case, and it perhaps should be tested in WPT for web-compat.
Chrome 93 passes all tests in the new WPTs, but Gecko fails in the cases of
related to focus (i.e., `execCommand` and user input).

Differential Revision: https://phabricator.services.mozilla.com/D124725
2021-09-07 12:46:23 +00:00
Emilio Cobos Álvarez 580e65503f Bug 1729292 - Honor scroll margin of host when we're scrolling to a chrome-only-access element. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D124691
2021-09-07 08:24:59 +00:00
Marian-Vasile Laza d25d135947 Backed out 7 changesets (bug 1728050, bug 1728251, bug 1728232, bug 1542929, bug 1714138, bug 1728258) for causing reftest failures. CLOSED TREE
Backed out changeset 41e053201cd3 (bug 1714138)
Backed out changeset 16ae9f5b4aa0 (bug 1728258)
Backed out changeset 414aa7ff05fe (bug 1542929)
Backed out changeset 7217ecf149c4 (bug 1728251)
Backed out changeset 405ff2ed2110 (bug 1728251)
Backed out changeset 3eec9e6c7218 (bug 1728232)
Backed out changeset 66038c15fe54 (bug 1728050)
2021-09-07 09:00:26 +03:00
Matt Woodrow 4588b30e2b Bug 1714138 - Remove AnimatedGeometryRoot. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124154
2021-09-06 23:12:05 +00:00
Matt Woodrow e060744ad1 Bug 1728258 - Compute AnimatedGeometryRoot frames in RetainedDisplayListBuilder without needing the existing object stored on nsDisplayItem. r=miko,mstange
Differential Revision: https://phabricator.services.mozilla.com/D124153
2021-09-06 23:12:04 +00:00
Matt Woodrow 9bdea2da6b Bug 1542929 - Remove mReferenceFrame from nsDisplayItem. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124009
2021-09-06 23:12:04 +00:00
Matt Woodrow 51b371636c Bug 1728251 - Remove mClip and compute it when we need it. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124008
2021-09-06 23:12:04 +00:00
Matt Woodrow e7b3614318 Bug 1728251 - Remove FuseClipChainUpTo since its unused. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124007
2021-09-06 23:12:03 +00:00
Matt Woodrow 3f9d3853cd Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-06 23:12:03 +00:00
Matt Woodrow 7e0f7ff766 Bug 1728050 - Move opacity flattening to be part of WR DL serialization. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124005
2021-09-06 23:12:02 +00:00
Jonathan Kew 6dbef6ba5d Bug 1729147 - Fix the serialization order for the text-decoration shorthand to match the canonical order in the spec. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124536
2021-09-06 18:22:37 +00:00
Sandor Molnar e259e004de Backed out 3 changesets (bug 1729236) for causing reftest failures in layout/reftests/svg/filters/filter-giant.
Backed out changeset 1333d00d417c (bug 1729236)
Backed out changeset a3021a3499e1 (bug 1729236)
Backed out changeset 49a5aa4c8eb7 (bug 1729236)
2021-09-06 19:31:31 +03:00
Matt Woodrow 47cbc38463 Bug 1729236 - Remove GetPaintRect. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124590
2021-09-06 06:26:08 +00:00
Matt Woodrow 42dfbb387c Bug 1729236 - Don't use GetPaintRect for painting text. r=jrmuizel
Text is the exception, where clipping the WR commands to the paint rect can let us reduce the size sent.
We want to avoid this when doing fallback painting, since we don't want to have to track paint rect changes for invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D124589
2021-09-06 06:26:08 +00:00
Matt Woodrow 3cdf8e4aeb Bug 1729236 - Don't use GetPaintRect for CreateWebRenderCommands. r=jrmuizel
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).

Differential Revision: https://phabricator.services.mozilla.com/D124588
2021-09-06 06:26:07 +00:00
Iulian Moraru 80b969f9fe Backed out 3 changesets (bug 1729236) for causing multiple failures. CLOSED TREE
Backed out changeset 8ebf965d624b (bug 1729236)
Backed out changeset 0d26dce41a12 (bug 1729236)
Backed out changeset bf228d1f3b49 (bug 1729236)
2021-09-06 07:32:43 +03:00
Matt Woodrow 0b4541468e Bug 1729236 - Remove GetPaintRect. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124590
2021-09-06 03:42:26 +00:00
Matt Woodrow d84885ee2a Bug 1729236 - Don't use GetPaintRect for painting text. r=jrmuizel
Text is the exception, where clipping the WR commands to the paint rect can let us reduce the size sent.
We want to avoid this when doing fallback painting, since we don't want to have to track paint rect changes for invalidation.

Differential Revision: https://phabricator.services.mozilla.com/D124589
2021-09-06 03:42:26 +00:00
Matt Woodrow 87fc1d4890 Bug 1729236 - Don't use GetPaintRect for CreateWebRenderCommands. r=jrmuizel
WebRender prefers to know the full bounds of the primitive, since it makes invalidation easier (and doesn't increase the size of the commands we send).

Differential Revision: https://phabricator.services.mozilla.com/D124588
2021-09-06 03:42:25 +00:00
Matt Woodrow d41e38aec0 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Matt Woodrow 5fa3be57b1 Bug 1728925 - Convert IsImageContainerAvailable to use WindowRenderer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124427
2021-09-05 22:36:45 +00:00