Commit Graph

1173 Commits

Author SHA1 Message Date
Timothy Nikkel
08466498c9 Bug 1787684. Only return views with widgets from FindFloatingViewContaining. r=emilio
The code that bug 1754436 deleted checked to make sure there was a widget for the returned view, but it looks like it's possible in some edge cases to have an open popup that doesn't have a widget (most likely just for a split second). We need a widget to dispatch the event, and if it doesn't have a widget it's not visible so no point in touching it at all anyways.

Differential Revision: https://phabricator.services.mozilla.com/D155819
2022-08-29 09:58:11 +00:00
Andrew Osmond
c7c852209d Bug 1677183 - Implement WebGPU's Queue.copyExternalImageToTexture. r=jgilbert,jimb,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145269
2022-08-18 16:11:46 +00:00
Norisz Fay
a5244481a8 Backed out changeset 4e76508f9136 (bug 1677183) for causing mochitest failures on test_queue_copyExternalImageToTexture.html CLOSED TREE 2022-08-08 14:03:15 +03:00
Andrew Osmond
0bc16477eb Bug 1677183 - Implement WebGPU's Queue.copyExternalImageToTexture. r=jgilbert,jimb,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145269
2022-08-08 09:54:25 +00:00
Emilio Cobos Álvarez
893e093b01 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.

Mostly automatic via:

  rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'

With trivial build fixes.

Not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151846
2022-07-14 16:03:25 +00:00
Razvan Cojocaru
839dab9e35 Bug 1771533 - Audit usages of MatrixScalesDouble to see if using MatrixScales would make more sense in some cases. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D148498
2022-06-08 21:28:30 +00:00
Timothy Nikkel
8dc6be8c00 Bug 1768593. Allow createImageBitmap to work on img elements whose src is an svg with no specified size of resizeWidth/Height is specified. r=lsalzman
Just need to pass the resizeWidth/Height down into SurfaceFromElement for html image elements so we can ask for a frame of the right size from the image.

We have to annotate the new test that I add as failing, just like all of the existing tests, because we don't yet support the resizeQuality option, so we fail that part of the test and pass all of the rest of it. The part that we are fixing here passes.

Differential Revision: https://phabricator.services.mozilla.com/D147739
2022-06-02 03:31:43 +00:00
Razvan Cojocaru
4de44a620e Bug 1770289 - Change the return type of nsLayoutUtils::ComputeSuitableScaleForAnimation() to MatrixScales. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147835
2022-06-01 23:19:11 +00:00
Miko Mynttinen
45c5c7a493 Bug 1766650 - Store modified frames in display root frame RetainedDisplayListBuilder r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D144889
2022-05-30 14:20:58 +00:00
Emilio Cobos Álvarez
e48bb99524 Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.

Doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D147555
2022-05-28 01:04:24 +00:00
Razvan Cojocaru
5c07d5569e Bug 1767124 - Change the return type of nsLayoutUtils::GetTransformToAncestorScaleExcludingAnimated to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D147100
2022-05-27 19:23:33 +00:00
Razvan Cojocaru
d73fada536 Bug 1767123 - Change the return type of nsLayoutUtils::GetTransformToAncestorScale to MatrixScalesDouble. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D146834
2022-05-22 01:36:29 +00:00
Emilio Cobos Álvarez
dfce65267f Bug 1768285 - Clean up unused -moz-window-shadow values. r=jwatt
After bug 1768278 and bug 1767815 there's no more uses of the cliprounded value
in the tree (also it causes artifacts on HiDPI screens so we probably don't
want new usages).

The "sheet" value is unused, and the other values other than "default" and
"none" are only derived from "default", so they don't need to be exposed in the
style system.

Differential Revision: https://phabricator.services.mozilla.com/D145821
2022-05-17 23:20:48 +00:00
Emilio Cobos Álvarez
83678aa490 Bug 1768157 - Remove kSelectPopupList. r=jwatt
It's unused since bug 1744009 at least, so no behavior change.

Depends on D145714

Differential Revision: https://phabricator.services.mozilla.com/D145715
2022-05-06 15:46:49 +00:00
Emilio Cobos Álvarez
b0b31562ed Bug 1767463 - Clean-up rounded rect computation for Windows popups. r=tnikkel
This doesn't change behavior.

mBounds are LayoutDevice pixels, so the shadow width should too.

In any case, in Win10+ layout to desktop scale is 1.0:

  https://searchfox.org/mozilla-central/rev/ea1234192518e01694a88eac8ff090e4cadf5ca4/widget/windows/ScreenHelperWin.cpp#32

