Commit Graph

2585 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
d6211e6535 Bug 1405087: Don't use -moz-user-input: disabled to decide event handling stuff. r=smaug
We only set it on disabled form controls anyway, so use the content state
directly.

MozReview-Commit-ID: 7jJ75dvszyC
2018-02-15 21:48:58 +01:00
Miko Mynttinen
a678c080ff Bug 1436415 - Part 2: Enable nsIFrame::BuildDisplayListForChild() fast-path when using simple event region items r=mattwoodrow
MozReview-Commit-ID: 77rwS0cDUnn
2018-02-13 01:55:27 +01:00
Miko Mynttinen
2284ed859b Bug 1436415 - Part 1: Reuse some local variables in nsIFrame::BuildDisplayListForChild() r=mattwoodrow
MozReview-Commit-ID: Cprpg6nMeY2
2018-02-12 23:59:32 +01:00
Daniel Holbert
1e1ae954dd Bug 1437623 part 1: (layout/generic) Add missing includes/namespaces to preemptively fix unified bustage. r=mats
MozReview-Commit-ID: GyFPLOsPWt3
2018-02-13 09:08:41 -08:00
Hiroyuki Ikezoe
af98d2cc14 Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio
This patch does basically throttle animations on visibility:hidden element
and unthrottle it once the animating element became visible or a child of the
animating element became visible.  But still there are some cases that we don't
throttle such animations perfectly.  For example;

  div.style.visibility = 'hidden'; // the 'div' has no children at this moment
  div.animate(..);
  // The animation is throttled

  div.appendChild(visibleChild);
  // The animation isn't throttled

  visibleChild.style.visibility = 'hidden';
  // Now the animation should be throttled again, but actually it's not.

To throttle this case properly, when the |visibleChild|'s visibility changed
to hidden, we would need to do either

 1) Check all siblings of the |visibleChild| have no visible children

or

 2) The parent element stores visible children count somewhere and decrease it
    and check whether the count is zero

To achieve 1) we need to walk up ancestors and their siblings, actually it's
inefficient.

2) is somewhat similar to what we already do for animating images but it's hard
to reuse it for CSS animations since it does not take into account that
descendants' visibilities.

Another example that this patch does not optimize is the the case where
animating element has children whose visibility is inherited and the element
itself initially visible something like this;

  let child = document.createElement('div'); // child visibility is 'inherit'
  div.appendChild(child);

  div.animate(..); // the 'div' is visible
  // The animation isn't throttled since the animating element is visible

  div.style.visiblily = 'hidden';
  // Now the animation should be throttled, but it's not since this patch does
  // not descend down all descendants to check they are invisible or not when the
  // animating element visibility changed to hidden.

This patch adds a test case for this case introduced with todo_is().

Another test case added in this patch fails if we don't use
nsPlaceholderFrame::GetRealFrameFor() in HasNoVisibleDescendants().

MozReview-Commit-ID: BJwzQvP9Yc4
2018-02-09 10:43:10 +09:00
Daniel Holbert
c22c9be178 Bug 1437599: Remove unreachable 'return' statement from nsIFrame::GetShapeBoxBorderRadii. r=bradwerth
MozReview-Commit-ID: ARNoCSShQVf
2018-02-12 09:43:39 -08:00
Miko Mynttinen
e2c781b1a5 Bug 1434243 - Part 4: Do not create unnecessary nsDisplayCompositorHitTestInfo items r=kats,mattwoodrow
MozReview-Commit-ID: CNXMMCFFBmc
2018-02-05 18:39:52 +01:00
Daniel Holbert
f08bc65832 Bug 1267462 part 10: Fix flexbox code in nsFrame::ComputeSize[WithIntrinsicDimensions] to use logical axes & coords. r=mats
This patch makes a bunch of tests start passing, so it removes some 'fails' annotations.

