Commit Graph

15084 Commits

Author SHA1 Message Date
Jonathan Kew
ad2647f459 Bug 1463115 - Try to skip irrelevant (collapsed/trimmed) whitespace when collecting used font faces for devtools inspector. r=jwatt 2018-05-24 14:44:09 +01:00
Mats Palmgren
79a2430c01 Bug 1462854 part 2 - [css-grid] Handle [max-]width/height percentages in min-size contributions according to spec. r=dholbert
Background:
https://github.com/w3c/csswg-drafts/issues/2674

calc() percentages for replaced boxes are still not according to spec.
Bug 1463700 will fix that.
2018-06-02 00:08:26 +02:00
Jonathan Kew
6e425cf382 Backed out changeset 36687c035662 (bug 1463115) for frequent mochitest failures on Linux-debug 2018-06-01 18:03:13 +01:00
Jonathan Kew
ca7c5f1e17 Bug 1463115 - Try to skip irrelevant (collapsed/trimmed) whitespace when collecting used font faces for devtools inspector. r=jwatt 2018-05-24 14:44:09 +01:00
Paolo Amadini
61cbbdb92c Bug 1457719 - Part 4 - Remove the "autorepeatbutton" element. r=bz
The DoMouseClick helper is also removed because no other caller can now pass a null aEvent. Other MouseClicked implementations are also updated since aEvent cannot be null, which was already the case.

MozReview-Commit-ID: 3bTJ6cZW9ZA

--HG--
extra : rebase_source : ae1bafe7144f6f428e2ef4e7047d5c64e0a19e8c
2018-06-01 11:15:56 +01:00
Cosmin Sabou
1bc774a842 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 12:44:57 +03:00
Emilio Cobos Álvarez
fffb25b74f 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
a6cecda388 Bug 1464737 - Make nsDisplayPerspective simpler by using the transform frame as mFrame. r=miko
MozReview-Commit-ID: CDjdjE2xCzG

--HG--
extra : rebase_source : 1779b8c20ca8eca4b0859ebc638c4b5bdcbac28d
2018-06-01 14:15:36 +12:00
Brad Werth
4c4f010732 Bug 1461046 Part 4: Change PolygonShapeInfo to tolerate polygons with only 1 or 2 vertices. r=dholbert
MozReview-Commit-ID: ICcIUulgSCW

--HG--
extra : rebase_source : b92a51a5298d4821c2ab86f9745867ea6dbdd387
2018-05-22 15:54:21 -07:00
Brad Werth
73efe1c012 Bug 1461046 Part 3: Change RoundedBoxShapeInfo to tolerate empty rects. r=dholbert
MozReview-Commit-ID: FNQwXdeqfua

--HG--
extra : rebase_source : bc9b97d5aef5bbece169ef1931523fb4f4a2e64f
2018-05-18 17:38:41 -07:00
Brad Werth
39839d2bd4 Bug 1461046 Part 1: Change EllipseShapeInfo to tolerate empty circles/ellipses and treat them as singular points/lines (possibly expanded by shape-margin). r=dholbert
MozReview-Commit-ID: 69VQiRjhtqA

--HG--
extra : rebase_source : 73fe14510971000890f2e2764f9c81cf505e6644
2018-05-18 17:13:22 -07:00
Andreea Pavel
38bcf897f1 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-31 13:04:21 +03:00
Emilio Cobos Álvarez
fe09ffd3af 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
fb18cb09bd Merge mozilla inbound to central a=merge 2018-05-31 01:05:10 +03:00
Emilio Cobos Álvarez
2116f48b14 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

--HG--
extra : rebase_source : 0bc1b00e69eb58b5ae5fe4ea9ec0b3b0970beb6c
2018-05-30 17:09:28 +02:00
Brad Werth
e0834100e1 Bug 1464113 Part 1: Make ImageShapeInfo tolerate shapes that are shifted left or above their margin rects. r=dholbert
MozReview-Commit-ID: 9NuHsjQfLxP