Differential Revision: https://phabricator.services.mozilla.com/D145336
2022-05-04 01:41:51 +00:00
Timothy Nikkel
3240aaa288 Bug 1754662. Refactor nsLayoutUtils::GetPopupFrameForEventCoordinates. r=emilio
This lets us re-use code for bug 1754436.

Differential Revision: https://phabricator.services.mozilla.com/D138392
2022-02-12 09:41:50 +00:00
Cristian Tuns
90d90707b1 Backed out changeset 3b7f350adae9 (bug 1754662) for causing build bustages on nsLayoutUtils.cpp CLOSED TREE 2022-02-12 04:04:52 -05:00
Timothy Nikkel
89f95c7ace Bug 1754662. Refactor nsLayoutUtils::GetPopupFrameForEventCoordinates. r=emilio
This lets us re-use code for bug 1754436.

Differential Revision: https://phabricator.services.mozilla.com/D138392
2022-02-12 08:46:47 +00:00
Emilio Cobos Álvarez
dc15260cbc Bug 1746794 - Make more nsLayoutUtils functions SVG-text aware. r=layout-reviewers,jfkthame
This makes TransformPoint and TransformRect deal with SVG text
correctly. We need TransformPoint support so that GeometryUtils works as
expected, since we need to transform the points individually so that
stuff like transforms report the expected result (a rect doesn't cut it
for those).

Differential Revision: https://phabricator.services.mozilla.com/D135152
2022-01-28 16:50:14 +00:00
Ting-Yu Lin
b6ce4c09ef Bug 1745113 Part 4 - Change AppUnitWidthOfString to take a Span parameter. r=jfkthame
`Span` is more versatile than `const String&`, and existing callers passing a
String into this function do not need any change.

This patch makes the next part simpler.

Differential Revision: https://phabricator.services.mozilla.com/D135642
2022-01-13 18:36:04 +00:00
Emilio Cobos Álvarez
c31cbabb32 Bug 1748174 - Clean-up a bit touch-action code. r=hiro
This shouldn't change behavior but makes following the code a bit
easier. There's no point in using callbacks for touch-action as:

 * We return the computed flags anyways.
 * Each caller wants to do something different.
 * (more importantly) The callback gets called synchronously.

So move the relevant code to TouchActionHelper and make the callers deal
with the flags as they please. I've preserved the behavior of only doing
the thing if the flags array is non-empty.

