This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
Otherwise fixed-pos elements still escape the container chain, which is
what the null-abspos container hack (currently used by mathml) is
supposed to prevent.
Differential Revision: https://phabricator.services.mozilla.com/D96779
Otherwise fixed-pos elements still escape the container chain, which is
what the null-abspos container hack (currently used by mathml) is
supposed to prevent.
Differential Revision: https://phabricator.services.mozilla.com/D96779
Aside from automating boilerplate, this will allow reusing some of these
structs for full LookAndFeel remoting in bug 1470983.
Differential Revision: https://phabricator.services.mozilla.com/D94531
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.
Differential Revision: https://phabricator.services.mozilla.com/D96414
CSSPixel::ToAppUnits() requires computation at runtime. Since most of
the layout computations require `nscoord`, this patch defines extra
intrinsic sizes in app units.
Differential Revision: https://phabricator.services.mozilla.com/D96258
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.
Notable Changes:
- Add new section and checkbox for two-sided printing.
- Add new getter to settings proxy for supportsDuplex.
- Add new setter/getter to settings proxy for printDuplex.
- Add new test for no duplex with PDF printer.
- Add new test for toggle duplex in portrait orientation.
- Add new test for toggle duplex in landscape orientation.
- Add new test for toggle orientation with duplex checked.
- Correctly set duple mode in GTK print settings.
Depends on D94026
Differential Revision: https://phabricator.services.mozilla.com/D93621
This patch adds a new checkbox to the print UI for two-sided printing.
The checkbox is only visible if the currently selected printer supports
two-sided printing.
Notable Changes:
- Add new section and checkbox for two-sided printing.
- Add new getter to settings proxy for supportsDuplex.
- Add new setter/getter to settings proxy for printDuplex.
- Add new test for no duplex with PDF printer.
- Add new test for toggle duplex in portrait orientation.
- Add new test for toggle duplex in landscape orientation.
- Add new test for toggle orientation with duplex checked.
- Correctly set duple mode in GTK print settings.
Depends on D94026
Differential Revision: https://phabricator.services.mozilla.com/D93621
This supports one manifestparser expression per line in the 'skip-if',
'fail-if' and 'run-if' keys. As a side effect the:
skip-if = foo ||
bar
syntax is no longer supported. Instead it can be:
skip-if =
foo # bug 123
bar # bug 456
Differential Revision: https://phabricator.services.mozilla.com/D95927
Also add AsyncPanZoomController::CanScrollDownwardsWithDynamicToolbar to tell
whether the root APZC is scrollable or there is room covered by the dynamic
toolbar so that we can tell GeckoView to move the dynamic toolbar in such cases.
Differential Revision: https://phabricator.services.mozilla.com/D93914
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.
This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.
Differential Revision: https://phabricator.services.mozilla.com/D94641
This also changes the frontend to use this interface.
This will be a bit less efficient in the general case, as it will serialize the
PaperList and DefaultSettings fetches. But most of the large delays seem to
occur when the print server is slow to respond, and ultimately using a single
live connection for both these requests when possible (particularly with CUPS)
should improve the total latency when the printer or print server is not
available, or is very slow.
Differential Revision: https://phabricator.services.mozilla.com/D93688
Similar to the optional aContainingBlockSize parameter, both border and
padding should use logical coordinates in ReflowInput::mFrame's writing
mode.
Table frames that need to override border and padding can be simplified a bit.
However, DR_init_constraints_cookie and DR_init_offsets_cookie become more
complex, but they're only for debugging. I'm not planning to update their
internal APIs.
Differential Revision: https://phabricator.services.mozilla.com/D95369
I favor two-argument SetComputedLogicalMargin() for clarity in this
patch series because it works for any pair of writing mode and logical
margin.
Spoiler alert: the one-argument SetComputedLogicalMargin() will be
removed in a later part.
Differential Revision: https://phabricator.services.mozilla.com/D95366
layout/base/tests/test_bug332655-1.html calls focus on an element, this triggers a call to zoomToFocusedInput. This can zoom the parent document of the test, the mochitest harness.
Then test layout/base/tests/test_bug667512.html runs. It ends by synthesizing a left arrow key and then a right arrow key. With the old scrollbar code this results in no scrolling because there is no layout scrolling that can be done either in the test or the parent document. With the new scrollbar code we can scroll the visual viewport using the keyboard so this scrolls the visual viewport of the test harness (because it got zoomed from a previous test).
The test harness being scrolled means that the synthesized click in the next test test_bug677878 can not hit its intended target.
Using the pref apz.zoom-to-focused-input.enabled to disable zoom to focused input in this directory does work to fix this, but I'm tired of doing that.
I think the proper fix here would be to disable scrolling/zooming of the test harness document. Since it's the root content document and it is not scrollable if not zoomed this is equivalent to disabling the zooming part of zoom to focused input (except for tests that open their own window). To test the zooming part of zoom to focused input we can use a test that opens it's own window: we have gfx/layers/apz/test/mochitest/test_group_zoomToFocusedInput.html for this.
We already have the pref formhelper.autozoom would seems like it would work for this purpose, except it is entangled with java stuff in mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoRuntimeSettings.java that I don't really understand that means setting the pref in mochitest.ini doesn't seem to take affect.
So I created a new pref we can use specifically for this purpose. Hopefully we can use it instead of fully disabling the zoom to focused input, so we more closely test what we ship.
Differential Revision: https://phabricator.services.mozilla.com/D95423
Flex item's content size suggestion is the min-content size in the main
axis. Quoting from the CSS Sizing spec, section "5.1. Intrinsic Sizes",
The min-content size of a box in each axis is the size it would have
if it was a float given an auto size in that axis (and no minimum or
maximum size in that axis) and if its containing block was
zero-sized in that axis. (In other words, the minimum size it has
when sized as “shrink-to-fit”.)
However, all the frame types' GetMinISize() doesn't consider aspect
ratio (either the intrinsic aspect ratio on images or svg, or the
preferred aspect ratio set by the aspect-ratio property). That is, we
currently don't allow `aspect ratio * definite block-size` as part of
the equation in `inline-size:min-content` (bug 1646100 or bug 1670151).
Luckily, nsIFrame::ComputeSize() already takes care of this [2]. We just
need to add a flag to let ComputeSize() behave as if the flex item had
an auto inline size. The code should be similar to FloatMarginISize() in
BlockReflowInput.cpp except we are calculate the flex item's content-box
size.
[1] https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes
[2] https://searchfox.org/mozilla-central/rev/dbced93f1c57942501c23d4633d01ce59d9087a1/layout/generic/nsContainerFrame.cpp#2732,2735-2736
Differential Revision: https://phabricator.services.mozilla.com/D94802
The goal here is to hook up the ctrl+0 keyboard shortcut to reset the scaling
zoom applied by pinch gestures (on touchscreen or trackpad), in addition to
resetting the reflow zoom (aka full zoom). This patch also makes other mechanisms
to reset the reflow zoom (e.g. clicking on the "100%" label in the hamburger menu)
also reset scaling zoom, which I think makes sense for consistency.
Most of this patch is just plumbing, but I'm unfamiliar with these codepaths
so requesting review from relevant owners to make sure it's sane.
Differential Revision: https://phabricator.services.mozilla.com/D94624
Even when the margins don't come from APZ, they are relative to
the visual viewport, and for the RCD-RSF there may be an offset
between the visual and layout viewports that they should be
translated by.
Bug 1669982 modified the call site in
CalculateAndSetDisplayPortMargins() to do this. This patch
refactors things such that all setters of the display port
do this if appropriate.
Differential Revision: https://phabricator.services.mozilla.com/D93428
Moving the ExternalPixel types from APZPublicUtils.h to Units.h to
reduce the transitive include graph from that dependency.
Signed-off-by: Joey Salazar <grey.lila@yahoo.com>
Differential Revision: https://phabricator.services.mozilla.com/D94932