Commit Graph

2740 Commits

Author SHA1 Message Date
Bas Schouten
312c046258 Bug 1473136: Cache mNeedsActiveLayer once for nsDisplayOpacity. r=mattwoodrow 2018-07-03 23:07:44 +00:00
Gerald Squelart
23189c8cae Bug 1407059 - GECKO_DISPLAY_REFLOW_PROCESSES=a/p/c enables reflow logging in chosen processes - r=dbaron
GECKO_DISPLAY_REFLOW_RULES_FILE doesn't work when the sandbox prevents access
to the rules file.
Added mention to try `--setpref security.sandbox.content.level=2` to lower
sandbox defenses.

As a workaround, and because in most cases the rules are only "* 1" (log
everything), a new env-var GECKO_DISPLAY_REFLOW_PROCESSES=a/p/c enables all
reflow logging without needing a rules file.

It also adds the choice of which processes have logging enabled, based on the
giving letter:
- a: All processes,
- p: Parent process,
- c: Content processes.

MozReview-Commit-ID: 9ymjtuXoF9r
2018-05-08 12:42:16 +10:00
Hiroyuki Ikezoe
3956b68929 Bug 1246045 - Throttle animations in out-of-view iframe. r=birtles
Before this change, we don't acend up frame tree across different documents,
but it's possible that subframe document is scrolled out in the parent document,
if there are animations in such subframes, we should throttle the animations
too.

The test case added here fails without this fix.

MozReview-Commit-ID: EdOEVEwomPc
2018-06-29 10:01:26 +09:00
Dorel Luca
a16f2f280d Merge mozilla-inbound to mozilla-central. a=merge 2018-06-27 13:26:49 +03:00
Hiroyuki Ikezoe
9a603e108d Bug 1471174 - Constify nsIFrame::IsScrolledOutOfView. r=birtles
The reason why const_cast is used for nsLayoutUtils::GetNearestScrollableFrame
is that if we changed the function as well, it ends up scattering const_cast
in most call sites of the function.  That's because GetNearestScrollableFrame
has a do_QueryFrame call for the given nsIFrame* and returns the queried frame,
so it will be like this;

 const nsIScrollableFrame* GetNearestScrollableFrame(const nsIFrame*, ..)

Most call sites of this function are then calls do_QueryFrame for the returned
nsIScrollableFrame*.

MozReview-Commit-ID: EwccKUITL89
2018-06-27 09:08:36 +09:00
Emilio Cobos Álvarez
0348c342b8 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Chris Peterson
f7ceeaf5cf Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr
2018-06-17 22:43:11 -07:00
Hiroyuki Ikezoe
06ea495082 Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl
2018-06-25 18:29:44 +09:00
Margareta Eliza Balazs
eb339b568b Backed out 9 changesets (bug 1430884) for frequently failing dom/animation/test/mozilla/test_restyles.html on android-em-4-3-armv7-api16 debug
Backed out changeset 262dbc8daac1 (bug 1430884)
Backed out changeset c3f9f3f66a98 (bug 1430884)
Backed out changeset 39e1c4e3c8c9 (bug 1430884)
Backed out changeset 4505e3f87b2e (bug 1430884)
Backed out changeset e7e8977e0e92 (bug 1430884)
Backed out changeset 6dbae2b8957d (bug 1430884)
Backed out changeset 1e047fbcae2a (bug 1430884)
Backed out changeset 52be07f10eaa (bug 1430884)
Backed out changeset cec68a5b01da (bug 1430884)
2018-06-25 12:23:59 +03:00
Hiroyuki Ikezoe
fe9603486c Bug 1430884 - Don't call UpdateVisibleDescendants for placeholder frames. r=birtles,heycam
The styles for placeholder frames differ from the styles for the real frames so
that the styles don't have visibility:hidden even if the parent has
visibility:hidden style.

The placeholder style is resolved by ServoStyleSet::ResolveStyleForPlaceholder
in nsCSSFrameConstructor::CreatePlaceholderFrameFor.

