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

2364 Коммитов

Автор SHA1 Сообщение Дата
longsonr c2fc063be0 Bug 1652254 - Remove svg from some moz.build local includes r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D83247
2020-07-12 16:38:26 +00:00
longsonr 875f5e88ac Bug 1259861 - Move everything else into the mozilla namespace in layout/svg r=dholbert
Also: adjust include paths to be consistent for usages of various SVG headers,
and remove unused SVG includes (mostly for "utils" classes),
and drop stray "ns" from already-renamed SVG classes in various code comments.

Differential Revision: https://phabricator.services.mozilla.com/D83140
2020-07-11 02:20:20 +00:00
longsonr cc4f307539 Bug 1651404 - Move nsSVGDisplayableFrame and nsISVGSVGFrame to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D82945
2020-07-09 18:34:54 +00:00
Cameron McCormack c7b8a0ec83 Bug 1650715 - Make image-orientation apply to all CSS images associated with an element. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D82471
2020-07-08 23:51:15 +00:00
Miko Mynttinen f51fb1062d Bug 1641769 - Compute visibility of nsDisplayPerspective children r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D82720
2020-07-08 21:30:30 +00:00
longsonr 058049a793 Bug 1649739 - Move SVG paint server and clipPath classes to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81858
2020-07-07 13:49:30 +00:00
Kagami Sascha Rosylight 1afcf4d621 Bug 1630704 - Part 27: Remove nsFrame from inheritance chain r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81864
2020-07-06 22:29:42 +00:00
Kartikaya Gupta 14464b938b Bug 1650488 - Don't build an async zoom container if a document is in fullscreen. r=botond
When a document has a fullscreen element, zooming is disabled, so we don't need
to build the async zoom container. But also, fullscreen is implemented via
hoisting the fullscreen element out of the normal layout flow, and making it
position:fixed. If the nsDisplayAsyncZoom display item is still in the display
list, it has a clip that doesn't account for fullscreen-ness, but still wraps
the nsDisplayPositionFixed items that are rendering the fullscreen elements.
This can result in hit-testing failing on those fullscreen items, because the
nsDisplayAsyncZoom item incorrectly clips away hit-test points. Instead, a
simple solution here is to just skip building the nsDisplayAsyncZoom item
entirely when in a fullscreen state.

Differential Revision: https://phabricator.services.mozilla.com/D82422
2020-07-06 20:31:00 +00:00
Hiroyuki Ikezoe 43877bd8b5 Bug 1647186 - Apply the cumulative resolution smaller than 1.0 to the root frame size for the partial pre-render. r=botond
So that we can reasonably expand the pre-render region on mobile environments.

Differential Revision: https://phabricator.services.mozilla.com/D81961
2020-07-05 23:17:02 +00:00
Hiroyuki Ikezoe 6daee7f230 Bug 1324591 - Disable partial pre-render for frames in position:sticky subtree. r=botond
Depends on D75732

Differential Revision: https://phabricator.services.mozilla.com/D77774
2020-07-05 11:45:59 +00:00
Hiroyuki Ikezoe 4205879729 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Depends on D75731

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 11:45:01 +00:00
Hiroyuki Ikezoe ec49c6a9a8 Bug 1324591 - Inform the partial prerender rect, the overflowed SideBits, the scroll id of the nearest scrollable frame and its rectable to the compositor. r=botond
nsDisplayTransform doesn't have enough room to store the partial prerender rect
and the overflowed SideBits unfortunately (it will exceed 512 bytes limit [1]).
So we get the partial prerender rect and calculate the overflowed SideBits just
before we send transform animation information to the compositor.

[1] https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/layout/painting/nsDisplayList.cpp#7318

Depends on D81480

Differential Revision: https://phabricator.services.mozilla.com/D75730
2020-07-05 11:43:33 +00:00
Hiroyuki Ikezoe cb8a5d8210 Bug 1324591 - Store PrerenderDecision in nsDisplayTransform. r=botond
Depends on D75728

Differential Revision: https://phabricator.services.mozilla.com/D75729
2020-07-05 11:43:07 +00:00
Narcis Beleuzu a1826f59a6 Backed out changeset 290c0c7b9864 (bug 1647186) for reftest failure on partial-prerender-expansion-with-resolution-2.html 2020-07-05 14:38:53 +03:00
Brindusan Cristian 7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe 4215f9a916 Bug 1647186 - Apply the cumulative resolution smaller than 1.0 to the root frame size for the partial pre-render. r=botond
So that we can reasonably expand the pre-render region on mobile environments.

