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

19245 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin 143ea4e3e4 Bug 1745828 Part 3 - Remove ScrollFrameHelper::HasResizer(). r=emilio
HasResizer() is equivalent to mResizerBox and is used only within
ScrollFrameHelper, so no need to expose it. Also, remove some unreachable
if-branches.

Differential Revision: https://phabricator.services.mozilla.com/D133693
2021-12-14 08:15:13 +00:00
Ting-Yu Lin bf69629542 Bug 1745828 Part 2 - Revise computation of scrollbars' rects. r=emilio
Revise vRect & hRect computation because the scrollbar gutter can be at both
inline start and inline end sides. For example, we can no longer use
`aInsideBorderArea.width - mScrollPort.width` to get the actual width of the
vertical scrollbar. We want to compute them in different ways.

Differential Revision: https://phabricator.services.mozilla.com/D133692
2021-12-14 08:15:12 +00:00
Ting-Yu Lin 06b8f84060 Bug 1745828 Part 1 - Compute scrollbar rects only if they are shown. r=emilio
Compute the actual vertical & horizontal scrollbars' rects (vRect & hRect) only
when we decide to show the scrollbars. The rationale is that after introducing
scrollbar-gutter in bug 1715112, `mScrollPort` is no longer equal to
`aInsideBorderArea` even if we don't show scrollbars, and we want scrollbar
rects remaining empty to avoid showing them.

Simplify `hasVisualOnlyScrollbarsOnBothDirections` and move it closer to its
first usage.

Differential Revision: https://phabricator.services.mozilla.com/D133691
2021-12-14 08:15:12 +00:00
Nika Layzell 7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Ting-Yu Lin 5909d5b7f3 Bug 1744895 Part 3 - Fix justify-*:{left|right} mapping for abspos children of flex containers. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D133169
2021-12-10 17:42:23 +00:00
Ting-Yu Lin fd68e79da7 Bug 1744895 Part 2 - Fix justify-*:{left|right} mapping for vertical row-oriented flex containers. r=dholbert
Currently, we use IsPhysicalLTR() to query which is the start side of the
physical left <-> right axis. However, for vertical row-oriented flex
containers, physical left <-> right axis is its cross axis. We really should
query IsBidiLTR() instead because its main axis is parallel to line-left <->
line-right axis (i.e. inline axis).

flexbox-justify-content-wmvert-003.html is adapted from
flexbox-justify-content-wmvert-002.html.

Differential Revision: https://phabricator.services.mozilla.com/D133168
2021-12-10 17:42:22 +00:00
Ting-Yu Lin 06346bb565 Bug 1744895 Part 1 - Extract a helper mapping justify-*:{left|right} to {start|end}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D133167
2021-12-10 17:42:22 +00:00
Andrew Osmond 878275c3b6 Bug 1736177 - Part 11. Plumb in OffscreenCanvasDisplayHelper. r=jgilbert
This patch integrates OffscreenCanvasDisplayHelper with
HTMLCanvasElement, OffscreenCanvas and nsDisplayCanvas to allow
asynchronous display of an OffscreenCanvas.

Differential Revision: https://phabricator.services.mozilla.com/D130787
2021-12-10 02:57:55 +00:00
Hiroyuki Ikezoe 29ec3a9389 Bug 1740289 - Notify onShowDynamicToolbar on overflow: hidden case. r=geckoview-reviewers,agi,emilio
The reason why we don't change GetOverflowState is that GetOverflowState is also
used for overflow/underflow event firing and our frontend code expects both
the events are fired on overflow:hidden elements [1]. And it looks like it's by
design as per one of test cases for overflow events has `overflow:hidden` style
in the first place.

[1] https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/devtools/client/shared/components/tabs/Tabs.css#38-39
[2] https://searchfox.org/mozilla-central/rev/df6434d2ebfdf2b5f89f205fc81d60d64a774fe1/layout/generic/test/test_overflow_event.html#46

Differential Revision: https://phabricator.services.mozilla.com/D131103
2021-12-10 01:12:56 +00:00
Csoregi Natalia 1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond 8e0ebe8c37 Bug 1736177 - Part 11. Plumb in OffscreenCanvasDisplayHelper. r=jgilbert
This patch integrates OffscreenCanvasDisplayHelper with
HTMLCanvasElement, OffscreenCanvas and nsDisplayCanvas to allow
asynchronous display of an OffscreenCanvas.

Differential Revision: https://phabricator.services.mozilla.com/D130787
2021-12-09 19:25:28 +00:00
Masayuki Nakano 9adbf59c05 Bug 1740853 - part 3: Redesign `nsContentUtils::ComparePoints_Fix*()` as taking `int64_t` for the offset r=smaug
For reducing the legacy behavior emulator of `nsContentUtils::ComparePoints`
and make it simpler, this patch makes it take `int64_t` as the offset.
Additionally, it's named "ComparePoints_AllowNegativeOffsets`.

Differential Revision: https://phabricator.services.mozilla.com/D132549
2021-12-09 17:06:18 +00:00
Masayuki Nakano ae4dedab30 Bug 1741148 - part 10: Make `nsIFrame::ContentIndexInContainer()` return `Maybe<uint32_t>` for index of a DOM node r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131344
2021-12-09 16:20:43 +00:00
Masayuki Nakano 3816ca9546 Bug 1741148 - part 3: Make users of `nsINode::ComputeIndexOf_Deprecated()` use `nsINode::ComputeIndexOf()` if the result is not set to `int32_t` nor return as `int32_t` r=smaug
This patch fixes only the cases if the result of `ComputeIndexOf_Deprecated()`
is used as unsigned integer with implicit or explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D131336
2021-12-09 11:55:36 +00:00
Masayuki Nakano f2baf0d9ab Bug 1741148 - part 1: Rename `nsINode::ComputeIndexOf` to `ComputeIndexOf_Deprecated` r=smaug
It's hard to fix some callers.  Therefore, in this bug, we should fix only
simple cases.  Therefore, we should rename existing API first.

Differential Revision: https://phabricator.services.mozilla.com/D131334
2021-12-09 08:32:30 +00:00
Masayuki Nakano c19aa5aaa5 Bug 1740853 - part 1: Make `nsContentUtils::ComparePoints` take `uint32_t` for offset in DOM nodes r=smaug
They are defined as "unsigned long" by the standards.  So we should use
`uint32_t` rather than `int32_t` with the methods.  However, layout code
uses `int32_t` a lot for representing the offset.  Therefore, this patch
adds `*_FixOffset1` etc for the cases which cannot fix easily in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D131110
2021-12-09 07:51:45 +00:00
Masayuki Nakano 82e2013683 Bug 1735446 - part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Masayuki Nakano 8213a63459 Bug 1735446 - part 1: Make `Selection` use `uint32_t` for handling offset in DOM nodes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128844
2021-12-09 00:45:19 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Jonathan Kew 2927597ae0 Bug 1742626 - Attempt to improve Indic-script ::first-letter behavior by not allowing a boundary after a ligated virama in scripts that use half-consonant forms. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132373
2021-12-08 15:42:55 +00:00
Boris Chiou 8604a51732 Bug 1676791 - Part 2: Implement the infrastructure of scroll-linked animations. r=emilio,hiro
The basic part of the infrastructure of scroll-linked animations. This is
designed based on scroll-linked animation generated by CSS. We will
implement the timing computation and hook the ScrollTimeline to the CSS
animations in the following patches.

All the tests are in the patch that hooks ScrollTimeline to CSS Animation.

Differential Revision: https://phabricator.services.mozilla.com/D129100
2021-12-08 01:16:28 +00:00
Ting-Yu Lin e9ca88e699 Bug 1743959 Part 2 - Simplify the computation regarding the space occupied by scrollbars in TryLayout. r=hiro
This patch is inspired by `ScrollFrameHelper::GetActualScrollbarSizes()` that
uses a nsMargin to represent the space occupied by scrollbar.

In bug 1715112, TryLayout is going to consider the space occupied by the
scrollbar gutter. Hence the variable name with gutter in it just to avoid change
the variable name again.

Differential Revision: https://phabricator.services.mozilla.com/D132663
2021-12-06 18:45:04 +00:00
Ting-Yu Lin 153e8dfe53 Bug 1743959 Part 1 - Make mScrollPort private, and add a getter and a setter for it. r=emilio
This patch ports the mScrollPort refactor Boris wrote in
https://phabricator.services.mozilla.com/D129100 with my tweaks.

Differential Revision: https://phabricator.services.mozilla.com/D132662
2021-12-06 18:45:04 +00:00
Ting-Yu Lin 2da77f16e4 Bug 1743959 Part 0 - Remove static nsXULScrollFrame::AddRemoveScrollbar helper. r=hiro
The static AddRemoveScrollbar() helper is meant to adjust the scroll port and
test whether the scrollbar fits, but its interface is obscure. By expanding the
helper in-place, the code should now become easy to follow, and we can also
remove the wordaround that sets the bool:1 bitfield.

Differential Revision: https://phabricator.services.mozilla.com/D132759
2021-12-06 18:45:03 +00:00
Dan Minor 522eefbe31 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-06 18:15:50 +00:00
Miko Mynttinen a5e210a518 Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-06 14:44:55 +00:00
Butkovits Atila 56c46d06a1 Backed out 3 changesets (bug 1719554) for causing bustages complaining about gfxTextRun.cpp.
Backed out changeset 6181e40d4da1 (bug 1719554)
Backed out changeset c261ede6ae81 (bug 1719554)
Backed out changeset 221ec418475c (bug 1719554)
2021-12-04 00:58:15 +02:00
Dan Minor 30ad309163 Bug 1719554 - Unify unicode::Script as intl::Script; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D132278
2021-12-03 20:49:32 +00:00
Emilio Cobos Álvarez 571e82c9f0 Bug 1744152 - Make the aAllUpperCase parameter of TransformString more generic. r=jfkthame
Bug 1744009 will stop creating frames for <option>s, but will need to
support text-transform on the option strings to calculate the right
intrinsic size for the <select> element.

The reason why we want to calculate the intrinsic size without having
into account the option styles is so that changing the selected option
doesn't change the width of the combobox, which is something that can
happen now.