MozReview-Commit-ID: GgFn5VJOvcl
2018-06-25 11:51:06 +09:00
Matt Woodrow
6f2ab3ef8e Bug 1464290 - Merge nsIFrame::IsVisuallyAtomic and IsStackingContext since the conclusion is that we want their behaviour to be identical. r=dbaron
MozReview-Commit-ID: A97NejkGoTr
2018-06-25 15:47:16 +12:00
Botond Ballo
f8a0761e22 Bug 1459696 - Improve const-correctness of nsIFrame methods and functions that accept an nsIFrame* argument. r=mstange
MozReview-Commit-ID: 9IcL8kfMdIH
2018-05-28 19:58:25 -04:00
Cameron McCormack
181d497978 Bug 1469738 - Part 3: Change "sc" (style context) to "cs" (computed style) in frame tree dumps. r=xidorn
MozReview-Commit-ID: 9tpKeE2YdzM
2018-06-05 16:40:07 +10:00
Hiroyuki Ikezoe
2bf60916ae Bug 1469220 - Backed out changeset 7fc66c715a0f and 39cb4d5f6602. r=mattwoodrow
Those changesets which are related to animations introduced in bug 1462497
seems to cause new crashes.  I think the first two changesets for the bug fixed
the original crash cases but the last two (i.e. these changesets) introduced
other crashes unfortunately.

MozReview-Commit-ID: 9LD2hIIXA2y
2018-06-18 06:16:07 +09:00
Daniel Holbert
09e9cab68b Bug 1468663 part 2: Add missing #includes, forward-decls, and 'using' statements in layout/generic to fix bustage in non-unified builds. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D1650
2018-06-15 18:00:36 +00:00
shindli
be87a79e4a Backed out changeset 2ea7e45aaaaf (bug 1462584) for reftest failures containing AddressSanitizer: use-after-poison on address on a CLOSED TREE 2018-06-14 03:54:51 +03:00
Jamie Nicol
fe0cf4af72 Bug 1462584 - Avoid dereferencing DisplayItemData in GetOldLayerForFrame. r=mattwoodrow
It's causing cache misses which are showing up in profiles of the
displaylist mutate test case.

Rather than calling item->Disconnected(), we can ensure the
DisplayItemData is destroyed when it should no longer be used.
We must also make sure we remove the sDisplayItem's dangling pointer.

Rather than calling data->mLayer->Manager() != mRetainingManager, we
can store a pointer to the manager along with the DisplayItemData on
the nsDisplayItem. The item should be in the cache so grabbing this
pointer to perform this check shouldn't cost us anything.

MozReview-Commit-ID: AAVAs8c0CQY
2018-05-29 18:10:42 +01:00
Kartikaya Gupta
a0f78ed6bb Bug 1421384 - Inherit touch-action flags down in the compositor hit-test infos. r=miko
Per the touch-action spec, the effective touch-action on an element includes
touch-action restrictions from ancestor elements up to and including the
element that has the "default action". This patch implements that behaviour
so that WebRender gets correct touch-action values on its display items.

MozReview-Commit-ID: Cw5uqAsE9qm
2018-06-11 08:29:24 -04:00
Kartikaya Gupta
80f159b687 Bug 1436409 - Remove the nsDisplayLayerEventRegions display item. r=mattwoodrow,tnikkel
MozReview-Commit-ID: 6mw0WUGGT0n
2018-06-08 17:31:27 -04:00
Yusuf Sermet
e79170eb25 Bug 1465250 - Make contain:paint trigger clipping independent of the overflow property. r=mattwoodrow
MozReview-Commit-ID: 2QbfZD1jnWX
2018-05-30 14:28:53 -07:00
Kartikaya Gupta
5e199f3ad6 Bug 1465935 - Handle another edge case with hit-testing inside fixed-pos items. r=mstange
Transforms are containing blocks for fixed-pos items, so if a fixed-pos
item is inside a scrolled transform, then it should use that scrollframe
as the scroll target for hit-testing. This patch handles this case for
WebRender by stashing the appropriate ASR on the nsDisplayFixedPosition
item and using it instead of the presShell's root scrollframe in this
scenario.