Differential Revision: https://phabricator.services.mozilla.com/D81961
2020-07-05 09:57:36 +00:00
Hiroyuki Ikezoe c86c19bd64 Bug 1324591 - Disable partial pre-render for frames in position:sticky subtree. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77774
2020-07-05 02:21:09 +00:00
Hiroyuki Ikezoe 92208a9c28 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 02:21:01 +00:00
Hiroyuki Ikezoe a32c79b20d Bug 1324591 - Inform the partial prerender rect, the overflowed SideBits, the scroll id of the nearest scrollable frame and its rectable to the compositor. r=botond
nsDisplayTransform doesn't have enough room to store the partial prerender rect
and the overflowed SideBits unfortunately (it will exceed 512 bytes limit [1]).
So we get the partial prerender rect and calculate the overflowed SideBits just
before we send transform animation information to the compositor.

[1] https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/layout/painting/nsDisplayList.cpp#7318

Differential Revision: https://phabricator.services.mozilla.com/D75730
2020-07-05 02:19:38 +00:00
Hiroyuki Ikezoe 235542b661 Bug 1324591 - Store PrerenderDecision in nsDisplayTransform. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D75729
2020-07-05 02:19:07 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Emilio Cobos Álvarez 3b9c28af7a Bug 1256980 - Make z-index only apply to positioned and grid / flex item frames. r=miko,hiro
Differential Revision: https://phabricator.services.mozilla.com/D81557
2020-06-30 22:51:12 +00:00
Kartikaya Gupta 40a788d924 Bug 1647034 - Change how the visual viewport is updated to eliminate spurious reflows. r=tnikkel
There's two code changes in this patch:

- The update to the visual viewport that was happening just before positioning
  the fixed items gets moved to happen after determining the scrollbars for
  the root scrollframe. This moves it a little bit earlier, to basically the
  earliest point at which the visual viewport can actually be computed, since
  it depends on the presence of the root scrollframe's scrollbars.

  More importantly, this change sets the visual viewport without checking to
  see if one was already set, as the old code did. This means every reflow
  of the root scrollframe on a presShell with an MVM will now have a visual
  viewport set. Previously the visual viewport would only get set for the first
  time when the MVM got a load or first-paint event, and then would get updated
  for subsequent reflows. The net effect here is that the visual viewport is
  set earlier, and this can sometimes eliminate extra reflows from after the
  load event, because everything is already in a consistent state.

- The NotifyResizeReflow call to MVM is replaced by a NotifyReflow call that
  runs before every reflow, instead of just on resizes. Note that the
  NotifyReflow also doesn't update the visual viewport like NotifyResizeReflow
  used to do, because that is taken care of by the above-mentioned code change
  to set the visual viewport.

  This is desirable because there are things that run during reflow that attempt
  to read the display size from the MVM, and they were getting a zero size
  for reflows that happened before the first resize or load/first-paint events.
  Now they get a valid display size on every reflow, and so again this allows
  fewer overall reflows as the code converges to a stable state faster.

Together these changes ensure that every reflow has access to up-to-date
properties (display size, mobile viewport size, visual viewport size) from the
MVM. This eliminates unnecessary reflows because of out-of-order computations
based on stale values and such. Therefore the number of reflows goes down,
which is reflected by the changes to the crashtest assertion counts.