This is similar to:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/layout_box.cc;l=307;drc=32f574f6df1d37b0d9ed765fe138270414d79e49

This patch will allow to achieve this (and not regress tests like
html/rendering/non-replaced-elements/form-controls/text-transform.html.ini).

Differential Revision: https://phabricator.services.mozilla.com/D132746
2021-12-03 11:45:48 +00:00
Andrew Osmond 33641307ec Bug 1743761 - Ensure we invalidate substituted images when the preferred size is ready. r=tnikkel
Previously with ImageContainers, we would put the new preferred surface
into the ImageContainer. When we check if we should invalidate, it would
have a different image key, and hence invalidate the image frame and
schedule a paint.

With ImageProviders, it returns the same key in this case, because the
ImageProvider represents a particular surface. As such, we need to
actually track when we get a substituted ImageProvider, and invalidate
the image frame more aggressively to ensure we get the preferred size.

Differential Revision: https://phabricator.services.mozilla.com/D132583
2021-12-03 03:14:01 +00:00
Noemi Erli cc6683ef9e Backed out changeset 7af79a49bf5f (bug 1743637) for causing perma geckoview failures 2021-12-02 13:31:34 +02:00
Miko Mynttinen a3bddeeb94 Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-01 23:59:37 +00:00
Sandor Molnar 3d64c3bcca Backed out changeset e86bd6c22ef7 (bug 1743637) for causing android failures. CLOSED TREE 2021-12-01 19:59:31 +02:00
Greg Tatum d642b72ac3 Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-12-01 17:41:37 +00:00
Miko Mynttinen b27a53abad Bug 1743637 - Fix array out of bounds in nsTextFrame::ToCString r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D132498
2021-12-01 16:32:59 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Ting-Yu Lin 5addb144e4 Bug 1743537 Part 6 - Rename arguments of ScrollFrameHelper::LayoutScrollbars(). r=emilio
Technically, `aContentArea` is not 100% wrong; its the content area of the outer
scroll frame, which contains the content area of the inner scrolled frame, the
padding, and the scrollbars. However, it should really be named
`aInsideBorderArea` as the caller names it. Otherwise, it is easy to cause
confusion with the content area of the inner scrolled frame.

Also, rename `aOldScrollArea` as well so that we use the term "scroll port"
consistently.

Differential Revision: https://phabricator.services.mozilla.com/D132445
2021-11-30 23:25:22 +00:00
Ting-Yu Lin cd368a47f6 Bug 1743537 Part 5 - Rename variables names storing mScrollPort. r=emilio
Make these variables more distinguishable from `oldScrolledAreaBounds` and
`newScrolledAreaBounds`.

Differential Revision: https://phabricator.services.mozilla.com/D132444
2021-11-30 23:25:22 +00:00
Ting-Yu Lin b5de753621 Bug 1743537 Part 4 - Cache scrollbar sizes in ScrollReflowInput. r=layout-reviewers,emilio
Scrollbar's min and pref sizes won't change during reflow, so we can cache them
in ScrollReflowInput to save some repetitive computation in multiple
ReflowScrolledFrame() and TryLayout() calls.

This is also a preparation for Bug 1715112 because we can use the pref sizes to
compute the scrollbar-gutter size in ScrollReflowInput.

Differential Revision: https://phabricator.services.mozilla.com/D132443
2021-11-30 23:25:22 +00:00
Ting-Yu Lin 9a7c5736d5 Bug 1743537 Part 3 - Call SetScrollbarMediatorContent in ScrollReflowInput's constructor. r=emilio
It should be sufficient to call `SetScrollbarMediatorContent` once in
ScrollReflowInput's constructor, which is created in the beginning of
nsHTMLScrollFrame::Reflow(), instead of calling it repeatedly in multiple
TryLayout() calls.

Differential Revision: https://phabricator.services.mozilla.com/D132442
2021-11-30 23:25:21 +00:00
Ting-Yu Lin 3495f5356d Bug 1743537 Part 2 - Pass ScrollReflowInput argument by reference. r=emilio
We've had some APIs passing ScrollReflowInput by reference while some others
using pointer. Let's unify them by using reference everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D132441
2021-11-30 23:25:21 +00:00
Ting-Yu Lin 33bd4df6d2 Bug 1743537 Part 1 - Move ScrollReflowInput members' initialization into its constructor. r=layout-reviewers,emilio
They shouldn't be scattered in nsHTMLScrollFrame::Reflow(). Also, reorder these
assignment operations according to the member variables' appearance order in
ScrollReflowInput.

I also moved the constructor out of the class definition because it becomes a
large method, and I'm going to add `private:` section after the methods section
in a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D132440
2021-11-30 23:25:21 +00:00
Marian-Vasile Laza 3bfa529b3e Backed out 6 changesets (bug 1715892, bug 1719735) for causing bc test failures. CLOSED TREE
Backed out changeset 196952bd8c9c (bug 1715892)
Backed out changeset 9105fe01c025 (bug 1715892)
Backed out changeset 4c15d1a24ccd (bug 1715892)
Backed out changeset 2c328b84285f (bug 1715892)
Backed out changeset 8fcdcdf44b62 (bug 1719735)
Backed out changeset c48f398e301f (bug 1719735)
2021-11-30 23:30:59 +02:00
Greg Tatum 9b5497020e Bug 1715892 - Unify locale/DateTimeFormat to mozilla::intl::AppDateTimeFormat; r=platform-i18n-reviewers,dminor
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.

Differential Revision: https://phabricator.services.mozilla.com/D131671
2021-11-30 19:05:58 +00:00
Miko Mynttinen 6edc3c9c20 Bug 1742850 - Add logging for display list building r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D132065
2021-11-29 14:50:53 +00:00
Andrew Osmond af4570762c Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-11-27 11:47:40 +00:00
Emilio Cobos Álvarez 2dca36cb25 Bug 502258 - Add a Show Password button to <input type=password> controls. r=Gijs
It's controlled by the pref:
layout.forms.input-type-show-password-button.enabled

Differential Revision: https://phabricator.services.mozilla.com/D130407
2021-11-25 20:12:05 +00:00
Emilio Cobos Álvarez 534a2657be Bug 1741124 - Don't apply CSS perspective to non-CSS-transformed frames. r=miko
Applying it to SVG-transformed frames is wrong, and causes us to
rasterize rather massive SVGs. This is consistent with the other CSS
3d transforms code, and our rendering of the test-case matches other
browsers.

Differential Revision: https://phabricator.services.mozilla.com/D132040
2021-11-24 16:33:12 +00:00
Emilio Cobos Álvarez 4fc02f6f53 Bug 1742411 - Prefer content property to img src on image elements. r=dholbert
Given the compat reports in bug 1484928, I don't think it's worth
keeping the current behavior.

Our behavior should match other browsers now. Rather than making
content: url() work everywhere even for otherwise-replaced elements,
just special-case this since that's what other browsers seem to do.

Differential Revision: https://phabricator.services.mozilla.com/D131797
2021-11-23 11:36:21 +00:00
Hiroyuki Ikezoe 26f550200e Bug 1742495 - Drop ScrollOrigin argument from ScrollToCSSPixelsApproximate. r=botond
And rename the function to ScrollToCSSPixelsForApz.

Differential Revision: https://phabricator.services.mozilla.com/D131854
2021-11-23 02:05:33 +00:00
Ting-Yu Lin 9eaf55eae1 Bug 1741773 - Document some state bits in ScrollReflowInput and ScrollFrameHelper. r=emilio
NPOTB DONTBUILD because this patch changes only comments.

Differential Revision: https://phabricator.services.mozilla.com/D131459
2021-11-18 18:23:34 +00:00
Emilio Cobos Álvarez 446bae08de Bug 1741495 - Make ThemeDrawsFocusForWidget return the right thing when drawing non-native widgets on Linux and Windows. r=spohl
Noticed this while digging into bug 1741359.

Differential Revision: https://phabricator.services.mozilla.com/D131277
2021-11-17 00:55:26 +00:00
Emilio Cobos Álvarez 2d8ab09b73 Bug 1739699 - Use preferred color scheme when forcing colors with system colors (except windows HCM). r=morgan
This causes (among other things) pages to be dark when using regular
windows system colors and forcing colors to "always", which is nice.

Differential Revision: https://phabricator.services.mozilla.com/D131165
2021-11-16 22:30:26 +00:00
Greg Tatum ec908112f4 Bug 1738057 - Split out BidiEmbeddingLevel into its own file; r=platform-i18n-reviewers,dminor
This should speed up re-compile times, as mozilla/intl/Bidi.h will only
be included in a few places.

Differential Revision: https://phabricator.services.mozilla.com/D129662
2021-11-16 15:11:58 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
Ting-Yu Lin 3285bbf67e Bug 1175509 Part 2 - Make TryLayout correctly consider ScrolledContentDependsOnBSize in vertical writing-mode. r=emilio
This patch potentially changes the behavior when the scrolled frame is in
vertical writing-mode, but it should be the correct way to handle the scrollbar
change.

Differential Revision: https://phabricator.services.mozilla.com/D130711
2021-11-15 18:51:29 +00:00
Ting-Yu Lin a1c0177324 Bug 1175509 Part 1 - Rename ScrolledContentDependsOnHeight to ScrolledContentDependsOnBSize. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130710
2021-11-15 18:51:28 +00:00
Ting-Yu Lin 2c88da9b0e Bug 1740831 Part 2 - Replace LineBreaker::Strictness with LineBreakRule. r=m_kato
LineBreaker::Strictness is just an alias of LineBreakRule in Segmenter.h. This
is to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131026
2021-11-15 17:20:36 +00:00
Ting-Yu Lin 638eb14439 Bug 1740831 Part 1 - Replace LineBreaker::WordBreak with WordBreakRule. r=m_kato
LineBreaker::WordBreak is just an alias of WordBreakRule in Segmenter.h. This is
to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131025
2021-11-15 17:20:35 +00:00
Hiroyuki Ikezoe b11e8dcd33 Bug 1692708 - Transmogrify ScrollToCSSPixels to ScrollByCSSPixels if there's any on-going APZ animation and there's no on-going async scroll by script. r=botond
test_abort_smooth_scroll_by_instant_scroll.html in this comment is a test case
to make sure this change doesn't regress a case where a smoothe scrolling run
by an APZC is replaced by an instant scroll operation by script.