The patch also adds a mochitest (which is basically a mochitested
version of the reftest in fixed-pos-scrolled-clip-3.html, with a
hit-test check to ensure that it's hitting the right scrollframe).

MozReview-Commit-ID: 7YQAeOiMMuP
2018-06-07 13:06:33 -04:00
Gurzau Raul
c6efd9228c Backed out changeset 9bdd12949711 (bug 1465250) for multiple failures on /css-contain/contain-paint-002.html on a CLOSED TREE 2018-06-07 06:40:03 +03:00
Yusuf Sermet
ad57afee29 Bug 1465250 - Make contain:paint trigger clipping independent of the overflow property. r=mattwoodrow
MozReview-Commit-ID: 2QbfZD1jnWX
2018-05-30 14:28:53 -07:00
Mats Palmgren
c7106ed729 Bug 1466330 - Make nsITheme::GetWidgetBorder return the border directly instead of using an out-param (idempotent patch). r=emilio 2018-06-02 19:10:48 +02:00
Cosmin Sabou
0e09913ec6 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 12:44:57 +03:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Matt Woodrow
9b63cf7bcd Bug 1464737 - Make nsDisplayPerspective simpler by using the transform frame as mFrame. r=miko
MozReview-Commit-ID: CDjdjE2xCzG
2018-06-01 14:15:36 +12:00
Emilio Cobos Álvarez
d1a8c048f5 Bug 1465478: Introduce Element::FromNode. r=smaug
And use it in a couple places I noticed.

MozReview-Commit-ID: 8baSMrbdEbF
2018-05-31 02:46:10 +02:00
arthur.iakab
436c7d6051 Merge mozilla inbound to central a=merge 2018-05-31 01:05:10 +03:00
Emilio Cobos Álvarez
40038f321c Bug 1465502: Remove write-only NS_FRAME_MAY_HAVE_GENERATED_CONTENT. r=mats
It's write-only, and I'd love to use it for other purposes :)

MozReview-Commit-ID: KpXNp72TcDb
2018-05-30 17:09:28 +02:00
Csoregi Natalia
249e893c4b Merge inbound to mozilla-central. a=merge 2018-05-30 12:25:03 +03:00
Boris Zbarsky
bd33db531b Bug 1455676 part 8. Remove nsIDOMNode usage from layout/. r=qdot 2018-05-29 22:58:48 -04:00
Yusuf Sermet
002b2dd779 Bug 1463599 - Create a stacking context for contain:paint. r=mattwoodrow
MozReview-Commit-ID: Ln72MOlHXwi
2018-05-28 23:54:01 -07:00
Matt Woodrow
8bca78d513 Bug 1464641 - Make sure we mark the out of flow frame as modified when we modify the placeholder. r=miko
MozReview-Commit-ID: L44fXMOpURM
2018-05-29 10:10:59 +12:00
Cameron McCormack
c3fde9a6c4 Bug 1464967 - Part 2: Fix nsReflowStatus dumping when REALLY_NOISY_REFLOW is defined. r=gerald
MozReview-Commit-ID: JPN7i5z5IeX
2018-05-29 14:08:01 +10:00
Cameron McCormack
602fcf5816 Bug 1464947 - Fix ReflowInput::DisplayInitFrameTypeExit display type logging. r=gerald
MozReview-Commit-ID: 4xPXJkys1so
2018-05-29 12:39:22 +10:00
Matt Woodrow
7c0d7d8f07 Bug 1436505. r=mats, a=abillings 2018-05-28 12:42:54 +12:00
Daniel Zielas
be0fdc4ea4 Bug 1455182 - Additional cleanup to nsDisplayOwnLayer and ScrollbarData. r=botond 2018-05-25 07:20:39 +02:00
Miko Mynttinen
8ac85b7308 Bug 1464065 - Avoid unnecessary work in nsIFrame::IsStackingContext() when frame is visually atomic r=mattwoodrow
MozReview-Commit-ID: 3g5PqD65I2p
2018-05-24 15:24:49 +02:00
Hiroyuki Ikezoe
79840bca98 Bug 1463605 - Check mMayHaveOpacityAnimation in nsFrame::HasOpacityInternal(). r=birtles
If the mMayHaveOpacityAnimation is false there, we don't need to check opacity
animations at all.

