Commit Graph

72915 Commits

Author SHA1 Message Date
Ting-Yu Lin
9daa2430da Bug 1642036 - Move nsContaineFrame's method definitions from nsFrame.cpp to nsContainerFrame.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77565
2020-06-01 18:10:05 +00:00
Ting-Yu Lin
72644413c0 Bug 1641739 - Reduce the support child list types for flex / grid container's frame list manipulation methods. r=mats
These flex / grid's methods are implemented by delegating to
nsContainerFrame's methods. We shouldn't assume they can support more
child list types than the ones supported in nsContainerFrame's methods.

- NoteNewChildren is a helper for flex and grid's AppendFrame and
InsertFrames, and nsContainerFrame::{AppendFrame,InsertFrames} supports
only kPrincipalList and kNoReflowPrincipalList.

- nsContainerFrame::RemoveFrame supports only kPrincipalList and
kNoReflowPrincipalList.

- nsContainerFrame::SetInitialChildList supports only kPrincipalList and
kBackdropList.

Differential Revision: https://phabricator.services.mozilla.com/D77391
2020-06-01 18:22:03 +00:00
Kris Maglione
b3fcd970ec Bug 1638153: Part 2 - Fix uses of .rootTreeItem to get top browser window. r=geckoview-reviewers,nika,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75429
2020-06-01 17:59:01 +00:00
Jamie Nicol
57d87985be Bug 1642079 - Only snap animated transforms for zoom reference frames? r=aosmond
Bug 1635406 made it so that webrender snaps the offsets of animated
transforms before accumulating them in to the reference frame
transform. Unfortunately, however, this causes jittery animations. The
original intention was just to snap the visual viewport offset when
scrolling, to avoid excessive picture cache invalidation.

To avoid this, make it so that we only snap for reference frames of
kind ReferenceFrameKind::Zoom. This will mean that most animations are
unaffected. There may however still be some jitter when zooming, but
this is outweighed by the benefit of not invalidating picture cache
tiles every frame when scrolling.

Differential Revision: https://phabricator.services.mozilla.com/D77679
2020-06-01 16:49:10 +00:00
Micah Tigley
81f5f0e8d0 Bug 1621781 - Add an "IsRDMTouchSimulationActive" field to ScrollMetadata. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77395
2020-05-30 03:15:22 +00:00
Noemi Erli
f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Ricky Stewart
0bbaac721b Bug 1641693 - Replace a bunch of uses of GENERATED_FILES with the GeneratedFile template r=necko-reviewers,geckoview-reviewers,aklotz,dragana,froydnj
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.

Differential Revision: https://phabricator.services.mozilla.com/D77496
2020-06-01 16:00:28 +00:00
Andrea Marchesini
8c0df411d1 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-01 11:57:46 +00:00
Jonathan Watt
bbb1b84928 Bug 1642233. Rename nsPrintObject's mDontPrint and IsPrintable for consistency with its EnablePrinting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77616
2020-05-31 19:00:42 +00:00
Emilio Cobos Álvarez
f8b1e141b1 Bug 1642232 - Remove SheetState::Unknown. r=jwatt
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D77615
2020-05-31 18:56:03 +00:00
Emilio Cobos Álvarez
2f5607b8d0 Bug 1642221 - Rename SheetLoadData::mLoaderPrincipal to mTriggeringPrincipal. r=jwatt
I'm about to introduce the concept of "Loader principal" (as in "the
principal of the CSS loader"), and SheetLoadData already has an
mLoaderPrincipal.

However SheetLoadData's principal is just the triggering principal (the
principal that initiated the load). So name it that with consistency
with SheetInfo::mTriggeringPrincipal etc.