Some other mochitests for this change are in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D129594
2021-11-12 07:54:17 +00:00
Ting-Yu Lin 443c337fb4 Bug 1739048 - Propagate NS_FRAME_CONTAINS_RELATIVE_BSIZE from inner scrolled frame to outer scroll frame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D130813
2021-11-11 18:23:55 +00:00
Emilio Cobos Álvarez 4d6ee249dc Bug 1739925 - Add a foreground color to attention selection. r=jfkthame
In some platforms (like macOS, windows dark mode, android, and some gtk
themes) the foreground selection color might be `currentcolor`, and that
doesn't generally guarantee enough contrast with the attention
background.

Remove HeadlessLookAndFeelGTK's handling of this color since it's
useless (always overridden by prefs in all.js)

Differential Revision: https://phabricator.services.mozilla.com/D130617
2021-11-11 11:14:13 +00:00
Emilio Cobos Álvarez 22f52bfe23 Bug 1739894 - Stop including overflowing descendants in outlines. r=jwatt
Keep old behavior behind a pref.

I've kept the tests that failed enabling the pref because they're
somewhat hard to rewrite and I'd rather avoid that until we know this
will stick, specially since they test the guts of the recursive function
that I'm basically ~disabling.

I've checked that the rendering on those is sensible / matches other
browsers.

Differential Revision: https://phabricator.services.mozilla.com/D130717
2021-11-10 20:00:13 +00:00
Sean Feng fc11ef0b3f Bug 1733978 - Don't overwrite the ISize of child frames when optimizing nested grid layout r=mats
The optimized code path for nested grid layout should only set the
BSize of the child frames, since this is what the optimization is
for.

Without the change, the ISize is always going to be set to 0 for
child frames which may break the layout. Sometimes, it is not
an issue because the ISize of the grid area gets updated, so
the cached measurement becomes invalid, and the ISize of the child
frame gets set to the correct one again.

Differential Revision: https://phabricator.services.mozilla.com/D130828
2021-11-10 16:18:11 +00:00
Cristian Tuns 6ccd260fb5 Backed out changeset 492b433034b3 (bug 1739894) for causing reftest failures. CLOSED TREE 2021-11-10 11:37:51 -05:00
Emilio Cobos Álvarez 6f02b18148 Bug 1739894 - Stop including overflowing descendants in outlines. r=jwatt
Keep old behavior behind a pref.

I've kept the tests that failed enabling the pref because they're
somewhat hard to rewrite and I'd rather avoid that until we know this
will stick, specially since they test the guts of the recursive function
that I'm basically ~disabling.

I've checked that the rendering on those is sensible / matches other
browsers.

Differential Revision: https://phabricator.services.mozilla.com/D130717
2021-11-10 15:24:30 +00:00
Ting-Yu Lin b738df1b25 Bug 1740175 - Convert NEEDS_REFLOW macro in nsHTMLScrollFrame::Reflow to lambda. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D130720
2021-11-09 22:41:15 +00:00
Emilio Cobos Álvarez 1d22fb4ae5 Bug 1732674 - Assert on tree mutations. r=jfkthame
This should hopefully help catch misuse. Fix an iterator that was living
for too long in ScrollIntoView.

Differential Revision: https://phabricator.services.mozilla.com/D128855
2021-11-09 15:55:55 +00:00
Jonathan Kew c77084245d Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-11-09 15:55:54 +00:00
Hiroyuki Ikezoe 9816dd2b16 Bug 1739541 - Introduce APZScrollAnimationType and use it in RepaintRequest and ScrollFrameHelopr instead of a boolean representing whether there's an animation or not. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D130421
2021-11-09 09:19:26 +00:00
Hiroyuki Ikezoe cd43013045 Bug 1739541 - Use `using` instead of `typedef` in nsGfxScrollFrame.h. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D130566
2021-11-09 09:19:26 +00:00
Hiroyuki Ikezoe 33d1f8ef64 Bug 1739541 - Set `TriggerByScript::Yes` for Element.scrollIntoView. r=botond
We'd want to differentiate Element.scrollIntoView call as `triggeredByScript`.

Differential Revision: https://phabricator.services.mozilla.com/D130419
2021-11-09 09:19:25 +00:00
Hiroyuki Ikezoe 1aea05dff0 Bug 1739541 - Introduce TriggeredByScript in ScrollPositionUpdate and set `Yes` for ScrollToCSSPixels and ScrollByCSSPixels. r=botond
Both ScrollToCSSPixels and ScrollByCSSPixels are called only from JS via
Element.scrollTo, Element.scrollTop, Element.scrollLeft, Window.scroll,
Window.scrollTo and Window.scrollBy.

Note that we don't target either Window.scrollByLines or Window.scrollByPages
(both end up calling ScrollFrameHelper::ScrollBy) because both are triggered by
user interactions for our XUL tree implementation, for example
Window.scrollByLines gets called in response to a DOMMouseScroll event in
tree.js [1].

[1] https://searchfox.org/mozilla-central/rev/a12c2c2e59c92d8f969d8f3f290ab16919449c9d/toolkit/content/widgets/tree.js#788

Differential Revision: https://phabricator.services.mozilla.com/D130418
2021-11-09 09:19:25 +00:00
Hiroyuki Ikezoe e1ac201baf Bug 1739541 - Drop ScrollOrigin argument from ScrollToCSSPixels. r=botond
There are 4 call sites of the function, Element::Scroll, Element::SetScrollTop,
Element::SetScrollLeft and nsGlobalWindowInner::ScrollTo. None of call sites
specifies ScrollOrigin.

Differential Revision: https://phabricator.services.mozilla.com/D130416
2021-11-09 09:19:24 +00:00
Hiroyuki Ikezoe fbdae21c47 Bug 1739541 - Drop ScrollOrigin argument from ScrollByCSSPixels. r=botond
All call sites of ScrollByCSSPixels specify ScrollOrigin::Relative.

Differential Revision: https://phabricator.services.mozilla.com/D130415
2021-11-09 09:19:24 +00:00
Daniel Holbert 0b51e59865 Bug 1707643 part 2: When computing static position of abspos grid child, perform alignment within content-box, rather than padding box. r=emilio
In the conditions where we hit this partiuclar codepath, the spec used to
require us to align within the grid's padding box (which is what we were trying
to do[1]), but now it requires us to align within the grid's content box.

This patch makes us start passing a bunch of WPT tests (whose .ini files I'm
removing here).

This patch also changes the reference case for some "last-baseline"-specific
tests in the same directory, by cribbing the "alignEnd" rule from the
neighboring non-"last-baseline" analog (since "last-baseline" falls back to end
alignment and is meant to be equivalent in these testcases).  Before this
patch, the affected reference cases were inadvertently depending on the Firefox
bug that I'm fixing here, and they were expecting the testcase's end-aligned
content to be at the wrong position as a result.  Chromium developers fixed
this issue in the neighboring non-"last-baseline" tests in [2], but they didn't
catch the files that I'm fixing here, because Chromium doesn't implement "last
baseline" alignment yet.

[1] Before this patch, we actually weren't quite aligning within the
padding-box, even though we were trying to. We were computing an alignment
offset based on the size of the padding box, and then we were using that offset
as a position within the *content box*.  This could result in us pushing
end-aligned content outside the grid entirely, as in the testcase on the bug
report for this bug.

[2] https://chromium-review.googlesource.com/c/chromium/src/+/2803842

Differential Revision: https://phabricator.services.mozilla.com/D130713
2021-11-09 06:14:21 +00:00
Ting-Yu Lin f32eaad379 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-09 01:14:15 +00:00
Iulian Moraru 36283a9a3b Backed out 2 changesets (bug 1722484) for causing multiple build bustages. CLOSED TREE
Backed out changeset bef547b588ff (bug 1722484)
Backed out changeset e676fa1a0cb7 (bug 1722484)
2021-11-09 01:42:20 +02:00
Ting-Yu Lin 7310c93473 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-08 22:24:19 +00:00
Emilio Cobos Álvarez c308704902 Bug 1738614 - Remove other Widget* colors. r=mstange
These are only used for frameset painting and the non-e10s <select>
dropdown focus codepath. We have other more appropriate standard
colors for this.

Differential Revision: https://phabricator.services.mozilla.com/D129992
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
Jonathan Kew a4983c6f2f Bug 1738560 - When text-transform is in effect, ensure we finish building the transformed textrun even if we would otherwise skip the line-break scan (in SVG text). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130055
2021-11-02 11:47:01 +00:00
Emilio Cobos Álvarez d0295b6c6f Bug 1738781 - Invalidate anchor after layout if we can find a better one. r=dholbert
This is _very_ similar to code Blink has dealing with
content-visibility: auto:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/scroll_anchor.cc;l=658-659;drc=fd8802b593110ea18a97ef044f8a40dd24a622ec

They don't have this problem on the original test-case because they
incorrectly invalidate the anchor when focus changes regardless of
whether the focus is a "priority element" per spec.

So I think this is a better, more consistent behavior over all.

Differential Revision: https://phabricator.services.mozilla.com/D130130
2021-11-02 10:59:50 +00:00
Hiroyuki Ikezoe e5085ada71 Bug 1738839 - Drop layout.css.scroll-behavior.enabled. r=dholbert
It's been enabled by default for years since bug 1087559.

