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

76846 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 90f700036a Bug 1727371 - Use the right color scheme for default background/color lookup on chrome docs. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124059
2021-09-01 16:52:53 +00:00
stransky 957f603c7e Bug 1708709 Use appunits for mScreenRect to avoid rounding errors, r=emilio
We have to use wayland to position popup windows and we need to propagate the modified
position (if happens) back to nsView. The mScreenRect in the nsMenuPopupFrame is in the CSS units
and that produce rounding error when font scale factor is not 1. To fix that we will use appunits
for the mScreenRect.

Differential Revision: https://phabricator.services.mozilla.com/D114577
2021-09-01 13:02:51 +00:00
Jeff Muizelaar 8c1459490b Bug 1728411 - Stop special casing bounds calculation on Windows. r=dholbert
As of bug 1728401, D2D is no longer used as content backend on Windows,
which makes this special casing unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D124110
2021-09-01 03:11:36 +00:00
criss b68bc8bbb9 Backed out changeset bb78095fd8c0 (bug 1728411) for causing wpt failures on SVGGraphicsElement.getBBox-01.html 2021-09-01 05:49:25 +03:00
Jeff Muizelaar 1b0af7981e Bug 1728411 - Stop special casing bounds calculation on Windows. r=dholbert
As of bug 1728401 D2D is no longer used as content backend on Windows,
which makes this special casing unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D124110
2021-09-01 01:03:11 +00:00
Jeff Muizelaar aa6cf4b3d4 Bug 1728246. Remove unused ComputeVisibility infrastructure. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124109
2021-08-31 20:52:54 +00:00
Jeff Muizelaar bfc8589cf8 Bug 1728246. Drop call to ComputeVisibility in nsDisplayList::Paint. r=mattwoodrow
This will cause to paint items that would've previously been occlusion culled,
but we shouldn't be using this code in any performance critical areas and
removing the occlusion culling infrastructure will let us make the fast path
faster.

Differential Revision: https://phabricator.services.mozilla.com/D124108
2021-08-31 20:52:54 +00:00
Jeff Muizelaar efa40c6470 Bug 1728246. Calculate opaqueness on demand instead of in ComputeVisibility. r=mattwoodrow
This lets us remove ComputeVisibility()

Differential Revision: https://phabricator.services.mozilla.com/D124106
2021-08-31 20:52:53 +00:00
Jeff Muizelaar 02d932d67d Bug 1728149 - Remove unused return type from nsLayoutUtils::PaintFrame. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D123961
2021-08-31 15:22:29 +00:00
Andrew Osmond 2598244906 Bug 1715760 - Turn reftest-snapshot back on by default on QR fission. r=jmaher
One can still run them via try fuzzy, but they aren't running by default
on mozilla-central.

Differential Revision: https://phabricator.services.mozilla.com/D117418
2021-08-31 15:06:47 +00:00
Jeff Muizelaar ecd6741296 Bug 1728311 - Remove unused LayersMessages::TransactionInfo. r=aosmond
Fixes up some missing includes that accidentally worked before.

Differential Revision: https://phabricator.services.mozilla.com/D124060
2021-08-31 14:48:00 +00:00
Jonathan Kew c7fdc790cc Bug 1725297 - Remove expiring font telemetry probes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D124051
2021-08-31 13:48:51 +00:00
Andrew Osmond b3def22e3d Bug 1728240 - Remove DrawTargetWrapAndRecord and gfx.2d.recording pref. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124000
2021-08-31 02:03:58 +00:00
Michelle Goossens 98bf6fc8fd Bug 1727925 - Part 2: Migrate windows10-32-tests from AWS to Azure r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D123896
2021-08-30 21:17:21 +00:00
Jeff Muizelaar 350596ef55 Bug 1728195 - Remove remnants of TiledLayerBuffer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123976
2021-08-30 20:25:54 +00:00
Andrew Osmond ac49f09199 Bug 1728113 - Remove DrawTargetCapture and related code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123953
2021-08-30 16:35:50 +00:00
Nicolas Silva 8496ccf07d Bug 1726102 - Telemetry on WebRender filter fallback via UseCounter. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122816
2021-08-30 15:54:46 +00:00
Emilio Cobos Álvarez 075d4ba939 Bug 1727537 - Fix one extra instance of the pref that I missed.
MANUAL PUSH: Trivial test fix on a CLOSED TREE
2021-08-30 14:42:21 +02:00
Emilio Cobos Álvarez 01aa139f4a Bug 1727537 - Remove layout.css.is-and-where-better-error-recovery.enabled. r=hiro
We shipped this in 84

Differential Revision: https://phabricator.services.mozilla.com/D123623
2021-08-30 11:08:40 +00:00
Glenn Watson bc95f6481b Bug 1726708 - Add stable key for spatial nodes r=gfx-reviewers,kvark
Add an interface (and update Gecko to provide) a stable unique
identifier for each spatial node that is consistent across
display lists.

Although this patch doesn't _do_ anything useful with this yet,
we'll use this in future to allow interning, persisting and caching
a lot more information related to primitives and clips.

For now, it just asserts that the calling code never supplies a
duplicate unique identifier - which will be useful to have running
in nightly for a couple of weeks before starting to make use of
these identifiers.

Differential Revision: https://phabricator.services.mozilla.com/D123177
2021-08-30 00:33:22 +00:00
Matt Woodrow 5c99a19709 Bug 1727683 - Remove LayerTreeInvalidation. r=jrmuizel
Depends on D123881

Differential Revision: https://phabricator.services.mozilla.com/D123882
2021-08-28 03:54:23 +00:00
Jonathan Kew eadc207a4e Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-27 16:23:25 +00:00
Jonathan Kew e8d3a05cc4 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-27 16:23:24 +00:00
Jonathan Kew 065c50ed6d Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-27 16:23:24 +00:00
Emilio Cobos Álvarez cfca657d9c Bug 1722487 - Avoid some work for font list updates. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D123363
2021-08-26 23:17:54 +00:00
Ting-Yu Lin 736fbaef17 Bug 1725973 Part 2 - Mark flex items with percentage flex-basis in column flex container as depending on CB's block-size. r=dholbert
If so, `dependsOnCBBSize` will be set to true, and later in
`ReflowInput::InitResizeFlags()` we will add
`NS_FRAME_CONTAINS_RELATIVE_BSIZE` to the appropriate ancestor.

