Commit Graph

15103 Commits

Author SHA1 Message Date
arthur.iakab
fade8462cb Merge mozilla-central to inbound on a CLOSED TREE 2018-06-06 01:10:33 +03:00
Mats Palmgren
81f9403270 Bug 1465290 part 3 - [css-grid-2] Add frame bits to nsGridContainerFrame that are set if it has an item that is a subgrid in that axis. r=dholbert 2018-06-05 21:46:28 +02:00
Mats Palmgren
1bc6740ba2 Bug 1465290 part 2 - [css-grid-2] Add bits to the GridItemInfo state that are set if the item is a subgrid in the container's axis. r=dholbert 2018-06-05 21:46:28 +02:00
Mats Palmgren
59ec467d3a Bug 1465290 part 1 - [css-grid-2] Add frame bits to nsGridContainerFrame that is set if it's a subgrid in an axis. r=dholbert 2018-06-05 21:46:28 +02:00
Daniel Holbert
f1d17dbb67 Bug 1406252: Add crashtest. (test-only)
This testcase used to fatally assert, but doesn't anymore. Hooray!
Let's keep it that way.

--HG--
extra : rebase_source : dad40f528fc56b0d8c4430053d87fbbc4873fe40
extra : amend_source : 8417dcfd116303645fe3d2825e94d2ddf5c3123d
2018-06-04 15:34:44 -07:00
Mats Palmgren
680ca035e7 Bug 1464883 - [css-grid] Remove a redundant ResolveGapToLength call. r=dholbert
mGridGap is already initialized in nsGridContainerFrame::Tracks::Initialize.
2018-06-04 23:18:57 +02:00
Mats Palmgren
88c6f4d992 Bug 1464882 - [css-grid] Pass the content size relevant for the specific axis rather than requiring both only to discard one value. r=dholbert 2018-06-04 23:18:56 +02:00
Mats Palmgren
8f2a5e19c9 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
Boris Zbarsky
15b087c696 Bug 1465875 part 4. Eliminate random mentions of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Boris Zbarsky
c7f378d7ab Bug 1465875 part 1. Eliminate pointless QIs to nsIDOMNSEditableElement. r=qdot
We expose the relevant APIs on textarea and input elements anyway
(chromeonly).  The QIs will throw on a non-input or non-textarea element, but
none of these consumers expect that to happen.
2018-06-01 22:35:22 -04:00
Gurzau Raul
8409fd4a82 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-02 05:12:32 +03:00
Gurzau Raul
b36972ff91 Backed out 7 changesets (bug 1461046) for permafailing reftest on /reftests/css-invalid/select/select-disabled-fieldset-1.html a=backout
Backed out changeset f5990eb1eb0d (bug 1461046)
Backed out changeset 8e0c340b9700 (bug 1461046)
Backed out changeset fbfe1d5b94e1 (bug 1461046)
Backed out changeset 48057a6ba3d6 (bug 1461046)
Backed out changeset 5c8648bcf6bb (bug 1461046)
Backed out changeset 157bbc74460a (bug 1461046)
Backed out changeset e990d4d07b0e (bug 1461046)
2018-06-02 05:07:03 +03: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
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
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
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
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