Differential Revision: https://phabricator.services.mozilla.com/D130147
2021-11-02 06:58:47 +00:00
Hiroyuki Ikezoe dd419fe544 Bug 1738811 - Drop ScrollSnapMode argument from nsIScrollableFrame::ScrollToCSSPixels and nsIScrollableFrame::ScrollByCSSPixels. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D130135
2021-11-02 05:08:03 +00:00
Miko Mynttinen 70489330ec Bug 1732921 - Part 1: Do not skip display list building when a replaced element is stacking context. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129966
2021-11-01 20:22:33 +00:00
Sandor Molnar f5bbecdcc2 Backed out 13 changesets (bug 1711061) on devs request. CLOSED TREE
Backed out changeset c4f073f7e3a3 (bug 1711061)
Backed out changeset aced4b672fb4 (bug 1711061)
Backed out changeset 3687e798f665 (bug 1711061)
Backed out changeset 7b471990ea86 (bug 1711061)
Backed out changeset 1014a95f540e (bug 1711061)
Backed out changeset a37b3091281d (bug 1711061)
Backed out changeset 96a0ef35881b (bug 1711061)
Backed out changeset 38890cc266fb (bug 1711061)
Backed out changeset be73004c0850 (bug 1711061)
Backed out changeset b964576ae53d (bug 1711061)
Backed out changeset d453c5219255 (bug 1711061)
Backed out changeset 0145b538175b (bug 1711061)
Backed out changeset 41ba2e2a2d13 (bug 1711061)
2021-10-29 00:36:30 +03:00
Andrew Osmond c6eb106f04 Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-10-27 01:24:35 +00:00
Jonathan Kew 7cda6fde19 Bug 1712780 - Skip running the line-breaker when scanning SVG text frames. r=emilio
As we don't support multi-line text in SVG, there's no point running the line-breaker and
collecting potential break positions for textframes that are part of an SVG text subtree.
Telling BuildTextRunsScanner to skip this makes it somewhat less expensive.

In my local build, this reduces the reflow time of the testcase from nearly 20s to about 4.5s.
Still much too long, but at least it's a step in the right direction.

Differential Revision: https://phabricator.services.mozilla.com/D129404
2021-10-26 16:54:01 +00:00
Sandor Molnar 6632079d8d Backed out 13 changesets (bug 1711061) for causing browser-chrome failures in test/performance/browser_startup_images. CLOSED TREE
Backed out changeset 5988220f56b8 (bug 1711061)
Backed out changeset cb7721d7ce49 (bug 1711061)
Backed out changeset 343746ffae73 (bug 1711061)
Backed out changeset 000940244dcf (bug 1711061)
Backed out changeset 27565d5ae08d (bug 1711061)
Backed out changeset f3b2379d971b (bug 1711061)
Backed out changeset d4b3d0fa1771 (bug 1711061)
Backed out changeset 9af5b3f2225f (bug 1711061)
Backed out changeset da992effeff1 (bug 1711061)
Backed out changeset 6b2bc6c16b9f (bug 1711061)
Backed out changeset ac2792d42be2 (bug 1711061)
Backed out changeset cb00177e655e (bug 1711061)
Backed out changeset 8d5261184226 (bug 1711061)
2021-10-26 18:04:34 +03:00
Andrew Osmond 0ac282d26a Bug 1711061 - Part 12. Change the display list to use WebRenderImageProvider. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D126605
2021-10-26 13:28:27 +00:00
Ting-Yu Lin 248b711736 Bug 1730570 - Clamp flex item's resolved min auto size if it's bogus. r=dholbert
This patch clamps the `resolvedMinSize` before the size is passed into
`UpdateMainMinSize`, which is where the assertion is triggered.

Also, tweak the MOZ_ASSERT a bit because it's best to test an nscoord is
not NS_UNCONSTRAINEDSIZE before invoking comparison operator.

Differential Revision: https://phabricator.services.mozilla.com/D129230
2021-10-26 00:01:58 +00:00
Ting-Yu Lin c2f6ef7a09 Bug 1736938 Part 3 - Make all WordBreaker's methods static, and adapt the callers. r=jfkthame
The motivation is the same as the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D129109
2021-10-25 19:00:22 +00:00
Evgenia Kotovich 228e38a58c Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128483
2021-10-25 11:12:41 +00:00
Emilio Cobos Alvarez 920a666c29 Bug 1736379 - Tweak selection contrast check to avoid totally-indistinguishable selection background. r=jfkthame
Windows on dark mode uses a semi-transparent selection background like macOS,
which is basically the proton accent color. Avoid totally indistinguishable
backgrounds by ensuring there's at least minimal background contrast when
NS_SAME_AS_FOREGROUND_COLOR is used.

Differential Revision: https://phabricator.services.mozilla.com/D128757
2021-10-22 15:55:54 +00:00
criss 152f71d4d3 Backed out changeset b60f98f26664 (bug 1576768) for causing mochitest failures. CLOSED TREE 2021-10-22 15:55:50 +03:00
Evgenia Kotovich e29e29aa5a Bug 1576768 [eslint] Turn on JavaScript linting and formatting rules for .sjs files. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128483
2021-10-22 11:39:46 +00:00
Emilio Cobos Álvarez 54055aeca2 Bug 1737012 - Make nsIFrame::ListTag() include the content id. r=dholbert,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D129136
2021-10-21 17:36:27 +00:00
Greg Tatum ee2694c97d Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-20 14:01:21 +00:00
Norisz Fay 489e82dcc1 Backed out 2 changesets (bug 1732674) for line iterator crashes (bug 1733047) a=backout
Backed out changeset 730555699380 (bug 1732674)
Backed out changeset f529288a6dde (bug 1732674)
2021-10-20 12:24:14 +03:00
Emilio Cobos Álvarez cfc9af581b Bug 1732674 - Assert on tree mutations. r=jfkthame
This should hopefully help catch misuse. Fix an iterator that was living
for too long in ScrollIntoView.

Differential Revision: https://phabricator.services.mozilla.com/D128855
2021-10-19 09:29:13 +00:00
Jonathan Kew a6be3734b3 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-10-19 09:29:13 +00:00
Emilio Cobos Álvarez 59c3527c15 Bug 1735797 - Fix scrollbar caching on macOS. r=mstange
For that:

 * Remove support for caching resizer styles, since they don't seem
   common enough to warrant it, unlike all other scrollbar parts.

 * Make scrollcorners have pointer-events: none with overlay scrollbars,
   so that the setup works / we can assert that if we have overlay
   scrollbars then we don't care about the pointer-events value on
   ancestors.

Differential Revision: https://phabricator.services.mozilla.com/D128772
2021-10-18 18:25:31 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Jeff Muizelaar f76f41feb4 Bug 1736236 - Remove obsolete LayerManager.h. r=gfx-reviewers,lsalzman
This adds a bunch of #include "WindowRenderer.h" in places
that were getting it implicitly before.

Differential Revision: https://phabricator.services.mozilla.com/D128687
2021-10-17 23:00:47 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
criss 55677726ee Backed out changeset ce929d9e000a (bug 1732674) for causing nsLineIterator::FindLineContaining crashes (bug 1733047) . a=aryx 2021-10-16 12:46:38 +03:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Jonathan Kew a66831cb8c Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-10-15 13:13:04 +00:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Timothy Nikkel 3facb5123d Bug 1734356. Remove code in ScrollFrameHelper constructor that sets a displayport when apz is disabled. r=botond
This code was added in bug 1031107 back when we didn't have apz on desktop, and even on android apz was not reported as enabled because we were using the java pan zoom code (https://bugzilla.mozilla.org/show_bug.cgi?id=1031107#c20).

Looks like the goal of this code was to improve performance when tiling was enabled (splitting up layers into tiles). The code to actually do this tiling appears gone now, so we shouldn't need this.

We can further ask if something might be depending on this code even though it's not related to tiling. The layers.enable.tiles pref is enabled on mac and android, so we'd have bugs on Linux and mac if that were true. Further, the only places that apz is disabled now is popups that do not have remote content in them, and the only scroll frames that are IsAlwaysActive are root scroll frames of root content documents (in process). If addons put an iframe in a popup I think it has to be remote, and I don't think we have any content documents in popups, and if we did and there was a problem with removing that code we'd already have that problem on Linux and Windows. So this should be safe to remove.

Differential Revision: https://phabricator.services.mozilla.com/D127635
2021-10-15 09:41:56 +00:00
Emilio Cobos Álvarez 210f6001ae Bug 1590247 - Fix some pre-existing dynamic restyling issues with scrollbar-width. r=dholbert
This was pre-existing but caught by some scrollbar-width tests. A
test-case that reproduces on current nightly:

  data:text/html,<html style="overflow: scroll; scrollbar-color: red red; scrollbar-width: thin">

Toggling the `scrollbar-width` declaration in devtools doesn't change
the effective scrollbar width. Ensure we correctly reflow the scrollbars
in this case.

Differential Revision: https://phabricator.services.mozilla.com/D128515
2021-10-14 21:19:14 +00:00
Emilio Cobos Álvarez 7db332dc3d Bug 1590247 - Don't reframe scrollable frames if we already have all needed anonymous content. r=dholbert
This prevents jank when switching from overflow: auto -> hidden or such.

Differential Revision: https://phabricator.services.mozilla.com/D128367
2021-10-14 21:19:14 +00:00
Butkovits Atila 13f18064b3 Backed out 2 changesets (bug 1590247) for causing failures at scrollbar-width-paint-001.html. CLOSED TREE
Backed out changeset 9b1d970ca9c2 (bug 1590247)
Backed out changeset 57193e853f39 (bug 1590247)
2021-10-14 23:02:38 +03:00
Emilio Cobos Álvarez 45a7260acb Bug 1590247 - Don't reframe scrollable frames if we already have all needed anonymous content. r=dholbert
This prevents jank when switching from overflow: auto -> hidden or such.

Differential Revision: https://phabricator.services.mozilla.com/D128367
2021-10-14 15:42:06 +00:00
Masayuki Nakano 16f869402f Bug 1734771 - part 10: Make `ContentEventHandler::ExpandToClusterBoundary()` take `Text&` instead of `nsIContent*` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D128147
2021-10-13 06:52:04 +00:00
Timothy Nikkel 377995ccb8 Bug 1725569. Send visualViewport resize events for iframes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D127941
2021-10-13 03:01:34 +00:00
Ting-Yu Lin ca7c388f7e Bug 1735251 - Use AxisTracker::MainComponent() to retrieve main max size. r=emilio
After Bug 1681849 Part 4 [1], accessing ComputedMaxSize() is trivial.
Note: MainComponent() expects its aSize argument in flex container's
writing mode, which matches aReflowInput's writing mode, so we don't
need any conversion.

[1] https://hg.mozilla.org/mozilla-central/rev/80ed365889fc