--HG--
extra : rebase_source : 37c7524daa268bb8321b9904ead9ca643f0641db
2018-05-25 15:12:02 -07:00
Csoregi Natalia
83a923ef7a Merge inbound to mozilla-central. a=merge 2018-05-30 12:25:03 +03:00
Boris Zbarsky
9748db120d Bug 1455676 part 8. Remove nsIDOMNode usage from layout/. r=qdot 2018-05-29 22:58:48 -04:00
Yusuf Sermet
ebb3ebe1db Bug 1463599 - Create a stacking context for contain:paint. r=mattwoodrow
MozReview-Commit-ID: Ln72MOlHXwi

--HG--
extra : rebase_source : ec6bd5d3de4635acd2e2d0dcd2222232524d9459
2018-05-28 23:54:01 -07:00
Matt Woodrow
9d671dd140 Bug 1464641 - Make sure we mark the out of flow frame as modified when we modify the placeholder. r=miko
MozReview-Commit-ID: L44fXMOpURM

--HG--
extra : rebase_source : 6ab8d22607dc136f25b5d29db4d9c83f9fee2f17
2018-05-29 10:10:59 +12:00
Timothy Guan-tin Chien
b355943072 Bug 1464412 - Flip vertical resizers on rtl sites r=dao
MozReview-Commit-ID: E0ejPUUCJiJ

--HG--
rename : layout/reftests/forms/textarea/resize-rtl.html => layout/reftests/forms/textarea/resize-rtl-vertical.html
rename : layout/reftests/forms/textarea/resize.html => layout/reftests/forms/textarea/resize-vertical.html
extra : rebase_source : 2e8b3492826ed05d2471f7aab25d371140039182
2018-05-26 10:18:19 +08:00
Cameron McCormack
43d697cf92 Bug 1464967 - Part 2: Fix nsReflowStatus dumping when REALLY_NOISY_REFLOW is defined. r=gerald
MozReview-Commit-ID: JPN7i5z5IeX

--HG--
extra : rebase_source : a9642d4cf38f0b94678ab8661bd204c53a397c39
2018-05-29 14:08:01 +10:00
Cameron McCormack
b3a4b80968 Bug 1464967 - Part 1: Make nsLineBox::BreakTypeToString static. r=gerald
MozReview-Commit-ID: L97yf6oCXlq

--HG--
extra : rebase_source : 6cc25d93ff8c8d446f63e90c93b8bc01aff59b66
2018-05-29 14:06:50 +10:00
Cameron McCormack
a696043ad2 Bug 1464947 - Fix ReflowInput::DisplayInitFrameTypeExit display type logging. r=gerald
MozReview-Commit-ID: 4xPXJkys1so

--HG--
extra : rebase_source : 06f7a1e3450b88a9502ed274384330289596184a
2018-05-29 12:39:22 +10:00
Emilio Cobos Álvarez
30535df923 Bug 1464813: Remove eDontReparentFrames, since it's not used. r=mats
We only set lazilySetParentPointer on the first reflow, then only call
DrainSelfOverflowListInternal on non-first reflows.

MozReview-Commit-ID: 364IwDoPE3W

--HG--
extra : rebase_source : 6551f2a3bbe080582de525f4c095bc60868c1a49
2018-05-28 13:49:35 +02:00
Dorel Luca
c581ba2f76 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-28 11:46:41 +03:00
Matt Woodrow
636753b307 Bug 1436505. r=mats, a=abillings
--HG--
extra : rebase_source : 9f91c91eb1061577148e1880dc4dc5655f7b099a
2018-05-28 12:42:54 +12:00
Daniel Holbert
732182f0c9 Bug 1461446: Make flex layout explicitly handle integer overflow when summing up flex item hypothetical sizes. r=mats
This patch accomodates for the unfortunate fact that elements with
"table-layout:fixed" have a max-content size of nscoord_MAX (infinity,
effectively), which turns out to be an easy source of integer overflow during
flex layout.

Before this patch, a flex container with "table-layout:fixed" in several flex
items could end up triggering integer-overflow & making the wrong judgement on
its arithmetic to determine...
 - whether a given flex item will fit on an existing flex line.
 - whether we've got positive free space and need to grow our items, or have
   negative free space and need to shrink our items.

This patch makes two changes to fix this issue.

(1) This patch makes us use CheckedInt when summing up flex item hypothetical
    sizes, which prevents integer overflow from flipping the sign of our line's
    total length.