Differential Revision: https://phabricator.services.mozilla.com/D81375
2020-06-29 18:39:57 +00:00
Kagami Sascha Rosylight 21f2b48e01 Bug 1647525 - Use HasAnyStateBits() in remaining layout files r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81230
2020-06-28 01:00:19 +00:00
Kagami Sascha Rosylight 0011786c13 Bug 1647525 - Use HasAnyStateBits() in nsDisplayList r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81214
2020-06-27 14:11:08 +00:00
Kagami Sascha Rosylight b6dc482753 Bug 1647525 - Use HasAnyStateBits() in nsCSSRendering r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81213
2020-06-27 14:09:53 +00:00
longsonr 71614873fb Bug 1648737 - Move SVGAFrame SVGGFrame SVGGenericContainerFrame SVGInnerSVGFrame SVGMarkerFrame SVGMaskFrame SVGSymbolFrame SVGViewportFrame to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81310
2020-06-27 05:39:42 +00:00
Mihai Alexandru Michis 20dfc519d1 Backed out changeset 1b8b8756acad (bug 1648737) for causing bustages in SVGMaskFrame.h
CLOSED TREE
2020-06-27 02:24:41 +03:00
longsonr 3b9835e5b8 Bug 1648737 - Move SVGAFrame SVGGFrame SVGGenericContainerFrame SVGInnerSVGFrame SVGMarkerFrame SVGMaskFrame SVGSymbolFrame SVGViewportFrame to the mozilla namespace r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D81310
2020-06-26 19:27:08 +00:00
Timothy Nikkel 67d20a7d63 Bug 1646887. Do a full display list rebuild if scrollbars change to or from being overlay scrollbars. r=miko
accessible/tests/browser/bounds/browser_test_resolution.js started flipping on the pref ui.useOverlayScrollbars in order to run it's test properly.

Changing the pref ui.useOverlayScrollbars is first handled in the look and feel code. A "look-and-feel-changed" notification is sent out. PresShell::Observe receives this and calls nsPresContext::ThemeChanged. This queues a runnable. This will eventually reflow all scrollframes via the call MediaFeatureValuesChangedAllDocuments in nsPresContext::ThemeChangedInternal. But before that can happen we can paint, and |LookAndFeel::GetInt(LookAndFeel::IntID::UseOverlayScrollbars)| will return the new value. Which means ScrollFrameHelper::AppendScrollPartsTo will place the scrollbars at their new position in the display list and nothing has marked the scrollbars as modified so we fail to merge.

Differential Revision: https://phabricator.services.mozilla.com/D80585
2020-06-23 14:48:29 +00:00
Andrew Osmond a70c654c29 Bug 1550710 - Make vector images enable high quality scaling for embedded raster images. r=tnikkel
We did not pass FLAG_HIGH_QUALITY_SCALING down to the document used to
rasterize the SVG to a surface, resulting in embedded raster images to
not use high quality downscaling.

Differential Revision: https://phabricator.services.mozilla.com/D56422
2020-06-23 12:43:21 +00:00
Kartikaya Gupta b9d1b84ed3 Bug 1644271 - Adjust assertion counts on some crashtests. r=tnikkel
I looked at the assertion stacks and checked that there were no new kinds of
assertions being triggered, just more of the same old assertions. Seems
reasonable that as the desktop behaviour moves closer to mobile (by turning
on visual viewport codepaths) the assertion count will also match that of
mobile.

Depends on D80088

Differential Revision: https://phabricator.services.mozilla.com/D80089
2020-06-21 20:48:32 +00:00
Razvan Maries c60adf564e Backed out 6 changesets (bug 1644271) for perma failures on browser_bug1170531.js.
Backed out changeset 9d4e746c732d (bug 1644271)
Backed out changeset 681a48643a84 (bug 1644271)
Backed out changeset 3cf3176c45d4 (bug 1644271)
Backed out changeset efaddcd67a33 (bug 1644271)
Backed out changeset 03aaac05c759 (bug 1644271)
Backed out changeset a780f5111efa (bug 1644271)
2020-06-21 23:44:04 +03:00
Kartikaya Gupta c2c799ab64 Bug 1644271 - Adjust assertion counts on some crashtests. r=tnikkel
I looked at the assertion stacks and checked that there were no new kinds of
assertions being triggered, just more of the same old assertions. Seems
reasonable that as the desktop behaviour moves closer to mobile (by turning
on visual viewport codepaths) the assertion count will also match that of
mobile.

Depends on D80088

Differential Revision: https://phabricator.services.mozilla.com/D80089
2020-06-20 11:13:27 +00:00
Hiroyuki Ikezoe 77bf0111ce Bug 1467765 - Sample off-main-thread animations on the render backend thread in case of WebRender. r=kats
Now CompositorAnimationStorage::GetAnimatedValue() and SetAnimatedValue()s
are called on the sampler thread in case of WebRender, are called on the
compositor thread in case of non WebRender, so we drop assertions of
IsInCompositorThread check there. A mLock.AssertCurrentThreadOwns call in
each function should make sure the function gets called on the
sampler/compositor thread with acquiring the lock.