Differential Revision: https://phabricator.services.mozilla.com/D134933
2022-01-04 13:31:34 +00:00
Emilio Cobos Álvarez
86ba03f68f Bug 1739464 - Simplify language-dependent font fallback code. r=jfkthame
.fallback is always the default font for the lang group unless we're a
system font (in which case it's "none").

The only reason we need that is because we need to react to
language changes (which affect the initial font).

Simplify the model a bit doing the language lookup in gfxTextRun (this
should avoid allocating a few nsStyleFont structs too.

Depends on D130732

Differential Revision: https://phabricator.services.mozilla.com/D131312
2021-11-19 16:11:55 +00:00
Botond Ballo
d1d9d2b8fa Bug 1740410 - Remove nsLayoutUtils::GetSideBitsAndAdjustAnchorForFixedPositionContent(). r=hiro
The anchor adjustment was only used by Layers.

Differential Revision: https://phabricator.services.mozilla.com/D130829
2021-11-10 04:42:57 +00:00
Timothy Nikkel
1ac7c75811 Bug 1733332. Change nsLayoutUtils::GetTransformToAncestorScale from Is2D to CanDraw2D. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D127073
2021-10-08 06:21:50 +00:00
Jeff Muizelaar
dea081d3e0 Bug 1734506 - Remove Layer. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D127753
2021-10-07 15:24:07 +00:00
Marian-Vasile Laza
aa5e6b1b3b Backed out 2 changesets (bug 1734506, bug 1734502) for causing build bustages. CLOSED TREE
Backed out changeset 542b8b4e17ca (bug 1734506)
Backed out changeset b37746f292da (bug 1734502)
2021-10-07 05:15:58 +03:00
Jeff Muizelaar
aac35e5a89 Bug 1734506 - Remove Layer. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D127753
2021-10-07 01:21:16 +00:00
Timothy Nikkel
95d731df52 Bug 1732600. Pass down transform to ancestor scale to child processes. r=botond
In bug 1731929 we added this value, here we give it the value we want for child processes. I think the code comments should explain it.

Differential Revision: https://phabricator.services.mozilla.com/D126629
2021-10-05 09:28:57 +00:00
Timothy Nikkel
89166b8063 Bug 1731938. Remove unused nsLayoutUtils::GetCurrentAPZResolutionScale. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D126311
2021-09-22 04:17:24 +00:00
Matt Woodrow
d31c9f0016 Bug 1725267 - Remove paint compression. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125799
2021-09-22 03:36:51 +00:00
Matt Woodrow
80d6febd27 Bug 1725267 - Remove unused NO_COMPOSITE. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125798
2021-09-22 03:36:51 +00:00
Matt Woodrow
76294f9cfd Bug 1542929 - Remove mReferenceFrame from nsDisplayItem. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124009
2021-09-13 05:01:35 +00:00
criss
3f0efebda9 Backed out 10 changesets (bug 1714138, bug 1542929, bug 1728232, bug 1729236, bug 1728258, bug 1728251, bug 1728050) for causing bug 1424348 a=backout
Backed out changeset c5b71e6ce0e5 (bug 1729236)
Backed out changeset c6bcc4ed3d2e (bug 1729236)
Backed out changeset 7e292895282a (bug 1729236)
Backed out changeset d9ddd915e0c2 (bug 1714138)
Backed out changeset 82b98d2f0dcf (bug 1728258)
Backed out changeset 9a84a36b9dc4 (bug 1542929)
Backed out changeset 96be978630ff (bug 1728251)
Backed out changeset d7a8bf19d849 (bug 1728251)
Backed out changeset cce0c53b439f (bug 1728232)
Backed out changeset 3afd6aee7849 (bug 1728050)
2021-09-12 12:00:30 +03:00
Matt Woodrow
566cb8c6f9 Bug 1542929 - Remove mReferenceFrame from nsDisplayItem. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124009
2021-09-10 03:43:34 +00:00
Timothy Nikkel
0af6e5c2e6 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
Marian-Vasile Laza
da24ed0855 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
af4b5ca97b 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
0f8591792b 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
6b4df4ae3f Bug 1728914 - Convert painting entrance points to use WebRenderLayerManager directly. r=gfx-reviewers,aosmond
Depends on D124417

Differential Revision: https://phabricator.services.mozilla.com/D124418
2021-09-05 02:16:37 +00:00
Jeff Muizelaar
018e4ac4ea 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
Matt Woodrow
eea082d1f2 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-23 03:07:31 +00:00
Cosmin Sabou
1efa0d3a4e 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
2a95268df2 Bug 1726291 - Remove FrameLayerBuilder. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D122930
2021-08-20 02:20:39 +00:00
Emilio Cobos Álvarez
5325b22807 Bug 1722968 - Add an optimization for GetAllInFlowRects to avoid expensive ancestor lookups in DOMIntersectionObserver. r=jwatt
Part of the issue with the profile in the blocked bug is that 30% of the
time is spent in nsLayoutUtils::FindNearestCommonAncestorFrame from
DOMIntersectionObserver::Update. That shouldn't be needed since in most
cases we know we're an ancestor.

We have an optimization for the root frame but DOMIntersectionObserver
keeps its rects relative to `target`. So we only need to do the
expensive transform for IB splits / fragmented flows.

Differential Revision: https://phabricator.services.mozilla.com/D121214
2021-07-30 12:34:00 +00:00
Hiroyuki Ikezoe
af2a47d051 Bug 1700245 - Introduce IsProperAncestorFrameCrossDocInProcess and use it in PruneDisplayListForExtraPage. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120428
2021-07-27 10:47:40 +00:00
Miko Mynttinen
8df6649834 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-19 11:28:20 +00:00
Alexandru Michis
9b9c5fe24e Backed out 2 changesets (bug 1720804) for causing bustages.
CLOSED TREE

Backed out changeset 5278e88c6d34 (bug 1720804)
Backed out changeset 1acb4ed79b6b (bug 1720804)
2021-07-16 18:10:11 +03:00
Miko Mynttinen
397ffc88e1 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120041
2021-07-16 14:36:34 +00:00
Mats Palmgren
9b44303ed1 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-14 01:22:04 +00:00
Hiroyuki Ikezoe
43a5d7a42f Bug 1700245 - Replace IsAncestorFrameCrossDoc with IsAncestorFrameCrossDocInProcess in TransformFrameRectToAncestor. r=emilio
And add a note to clarify IsAncestorFrameCrossDocInProcess doesn't work
across different process documents.

Differential Revision: https://phabricator.services.mozilla.com/D117502
2021-06-13 22:02:23 +00:00