Differential Revision: https://phabricator.services.mozilla.com/D77613
2020-05-31 17:11:57 +00:00
Jonathan Watt
1ba1fb1c93 Bug 1642167. Remove nsPrintData->mIsIFrameSelected. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77602
2020-05-31 07:47:20 +00:00
Jonathan Watt
78ab5353da Bug 1642167. Further simplify nsPrintJob::EnablePOsForPrinting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77601
2020-05-31 15:51:53 +00:00
Jonathan Watt
a26f4f2486 Bug 1642167. Group kRangeAllPages and kRangeSpecifiedPageRange code in nsPrintJob::EnablePOsForPrinting. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77600
2020-05-31 15:28:22 +00:00
Masatoshi Kimura
b9a2ffc214 Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-31 03:41:03 +00:00
Timothy Nikkel
6cedbd9795 Bug 1642088. Use a ResolutionChangeOrigin for when the resolution is changing by tests that overides and sets the restore resolution. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77582
2020-05-30 21:34:39 +00:00
longsonr
08748daea7 Bug 1638842 - Make border-image-repeating-radial-gradient reftest very slightly fuzzier r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77585
2020-05-30 14:54:41 +00:00
Sylvestre Ledru
63be8d152d Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D77580
2020-05-30 09:55:27 +00:00
Dorel Luca
0c8ff16ba2 Backed out 2 changesets (bug 1621781) for Mochitest failures in gfx/layers/apz/test/mochitest/test_group_mouseevents.html
Backed out changeset a5fe71693070 (bug 1621781)
Backed out changeset 58a9b7f50a4b (bug 1621781)
2020-05-30 06:12:01 +03:00
Micah Tigley
62367a9af9 Bug 1621781 - Add an "IsRDMTouchSimulationActive" field to ScrollMetadata. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77395
2020-05-29 21:03:06 +00:00
Hiroyuki Ikezoe
935fac58d0 Bug 1640223 - Expand the given size in ExpandHeightForViewportUnits by multiplying the 'vh value / visible area height'. r=botond
The viewport units size doesn't match the aspect ratio of the screen size in
some cases.

For example, in the case of the reftest in this commit, the meta viewport is
"width=1600, height=device-height" and the screen size during reftest is
"800x1000". Thus the viewport units size will be "1600x1000". In such cases
with the old way ExpandHeightForViewportUnits shrinks the given size
"1600x1800" to "1600x1000" with 100px dynamic toolbar max height (and the
MOZ_ASSERT in the function happens on debug builds).

Differential Revision: https://phabricator.services.mozilla.com/D77176
2020-05-29 17:18:21 +00:00
Timothy Nikkel
918a7c4207 Bug 1641752. Don't access dead frame in AutoScrollbarRepaintSuppression. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77403
2020-05-29 11:19:59 +00:00
Erik Nordin
4c06dea151 Bug 1639990 - Rename defaultPrinterName to lastUsedPrinterName r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D76955
2020-05-29 17:37:01 +00:00
Emilio Cobos Álvarez
5223bb118d Bug 1641861 - Remove some useless includes from Loader.h. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D77456
2020-05-29 13:48:11 +00:00
Ting-Yu Lin
80aee9fb92 Bug 1640275 Part 2 - Override nsContainerFrame's methods for nsFlexContainerFrame. r=mats
Similar to nsGridContainerFrame, when appending, inserting, or removing
frames, the state bits NS_STATE_FLEX_DID_PUSH_ITEMS and
NS_STATE_FLEX_HAS_CHILD_NIFS need to be set so that
nsContainerFrame::NormalizeChildLists() can work correctly.

Remove kNoReflowPrincipalList from the supported child list in
NoteNewChildren() since the list is used to optimize BIDI-splitting,
which should only affect Inline and Text frame classes.

Differential Revision: https://phabricator.services.mozilla.com/D77204
2020-05-28 22:50:57 +00:00
Ting-Yu Lin
fae28a9fe1 Bug 1640275 Part 1 - Move some nsGridContainerFrame's helper methods to nsContainerFrame. r=mats
In the next part, I'll extend these helpers, and use them in
nsFlexContainerFrame.