Sorted the #include statements in ReflowInput.cpp because I added
nsFlexContainerFrame.h.

Differential Revision: https://phabricator.services.mozilla.com/D123703
2021-08-26 22:43:10 +00:00
Ting-Yu Lin 85766432de Bug 1725973 Part 1 - Add a FLEX_LOG in MoveFlexItemToFinalPosition(). r=dholbert
Make it easier to spot a flex item is being moved to the final position
rather than going through the final reflow.

Differential Revision: https://phabricator.services.mozilla.com/D123702
2021-08-26 22:43:09 +00:00
Jeff Muizelaar 03b9326d8e Bug 1727814 - Drop mVisibleRegion from box shadow items. r=miko
mVisibleRegion was added in bug 530686 as an optimization for when the invalid
region was vertically discontiguous. WebRender doesn't call ComputeVisibility
and so never had an updated mVisibleRegion and so never used it during drawing.

WebRender fallback drawing has limited invalidation support and currently only
passes a rect to ComputeVisibility so it also wasn't taking advantage of this
optimization. This is also true of nsDisplayList::Paint.

In summary, we're not currently using this optimization and supporting it bloats
the display items. If we were to reintroduce it, I think it would make more sense
for the paint region to show up in the Paint function and not be stored in the
display item.

Differential Revision: https://phabricator.services.mozilla.com/D123791
2021-08-26 20:29:23 +00:00
Alexandru Michis dc7a2fbe2f Backed out changeset 9c2d20304eee (bug 1726708) for causing conflicts while backing out Bug 1724846 2021-08-26 22:50:37 +03:00
Alexandru Michis 010cf9dd17 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame.
CLOSED TREE

Backed out changeset d0864a5c8e90 (bug 1725555)
Backed out changeset 22b941581212 (bug 1725555)
Backed out changeset f2357e055668 (bug 1725555)
2021-08-26 20:43:41 +03:00
Jonathan Kew 849c259bc7 Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-26 16:56:44 +00:00
Jonathan Kew 6481b69a6c Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-26 16:56:43 +00:00
Jonathan Kew 2dddbe283f Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-26 16:56:43 +00:00
Jeff Muizelaar 4120284f9a Bug 1727774 - Remove unused RecomputeVisibility method. r=miko
This was previously used by FrameLayerBuilder, but that's gone now.

Differential Revision: https://phabricator.services.mozilla.com/D123771
2021-08-26 16:04:50 +00:00
Gerald Squelart d1b94045b3 Bug 1727762 - Fix profiler build issue by removing obsolete macros in nsButtonFrameRenderer.cpp - r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D123772
2021-08-26 15:45:03 +00:00
Matt Woodrow d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Botond Ballo 39b5581175 Bug 1685146 - Avoid emitting a deferred transform at the wrong level of the WebRenderLayerScrollData tree. r=tnikkel
Since WebRenderLayerScrollData nodes are emitted on the way out
of the recursion over the display list, we need to be careful
that a deferred transform doesn't end up on a deeper node than
it should be.

Differential Revision: https://phabricator.services.mozilla.com/D123397
2021-08-26 04:39:49 +00:00
Botond Ballo 3ef87f649b Bug 1685146 - Add ActiveScrolledRoot::IsProperAncestor(). r=tnikkel
Depends on D123700

Differential Revision: https://phabricator.services.mozilla.com/D123701
2021-08-26 04:39:49 +00:00
Butkovits Atila c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow 0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Glenn Watson 7401f9f93e Bug 1726708 - Add stable key for spatial nodes r=gfx-reviewers,kvark
Add an interface (and update Gecko to provide) a stable unique
identifier for each spatial node that is consistent across
display lists.

Although this patch doesn't _do_ anything useful with this yet,
we'll use this in future to allow interning, persisting and caching
a lot more information related to primitives and clips.

For now, it just asserts that the calling code never supplies a
duplicate unique identifier - which will be useful to have running
in nightly for a couple of weeks before starting to make use of
these identifiers.

Differential Revision: https://phabricator.services.mozilla.com/D123177
2021-08-25 21:52:13 +00:00
Daniel Holbert 1f76d3eab9 Bug 1727604: clang-format the layout directory. r=layout-reviewers,TYLin
This patch's changes were automatically generated by this command:
./mach clang-format -p layout/

Differential Revision: https://phabricator.services.mozilla.com/D123662
2021-08-25 19:46:48 +00:00
Jonathan Kew ef07bb0d84 Bug 1725743 - Put the use of internal PDF destinations behind a pref, and disable by default due to possible cairo assertions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123650
2021-08-25 16:28:43 +00:00
Nazım Can Altınova 765bc72e8f Bug 1727529 - Remove the unused profiler servo FFI bindings r=emilio
Looks like they are some leftovers from the previous profiler Rust API changes.
I thought they were removed already, but apparently they were forgotten during
a rebase or somethig.

Differential Revision: https://phabricator.services.mozilla.com/D123619
2021-08-25 13:40:31 +00:00
Emilio Cobos Álvarez ec922d3f90 Bug 1721952 - Don't let nsTextFragment::IsBidi get out of sync even if the document has already enabled bidi. r=smaug
It's not a sound optimization in presence of adoption.

Differential Revision: https://phabricator.services.mozilla.com/D123524
2021-08-25 11:07:40 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Hiroyuki Ikezoe dad8fcb8a2 Bug 1727431 - Replace GetCrossDocParentFrame in nsIFrame::GetOffsetToCrossDoc with GetCrossDocParentFrameInProcess. r=tnikkel
GetOffsetToCrossDoc takes a valid non null pointer of nsIFrame, so it will not
walk up the frame tree across process boundaries.