MozReview-Commit-ID: DCxkXFnztLc
2018-02-08 15:17:24 -08:00
Narcis Beleuzu
48308c4297 Backed out 6 changesets (bug 1237454) for bc failures on /browser_toolbariconcolor_restyles.js. CLOSED TREE
Backed out changeset f8d771835fd2 (bug 1237454)
Backed out changeset 2dbbfc331bdf (bug 1237454)
Backed out changeset c481f409feaa (bug 1237454)
Backed out changeset 0b9872865f0e (bug 1237454)
Backed out changeset 43ca55e7c93b (bug 1237454)
Backed out changeset 027b0c65d944 (bug 1237454)
2018-02-06 11:19:56 +02:00
Hiroyuki Ikezoe
35ab3ac6b8 Bug 1237454 - Throttle animations on visibility:hidden element. r=birtles,boris,emilio
This patch does basically throttle animations on visibility:hidden element
and unthrottle it once the animating element became visible or a child of the
animating element became visible.  But still there are some cases that we don't
throttle such animations perfectly.  For example;

  div.style.visibility = 'hidden'; // the 'div' has no children at this moment
  div.animate(..);
  // The animation is throttled

  div.appendChild(visibleChild);
  // The animation isn't throttled

  visibleChild.style.visibility = 'hidden';
  // Now the animation should be throttled again, but actually it's not.

To throttle this case properly, when the |visibleChild|'s visibility changed
to hidden, we would need to do either

 1) Check all siblings of the |visibleChild| have no visible children

or

 2) The parent element stores visible children count somewhere and decrease it
    and check whether the count is zero

To achieve 1) we need to walk up ancestors and their siblings, actually it's
inefficient.

2) is somewhat similar to what we already do for animating images but it's hard
to reuse it for CSS animations since it does not take into account that
descendants' visibilities.

Another example that this patch does not optimize is the the case where
animating element has children whose visibility is inherited and the element
itself initially visible something like this;

  let child = document.createElement('div'); // child visibility is 'inherit'
  div.appendChild(child);

  div.animate(..); // the 'div' is visible
  // The animation isn't throttled since the animating element is visible

  div.style.visiblily = 'hidden';
  // Now the animation should be throttled, but it's not since this patch does
  // not descend down all descendants to check they are invisible or not when the
  // animating element visibility changed to hidden.

This patch adds a test case for this case introduced with todo_is().

Another test case added in this patch fails if we don't use
nsPlaceholderFrame::GetRealFrameFor() in HasNoVisibleDescendants().

MozReview-Commit-ID: BJwzQvP9Yc4
2018-02-06 08:43:53 +09:00
Emilio Cobos Álvarez
173945689b Bug 1423331: Prevent selection from leaking from blocks. r=mats
MozReview-Commit-ID: EFLXSQ8Zvze
2018-02-01 17:23:49 +01:00
Cameron McCormack
34288f7f48 Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl
2018-02-01 15:04:04 +11:00
Cameron McCormack
02c617875f Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN
2018-02-01 15:04:04 +11:00
Daniel Holbert
288ea66169 Bug 958714 part 2: Simplify percent-margin/padding resolution code to pass around a single length as the percent basis. r=mats
MozReview-Commit-ID: J1EPYMQ5lP4
2018-01-30 22:24:55 -05:00
496e34da89 Bug 1413834 - part 1: Limit frame traversal and getting of next tabindex inside scope owned by document root, r=smaug 2018-01-26 17:47:44 +02:00
Timothy Nikkel
b643b723bd Bug 1417358. Make sure that the override dirty rect that we set when a displayport changes gets cleared even if we don't perform a partial display list update. r=mattwoodrow
We do this by tracking them as a property on the root frame the same way we do for modified frames.