Differential Revision: https://phabricator.services.mozilla.com/D77203
2020-05-28 18:03:11 +00:00
Ting-Yu Lin
f9501b14d9 Bug 1405896 - Properly destroy OverflowContainersProperty() in NormalizeChildLists(). r=mats
mozilla::Unused is going to be removed in bug 1628542. We can cast the
return value of `TakeProperty` into void to suppress the warning.

In bug 1641085, we can add `DestroyOverflowContainersList` (similar to
DestroyOverflowList(), and audit the caller.

Differential Revision: https://phabricator.services.mozilla.com/D76981
2020-05-28 22:49:24 +00:00
Emilio Cobos Álvarez
123b578237 Bug 1641520 - Remove some dead code in nsComputedDOMStyle.h. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D77232
2020-05-28 22:23:22 +00:00
Erik Nordin
3a7fc409b7 Bug 117233 - Implement nsIPrinterEnumeratorX r=jwatt
- Implement the nsPrinterEnumeratorX
- Enable the contract @mozilla.org/gfx/printerenumerator;1 for macOS
- Add test for default printer name.
- Remove restrictions preventing some tests from running on macOS

Differential Revision: https://phabricator.services.mozilla.com/D76356
2020-05-28 15:36:44 +00:00
Geoff Brown
077744cb37 Bug 1641255 - Remove bad WindowListener reference from android reftest harness; r=jya
WindowListener was removed in bug 1632098, but this reference was left behind.

Differential Revision: https://phabricator.services.mozilla.com/D77098
2020-05-28 04:26:57 +00:00
Haik Aftandilian
0a19d8eeb2 Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-28 04:00:02 +00:00
Kartikaya Gupta
01892da471 Bug 1641246 - Remove unrelated stray function declaration. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D77112
2020-05-27 21:33:55 +00:00
Kartikaya Gupta
b0ee5dd871 Bug 1641246 - Remove nsDisplayResolution. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77111
2020-05-27 22:17:09 +00:00
Boris Chiou
6685919b0d Bug 1640036 - Drop the guard of aUseMappedRatio for non-auto aspect-ratio case. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D77191
2020-05-28 01:18:32 +00:00
Razvan Maries
c2dda9f2ae Backed out changeset 854feb05fff6 (bug 1592416) for assertion failures. CLOSED TREE 2020-05-28 03:42:16 +03:00
Boris Chiou
57938596a7 Bug 1640036 - Update aspec-ratio syntax for HTML IMG mapped ratio. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D76942
2020-05-27 21:43:00 +00:00
Haik Aftandilian
76c2f2d30d Bug 1592416 - Right click opens context menu on wrong monitor or virtual desktop (mac OS Catalina) r=spohl
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.

This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.

With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.

Differential Revision: https://phabricator.services.mozilla.com/D75419
2020-05-27 22:41:34 +00:00
Joel Maher
9e0ee8988a Bug 1641160 - add support for isCoverageBuild in reftests. r=gbrown
add support for isCoverageBuild in reftests.

Differential Revision: https://phabricator.services.mozilla.com/D77139
2020-05-27 21:22:54 +00:00
Erik Nordin
b077117ab0 Bug 1637437 - Recompute backdrop-filter only when WebRender changes r=jrmuizel
- Add a gfxVarReceiver for nsCSSProps.
  - Recompute backdrop-filter state when notifying receivers for WebRender.
  - Remove NS_NewRunableFunction calls when we know we're on main thread.
  - Add assertion that recompute enabled state is called from main thread.

Differential Revision: https://phabricator.services.mozilla.com/D74975
2020-05-27 19:53:05 +00:00
Jon Bauman
3b93e0e5f8 Bug 1635391 - Firefox does not download WebP and AVIF when their support flags are off. r=mattwoodrow
Dynamically toggle support for displaying image/webp and image/avif according
to the values of the image.webp.enabled and image.avif.enabled prefs.

Differential Revision: https://phabricator.services.mozilla.com/D76977
2020-05-27 18:51:25 +00:00
Jamie Nicol
7aabe03a28 Bug 1635406 - Snap reference frame transforms if animated or zooms. r=aosmond
Bug 1620014 attempted to fix an issue where an animated visual
viewport offset (eg due to scrolling while being zoomed in) was
causing the fractional offset of a descendant scroll frame's content
transform to change, causing too much picture cache invalidation.

It did so by snapping the coordinate-system-relative offset when using
it to calculate the content_transform. This value of course includes
the animated visual viewport offset (as the axis-aligned zoom
transform cannot reset the coordinate system). However, it also
includes non-animated offsets, which were now being incorrectly
snapped, causing blurry/clipped text.

This change reverts that original fix. And instead, it snaps the
source_transform of the reference frame itself when it is sampled,
rather than the accumulated coordinate-system-relative scale_offset of
the scroll frame. Additionally, it only snaps the offset if it is an
animation (including zoom), and static offsets are left unsnapped.

Differential Revision: https://phabricator.services.mozilla.com/D76298
2020-05-27 13:45:08 +00:00
Bob Clary
6a0aed7b99 Bug 1638981 - enable mach reftests to run with Python 3. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D76650
2020-05-27 13:07:07 +00:00
Emilio Cobos Álvarez
54fd961a29 Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin
There's no use case for stateful comparators, so they can be just plain
function pointers.

This is used in some hot places like CSS selector matching.

Differential Revision: https://phabricator.services.mozilla.com/D77084
2020-05-27 18:11:12 +00:00
Miko Mynttinen
6013e7cd95 Bug 1640457 - Discard pending WR display items if the Gecko item will be pushed as an image r=jrmuizel
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.

Differential Revision: https://phabricator.services.mozilla.com/D77095
2020-05-27 16:45:08 +00:00
sefeng
727ca5589e Bug 1322947 - Add support of cancel dialog modal with escape key r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74937
2020-05-27 14:37:19 +00:00
Mirko Brodesser
17a7e3429d Bug 1635709: part 23) Factor code out to IsContentInActivelyEditableTableCell. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D77004
2020-05-27 14:39:11 +00:00
Emilio Cobos Álvarez
99ed9d65e3 Bug 1640843 - Finer grained invalidation for attribute changes. r=heycam
This should help out quite a bit with uBO, which has lots of very
general attribute selectors. We invalidate per attribute name rather
than using a SelectorMap, which prevents matching for attribute
selectors that can't have changed.