If the call site needed the offset up to a frame in a different process, which
means the function call used for obtaining the nsIFrame needs to be audited such
as bug 1727229, which is for auditing GetReferenceFrame call sites
(GetOffsetToCrossDoc is often used with GetReferenceFrame, something like
 `GetOffsetToCrossDoc(GetReferenceFrame())`.

FWIW, I did skim all GetOffsetToCrossDoc call sites [1], all look okay to me,
they are in auto scrolling, event handling, display list building, in the parent
process (i.e. XUL), etc. etc. Those features have been addressed in Fission.

[1] https://searchfox.org/mozilla-central/search?q=nsIFrame%3A%3AGetOffsetToCrossDoc&path=&case=true&regexp=false

Differential Revision: https://phabricator.services.mozilla.com/D123553
2021-08-25 10:23:32 +00:00
Matt Woodrow 7755c29fd8 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 07:35:17 +00:00
Matt Woodrow 15827952f9 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 07:35:17 +00:00
Ting-Yu Lin eb00182e36 Bug 1469649 Part 3 - Upgrade the assertion to MOZ_ASSERT, and update its comments. r=dholbert
The assertion is testing the sign of `availableFreeSpace` and `isUsingFlexGrow`.
After we use 64-bit arithmetic, it's likely that the stronger assertion holds.

Differential Revision: https://phabricator.services.mozilla.com/D123519
2021-08-25 06:43:34 +00:00
Ting-Yu Lin 1162baafb1 Bug 1469649 Part 2 - Use 64-bit coord type when resolving the main size for flex items. r=dholbert
The idea of this patch is to use 64-bit coord type when resolving the
main size for flex items to avoid integer overflow when individual flex
items have huge hypothetical main sizes, which can happen with
percent-width table-layout:fixed descendants. We have to avoid integer
overflow to shrink flex items properly in that scenario.

Delete the "Note:" in `AddLastItemToMainSizeTotals()` since we remove
`AddChecked()` in favor of regular 64-bit addition for
`mTotalOuterHypotheticalMainSize`.

The wpt testcase is adapted from bug 1469649 comment 12.

Differential Revision: https://phabricator.services.mozilla.com/D123268
2021-08-25 06:43:34 +00:00
Ting-Yu Lin 1902424bff Bug 1469649 Part 1 - Promote floating point precision when computing the weight of flex items. r=dholbert
The precision of `double` is needed when we are distributing large
`sizeDelta` via `availableFreeSpace * myShareOfRemainingSpace`.

Without this patch, the wpt test added in Part 2 will fail.

Differential Revision: https://phabricator.services.mozilla.com/D123267
2021-08-25 06:43:33 +00:00
Matt Woodrow 00be3c92c2 Bug 1727172 - Use doubles instead of ints when computing video scale for fallback painting. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123411
2021-08-25 04:18:01 +00:00
criss 58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
criss 96498febad Backed out changeset b9116770d9b1 (bug 1727172) for causing failures in layout/reftests/bugs/1727172 2021-08-25 04:38:49 +03:00
Jeff Muizelaar ad77ed3d1b Bug 1727447 - Stop using PushGroupAndCopyBackground when painting masks. r=mattwoodrow
We don't support COMPONENT_ALPHA anymore.

Differential Revision: https://phabricator.services.mozilla.com/D123576
2021-08-25 01:11:45 +00:00
Matt Woodrow 59e71b6c78 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 01:04:26 +00:00
Matt Woodrow 2aa361b420 Bug 1727423 - Convert some usage of LayerManager to WindowRenderer in image/. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123554
2021-08-25 01:04:25 +00:00
Matt Woodrow e9dfbfe231 Bug 1727172 - Use doubles instead of ints when computing video scale for fallback painting. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123411
2021-08-25 00:14:03 +00:00
Hiroyuki Ikezoe 99412d3e2c Bug 1727434 - Replace GetCrossDocParentFrame nsIFrame::IsVisibleConsideringAncestors with GetCrossDocParentFrameInProcess. r=tnikkel
IsVisibleConsideringAncestors has a PresShell::IsUnderHiddenEmbedderElement which
is representing ancestor's visibility state in different process (but only for
contents processes). so it doesn't need to walk up the frame tree across process
boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D123556
2021-08-24 23:33:07 +00:00
Hiroyuki Ikezoe 584b11a7b9 Bug 1727229 - Replace GetCrossDocParentFrame in nsLayoutUtils::GetReferenceFrame with GetCrossDocParentFrameInProcess. r=boris,tnikkel
There are three call sites of nsLayoutUtils::GetReferenceFrame;

1) In CreateAnimationData [1]
2) In nsImageFrame::MaybeDecodeForPredictedSize [2]
3) In ScrollFrameHelper::GetScrolledRect [3]

1) is a piece of code for the layers backend and only used in the case of
   disabling retained-display-list, so it's not a problem at all for Fission.
2) is used for predecting image frame size, since bug 1724808 we properly handle
   cases where ancestor documents get scaled, so it's fine now.