We also set the property in ProcessFrame but that is okay because we are guaranteed to finish the partial update at that point.
2018-01-25 23:42:44 -06:00
Andrea Marchesini
8d41475807 Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Miko Mynttinen
69703caf70 Bug 1428993 - Part 2: Override dirty rect for stacking contexts between OOF frame placeholder and the containing block r=mattwoodrow
MozReview-Commit-ID: FoX9uyoiqj4
2018-01-12 18:02:14 +01:00
Andreea Pavel
f1cfc5824a Backed out 2 changesets (bug 1428993) for failing reftest ayout/reftests/display-list/1428993-1.html on Android
Backed out changeset 080c07796f4c (bug 1428993)
Backed out changeset 7f88ebf8d0d1 (bug 1428993)
2018-01-18 21:03:23 +02:00
Miko Mynttinen
ce44e29f67 Bug 1428993 - Part 2: Override dirty rect for stacking contexts between OOF frame placeholder and the containing block r=mattwoodrow
MozReview-Commit-ID: FoX9uyoiqj4
2018-01-12 18:02:14 +01:00
sotaro
2b387e1f94 Bug 1430610 - Change nsIFrame::InvalidateLayer() as to check WebRender's async update r=mtseng 2018-01-18 13:28:49 +09:00
Emilio Cobos Álvarez
7d01091273 Bug 1420722: Just use GetInFlowParent for now. r=mattwoodrow
display: contents is about to ship in other engines, let's prevent subtle bugs.

MozReview-Commit-ID: C8saQnRvRuI
2018-01-16 11:19:36 +01:00
Mats Palmgren
6d50b11990 Bug 1427221 part 1 - Do nsMathMLmfencedFrame cleanup in DestroyFrom, not in the dtor. r=mattwoodrow 2018-01-10 20:09:18 +01:00
Matt Woodrow
8cd6f1f702 Bug 1427476 - Don't try to retain display lists for popups since their display root isn't the root frame of a document. r=miko 2018-01-03 18:31:31 +13:00
Tiberius Oros
343df02d82 Merge inbound to mozilla-central r=merge a=merge 2018-01-05 11:57:58 +02:00
Hiroyuki Ikezoe
4a9f727d6a Bug 1421507 - Throttle animations in position:fixed element that the element is out of view. r=boris,tnikkel
MozReview-Commit-ID: jLvrcVhTKW
2018-01-05 10:30:46 +09:00
Mats Palmgren
d079be3365 Bug 1423761 - Make CorrectStyleParentFrame / UpdateStyleOfChildAnonBox deal with abs.pos. anon boxes. r=dholbert
For an OOF frame, the parent frame that's associated with our parent style
context is the *placeholder's* parent -- not the OOF frame's parent.
2018-01-04 22:16:37 +01:00
Emilio Cobos Álvarez
7f2020dd53 Bug 1428144: Remove some dead nsIFrame code. r=mats
MozReview-Commit-ID: Aaj6XLp3LnA
2018-01-04 20:37:11 +01:00
Emilio Cobos Álvarez
8a71d3197b Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez
ecd202d763 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez
b3956b6171 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-07 19:13:50 +01:00
Matt Woodrow
e95577a1a6 Bug 1344971 - Part 2: Check NS_FRAME_MAY_BE_TRANSFORMED as part of Extend3DContext. r=thinker 2017-03-07 14:07:32 +13:00
Matt Woodrow
4919a6c407 Bug 1344971 - Part 1: Create OutOfFlowDisplayData for the parent of the OOF frame so they can be shared. r=mstange 2017-03-01 12:09:43 +13:00
Matt Woodrow
00d3947a6b Bug 1413546 - Add pref to allow retained display lists within the parent process. r=jet 2017-12-22 11:45:32 +13:00
Emilio Cobos Álvarez
8245586af5 Bug 975644: Enable position sticky in table parts. r=bz
MozReview-Commit-ID: 85nCuChHdTa
2017-12-21 20:29:20 +01:00
Emilio Cobos Álvarez
beefce9983 Bug 975644: Add a hack to skip table row groups for sticky positioning. r=bz
This matches Blink's behavior.

Just skipping table row groups from being containing blocks makes
layout/reftests/table-overflow/table-cell-block-overflow.html render differently
(and way more different than any other browser, actually...), so I avoided doing
that.