One caveat in this change is that in case we try to get an animation value via
nsIDOMWindowUtils.getOMTAStyle(), we do sample animations on the _compositor_
thread and we never call UpdateDynamicProperties, which means if it gets called
in testing refresh driver mode, visual results will differ from what the value
returned by the getOMTAStyle should look like. But it should be fine because we
disallow using any chrome priviledge APIs in reftests and also we will never use
the testing refresh driver mode in the reftest harness. Also in mochitests the
visual results' differences might make people confusing if the person can notice
it, but in principal getOMTAStyle() is designed to get computed animating values
so that it doesn't matter what the visual result is.

Differential Revision: https://phabricator.services.mozilla.com/D79982
2020-06-17 23:47:20 +00:00
Markus Stange f0b3aa554a Bug 1592739 - Stop clearing the background behind vibrant -moz-appearance items. r=mattwoodrow
Now that there is no Gecko-contributed background color in the window any more,
there's nothing that needs to be cleared away. This simplifies things.

Differential Revision: https://phabricator.services.mozilla.com/D51464
2020-06-11 18:46:39 +00:00
Emilio Cobos Álvarez 58bb0b25d9 Backed out 2 changesets (bug 477157) for border rendering regressions.
Backed out changeset 04543b8ded50 (bug 477157)
Backed out changeset 5df17ecbcaa1 (bug 477157)

MANUAL PUSH: backout
2020-06-14 11:45:06 +02:00
Markus Stange 1afb437c70 Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 23:35:18 +00:00
Razvan Maries dcf28ff865 Backed out changeset 6bc479713c3c (bug 1644468) for perma failures on nsDisplayList.h. CLOSED TREE 2020-06-12 00:32:04 +03:00
Markus Stange b8932b1368 Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 18:42:13 +00:00
Dorel Luca 3a1ae4298b Backed out changeset 53c16c65827a (bug 1644468) for Mochitest failures in checkouts/gecko/layout/painting/nsDisplayListInvalidation.h. CLOSED TREE 2020-06-11 19:45:38 +03:00
Markus Stange a94dd20a0b Bug 1644468 - Invalidate XUL trees when window focus changes. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D78941
2020-06-11 11:47:59 +00:00
Emilio Cobos Álvarez e6eb652a8f Bug 477157 - Annotate one more test as passing, and fix build in older compilers.
MANUAL PUSH: minor orange cleanup on a CLOSED TREE
2020-06-10 15:28:01 +02:00
Emilio Cobos Álvarez e8caef7a14 Bug 477157 - Ceil border and outline widths to 1 dev px at computed value time, but don't floor others to dev pixels until paint time. r=mats,dbaron
This seems to match what other browsers do, and seems saner layout-wise,
at least.

I only annotated outline-width-interpolation.html because it's already
fixed upstream in:

  8a489657bc

Differential Revision: https://phabricator.services.mozilla.com/D75360
2020-06-10 10:44:32 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +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
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
Glenn Watson af3ddc2628 Bug 1617524 - Fix crash in get_relative_transform edge case. r=jnicol
Previously, WR would attempt to detect at the start of frame
building if the spatial node of any picture cache contained
a non-axis-aligned transform, and disable picture caching in
that edge case.

However, picture caching can't (currently) be disabled when the
native compositor is active. In this mode, picture caching was
force enabled, causing an assertion failure due to unexpected
coordinate systems when updating pictures.

This patch changes the way the detection of scroll root logic
works such that we don't consider any scroll frame inside a
reference frame to be a valid scroll root for picture caching
purposes. Thus it's not possible to create a picture cache
where the reference spatial node has a non-axis-aligned transform.

Differential Revision: https://phabricator.services.mozilla.com/D75890
2020-05-21 07:42:32 +00:00
Ting-Yu Lin 162c8d3a67 Bug 1638928 Part 2 - Rename nsIFrame's GetChildLists() to ChildLists(). r=mats
This patch is generated by using my editor's rename functionality.

In the next patch, `nsIFrame::` prefix is going to be removed manually
from all the ChildLists() calls.

Differential Revision: https://phabricator.services.mozilla.com/D75893
2020-05-19 12:37:37 +00:00
Ting-Yu Lin 0865183345 Bug 1638917 - Replace mozilla::Tuple with std::tuple in layout. r=emilio
Also, replace mozilla::Tie with std::tie, and use C++17 structured
binding at some places where they make sense.

Differential Revision: https://phabricator.services.mozilla.com/D75821
2020-05-19 03:59:23 +00:00