(2) This patch makes us *directly* track the space reserved for flex item
    margin/border/padding within a flex line.  Previously, we tracked this
    implicitly as the difference between two other quantities that we stored;
    but with the other changes in this patch, those two other quantities can
    *both* trigger overflow and get clamped, which would make us lose track of
    how much space to reserve for margin/border/padding.  So now we simply
    track that space-to-reserve directly.

MozReview-Commit-ID: 9izhOnlS4F1

--HG--
extra : rebase_source : 185f2409dcb2f9c5bd0a2466a8e2233d7db3250a
2018-05-25 19:46:29 -07:00
Daniel Zielas
6e81464d99 Bug 1455182 - Additional cleanup to nsDisplayOwnLayer and ScrollbarData. r=botond
--HG--
extra : rebase_source : d0dd9840dab41e6a2dbd3427fafbf03b741441a1
2018-05-25 07:20:39 +02:00
Coroiu Cristina
19e81b8d28 Merge inbound to mozilla-central a=merge 2018-05-25 20:51:27 +03:00
Miko Mynttinen
10427be70b Bug 1464065 - Avoid unnecessary work in nsIFrame::IsStackingContext() when frame is visually atomic r=mattwoodrow
MozReview-Commit-ID: 3g5PqD65I2p

--HG--
extra : rebase_source : 7427ed54043bfa312c20acd887b31f7a22be13f7
2018-05-24 15:24:49 +02:00
Emilio Cobos Álvarez
3aea548f0f Bug 1462272: Minor cleanup of nsImageListener's ctor / dtors. r=dholbert
MozReview-Commit-ID: BHipMKnFQvA
2018-05-25 12:09:56 +02:00
Emilio Cobos Álvarez
ac48d4a2a8 Bug 1462272: Remove handling for an impossible condition. r=asuth
The frame is notified via its mListener, which is an observer of the
nsImageLoadingContent (mContent).

This last one only notifies for the current and pending requests, otherwise it's
a bug we need to fix there, not wallpaper here, since that'd mean that we forgot
to cancel the previous request. Added assertions to that effect.

Notify() is only called with the this object as a first argument from
imgRequestProxy, so it'd better be non-null, too.

MozReview-Commit-ID: DHaOLph2EAo
2018-05-25 12:09:23 +02:00
Emilio Cobos Álvarez
9520790e72 Bug 1462272: Remove an unneeded and ugly reinterpret_cast. r=dholbert
MozReview-Commit-ID: Evip43nwNii
2018-05-25 12:09:49 +02:00
Emilio Cobos Álvarez
f981370133 Bug 1462272: Introduce nsImageFrame::GetCurrentRequest. r=dholbert
MozReview-Commit-ID: IXXtYClyY2z
2018-05-25 12:09:42 +02:00
Emilio Cobos Álvarez
6332002ac0 Bug 1462272: Remove a weirdly named variable, and call LoadIcons sooner. r=dholbert
So that the imageLoader code is all grouped together. LoadIcons should probably
be a static, and the change shouldn't have any observable behavior.

MozReview-Commit-ID: Anxe8c5OfLe
2018-05-25 12:09:35 +02:00
Emilio Cobos Álvarez
f09824aad6 Bug 1149357: Properly update responsive images for density changes. r=dholbert
Before that we were not notifying the image frame in any way if we ended up not
doing a load, and we were instead relying on the reflow the viewport resize
caused to get the new density in ComputeSize from the content node (but nowhere
else, since that's the bug part 1 fixes).

This was generally unsound, since you can stash random media in a sizes=
attribute, which don't necessarily needs to cause a reflow.

Now we need to notify necessarily because nsImageFrame stores the adjusted
intrinsic size.

mCurrentDensity could also get out of sync as well, when the selected image
density changed, but we ended up returning early because our source hadn't
change in the first early exit.

This patch moves us to a model where we don't re-trigger loads for density
changes if the source doesn't change (unless we pass aAlwaysLoad when we need
to, per spec).

This matches our previous behavior (without the bugginess of not updating the
intrinsic size), and also Chromium, at least.