Though I'm not really proud of this one, better ideas welcome. Maybe I should
just fix table layout so that we agree with WebKit / Blink... But that seemed
harder, too.

MozReview-Commit-ID: AkUB4MFzwZK
2017-12-21 20:29:19 +01:00
Daniel Holbert
7d219d6c3a Bug 1398963 part 1: Rename frame-state bit from NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX to NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX (idempotent patch). r=mats
This patch isn't changing semantics of this bit at all - it just renames it to
a more general name. In other words, this patch does not change behavior.

MozReview-Commit-ID: 4wb13X4YinJ
2017-12-18 12:17:10 -06:00
Margareta Eliza Balazs
335fc3dcb4 Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE 2017-12-15 11:52:23 +02:00
Matt Woodrow
eb54539b33 Bug 1419021 - Part 2: Don't do a full display list build when there are no modified frames. r=miko 2017-12-14 17:38:21 -06:00
Narcis Beleuzu
0d5e874622 Merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-12-15 03:46:15 +02:00
Gerald Squelart
8ae66ef2e6 Bug 1416991 - Fix perspective indexing in partial DL builds - r=mattwoodrow
Perspective item indices (used to produce unique per-frame keys) were generated
by incrementing a counter in the builder when building a perspective display
item. This caused problems with retained display lists, because an unmodified
perspective could be skipped during a partial build, causing other perspectives
to be incorrectly numbered and then incorrectly merged with the previous
retained display list.

To fix this, we need to always increment the counter if there is likely to be
a perspective, before that item may be skipped.

MozReview-Commit-ID: Edn7lUOLuPw
2017-12-13 05:41:13 -06:00
Mats Palmgren
2669e7c654 Bug 1424528 part 3 - A few manual fixes related to removing the nsDidReflowStatus param in DidReflow. r=dholbert
MozReview-Commit-ID: 8elJQTfOaaL
2017-12-14 16:21:49 +01:00
Mats Palmgren
430070c174 Bug 1424528 part 2 - Remove nsDidReflowStatus param in DidReflow declarations (automated change). r=dholbert
MozReview-Commit-ID: 44pchGXzYL7
2017-12-14 16:21:49 +01:00
Miko Mynttinen
896b0f3d84 Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow
MozReview-Commit-ID: E3neKT2sV4Q
2017-12-13 11:23:04 -06:00
Daniel Holbert
b2377b43d7 Bug 1418349: Make nsFrame::BoxReflow() handle missing-BoxMetrics() more gracefully (with explicit abort or early-return). r=mats
MozReview-Commit-ID: LSxMEYpWTmV
2017-12-01 11:14:26 -08:00
Mats Palmgren
03018ea47a Bug 1422839 part 1 - Add internal overflow-clip-box-block/-inline properties and make overflow-clip-box a shorthand. r=dholbert
MozReview-Commit-ID: axoDaWnOJQ
2017-12-05 21:08:41 +01:00
Botond Ballo
cd5ffe3d62 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
MozReview-Commit-ID: 5TwC75wzOsm
2017-11-27 16:45:29 -05:00
Matt Woodrow
f8ebb59353 Bug 1420312 - Followup to only mark frame as modified during retained building, since otherwise it won't be restored. 2017-11-27 16:47:28 +13:00
Matt Woodrow
981eb1e906 Bug 1420312 - Rebuild the entire visible area when we find preserve-3d content. r=miko 2017-11-27 15:00:19 +13:00
Kartikaya Gupta
904bd2136b Bug 1418541 - Correct an error when generating event regions. r=mstange
Turns out that there's been a bug in the event regions code since it was
first written, where touch-action:manipulation is not properly expressed
in the event region structs. It's sort of a design bug that we can't fix
without adding another region. However, in bug 1389149 I accidentally
changed the behaviour of some of these cases because I wasn't aware of
this bug. This patch repairs the code so that it behaves the same as it
used to prior to bug 1389149, and documents the buggy scenario.

MozReview-Commit-ID: 9XhkH6ypZHi
2017-11-25 10:53:35 -05:00