MozReview-Commit-ID: LTYPPXzF8V6
2018-05-23 18:15:12 +09:00
Csoregi Natalia
abbb20048f Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-30 12:28:56 +03:00
Emilio Cobos Álvarez
f553b5e6f9 Bug 1460382: Make element-backed pseudos inherit from NAC subtree roots and other NAC inherit from their parents. r=heycam
Currently, NAC always inherits from the closest non-NAC ancestor element,
regardless of whether it is for an element-backed pseudo or not.

This patch changes the inheritance so that for element-backed pseudos, we
inherit from the closest native anonymous root's parent, and for other NAC we
inherit from the parent.

This prevents the following two issues and allows us to remove the
NODE_IS_NATIVE_ANONYMOUS flag:

 * Avoiding inheriting from the non-NAC ancestor in XBL bindings bound to NAC.

   - This is no longer a problem since we apply the rule only if we're a
     pseudo-element, and all pseudo-elements are in native anonymous subtrees.

   - This also allows to remove the hack that propagates the
     NODE_IS_NATIVE_ANONYMOUS flag from the ::cue pseudo-element from
     BindToTree.

 * Inheriting from the wrong thing if we're a nested NAC subtree.

   - We no longer look past our NAC subtree, with the exception of
     ::-moz-number-text's pseudo-elements, for which we do want to propagate
     ::placeholder to.

A few rules from forms.css have been modified because they're useless or needed
to propagate stuff to the anonymous form control in input[type="number"] which
previously inherited from the input itself.

MozReview-Commit-ID: IDKYt3EJtSH
2018-05-30 10:14:46 +02:00
Dorel Luca
17cbf44c3f Merge mozilla-inbound to mozilla-central. a=merge 2018-05-23 12:51:22 +03:00
Matt Woodrow
22ed5024e9 Bug 1462497 - Part 3: Don't condition useOpacity on values that might change silently between paints (HasAnimationsForCompositor, and the will-change budget). r=hiro
MozReview-Commit-ID: Kry5YIAIAHt
2018-05-23 11:03:42 +12:00
Matt Woodrow
135bfc272b Bug 1462412 - Correctly ignore the perspective property for frames that aren't transformable. r=dbaron 2018-05-23 10:41:19 +12:00
Emilio Cobos Álvarez
d3d78dc6a7 Bug 1463138: Remove unused nsIFrame::GetPseudoElement. r=mats
MozReview-Commit-ID: 4LFZibUS9DP
2018-05-21 20:03:36 +02:00
Kartikaya Gupta
886c7a1b7f Bug 1425565 - Use the container ASR for sticky items when building WebRender clips. r=mstange
Even if the sticky item has a fixed descendant, we want to use the
sticky container item's "real" ASR when computing the WR clips because
otherwise the WR item doesn't get attached to the correct scrolling
layer.

MozReview-Commit-ID: JVnzEIBeLKp
2018-05-18 15:19:47 -04:00
Mats Palmgren
b19e6d0213 Bug 1461222 part 2 - Make GetWidgetPadding return LayoutDeviceIntMargin. r=emilio 2018-05-17 17:30:35 +02:00
Mats Palmgren
e188037050 Bug 1461222 part 1 - Make GetWidgetBorder return LayoutDeviceIntMargin. r=emilio 2018-05-17 17:30:35 +02:00
Botond Ballo
1ee501f535 Bug 1459890 - Do not clip mask for clip path to bbox of clipped content. r=mstange
MozReview-Commit-ID: 9yZ1ziiDAKa
2018-05-11 18:55:30 -04:00