Differential Revision: https://phabricator.services.mozilla.com/D128151
2021-10-12 17:51:12 +00:00
Ting-Yu Lin 7ec49f975f Bug 1735251 - Set ReflowInput::mComputeSize in one operation. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D128150
2021-10-12 17:51:11 +00:00
Eitan Isaacson bc023a74f1 Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-12 15:46:38 +00:00
Emilio Cobos Álvarez 8ca969082f Bug 1674204 - Fix hyphenated text min-content size. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D128105
2021-10-12 13:06:02 +00:00
Emilio Cobos Álvarez 4f8856c545 Bug 1730503 - Make RDM force Android-style scrollbars better. r=mstange,devtools-backward-compat-reviewers,nchevobbe
There are a few bits that still don't work with this patch but will with the
following patches.

Differential Revision: https://phabricator.services.mozilla.com/D128083
2021-10-12 09:21:17 +00:00
Masayuki Nakano 1836c00470 Bug 1729170 - Make all methods of `nsTextFragment` take `uint32_t` for the offset and length of text r=smaug
`nsTextFragment` is a storage of data node and DOM offset is `uint32_t`, but
some methods of `nsTextFragment` takes `int32_t` for the offset/length in
its text.  Therefore, callers need to cast from `uint32_t` to `int32_t` if
the offset value is offset in a DOM node.  Therefore, all methods of it should
take `uint32_t` values as offset/length in its text.

Differential Revision: https://phabricator.services.mozilla.com/D127923
2021-10-12 05:05:12 +00:00
Narcis Beleuzu 908970e8a5 Backed out 3 changesets (bug 1733238) for Bp-hybrid bustages on ImageAccessible . CLOSED TREE
Backed out changeset af8436178a49 (bug 1733238)
Backed out changeset 910aebecda65 (bug 1733238)
Backed out changeset c5d218eb6acb (bug 1733238)
2021-10-12 00:53:23 +03:00
Eitan Isaacson 4bd2d11bcb Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-11 19:43:19 +00:00
Jonathan Kew 6a202b53cb Bug 1731120 - Make truly-empty textframes return true for IsEmpty even when WhiteSpaceIsSignificant, unless they're editable or in an <input> element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D128009
2021-10-11 12:54:44 +00:00
Iulian Moraru 2c4b830b92 Backed out changeset 5500054be8d6 (bug 1731120) for causing android 4.1 shippable build bustages. CLOSED TREE 2021-10-10 23:08:49 +03:00
Jonathan Kew a22fbdf382 Bug 1731120 - Make truly-empty textframes return true for IsEmpty even when WhiteSpaceIsSignificant, unless they're editable or in an <input> element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D128009
2021-10-10 15:30:55 +00:00
Timothy Nikkel 61363a9e97 Bug 1731575. Don't use nsIScrollableFrame::IsScrollingActive when making decisions about what to send to the compositor about sticky position content. r=mattwoodrow,botond
nsIScrollableFrame::IsScrollingActive basically means "has this scroll frame been scrolled recently or is this the root scroll frame". Neither of which is relevant when we are async scrolling a scrollframe on the compositor.

What determines if we can scroll a scroll frame async is ScrollFrameHelper::mWillBuildScrollableLayer, aka nsIScrollableFrame::IsMaybeAsynchronouslyScrolled.

The code in nsDisplayStickyPosition::GetStickyScrollContainer already mostly neuters nsDisplayStickyPosition is this isn't the case, this just takes it one step further.

This also removes one more user of nsIScrollableFrame::IsScrollingActive, there are only a handful left.

Differential Revision: https://phabricator.services.mozilla.com/D126427
2021-10-10 09:07:54 +00:00
Marian-Vasile Laza 2ceb1f0ca2 Backed out changeset 452b230b7276 (bug 1725569) for causing mochitest failures on test_recursive_frames.html. CLOSED TREE 2021-10-09 12:52:35 +03:00
Timothy Nikkel e930ccd98e Bug 1725569. Send visualViewport resize events for iframes. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D127941
2021-10-09 08:41:56 +00:00
Cristian Tuns a373e25460 Backed out 3 changesets (bug 1733238) for causing hybrid build bustages. CLOSED TREE
Backed out changeset 7753b03a092a (bug 1733238)
Backed out changeset 352c6a7ae5cd (bug 1733238)
Backed out changeset 9c132ebfabb2 (bug 1733238)
2021-10-08 19:17:37 -04:00
Eitan Isaacson 306495fc6c Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-08 20:20:58 +00:00
Ting-Yu Lin 5a1edcbcec Bug 1145323 - Audit callers of ReflowOutput constructor in nsFlexContainerFrame. r=dholbert
ReflowOutput can accept any writing mode or ReflowInput passed to its
constructor, so a caller can pass a writing mode that is more convenient
to retrieve the size.

After reflowing flex items, we want to cache its metrics in flex item's
writing mode, so we pass item's ReflowInput into ReflowOutput. However,
for out-of-flow children, we can change ReflowOutput to use flex
container's writing mode by convention.