This changes behavior in one case, which is when we don't load the same source
node, but we have the same source URL, and the density does change. This could
happen with <picture> and two <source>s with same source and different media and
sizes. This makes our behavior consistent with the behavior we have when both
the source and the density doesn't change.

Blink and WebKit do trigger a second image load both when the source changes
without changing density and when density changes. I'll file a spec issue, since
per:

  https://html.spec.whatwg.org/#reacting-to-environment-changes

We should be triggering the load when the density changes but the source
doesn't as well, but no UA does that.

I filed https://github.com/whatwg/html/issues/3709 with a little summary of the
situation and what I think the behavior should be (which is what this patch
implements). That being said, I'll update the impl if the spec people think
otherwise :).

MozReview-Commit-ID: Eqy16ygHRLo
2018-05-25 12:09:30 +02:00
Emilio Cobos Álvarez
5d4df42dc7 Bug 1149357: Make nsImageFrame::mIntrinsicSize account for density. r=dholbert
Only doing it in ComputeSize (via GetNaturalSize) is unsound, and the rest of
the users of mIntrinsicSize definitely do need scaling accounted for.

Move the adjustment to nsImageFrame for two reasons:

 * Prevents adding more dependencies from nsIImageLoadingContent, which
   otherwise would need to go away anyway in bug 215083.

 * Avoids having to duplicate the image orientation logic, since mImage is
   already an OrientedImage if needed.

MozReview-Commit-ID: EA0n0TctZhN
2018-05-25 12:09:23 +02:00
Emilio Cobos Álvarez
44b34ec276 Bug 1461954: Fix nsBulletFrame's image request registration code. r=tnikkel
Ideas for a test for this welcome :).

MozReview-Commit-ID: 1IpUlakeKXm

--HG--
extra : rebase_source : 54ef3968cb868b998cd161e70786c84304099729
2018-05-16 15:05:54 +02:00
Hiroyuki Ikezoe
c4fb9d14c7 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

--HG--
extra : rebase_source : ee2c90e04003140944fb4cc255aa3c6f1c07f0b0
2018-05-23 18:15:12 +09:00
Csoregi Natalia
f3599e000e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-30 12:28:56 +03:00
Emilio Cobos Álvarez
d7bfa8a3bb 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
Emilio Cobos Álvarez
dd5f25c2f6 Bug 1465107: Cleanup remaining mochitest / reftest / crashtests stylo expectations. r=xidorn
MozReview-Commit-ID: 1IeURcnoESX
2018-05-30 10:03:50 +02:00
Dorel Luca
dc6d856805 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-23 12:51:22 +03:00
Matt Woodrow
44fcf86181 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

--HG--
extra : rebase_source : ccc1085ad534da882a9f5ef03a5b7675bc39ed08
2018-05-23 11:03:42 +12:00
Matt Woodrow
c77fe6d1bd Bug 1462497 - Part 2: Invalidate the new caret frame in subdocuments, since it will result in a new nsDisplayWrapList being created. r=miko,mstange
nsDisplayListBuilder::DisplayCaret returning true means that we set canSkipWrapList to true, and then we build an nsDisplayWrapList.
We need to make sure we're invalidated for this changing in nesting level to be handled.

MozReview-Commit-ID: 4j3WIJDcHtI

--HG--
extra : rebase_source : b64d0af756c297de42aa2e164ee32ccbe01890d1
2018-05-23 10:59:53 +12:00
Matt Woodrow
95856dac21 Bug 1462412 - Correctly ignore the perspective property for frames that aren't transformable. r=dbaron 2018-05-23 10:41:19 +12:00
Jonathan Kew
149819a764 Bug 1463020 - Don't allow letter-spacing or cursor placement within a merged group of glyph records in a transformed textrun. r=m_kato 2018-05-22 13:46:54 +01:00
Narcis Beleuzu
7bfb685bb2 Merge inbound to mozilla-central. a=merge 2018-05-22 12:49:47 +03:00
Morgan Rae Reschenberg
5e74927f09 Bug 1461979 - change faulty assert to warning r=dholbert
MozReview-Commit-ID: 1cFN6Hk2Bdj

--HG--
extra : rebase_source : 0147a6e3932abc1d672bb269b3a0b56a62302104
2018-05-21 15:35:31 -07:00