3) was introduced to avoid redundant paints due to a pixel snapping issue in bug
   1012752 (I am thinking it's not only for fixing the redundant paints though),
   the reference frame is used for obtaining the offset from the reference to
   the scroll frame, that's fine on Fission, there's another problem in the pixel
   snapping code in GetPaintedLayerScaleForFrame which will be handled in bug
   1727228.

[1] https://searchfox.org/mozilla-central/rev/912ff8d38996365e8b843cd82ddce348d8b7f78b/gfx/layers/AnimationInfo.cpp#809
[2] https://searchfox.org/mozilla-central/rev/912ff8d38996365e8b843cd82ddce348d8b7f78b/layout/generic/nsImageFrame.cpp#1076
[3] https://searchfox.org/mozilla-central/rev/912ff8d38996365e8b843cd82ddce348d8b7f78b/layout/generic/nsGfxScrollFrame.cpp#7090

Differential Revision: https://phabricator.services.mozilla.com/D123412
2021-08-24 23:06:44 +00:00
Sebastian Hengst 8136109b66 Bug 1725702 - pretty print dictionary of variables available for reftest annotations. r=gbrown
Depends on D123499

Differential Revision: https://phabricator.services.mozilla.com/D123500
2021-08-24 22:15:04 +00:00
Jeff Muizelaar 2937dbb0e1 Bug 1727395 - Remove unused ClientLayerManager.h includes. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D123518
2021-08-24 19:27:26 +00:00
Jeff Muizelaar e8908dd3bd Bug 1727360 - Remove WindowRenderer::AsShadowForwarder() r=aosmond
We shouldn't ever be hitting this path.

Differential Revision: https://phabricator.services.mozilla.com/D123495
2021-08-24 17:58:46 +00:00
Jeff Muizelaar 4e0c60c99c Bug 1727324 - Remove WindowRenderer::AsClientLayerManager. r=aosmond
A step down the path of removing ClientLayerManager.

Differential Revision: https://phabricator.services.mozilla.com/D123451
2021-08-24 15:07:56 +00:00
Brindusan Cristian 9759c03110 Merge autoland to mozilla-central. a=merge 2021-08-24 12:46:11 +03:00
Alexandru Michis 6fa51346d4 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame::FindContinuationForOffset. a=backout
DONTBUILD

Backed out changeset a0c5d86c771b (bug 1725555)
Backed out changeset 35fbd6aaada3 (bug 1725555)
Backed out changeset 6abaa3b17be8 (bug 1725555)
2021-08-24 12:42:39 +03:00
Brindusan Cristian 8db1d46e9f Backed out 1 changesets (bug 1727172) for causing reftest failures in 1727172-1-ref.html.
CLOSED TREE

Backed out changeset e8046a319fbf (bug 1727172)
2021-08-24 08:49:01 +03:00
Matt Woodrow f9c7e2846d Bug 1727172 - Use doubles instead of ints when computing video scale for fallback painting. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123411
2021-08-24 04:06:54 +00:00
Matt Woodrow c50394f53d Bug 1726802 - Trigger pending animations after a paint with the fallback renderer. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D123390
2021-08-24 00:40:45 +00:00
Emilio Cobos Álvarez 380d55802a Bug 1725207 - Implement transform: perspective(none). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D123350
2021-08-24 00:32:24 +00:00
Emilio Cobos Álvarez b47f6e64d7 Bug 1726396 - Update getComputedStyle pseudo-element behavior. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D122978
2021-08-23 23:59:30 +00:00
Emilio Cobos Álvarez 4a28778f52 Bug 1724237 - Fix optimization from bug 1722968 to account for when we may dig out of the target subtree for SVG. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D122964
2021-08-23 23:10:15 +00:00
Jonathan Kew c02e51c6af Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-23 12:56:19 +00:00
Jonathan Kew a2a210e2f2 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-23 12:56:19 +00:00
Jonathan Kew 5128ae2085 Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-23 12:56:18 +00:00
Emilio Cobos Álvarez e8ca9c45d5 Bug 1725604 - Work around a GTK bug where wayland input regions get lost. r=stransky
Depends on D122610

Differential Revision: https://phabricator.services.mozilla.com/D122611
2021-08-23 12:10:43 +00:00
Emilio Cobos Álvarez d5d7725e5f Bug 1725604 - Drive-by cleanups. r=stransky
Depends on D122584

Differential Revision: https://phabricator.services.mozilla.com/D122610
2021-08-23 12:10:43 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Matt Woodrow 0ee96e3fa5 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-23 03:07:31 +00:00
Matt Woodrow fea5444468 Bug 1723266 - Return an infinite perspective in TransformOperation::Perspective::to_animated_zero. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122919
2021-08-22 20:46:47 +00:00
Ting-Yu Lin 73a9108de9 Bug 1715291 - Fix text in <input> is clipped by inline-end padding. r=emilio
The fix in Bug 1696885 is not correct when the width of the text in
<input> is shorter than the width of the <input>, but is long enough to
be covered by its inline-end padding.

This patch's idea is similar to the old code [1] before applying bug
1696885, but only tweak the scrollable overflow area in the inline axis.

[1] https://searchfox.org/mozilla-central/rev/c3ee9188d2f9020764db9daf8fa47a07fa3311c9/layout/generic/nsGfxScrollFrame.cpp#785-806

Differential Revision: https://phabricator.services.mozilla.com/D123244
2021-08-20 21:41:46 +00:00
Marian-Vasile Laza ddbd16c8f6 Backed out changeset d4d3c40a747d (bug 1715291) for causing Linting failures. CLOSED TREE 2021-08-21 00:07:00 +03:00
Ting-Yu Lin 9e40ab7a19 Bug 1715291 - Fix text in <input> is clipped by inline-end padding. r=emilio
The fix in bug 1696885 is not correct when the width of the text in
<input> is shorter than the width of the <input>, but is long enough to
be covered by its inline-end padding.

This patch's idea is similar to the old code [1] before applying bug
1696885, but only tweak the scrollable overflow area in the inline axis.

[1] https://searchfox.org/mozilla-central/rev/c3ee9188d2f9020764db9daf8fa47a07fa3311c9/layout/generic/nsGfxScrollFrame.cpp#785-806

Differential Revision: https://phabricator.services.mozilla.com/D123244
2021-08-20 20:47:48 +00:00
Emilio Cobos Álvarez 8d2808b5c9 Bug 1722487 - Improve preference change handling code to be faster. r=jfkthame
Remove the need to post a runnable to coalesce them (we still coalesce
theme changes because those do non-trivial work).

What can go on is that on cold load we load the font list async, and
that goes through this code via a faked font.internaluseonly.changed
pref change, which stores a reframe change hint in
mChangeHintForPrefChange.

If the page flushes after this code runs, but before the next refresh
driver tick, we will be just wasting work. So instead do the
RebuildAllStyleData call synchronously. It just schedules a flush and
posts a hint, so it doesn't do the work right there, but makes the next
flush do the work as needed, so it should be faster and also more
correct.

Also improve handling of preference sheet prefs and such to avoid more
wasted work when we go through this code, as the assumption their
handling was doing was that it gets called infrequently, but it's not
the case due to the font list updates.

Differential Revision: https://phabricator.services.mozilla.com/D123103
2021-08-20 13:03:40 +00:00
Sebastian Hengst 9a562a2cb5 Merge autoland to mozilla-central. a=merge 2021-08-20 11:56:29 +02:00
Sebastian Hengst 49f27b5e78 Backed out 3 changesets (bug 1725555) for causing crashes in nsTextFrame::FindContinuationForOffset. a=backout DONTBUILD
Backed out changeset 2b74d92f7be2 (bug 1725555)
Backed out changeset 054669fb1640 (bug 1725555)
Backed out changeset 62ba1322b82b (bug 1725555)
2021-08-20 11:52:43 +02:00
Cosmin Sabou b53abb88e7 Backed out changeset e111894317cc (bug 1726291) for causing assertion failures on WebRenderCommandBuilder.cpp. CLOSED TREE 2021-08-20 06:22:40 +03:00
Matt Woodrow 94015526e1 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-20 02:20:39 +00:00
Cosmin Sabou b8da11ef50 Backed out changeset 21e4ad4c8599 (bug 1723266) for causing mochitest plain failures on test_distance_of_transform.html. CLOSED TREE 2021-08-20 02:39:15 +03:00
Timothy Nikkel 48b857316e Bug 1726554. Allow use of example.org URLs in reftests so that cross site behaviour can be tested. r=mattwoodrow
Android reftests run the server via remoterefest.py and not from js so I didn't try to get it to work there.

Differential Revision: https://phabricator.services.mozilla.com/D123107
2021-08-19 22:30:38 +00:00
Matt Woodrow 0c573563cc Bug 1723266 - Return an infinite perspective in TransformOperation::Perspective::to_animated_zero. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122919
2021-08-19 21:47:54 +00:00
Botond Ballo baa2926fdf Bug 1723200 - Add crashtest. r=tnikkel
Depends on D123037

Differential Revision: https://phabricator.services.mozilla.com/D123038
2021-08-19 18:31:08 +00:00
Emilio Cobos Álvarez 1c4e04a80e Bug 1105364 - Respect transparent and system color border colors in forced-colors mode. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123111
2021-08-19 17:46:54 +00:00
Gijs Kruitbosch d90c0bb57f Bug 1724718 - skip some XUL-y tests on android, r=emilio,agi
Depends on D122663

Differential Revision: https://phabricator.services.mozilla.com/D122664
2021-08-19 12:13:01 +00:00
Gijs Kruitbosch 5824c28923 Bug 1724718 - fake global.css for android reftests and crashtests, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122663
2021-08-19 12:13:00 +00:00
Jonathan Kew 7c028b0377 Bug 1725555 - patch 3 - Also use continuations array to accelerate nsTextFrame::SelectionStateChanged. r=emilio
After CollectClientRectsAndText is eliminated from the profiles here, SelectionStateChanged
is the next obvious hotspot, and it can similarly be accelerated by binary-searching the continuations.

Depends on D122999

Differential Revision: https://phabricator.services.mozilla.com/D123000
2021-08-19 11:02:04 +00:00
Jonathan Kew 76844eef98 Bug 1725555 - patch 2 - Enable the primary nsTextFrame to provide, and cache, an array of all the continuations in the chain. r=emilio
This allows us to binary-search the continuations from nsRange::CollectClientRectsAndText,
instead of linear-searching the linked list for every range we need to look up.

Depends on D122998

Differential Revision: https://phabricator.services.mozilla.com/D122999
2021-08-19 11:02:04 +00:00
Jonathan Kew 7effafb1d1 Bug 1725555 - patch 1 - Cache first-continuation pointer in nsContinuingTextFrame so that accessing FirstContinuation() is constant-time. r=emilio
This is helpful when we have extremely long continuation chains, to avoid having to
follow all the back-pointers to find the primary frame. By itself it makes little
difference to the testcase here, but is a basis for the patch that follows.

Differential Revision: https://phabricator.services.mozilla.com/D122998
2021-08-19 11:02:03 +00:00
Masayuki Nakano 19fc844cdb Bug 1714810 - Add a hidden pref to prevent to collapse selection at trying to start autoscroll r=edgar
Collapsing selection with middle click is compatible behavior with Chrome.
However, some Firefox users don't like this behavior, and we have not done it
before.  Therefore, this patch adds a hidden pref to prevent the new Chrome
compatible behavior.

Keeping compatible behavior is important and middle click is mainly used for
autoscroll.  Therefore, if auto scroll is disabled, we should ignore the new
pref for better compatibility.

Unfortunately, we collapse selection before `AutoScrollChild` handles
`mousedown` event with the listener in the system group (
 `nsIFrame::HandleEvent()` is called before that).  Therefore, we cannot prevent
 the selection change from `AutoScrollChild` only when it starts scroll.
 For solving this issue, we need a lot of big changes.  Therefore, for now,
 this patch just checks whether the pref is enabled or not.

 And also the new pref is ignored when middle click paste is enabled because
 it may be followed by "paste" event even when user clicks non-editable nodes.
 Then, if web apps handle "paste" event, the new selection range may be
 important.  Therefore, we should ignore the new pref in this case.

Differential Revision: https://phabricator.services.mozilla.com/D122931
2021-08-19 10:39:11 +00:00
Dzmitry Malyshau 1da5651ba2 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-08-18 14:11:21 +00:00
Nicklas Boman ec22be8442 Bug 1724526 - Remove uses of PL_strchr in layout code r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D122060
2021-08-18 08:28:49 +00:00
Brindusan Cristian 1cdd46e3ba Backed out changeset e34f15d5e74d (bug 1622846) for causing linux toolchain build bustages.
CLOSED TREE
2021-08-18 07:58:38 +03:00
Dzmitry Malyshau 6d7cfc6c90 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-08-17 15:22:45 +00:00
Emilio Cobos Álvarez 6dc014f3df Bug 1719963 - Followup so that getMatchedCSSRules keeps working.
MANUAL PUSH: Orange fixup CLOSED TREE
2021-08-17 13:19:52 +02:00
Hiroyuki Ikezoe d5c7326eac Bug 1726081 - Replace nsLayoutUtils::GetCrossDocParentFrame calls in nsDisplayList.cpp with GetCrossDocParentFrameInProcess. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D122802
2021-08-17 09:41:34 +00:00
Emilio Cobos Álvarez a240c81d43 Bug 1719963 - Restore EnsureUniqueInner() call for now. r=jfkthame
This effectively reverts the behavior to the one before bug 1711437
(making the CC setup sound again), but without a big backout.

Fixing the CC setup of @import rules properly is a bit more involved
than what I anticipated and I don't want to have DevTools folks blocked
for too long, nor have this crash in-tree for too long either.

Differential Revision: https://phabricator.services.mozilla.com/D122819
2021-08-17 09:26:29 +00:00
Patrick f3d0961cb2 Bug 1723224 - Remove layout.css.DOMPoint.enabled, layout.css.DOMMatrix.enabled, and layout.css.DOMQuad.enabled. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122531
2021-08-17 09:06:29 +00:00
Jonathan Kew f1d0b4bbe4 Bug 1725940 - patch 2 - Move nsFontCache from the device context to the prescontext. r=emilio
To look up/instantiate platform fonts based on CSS font properties, we create a gfxFontGroup from an nsFont and other attributes; this is currently cached in an nsFontCache attached to the nsDeviceContext.

However, this assumes that the mapping to platform fonts will be the same for all documents using the given device context. In a world where visibility of platform fonts to the page may be restricted, and may depend on the individual document (e.g. if the user disables tracking protection for a particular site), the mapping represented by nsFontCache may vary, and determining how to resolve a given font request will need access to the requesting document in order to know what visibility it is allowed.

To support this, this patch moves the nsFontCache from nsDeviceContext to nsPresContext. In itself, this should cause no visible change in behavior, but it provides a basis for the patches that will follow in bug 1715501.

It's likely that this will have some effects on individual performance tests, depending on the exact content and sequencing of page loads, because of changed caching behavior. E.g. having a per-presContext cache may sometimes mean that we no longer take advantage of a cached gfxFontGroup that a previously-loaded page created; but on the other hand the caches will tend to be smaller and have faster lookups.

My testing so far suggests that we will see some apparent regressions, alongside some improvements, but that overall there should be little change. I'd like to get this change landed separately, before any of the actual font-visibility behavior changes, so that we can more clearly see and isolate any unexpected effects.

Differential Revision: https://phabricator.services.mozilla.com/D122715
2021-08-16 13:58:03 +00:00
Hiroyuki Ikezoe 85efe18337 Bug 1725893 - Replace GetCrossDocParentFrame with GetCrossDocParentFrameInProcess in nsIFrame::GetScreenRectInAppUnits. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D122675
2021-08-16 02:20:29 +00:00
Hiroyuki Ikezoe 12bf7decdb Bug 1678089 - Trigger the test function after the child document received the load event. r=dholbert
Though the test funtion is called twice since the parent document reloads the
iframe document, but the test will not run for the second call since it's
prevented by `testRunning` flag in test_bug851485.html.

Differential Revision: https://phabricator.services.mozilla.com/D122662
2021-08-14 22:55:17 +00:00
Gijs Kruitbosch 3f4ca6437f Bug 1698332 - fix clear button in input type=search on android, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122541
2021-08-13 09:17:26 +00:00
Emily McDonough e71325b8e1 Bug 1722890 Part 2 - Add disabled print preview test for scaled content on the edge of the clipping rect r=dholbert
Scaling currently doesn't work in print preview tests. This adds a test that
will begin to fail if scaling gets fixed, to tell us to enable the actual
scaled content test instead.

See bug 1725486 for the scaling issue.

Differential Revision: https://phabricator.services.mozilla.com/D122292
2021-08-12 23:31:20 +00:00
Emily McDonough 21ced21400 Bug 1722890 Part 1 - Apply page scaling to the clipping rect for page content frames r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D122291
2021-08-12 23:31:19 +00:00
stransky 36904ac58d Bug 1720551 [Wayland] Update popup anchor for RTL locales, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122333
2021-08-12 14:07:30 +00:00
Daniel Holbert 5d858134b3 Bug 1459682: Reenable test_after_paint_pref.html on Windows ASAN builds. (no review; just a metadata tweak to reenable a test that's now been fixed)
This test was disabled for some sort of failure on Windows ASAN configurations,
several years ago.

The bug doesn't have details on the failure, but it's likely the failure was a
version of the same race condition that turned up (and was recently fixed) in
bug 1720485.  So, let's see if we can reenable this test on Windows ASAN now.

Differential Revision: https://phabricator.services.mozilla.com/D122314
2021-08-12 17:10:27 +00:00
Iulian Moraru 75fa983116 Backed out changeset 8b346c50a44c (bug 1720551) for causing bc failures on browser_test_clipboardcache.js. CLOSED TREE 2021-08-12 19:24:16 +03:00
stransky 4fdb1bce7a Bug 1720551 [Wayland] Update popup anchor for RTL locales, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122333
2021-08-12 14:07:30 +00:00
Olli Pettay 325a2c101d Bug 1725133 - Consider to not run a catch-up tick before a normal tick, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D122332
2021-08-12 08:50:56 +00:00
Matt Woodrow 9b4a2add9f Bug 1724848 - Make sure we unconditionally invalidate the widget and request a composite when the refresh driver tries to paint a fallback renderer. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D122391
2021-08-11 23:45:32 +00:00
Emilio Cobos Álvarez 8f1263bd9b Bug 1724907 - Annotate reftest as failing on Android.
MANUAL PUSH: Trivial orange fix on a CLOSED TREE
2021-08-11 17:26:32 +02:00
Emilio Cobos Álvarez 7380b2ed60 Bug 1724907 - Reftest. r=jfkthame
Confirming on try that it behaves as expected.

Differential Revision: https://phabricator.services.mozilla.com/D122245
2021-08-11 13:34:53 +00:00
Timothy Nikkel 423dd4a3bd Bug 1724808. Take into account ancestor documents in other processes' resolution when pre-decoding images. r=hiro
Depends on D122212

Differential Revision: https://phabricator.services.mozilla.com/D122213
2021-08-11 07:18:09 +00:00
stransky 50cee5c326 Bug 1718727 [Wayland] Don't constrain popup size by screen size on Wayland, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122102
2021-08-11 06:37:07 +00:00
stransky b6f99ae08b Bug 1718727 [Wayland] Don't constrain mouse events by screen size on Wayland, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122101
2021-08-11 06:37:06 +00:00
Timothy Nikkel 33ea672136 Bug 1724904. Send resolution to oopifs with webrender. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D122212
2021-08-10 23:42:43 +00:00
Mats Palmgren 05d79d0404 Bug 1724880 - Add a layout-debugger menu item that dumps CounterManager data. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122210
2021-08-10 23:15:31 +00:00
Gijs Kruitbosch 3355c934ef Bug 1724718 - forget AddTask.js ever existed as bug 1544051 already removed it, r=bgrins
Differential Revision: https://phabricator.services.mozilla.com/D122166
2021-08-10 22:33:06 +00:00
Ting-Yu Lin 2fe6eb093f Bug 1611303 - Always assume a flex item needs a block-axis resize in final reflow. r=dholbert
In an incremental reflow, if a flex item has a valid bsize cache , we
skip its measuring reflow. However, we may still need to set relevant
bsize flags if the flex container is changing its definiteness in the
block-axis. See bug 1611303 comment 2 for an analysis.

This patch is playing safe by always calling SetHasBSizeChange() if we
override bsize for the item. Of course this can be solved in a more
sophisticated way by checking whether the item really has a block-axis
resize, but that means we'll need to duplicate a lot of logic in
FlexItem::NeedsFinalReflow().

Differential Revision: https://phabricator.services.mozilla.com/D122041
2021-08-10 21:43:14 +00:00
Jan Henning 6a54fe3b58 Bug 1685756 - Part 3: Take default scale into account when disabling font inflation. r=hiro
Font inflation isn't required for pages whose viewport is narrow enough that we
don't have to zoom *out* when doing zoom-to-fit.

As the viewport scale is given as a CSSToScreenScale, this means that what we're
actually doing at the moment, though, is comparing the width of the viewport in
CSS pixels to the width of the screen in physical pixels, *without* taking the
default scale on a high-DPI device into account.

This issue affects neither pages using a "width=device-width" viewport (the
IsAutoSizeEnabled() check handles those), nor pages without an explicitly
specified viewport at all (the viewport info returns the minimum zoom level in
that case, i.e. 25 %, which would therefore require a device scale of > 4 in
order for us to erroneously turn off font inflation - even modern phones don't
seem to quite reach *that* sort of pixel density, e.g. a Pixel 5 only reports a
default scale of ~2.73.

For pages with an explicitly sized viewport this can however mean that we turn
off font inflation too early: Slashdot e.g. uses "width=1000", which means that
on a phone with a 720 px screen font inflation is correctly enabled, but on a
different phone squeezing 1080 px into the same physical screen width (i.e.
higher DPI, but *not* a physically larger screen), font inflation is suddenly
and incorrectly turned off.

Differential Revision: https://phabricator.services.mozilla.com/D122059
2021-08-10 19:36:24 +00:00
Jan Henning 51801cf11b Bug 1685756 - Part 2: Add reftests for explicitly sized viewports. r=hiro
Touching layout.css.devPixelsPerPx during a reftest seems to cause a few
peculiarities:
- On OS X, increasing layout.css.devPixelsPerPx almost immediately runs into
  bug 1263092, so I'm skipping that test there.
- Likewise, under Webrender on Android using a value > 1 causes some weird
  display corruption issues during all subsequent tests running within the same
  task (bug 1724608).
- We're randomly hitting the "can't mark frame dirty during reflow" assertion
  again (bug 1724623).

Differential Revision: https://phabricator.services.mozilla.com/D122058
2021-08-10 19:36:24 +00:00
Jan Henning 030f9901f0 Bug 1685756 - Part 1: Use content viewer size for determining font inflation state. r=hiro
For pages with an explicitly sized viewport, whether or not we enable font
inflation depends on whether the viewport is larger than content viewer size (so
it will be displayed zoomed out) or not.

For historical reasons, so far we've used the screen size as a proxy for the
content viewer size. On a phone this is a reasonable approximation (albeit a bit
less so now that Android also offers split-screen and picture-in-picture modes),
but when testing/debugging on a desktop computer, this means that the results
will depend on the screen size of the machine in question, which makes it rather
hard writing sensible test cases for that scenario.

Therefore, we're finally following up with that TODO comment in the existing
code and start using the content viewer size of the top-level document instead.
Fission means that approach won't easily work for cross-process iframes, but
given that the current calculations don't make much sense for frames anyway, we
just accept that limitation, since a proper solution as per bug 1724311 would
obsolete any work done here anyway.

Differential Revision: https://phabricator.services.mozilla.com/D122057
2021-08-10 19:36:23 +00:00
Sebastian Hengst a344f2a432 Bug 1724583 - 513153-2a.html: set widget.non-native-theme.webrender to true to let it pass on Beta and Release with macOS 11 DONTBUILD
Depends on D122280

Differential Revision: https://phabricator.services.mozilla.com/D122281
2021-08-10 19:22:56 +00:00
Sebastian Hengst 5daaaa7bf7 Bug 1724582 - dynamic-max-width.html: set widget.non-native-theme.webrender to true to let it pass on Beta and Release with macOS 11 DONTBUILD
Depends on D122279

Differential Revision: https://phabricator.services.mozilla.com/D122280
2021-08-10 19:22:56 +00:00
Ting-Yu Lin 0141546f03 Bug 1654044 - Carry mTreatBSizeAsIndefinite flag from scroll frame to scrolled inner frame (-moz-scrolled-content). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D122038
2021-08-10 18:33:38 +00:00
Emilio Cobos Álvarez 624584c368 Bug 1724405 - Make ui.caretBlinkCount a proper widget int, and make it respect GTK settings. r=stransky
And make sure the caret ends up being visible, rather than _not_
visible.

This should be implementable on windows as well. It seems macOS doesn't
have a timeout thing.

Differential Revision: https://phabricator.services.mozilla.com/D122132
2021-08-10 14:39:27 +00:00
Masayuki Nakano 53bef623bf Bug 1717760 - Stop using `KeyEvent.initKeyEvent` in our tests r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121028
2021-08-10 03:51:37 +00:00
Matt Woodrow bd3bd43954 Bug 1724839 - Mark tests as passing. r=jrmuizel
Depends on D122176

Differential Revision: https://phabricator.services.mozilla.com/D122177
2021-08-10 03:38:42 +00:00
Matt Woodrow 9e61c44d5d Bug 1724839 - Snap transforms for video/canvas painting in the same way that Layer rendering did. r=jrmuizel
This takes the logic used for Image/CanvasLayer::ComputeEffectiveTransforms and uses it to get matching rendering for the Paint path.

Depends on D122175

Differential Revision: https://phabricator.services.mozilla.com/D122176
2021-08-10 03:38:42 +00:00
Matt Woodrow d93a690a00 Bug 1724839 - Don't use BasicLayerManager to paint video elements. r=jrmuizel
Depends on D122172

Differential Revision: https://phabricator.services.mozilla.com/D122173
2021-08-10 03:38:41 +00:00
Matt Woodrow 1d5382e878 Bug 1724839 - Don't use BasicLayerManager for painting CanvasRenderer backed canvas elements. r=jrmuizel
Depends on D122171

Differential Revision: https://phabricator.services.mozilla.com/D122172
2021-08-10 03:38:40 +00:00
Matt Woodrow 8a447ade17 Bug 1724839 - Don't use BasicLayerManager for painting ImageBitmap <canvas> elements. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D122171
2021-08-10 03:38:40 +00:00
Daniel Holbert a1d0abeb81 Bug 1720485: Adjust test_after_paint_pref.html to use a double-rAF instead of a timeout, to give its pref-adjustment a better chance to take effect. r=mattwoodrow
nsPresContext has a flag that caches the value of this pref, and the flag gets
updated in the next refresh driver tick after a pref-change occurs.  Right now
we don't have a strong guarantee that the flag will have been updated by the
time the test assumes that it has, which is why we're seeing intermittent
failures.

This patch adjusts the test so that it waits for a double-rAF before proceeding
from its pref adjustment.  I believe this is the recommended way of forcing &
waiting-out at least one refresh driver tick; and this should let the test
reliably assume the pref-adjustment has taken effect.

Differential Revision: https://phabricator.services.mozilla.com/D122169
2021-08-10 03:21:41 +00:00
Matt Woodrow ec9b5dd838 Bug 1720152 - Recurse into replay for dependencies, rather than using a temp surface. r=jrmuizel,bobowen,emilio
Differential Revision: https://phabricator.services.mozilla.com/D120050
2021-08-09 22:07:36 +00:00
Mats Palmgren 14c9063444 Bug 1706080 - [css-fonts] Implement 'font-synthesis: small-caps'. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D114313
2021-08-09 21:41:34 +00:00
Emilio Cobos Álvarez 4498297532 Bug 1722662 - Add tests for autofill rendering. r=hiro
They're not the prettiest, but that's all that needs to happen right now for
autofill to work.

Depends on D122015

Differential Revision: https://phabricator.services.mozilla.com/D122016
2021-08-09 21:29:26 +00:00
Emilio Cobos Álvarez 831f0bb860 Bug 1722662 - Load SpecialPowers in reftests. r=jgraham,jmaher
Depends on D122014

Differential Revision: https://phabricator.services.mozilla.com/D122015
2021-08-09 21:29:26 +00:00
Emilio Cobos Álvarez 10a2cfebc1 Bug 1722662 - Make :-moz-autofill-preview imply :autofill. r=hiro
This is useful so that author rules for :autofill also work for the
autofill preview.

It also makes the UA sheet in forms.css simpler (otherwise we'd need to
tweak the selectors to put :-moz-autofill-preview everywhere we put
:autofill).

Differential Revision: https://phabricator.services.mozilla.com/D122014
2021-08-09 21:29:25 +00:00
Mike Hommey 84b57c8377 Bug 1724278 - Fix --with-system-nspr build after bug 1722652 r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D121940
2021-08-09 21:12:04 +00:00
Ting-Yu Lin cd5b6baa4e Bug 1686961 - Don't cache ascent in CachedBAxisMeasurement. r=dholbert
CachedBAxisMeasurement::mAscent caches the ascent of a flex item after
the measuring reflow, but the ascent may change after the final reflow
if the item is stretched and does some vertical alignment internally.
However, we don't cache the new ascent. Therefore, when we reflow the
item incrementally, if the CachedBAxisMeasurement::Key is valid, we just
skip the measuring reflow, and retrieve the wrong ascent from the cache.

Instead of fixing this bug by updating the cached ascent or rejecting
the ascent cache for a stretching flex item in block axis, this patch
removes the cache and sets ReflowOutput's BlockStartAscent() to the flex
item after the item's measuring reflow. (We've done the same after the
item's final reflow.) If the ascent is ReflowOutput::ASK_FOR_BASELINE,
we resolve in FlexItem::ResolvedAscent() anyway.

Differential Revision: https://phabricator.services.mozilla.com/D121404
2021-08-09 20:55:11 +00:00