The idea is that this should be generally cheaper, though there are
cases where this would be a slight pesimization. For example, if there's
an attribute selector like:

  my-specific-element[my-attribute] { /* ... */ }

And you change `my-attribute` in an element that isn't a
`my-specific-element`, before that the SelectorMap would've prevented us
from selector-matching completely. Now we'd still run selector-matching
for that (though the matching would be pretty cheap).

However I think this should speed up things generally, let's see what
the perf tests think before landing this though.

Differential Revision: https://phabricator.services.mozilla.com/D76825
2020-05-27 09:17:47 +00:00
longsonr
ef003847e5 Bug 1640280 - Extend autofocus to SVGGraphicsElement r=emilio
Note we're still limited to markup only because of bug 662496
so we don't pass the web platform tests for this feature.
Chrome has implemented support per
https://www.chromestatus.com/feature/5654905853313024
In SVG only SVGGraphicsElements are focusable.

Differential Revision: https://phabricator.services.mozilla.com/D76546
2020-05-27 07:59:07 +00:00
Botond Ballo
6c825b036b Bug 1637135 - Hit-test input events in layout coordinates on mobile. r=tnikkel
Depends on D76996

Differential Revision: https://phabricator.services.mozilla.com/D76997
2020-05-27 06:55:39 +00:00
Botond Ballo
ed360f1a91 Bug 1637135 - Don't assume visual coordinates in event retargeting helpers. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D76996
2020-05-27 06:54:35 +00:00