Differential Revision: https://phabricator.services.mozilla.com/D127913
2021-10-08 17:50:35 +00:00
Timothy Nikkel dd46ffad54 Bug 1733332. Switch GetPaintedLayerScaleForFrame to use nsLayoutUtils::GetTransformToAncestorScaleCrossProcessForFrameMetrics now that they are the same. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D127074
2021-10-08 06:21:51 +00:00
Emilio Cobos Álvarez 9fbc18ca4c Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 17:00:36 +00:00
Butkovits Atila 4d927c1fb4 Backed out 4 changesets (bug 1733384) for causing failures at browser_windowPrompt.js. CLOSED TREE
Backed out changeset fa609fadac26 (bug 1733384)
Backed out changeset dd1936d9fe17 (bug 1733384)
Backed out changeset 1a073e40ab1a (bug 1733384)
Backed out changeset 65708a4c708f (bug 1733384)
2021-10-07 17:52:51 +03:00
Emilio Cobos Álvarez bfdd0fcc77 Bug 1733384 - Make inert not modify the computed style. r=sefeng,layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D127422
2021-10-07 11:47:34 +00:00
Timothy Nikkel 48be720702 Bug 1733742. Remove GetHighResolutionDisplayPort. r=botond
With the old layers backend we had low precision buffer code controlled via the pref layers.low-precision-buffer that was used on android. We would expand the displayport by 4x and then paint it as 1/4 the resolution, and then we would have a critical displayport without the 4x multipler that we would paint at the real resolution. The code to do the painting at the lower resolution was in the layers backend and has since been removed. (This is okay because webrender doesn't rasterize all of the content in the displayport.) So the critical displayport or displayport are no longer treated differently anywhere. Except a few pieces of code that should be fixed/changed/removed. This patch being one of them.

GetHighResolutionDisplayPort would return the displayport without the multipler in all situations (pref on or off).

In DisplayPortUtils we are checking the displayport rect before/after setting new displayport margins to see if it changes to determine if we need to invalidate. Since the critical displayport isn't used for anything, the regular displayport is the correct thing to use here.

In nsGfxScrollFrame we are doing a similar thing, except checking that the displayport doesn't change after a scroll.

In nsDisplayListBuilder::OutOfFlowDisplayData::ComputeVisibleRectForFrame it's also the correct thing, as we want to include the same rect for fixed content as we do for non-fixed content. But this is an significant expansion of the dirty rect of fixed content and the code history has fixes related to drawing too much of fixed content and OOMing so a little more scrutiny is reasonable. However if there was a problem with OOM, since this is the same rect we use for non-fixed content we would have OOM problems with regular content, so this should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D127344
2021-10-07 05:41:19 +00:00
Andi-Bogdan Postelnicu 5482810b38 Bug 1734285 - fix mixing bitwise with bool operators. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D127639
2021-10-06 17:37:56 +00:00
Emily McDonough 7c9c0145a9 Bug 1732836 - Do not apply page scale twice when building display lists for paged content. r=mattwoodrow
This reverts the patch for bug 1720621.

This caused a conflict with the fix for bug 1722890, which fixed another case
of cutoff content when printing scaled. That fix should also cover the upscaled
case.

Differential Revision: https://phabricator.services.mozilla.com/D127594
2021-10-06 06:51:52 +00:00
Timothy Nikkel 2ff7452f40 Bug 1732660. Make GetPaintedLayerScaleForFrame use transform to ancestor scale passed down from ancestor process. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D126652
2021-10-05 22:40:05 +00:00
Morgan Reschenberg 8ec999d32d Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-05 20:44:46 +00:00
Timothy Nikkel 708b53f06a 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
Tetsuharu Ohzeki 0c71b39b6f Bug 1733980 - Remove vestiges of removed ***Layer class. r=gfx-reviewers,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D127464
2021-10-04 22:19:11 +00:00
Tetsuharu Ohzeki 5edbcffacb Bug 1733971 - Make nsIFrame::InvalidateLayer() return void. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D127460
2021-10-04 22:17:23 +00:00
Butkovits Atila 0db4640a28 Backed out 2 changesets (bug 1732154, bug 1726227) for causing build bustages complaining about RemoteAccessible. CLOSED TREE
Backed out changeset 4fd72f9ca327 (bug 1732154)
Backed out changeset 6591f14bbc71 (bug 1726227)
2021-10-05 00:19:09 +03:00
Morgan Reschenberg c2cac47ff1 Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-04 19:46:54 +00:00
Emilio Cobos Álvarez 3f013cc607 Bug 1733952 - When computing inline intrinsic sizes, resolve with a 0 percentage basis rather than just resolving to zero if there's a percentage. r=jfkthame
This matches other browsers, the spec
(https://drafts.csswg.org/css-sizing/#cyclic-percentage-contribution):

  For the min size properties, as well as for margins and paddings (and
  gutters), a cyclic percentage is resolved against zero for determining
  intrinsic size contributions.

And also what we do in SizeComputationInput::Compute{Margin,Padding}:

  https://searchfox.org/mozilla-central/rev/75e9d727ce5ba2c14653cf8fb0f1367f085271b7/layout/generic/ReflowInput.cpp#2811-2832
  https://searchfox.org/mozilla-central/rev/75e9d727ce5ba2c14653cf8fb0f1367f085271b7/layout/generic/ReflowInput.cpp#2861-2868

This fixes a compat issue with the menu alignment in lume.io:

  https://github.com/webcompat/web-bugs/issues/88484#issuecomment-933226651

It's also simpler.

Differential Revision: https://phabricator.services.mozilla.com/D127441
2021-10-04 15:20:30 +00:00
Tetsuharu Ohzeki 504ad34e8e Bug 1733785 - Remove unused RefLayer(). r=gfx-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D127365
2021-10-03 10:22:09 +00:00
Daniel Holbert f913735c40 Bug 1733727 part 3: Use StaticAutoPtr to manage lifetime of various "gFoo" static global variables in layout. r=jfkthame
This patch doesn't change any user-observable behavior.

StaticAutoPtr lets us remove a handful of explicit 'delete' statements, by
making deletion happen automatically when these variables are cleared.

Differential Revision: https://phabricator.services.mozilla.com/D127337
2021-10-02 18:59:11 +00:00
Daniel Holbert ed93bd5007 Bug 1733465 part 2: Modernize nsViewManager::GetRootWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 20:38:09 +00:00
Sandor Molnar 325902a5b7 Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert 5b203843bc Bug 1733465 part 2: Modernize nsViewManager::GetWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 14:37:05 +00:00
Miko Mynttinen 6e6f9c754a Bug 1730856 - Part 1: Use the correct scroll target for fixed backgrounds. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D127120
2021-10-01 14:01:51 +00:00
Timothy Nikkel 8e8f11e1e6 Bug 1733520. Remove apz.nonwr.activate_all_scroll_frames* prefs. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D127219
2021-10-01 09:13:32 +00:00
Alexandru Michis e912fb2466 Backed out changeset a4ebb978f792 (bug 1732674) for causing layout crashes (bug 1733047). a=backout 2021-09-30 17:38:15 +03:00
Mike Hommey aec5c5347b Bug 1733034 - Fix unused*-variable warnings due to missing ifdefs. r=andi
dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
                     ^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
                     ^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
                              ^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
              ^

Differential Revision: https://phabricator.services.mozilla.com/D126866
2021-09-29 21:44:49 +00:00
Stephen A Pohl 33e4e0af62 Bug 1733249: Remove part of a comment that was referencing ScrollbarNonDisappearing, which was removed in bug 1689253. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D126999
2021-09-29 20:30:49 +00:00
Jonathan Kew 6d191d1715 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-09-29 17:55:44 +00:00
Cristian Tuns 9285106fbd Backed out changeset 43d9f690a94f (bug 1732674) to fix nsLineIterator crashes (bug 1733047). CLOSED TREE 2021-09-29 03:45:51 -04:00
Ting-Yu Lin 8492d801e8 Bug 1731653 - Record padding change in a frame bit, and use it to detect inline resize. r=dholbert
We store this new bit in nsIFrame instead of in ReflowInput to record a
change to padding (inspired by the mHasBSizeChange bit). That is because
we may construct a ReflowInput more than one time before reflowing the
frame. The first construction of ReflowInput (in
SizeComputationInput::InitOffsets) will update
nsIFrame::UsedPaddingProperty() using the latest style data, so
we *cannot* determine the padding change in any of the subsequent
construction of ReflowInput.

dynamic-change-inline-size-001.html is the scenario fixed by
bug 1307853. We've already passed this test without this patch.

dynamic-change-inline-size-002.html is equivalent to 001.html except
it's written with "box-sizing:content".
dynamic-change-inline-size-003.html is adapted from testcase 2 in bug
1729122 comment 4. Both tests pass after this patch.

Differential Revision: https://phabricator.services.mozilla.com/D126422
2021-09-28 20:59:38 +00:00
Emilio Cobos Álvarez e5a8824eaf Bug 1732759 - Unprefix -moz-fit-content. r=dholbert
I'm not aware of any reason we shouldn't do this, as it is interoperable
with other browsers, and it causes compat issues from sites that forget
to use the prefixed version.

Note this removes some #[parse(aliases)]. These only affect devtools
autocomplete behavior, and we avoid autocompleting -moz-prefixed
keywords when possible, so even though it's a slight behavior change,
it's worth it.

Differential Revision: https://phabricator.services.mozilla.com/D126718
2021-09-28 11:44:33 +00:00
Jonathan Kew 7fe40d2b21 Bug 1732674 - Make nsLineIterator a lightweight wrapper for an nsLineList_iterator instead of building a separate array. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126671
2021-09-28 11:34:02 +00:00
Jonathan Kew 1989dbf0ca Bug 1732463 - Make nsIFrame::GetContainingBlockForLine return a pair of `nsIFrame*`s instead of using an outparam for one of them. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D126587
2021-09-25 09:13:02 +00:00
Jonathan Kew e8d5080a53 Bug 1732355 - Eliminate the nsILineIterator::GetNextSiblingOnLine virtual method, whose only implementations are trivial. r=layout-reviewers,emilio
Depends on D126532

Differential Revision: https://phabricator.services.mozilla.com/D126533
2021-09-24 14:20:07 +00:00
Jonathan Kew 8fcc9dd8a0 Bug 1732349 - patch 3 - Avoid getting line iterators that are not actually needed in nsIFrame::PeekOffsetForLine. r=emilio
We only need the actual iterator once, to get the line number; subsequently, we can use
the new CanProvideLineIterator method to check if we've found a block frame without
paying the cost of actually initializing it.

This eliminates the last remaining caller of nsIFrame::GetLineNumber, so that method
(which is prone to inefficient usage) can be removed altogether.

Differential Revision: https://phabricator.services.mozilla.com/D126532
2021-09-24 14:20:06 +00:00
Jonathan Kew 41e86438dd Bug 1732349 - patch 2 - Avoid redundant creation of a line-iterator in nsIFrame::GetFrameFromDirection. r=emilio
Depends on D126530

Differential Revision: https://phabricator.services.mozilla.com/D126531
2021-09-24 14:20:06 +00:00
Jonathan Kew 028c0f859f Bug 1732349 - patch 1 - Avoid redundant creation of a line-iterator in nsIFrame::PeekOffsetForLineEdge. r=emilio
Depends on D126470

Differential Revision: https://phabricator.services.mozilla.com/D126530
2021-09-24 14:20:05 +00:00
Jonathan Kew fb9588e175 Bug 1732268 - Remove redundant failure-checks from nsLineIterator initialization, as it uses infallible allocation. r=dholbert
This means nsBlockFrame::GetLineIterator is also infallible, so callers that know
they're dealing with an nsBlockFrame (not an arbitrary nsIFrame) don't need to
check for null.

Differential Revision: https://phabricator.services.mozilla.com/D126470
2021-09-24 14:20:05 +00:00
James Teh 7caf3d0624 Bug 1729412: Add nsIFrame::GetContainingBlockForLine to facilitate checking whether two frames are on the same line. r=jfkthame
Previously, to check whether two frames were on the same line, you had to call nsIFrame::GetLineNumber on both of them.
If the lines were in a different containing block, this wastefully created line iterators.
With this new method, you can get the containing blocks for both frames and only create a single line iterator if the blocks are the same.
To achieve this, nsIFrame::CanProvideLineIterator was also added and is used by GetContainingBlockForLine.
Accessibility will use this new functionality in its new text boundary implementation.

Differential Revision: https://phabricator.services.mozilla.com/D126433
2021-09-23 11:38:09 +00:00
Matt Woodrow 5d982b06d4 Bug 1725267 - Remove paint compression. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125799
2021-09-22 03:36:51 +00:00
Hiroyuki Ikezoe e0d7cca528 Bug 1727674 - Replace nsLayoutUtils::GetCrossDocParentFrame with nsLayoutUtils::GetCrossDocParentFrameInProcess in nsIFrame::UpdateVisibilitySynchronously. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125126
2021-09-22 00:57:14 +00:00
Hiroyuki Ikezoe 5dd44bf2b5 Bug 1727674 - Track frame visibility in OOP iframes. r=tnikkel
One caveat is that this change doesn't mean we handle frame visibility in
iframes in a same manner regardless whether the iframe is out-of-process or not.
In fact, we handle OOP iframe cases in a slightly different way since in OOP
iframes if the iframe is invisible because it's scrolled out or some such, then
we can't tell how far the iframe is from the visible scroll port. For example;

```
<div style="height: 100px; overflow: scroll;">
  <div id="spacer" style="width: 100%; height: 200px;"></div>
  <iframe style="height: 100px;"></iframe>
</div>
```

In this case, we consider all frames inside the iframe are invisible because
the iframe position is out of our frame visibility tracking margins. But if
the #spacer element's height is 100px, we consider all frames inside the iframe
viewport are visible if the iframe is in-process iframe, whereas we consider
all frames are invisible if the iframe is out-of-process iframe.

So in short, the frame visibilityn inside OOP iframes is depending on whether
the iframe gets painted in the parent document, i.e. depending on display port
and other factors controlling the paint stuff, the visibility inside in-process
iframes is depending on same factors for normal scrollable frames.

Differential Revision: https://phabricator.services.mozilla.com/D125125
2021-09-22 00:57:14 +00:00
Daniel Holbert b7cb22a3af Bug 1731359 part 1: Change the "NormalPositionProperty" frame property to use the "small value" method of storage. r=emilio
This frame property's type is small enough to fit directly in the property
table's 64-byte slot; so, this patch makes us store the data directly there
(rather than allocating it externally and storing a pointer in the table).

This patch shouldn't impact behavior at all.

Differential Revision: https://phabricator.services.mozilla.com/D126031
2021-09-20 22:26:14 +00:00
Mats Palmgren 8e002ac59f Bug 1591366 - Always reserve 64 bits for frame property value r=dholbert
Depends on D115711

Differential Revision: https://phabricator.services.mozilla.com/D124955
2021-09-20 19:52:46 +00:00
Sean Feng fc3b778ccf Bug 1591366 - Improve nested grid layout performance r=mats
This patch improves nested grid layout performance by caching the grid
items' block axis measurement to avoid potentially doing exponential
reflows.

Differential Revision: https://phabricator.services.mozilla.com/D115711
2021-09-20 19:52:45 +00:00
Emilio Cobos Álvarez 0873ed43bc Bug 1596184 - Get rid of nsStackFrame. r=layout-reviewers,mats
There are no legacy-stack uses anymore.

Differential Revision: https://phabricator.services.mozilla.com/D126077
2021-09-20 12:05:32 +00:00
Andrew Osmond 3a98545701 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-18 11:44:51 +00:00
Noemi Erli bb5d736641 Backed out 2 changesets (bug 1591366) for causing failures in table-grid-item-dynamic-004.html CLOSED TREE
Backed out changeset 19be43686dc0 (bug 1591366)
Backed out changeset a2b6f6abda6e (bug 1591366)
2021-09-18 02:42:58 +03:00
Mats Palmgren aa3e8d4e24 Bug 1591366 - Always reserve 64 bits for frame property value r=dholbert
Depends on D115711

Differential Revision: https://phabricator.services.mozilla.com/D124955
2021-09-17 21:06:53 +00:00
Sean Feng 586a33d2b9 Bug 1591366 - Improve nested grid layout performance r=mats
This patch improves nested grid layout performance by caching the grid
items' block axis measurement to avoid potentially doing exponential
reflows.

Differential Revision: https://phabricator.services.mozilla.com/D115711
2021-09-17 21:06:52 +00:00
Masayuki Nakano 5912f0b3ff Bug 1729480 - Make `keypress` event listener of editor and `execCommand` related methods access editor instance after flushing pending layout r=emilio,smaug
I have no idea how to make the test result stable because the intermittent
failure is caused by a race of `IMEContentObserver`'s content query performend
at vsync and `keypress` event after the `keydown` event.  Therefore, I try to
fix the root cause of the failure.

There are two paths reaching a public method of editor with pending
notifications.  One is `keypress` event listener of the editor.  The other is
`execCommand` related methods of `Document`.  Therefore, we should make them
flush pending notifications before accessing editor, but the cost may be too
expensive.  So we should consider whether we should flush pending notifications
or not as far as later.

Note that we cannot fix the `beforeinput` cases because flushing pending
notifications after dispatching `beforeinput` event may cause oranges.  It'll
be fixed while I'm working on bug 1710784.

Differential Revision: https://phabricator.services.mozilla.com/D125805
2021-09-17 17:48:05 +00:00
Ting-Yu Lin 143fe07a33 Bug 1700580 Part 4 - Cache flex item's border and padding used in the final reflow. r=dholbert
Currently, we assume any flex item with percentage padding will be
marked as dirty if the percentage basis is changed. However, it is not
true.

To fix it, we cache the flex item's border and padding used in its most
recent final reflow to detect their changes.

dynamic-isize-change-004.html is designed to catch the concern in bug
1700580 comment 12.

Differential Revision: https://phabricator.services.mozilla.com/D125620
2021-09-17 05:54:09 +00:00
Ting-Yu Lin 192d010f2b Bug 1700580 Part 2 - Add a helper class to cache flex item's metrics in its most recent reflow. r=dholbert
This patch introduces a class that caches metrics in flex item's final
reflow. With it, we have a better symmetry for caches, one for measuring
reflow and the other for final reflow. Also, we don't have to explain
that mLastReflowTreatedBSizeAsIndefinite is only meaningful if
mFinalReflowSize is set.

Differential Revision: https://phabricator.services.mozilla.com/D124967
2021-09-17 05:54:08 +00:00
Ting-Yu Lin 16a0744567 Bug 1700580 Part 1 - Unify CachedFlexItemData's APIs that update the existing cache. r=dholbert
Add `CachedFlexItemData::Update()` with the same arguments as the
constructor to update the existing cache for both the measuring & final
reflow.

`mFinalReflowSize` is going to be renamed in a later patch, so I also
change `UpdateFinalReflowSize()` to `Update()` for consistency with the
new API.

Differential Revision: https://phabricator.services.mozilla.com/D124966
2021-09-17 05:54:08 +00:00
Ting-Yu Lin fe3e424e83 Bug 1730506 - Tweak the assertion again to recognize integer overflow due to huge main gap size. r=dholbert
Similar to bug 1728319, a huge main gap size can also make SumOfGaps()
negative due to integer overflow. This patch is to recognize that
scenario.

We still need to annotate the crashtest because it still triggers the
following assertion in nsIFrame.

```
ASSERTION: inline-size less than zero: 'result >= 0'
```

Differential Revision: https://phabricator.services.mozilla.com/D125778
2021-09-16 23:06:37 +00:00
Daniel Holbert 86064ad618 Bug 1730774 part 3: Add includes for Inlines headers, to fix non-unified-build linking issues in layout/generic (and remove REQUIRES_UNIFIED_BUILD decl). r=TYLin
After the fixes in this patch, the REQUIRES_UNIFIED_BUILD declaration is no
longer needed, so I'm removing it here.  This directory now builds successfully
with that removed and with ac_add_options --disable-unified-build in the
mozconfig.

Differential Revision: https://phabricator.services.mozilla.com/D125738
2021-09-15 22:43:24 +00:00
Daniel Holbert d05867cc4e Bug 1730774 part 2: Add includes and forward-decls to fix non-unified-build bustage in layout/generic. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D125611
2021-09-15 16:15:02 +00:00
Matt Woodrow 2859a00361 Bug 1714138 - Remove AnimatedGeometryRoot. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124154
2021-09-15 08:31:05 +00:00
criss 196daa1700 Backed out changeset 007ff7f371c9 (bug 1730774) for causing bustages on Bp-hybrid. CLOSED TREE 2021-09-15 09:14:41 +03:00
Daniel Holbert 522de8e4d7 Bug 1730774 part 2: Add includes and forward-decls to fix non-unified-build bustage in layout/generic, and remove REQUIRES_UNIFIED_BUILD declaration. r=TYLin
After the fixes in this patch, the REQUIRES_UNIFIED_BUILD declaration is no
longer needed, so I'm removing it here.  This directory now builds successfully
with that removed and with ac_add_options --disable-unified-build in the
mozconfig.

Depends on D125610

Differential Revision: https://phabricator.services.mozilla.com/D125611
2021-09-15 00:04:16 +00:00
Jonathan Kew 56e3aa0a0f Bug 1729578 - Adjust overly-strict assertion in nsContinuingTextFrame::FirstContinuation(). r=emilio
It turns out this assertion (added as part of bug 1725555) is not necessarily valid.
When we're updating the frame tree in response to DOM modifications (in the testcase
here, we're under nsCSSFrameConstructor::ContentRemoved), we may call DeleteFrom on
the primary textFrame first, which results in calling SetPrevInFlow(nullptr) on its
nextContinuation; this in turn clears the mFirstContinuation back-pointers in all
the successors. But if we then call DeleteFrom on one of the continuations later
in the chain, those nulled-out pointers trigger this assertion. In fact, it's OK
for them to be null in this case, so the assertion is over-zealous and we should
drop it.

I believe the only time it's OK for this to happen is if the chain of nsContinuingTextFrames
has been "detached" from the primary frame during frame-tree updating, as has happened in
this example.

We can still sanity-check the mFirstContinuation pointer here by asserting that it
matches the FirstContinuation() reported by our prev-continuation, or is null if there
is no prev-continuation. This is a bit expensive, though, so it's a only a debug-mode
assertion (for the fuzzers to try and hit).

Differential Revision: https://phabricator.services.mozilla.com/D125444
2021-09-14 14:17:25 +00:00
Narcis Beleuzu e5d3122984 Backed out changeset 88fee7a54781 (bug 1729578) for crashtest failures on 1507961-1.html . CLOSED TREE 2021-09-14 15:20:04 +03:00
Jonathan Kew 0b513c5331 Bug 1729578 - Adjust overly-strict assertion in nsContinuingTextFrame::FirstContinuation(). r=emilio
It turns out this assertion (added as part of bug 1725555) is not necessarily valid.
When we're updating the frame tree in response to DOM modifications (in the testcase
here, we're under nsCSSFrameConstructor::ContentRemoved), we may call DeleteFrom on
the primary textFrame first, which results in calling SetPrevInFlow(nullptr) on its
nextContinuation; this in turn clears the mFirstContinuation back-pointers in all
the successors. But if we then call DeleteFrom on one of the continuations later
in the chain, those nulled-out pointers trigger this assertion. In fact, it's OK
for them to be null in this case, so the assertion is over-zealous and we should
drop it.

I believe the only time it's OK for this to happen is if the chain of nsContinuingTextFrames
has been "detached" from the primary frame during frame-tree updating, as has happened in
this example.

We can still sanity-check the mFirstContinuation pointer here by asserting that it
matches the FirstContinuation() reported by our prev-continuation, or is null if there
is no prev-continuation. This is a bit expensive, though, so it's a only a debug-mode
assertion (for the fuzzers to try and hit).

Differential Revision: https://phabricator.services.mozilla.com/D125444
2021-09-14 10:10:11 +00:00
Timothy Nikkel 23e5fd11c1 Bug 1730131. HitTestingTreeNode::GetRemoteDocumentScreenRect() double applies the resolution. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D125484
2021-09-14 02:33:36 +00:00
Emilio Cobos Álvarez 1f6f8d1fee Bug 1730603 - Blend with ancestor backgrounds until we compute an opaque backplate color. r=morgan
This should ensure the correct behavior when system colors are
semi-transparent, like on macOS on dark mode.

Testing this without hard-coding the system color seems hard (and I
think macOS on automation might not even hard native dark mode support
anyways).

In fact, if it did I think backplat-bg-image-006 would've caught it.

Differential Revision: https://phabricator.services.mozilla.com/D125475
2021-09-13 23:49:55 +00:00
Matt Woodrow 3be3d71f55 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-13 05:01:35 +00:00
Matt Woodrow 7292fcce3e Bug 1542929 - Remove mReferenceFrame from nsDisplayItem. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124009
2021-09-13 05:01:35 +00:00
Matt Woodrow 642579b68a Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-13 05:01:34 +00:00
criss 9640d7f5f3 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 a0a81ab3ce 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-10 03:43:35 +00:00
Matt Woodrow 75c16d58b2 Bug 1714138 - Remove AnimatedGeometryRoot. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D124154
2021-09-10 03:43:35 +00:00
Matt Woodrow 64ed962752 Bug 1542929 - Remove mReferenceFrame from nsDisplayItem. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124009
2021-09-10 03:43:34 +00:00
Matt Woodrow 706fce127d Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-10 03:43:32 +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
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
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 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 3f9d3853cd Bug 1728232 - Remove RestoreState. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D124006
2021-09-06 23:12:03 +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 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 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 700f26a934 Bug 1728925 - Remove unused nsDisplayImageContainer. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D124426
2021-09-05 22:36:44 +00:00
Matt Woodrow 3b71aff051 Bug 1728914 - Convert GetWidgetLayerManager to return a WebRenderLayerManager. r=gfx-reviewers,aosmond
Depends on D124416

Differential Revision: https://phabricator.services.mozilla.com/D124417
2021-09-05 02:16:37 +00:00
Timothy Nikkel 0a19897c13 Bug 1729087. Remove ScrollFrameHelper::mScrollPosForLayerPixelAlignment as it is unused with webrender. r=botond
gfxVars::UseWebRender() is always true now.

Differential Revision: https://phabricator.services.mozilla.com/D124510
2021-09-04 03:56:50 +00:00
Ting-Yu Lin 30a1f1e161 Bug 1728319 - Tweak an assertion to recognize integer overflow due to huge margin/border/padding. r=dholbert
We could fix the testcase in this patch by promoting
`FlexLine::mTotalItemMBP` to `AuCoord64`, but then
`layout/generic/crashtests/1488762-1.html` will start crashing. It is
because `FlexItem::OuterMainSize()` can return negative size due to
integer overflow, and the negative sizes will accumulate in
`mTotalOuterHypotheticalMainSize`.

Instead of promoting more variables to `AuCoord64` to workaround huge
margin/border/padding that we cannot handle gracefully, this patch
tweaks the assertion to check only if `mTotalOuterHypotheticalMainSize`
and `mTotalItemMBP` have valid values.

Differential Revision: https://phabricator.services.mozilla.com/D124409
2021-09-03 21:23:52 +00:00
Timothy Nikkel 7a00827c3b Bug 1728699. Use IsRootContentDocumentCrossProcess in one place in ScrollFrameHelper::BuildDisplayList. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124282
2021-09-03 02:23:03 +00:00
Timothy Nikkel 185e176645 Bug 1728706. Use IsRootContentDocumentCrossProcess for top layer related optimization in ScrollFrameHelper::BuildDisplayList. r=botond
The reason this IsRootContentDocument check was added was because of a test where there is fixed pos content in the top layer of a subdocument. This fixed pos content gets removed from the display list as part of this optimization. So no WebRenderLayerScrollData gets created for the asr of this fixed pos content, which causes an assert. (from https://bugzilla.mozilla.org/show_bug.cgi?id=1664804#c18 )

The code that ensures there is WebRenderLayerScrollData for the root asr is here https://searchfox.org/mozilla-central/rev/55e8eba74b60b92d04b781f7928f54ef76b13fa9/gfx/layers/wr/WebRenderCommandBuilder.cpp#1636 and it happens for all root content documents in the process, so this optimization is valid for any root content document in the process.

Differential Revision: https://phabricator.services.mozilla.com/D124298
2021-09-03 19:17:17 +00:00
Matt Woodrow a1f669f3aa Bug 1728709 - Add nsDisplayItem::GetPaintRect that computes a value using the current clip extents. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124299
2021-09-03 18:58:18 +00:00
Cosmin Sabou eda6b9ae4c Backed out changeset a954692bd4c5 (bug 1728699) for content crashes. CLOSED TREE 2021-09-03 20:58:53 +03:00
Iulian Moraru d7a06601a0 Backed out changeset 089962073382 (bug 1728903) for causing Bp-hybrid bustages on ImageBitmapRenderingContext.cpp. CLOSED TREE 2021-09-03 18:49:32 +03:00
Andrew Osmond 472ab1dfc3 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 12:52:05 +00:00
Emilio Cobos Álvarez 70f53c85d4 Bug 856337 - Implement image-rendering: smooth and image-rendering: pixelated. r=jrmuizel,dholbert,longsonr
Also, more directly go from StyleImageRendering to wr::ImageRendering.

 * image-rendering: smooth the non-deprecated version of
   OptimizeQuality, which maps to SamplingFilter::LINEAR /
   wr::ImageRendering::Auto (which uses gl::LINEAR).

 * image-rendering: pixelated maps to wr::ImageRendering::Pixelated /
   SamplingFilter::POINT which is the same crisp-edges does.

Note that this uncovers that we were mapping image-rendering:
crisp-edges to wr::ImageRendering::Pixelated.

I'm going to preserve behavior on this patch but we should consider
switching that to map to wr::ImageRendering::CrispEdges on a
follow-up (filed bug 1728831 for this).

Differential Revision: https://phabricator.services.mozilla.com/D124378
2021-09-03 08:56:43 +00:00
Timothy Nikkel 7e8bd67afb Bug 1728699. Use IsRootContentDocumentCrossProcess in one place in ScrollFrameHelper::BuildDisplayList. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124282
2021-09-03 02:23:03 +00:00
Timothy Nikkel 72553046c2 Bug 1728693. Use IsRootContentDocumentCrossProcess in nsSubDocumentFrame::BuildDisplayList. r=mattwoodrow
Not sure we even need this anymore but just doing this so I can finish the fission audit.

Added way back in bug 588407.

This shouldn't actually be any behaviour change: anything that is IsRootContentDocumentInProcess but not IsRootContentDocumentCrossProcess should be a oop if with fission (unless I'm missing a case), so we will never hit this code path, we'll hit the remote iframe path above.

Differential Revision: https://phabricator.services.mozilla.com/D124277
2021-09-03 02:22:11 +00:00
Noemi Erli e5f5e8d032 Backed out changeset f12c6a6cd1a5 (bug 1728903) for causing build bustage in TestTextures.cpp CLOSED TREE 2021-09-03 05:16:59 +03:00
Andrew Osmond 4219d92daf Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 01:48:17 +00:00
Noemi Erli f3a236c514 Backed out 2 changesets (bug 856337) for causing xpcshell failures in test_css-properties-db.js CLOSED TREE
Backed out changeset 7070c7cea8ec (bug 856337)
Backed out changeset edc12b36439f (bug 856337)
2021-09-03 01:36:17 +03:00
Emilio Cobos Álvarez 1602724fa9 Bug 856337 - Implement image-rendering: smooth and image-rendering: pixelated. r=jrmuizel,dholbert,longsonr
Also, more directly go from StyleImageRendering to wr::ImageRendering.

 * image-rendering: smooth the non-deprecated version of
   OptimizeQuality, which maps to SamplingFilter::LINEAR /
   wr::ImageRendering::Auto (which uses gl::LINEAR).

 * image-rendering: pixelated maps to wr::ImageRendering::Pixelated /
   SamplingFilter::POINT which is the same crisp-edges does.

Note that this uncovers that we were mapping image-rendering:
crisp-edges to wr::ImageRendering::Pixelated.

I'm going to preserve behavior on this patch but we should consider
switching that to map to wr::ImageRendering::CrispEdges on a
follow-up (filed bug 1728831 for this).

Differential Revision: https://phabricator.services.mozilla.com/D124378
2021-09-02 20:28:39 +00:00
Mats Palmgren fbd78876d2 Bug 1728497 - Remove nsColumnSetFrame::CalculateColumnRuleBounds and just return InkOverflowRect() instead. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D124202
2021-09-02 15:42:04 +00:00
Andrew Creskey 46162554f6 Bug 1717920 - Add scrolling metrics to history metadata r=mossop,botond,edgar
Disabled by default, browser.places.interactions.enabled, this adds scrolling metrics (time spent scrolling and distance scrolled) to the history metadata.

Differential Revision: https://phabricator.services.mozilla.com/D120656
2021-09-02 14:11:56 +00:00
Emilio Cobos Álvarez 8b10d3a89d Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-02 11:38:01 +00:00
Timothy Nikkel e389ea6afd Bug 1728702. Use IsRootContentDocumentCrossProcess in ScrollFrameHelper::AppendScrollPartsTo. r=botond
This code clearly only wants to handle the case where there is zooming and the scrollbar sizes have a bound (screen size or maximum window size from OS).

Differential Revision: https://phabricator.services.mozilla.com/D124284
2021-09-02 03:01:36 +00:00
Timothy Nikkel 9d236f874e Bug 1728700. Use IsRootContentDocumentCrossProcess in another place in ScrollFrameHelper::BuildDisplayList. r=botond
This has to do with determining whether visual or layout coords are used, which is determined by the cross process root content doc.

Differential Revision: https://phabricator.services.mozilla.com/D124283
2021-09-02 03:01:07 +00:00
Timothy Nikkel 87be53243f Bug 1728698. Use IsRootContentDocumentCrossProcess ScrollFrameHelper::ScrollToImpl. r=hiro
This is used to scrolling the visual viewport which is on the cross process root content doc.

Differential Revision: https://phabricator.services.mozilla.com/D124280
2021-09-02 02:15:31 +00:00
Timothy Nikkel fd8d46b7b6 Bug 1728660. Use IsRootContentDocumentCrossProcess in ScrollFrameHelper::RestrictToRootDisplayPort. r=botond
We use it to determine if we had applied resolution that we need to remove, that is only done at the cross process root content document, not an in process root content document.

As a confirmation of this, the function we get the rect from, CalculateCompositionSizeForFrame, also uses IsRootContentDocumentCrossProcess to determine if the rect is handled specially.

Differential Revision: https://phabricator.services.mozilla.com/D124253
2021-09-01 23:25:11 +00:00
Narcis Beleuzu 92fc260af2 Backed out changeset 28a0487d0291 (bug 1693222) for reftest failure on themed-widget.html. CLOSED TREE 2021-09-02 02:26:12 +03:00
Emilio Cobos Álvarez c3eb845bbf Bug 1693222 - Implement SelectedItem and SelectedItemText system colors. r=mstange
Since Highlight / HighlightText are now equivalent to the text selection
ones, remove those too.

Differential Revision: https://phabricator.services.mozilla.com/D123964
2021-09-01 18:21:57 +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
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
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