Commit Graph

64357 Commits

Author SHA1 Message Date
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
Emilio Cobos Álvarez
14326e571a Backed out changeset d48abd83fc7c (bug 1463884) since it's not the correct fix. r=me
If the font enumeration thread runs during the Servo traversal, it'd end up
thinking it _is_ (incorrectly) a Servo thread.
2018-05-27 10:04:27 +02:00
Peter Van der Beken
2de39f46d8 Bug 1146316 - Leak fix, set up CC in XPCShell too. r=smaug.
XPCShell allows interaction with object that are cycle collected, but we never run the
cycle collector in it. In XPCShell we don't call nsJSContext::EnsureStatics.
nsJSContext::EnsureStatics is responsible for setting DOMGCSliceCallback as a GC callback,
which we need for running the cycle collector.

--HG--
extra : rebase_source : 5f12c15dabf3b23d9e4b1d8d88920e476d2d4bd6
2018-05-08 17:07:33 +02:00
Matt Woodrow
c868a9a37d Bug 1464288 - Make sure PreProcessDisplayLists logic for switching AGRs matches what ComputeRebuildRegion uses. r=miko
MozReview-Commit-ID: F6N0XLCpuEe

--HG--
extra : rebase_source : b706ded33ac5baf6433c99af8cacb62ebcf1e753
2018-05-26 16:55:17 +12:00
Jonathan Kew
2c8d1fd244 Bug 1463884 - patch 2 - Make gfxFcPlatformFontList::TryLangForGroup safe for off-main-thread use. r=emilio 2018-05-25 21:18:55 +01: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
Chris AtLee
6ced44821e Bug 1237182: Fix python unitests r=bustage on a CLOSED TREE
--HG--
extra : rebase_source : 1e118ab5aed8251dfff28f6c3c4f885e1de24a04
extra : histedit_source : 635a7aa2a4fb47ff1b3b28f0ce099948d6f1101a
2018-05-25 13:42:58 -04:00
Dorel Luca
847485b23e Backed out changeset f65b3816a198 (bug 1451973) for tps failure on multiple files. CLOSED TREE 2018-05-25 21:17:01 +03:00
Coroiu Cristina
c032f38419 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-05-25 20:58:44 +03:00
Coroiu Cristina
19e81b8d28 Merge inbound to mozilla-central a=merge 2018-05-25 20:51:27 +03:00
Coroiu Cristina
6ea42bbe36 Backed out changeset 5033de939b8c (bug 1464288) for failing reftests at reftest/tests/layout/reftests/display-list/1464288-1.htm a=backout 2018-05-25 20:42:33 +03:00
Joel Maher
29d83f200e Bug 1392106 - random-if many more tests on win7. r=RyanVM 2018-05-25 13:03:59 -04:00
Matt Woodrow
6fdf0741d7 Bug 1464288 - Make sure PreProcessDisplayLists logic for switching AGRs matches what ComputeRebuildRegion uses. r=miko
MozReview-Commit-ID: Ht11ul21PRO

--HG--
extra : rebase_source : 3bb7b0128f3932142b518490cef3ba814245b5d6
2018-05-25 16:21:18 +12: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
441ab566e4 No bug - Fix some bogus indentation. r=me
MozReview-Commit-ID: 6G7oS6MkJ0Y
2018-05-25 14:18:29 +02:00
Gurzau Raul
c406b410bc Backed out changeset 5bb547481faf (bug 1451973) for testChild failures on a CLOSED TREE 2018-05-25 14:16:34 +03:00
Bogdan Tara
597ad02dc7 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032.html
2018-05-25 13:01:23 +03:00
Xidorn Quan
ee0c05df56 Bug 1463687 - Apply scrollbar style of root element to scrollbars of viewport. r=heycam
MozReview-Commit-ID: GWmhehtqO1U

--HG--
extra : rebase_source : 18e73bb269c9a0b1fd7d3c4ab25f4ad788d1a065
2018-05-24 16:34:58 +10:00
Brad Werth
39c314e889 Bug 1463794: Move new WPT reftests to correct source-of-truth directory. r=dbaron+3881
MozReview-Commit-ID: DcM0kVCAsZn

--HG--
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-circle-056.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-circle-056.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-ellipse-052.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-ellipse-052.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032-ref.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032-ref.html
rename : testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/shapes1/shape-outside-polygon-032.html => layout/reftests/w3c-css/submitted/shapes1/shape-outside-polygon-032.html
extra : rebase_source : add4f42d16a770eac4915b26fb4a7fffd5ac6ac4
2018-05-23 12:53:34 -07:00
Matt Woodrow
55904c6b43 Bug 1462497 - Follow-up to fix code that was accidentally inside a MOZ_DIAGNOSTIC_ASSERT_ENABLED block.
--HG--
extra : rebase_source : b83d1cba9ae77e01d7e972aae2d9611d1d5cac00
2018-05-25 09:56:28 +12:00
Brindusan Cristian
309ff0bd1f Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-25 03:08:34 +03:00
Yusuf Sermet
3b2bfe587d Bug 1460787 - Change fatal assertion to warning for extremely large sized pages. r=dholbert
MozReview-Commit-ID: 8MpvqbecU2k

--HG--
extra : rebase_source : a4d4552780e916a3fde0a454238fc069722b5604
2018-05-23 10:06:57 -07:00
Peter Van der Beken
3659b3ea86 Bug 1451973 - Split off process from non-process message managers. r=bz.
Process and non-process managers have different script loader interfaces
(ProcessScriptLoader/GlobalProcessScriptLoader vs FrameScriptLoader). The WebIDL
conversion used the same interface for some process and
non-process managers, but because of the different script loader interfaces they really
should be using separate interfaces.

--HG--
rename : dom/base/ChromeMessageBroadcaster.cpp => dom/base/MessageBroadcaster.cpp
rename : dom/base/ChromeMessageBroadcaster.h => dom/base/MessageBroadcaster.h
rename : dom/base/ChromeMessageBroadcaster.cpp => dom/base/ParentProcessMessageManager.cpp
rename : dom/base/ChromeMessageBroadcaster.h => dom/base/ParentProcessMessageManager.h
rename : dom/base/ChromeMessageSender.cpp => dom/base/ProcessMessageManager.cpp
rename : dom/base/ChromeMessageSender.h => dom/base/ProcessMessageManager.h
extra : rebase_source : 6694ae975bc2af1b496db6b8cef645ec62582d9a
2018-04-16 15:18:48 +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
Tyson Smith
97fefc2d56 Bug 1414100: Crashtest. r=emilio
MozReview-Commit-ID: 8tQwUR8BFPk
2018-05-25 18:36:30 +02:00
Peter Van der Beken
1c4d1cd486 Bug 1451973 - Split off process from non-process message managers. r=bz.
Process and non-process managers have different script loader interfaces
(ProcessScriptLoader/GlobalProcessScriptLoader vs FrameScriptLoader). The WebIDL
conversion used the same interface for some process and
non-process managers, but because of the different script loader interfaces they really
should be using separate interfaces.

--HG--
rename : dom/base/ChromeMessageBroadcaster.cpp => dom/base/MessageBroadcaster.cpp
rename : dom/base/ChromeMessageBroadcaster.h => dom/base/MessageBroadcaster.h
rename : dom/base/ChromeMessageBroadcaster.cpp => dom/base/ParentProcessMessageManager.cpp
rename : dom/base/ChromeMessageBroadcaster.h => dom/base/ParentProcessMessageManager.h
rename : dom/base/ChromeMessageSender.cpp => dom/base/ProcessMessageManager.cpp
rename : dom/base/ChromeMessageSender.h => dom/base/ProcessMessageManager.h
extra : rebase_source : d19120fb59b413aecf4e78aee8dc845022cd84dd
2018-04-16 15:18:48 +02:00
Olli Pettay
87d2947a92 bug 1429572, touch.target retargeting in shadow DOM, r=masayuki
--HG--
extra : rebase_source : 75d837bfd7533322a10ae2f785c7efce1fe8ec68
2018-05-25 18:02:59 +03: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
Noemi Erli
3180433f81 Backed out changeset 07344dd47432 (bug 1217748) for increasing the frequency of https://bugzilla.mozilla.org/show_bug.cgi?id=1439979 a=backout 2018-05-24 18:44:44 +03:00
Noemi Erli
9205eb539e Merge inbound to mozilla-central. a=merge 2018-05-24 18:40:38 +03:00
Margareta Eliza Balazs
ae2fc24a7c Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-24 12:44:13 +03:00
Margareta Eliza Balazs
03394c438d Merge inbound to mozilla-central. a=merge 2018-05-24 12:37:58 +03:00
Boris Zbarsky
b134958200 Bug 1452666. Implement nsISerializable on expanded principals. r=kmag 2018-05-24 02:43:14 -04:00
Hiroyuki Ikezoe
265c5c817a Bug 1463605 - A reftest that IB sibling frames are correctly marked as 'NeedsDisplayItemRebuild' when there is an animation on the frames. r=mattwoodrow
MozReview-Commit-ID: FG7SQYKOq3r

--HG--
extra : rebase_source : a42ffc7a601b4dc872f4a2dae83d2ea1366b2f86
2018-05-23 18:15:12 +09: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
Xidorn Quan
cfe970a04f Bug 1463408 part 2 - Add profiler feature seqstyle for forcing sequential styling when profiling. r=emilio,mstange
MozReview-Commit-ID: 6fm8j7z1EbJ

--HG--
extra : rebase_source : 1715b6af2c72323f320ff3da8e46d1634f5f7367
2018-05-23 19:35:03 +10:00
Miko Mynttinen
c6432bd30e Bug 1463752 - Part 2: Avoid allocating AutoTArray when there are no items that can be merged together r=mattwoodrow
MozReview-Commit-ID: 2t0ehABBPy4

--HG--
extra : rebase_source : 4b53bd8845b39da023eca44ba9afd6ac9727ba15
2018-05-22 23:46:11 +02:00
Emilio Cobos Álvarez
fb4762b5e6 Bug 1461749: Fix slow path for finding the next sibling frame for appending in presence of Shadow DOM. r=mats
In this case we have a shadow hoot with display: contents, with no children.
Those children wouldn't be flattened tree children of the shadow host.

Instead of using the last light dom child and seek to it, use
FlattenedChildIterator's reverse iteration.

MozReview-Commit-ID: 18XL5Ong7ww

--HG--
extra : rebase_source : 2d34bd5b1fdd509a069ffa5052a7b7b3302be24c
2018-05-23 18:20:33 +02:00
Emilio Cobos Álvarez
10167dbcac Bug 1419802: Bailout from ScheduleViewManagerFlush if already destroying the shell. r=mats
MozReview-Commit-ID: Ixq9jwX2kET

--HG--
extra : rebase_source : c4fe85307a4247209bf085a20a913d577cf15788
2018-05-23 17:20:14 +02:00
Andreea Pavel
2c92aa2095 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2018-05-24 01:03:40 +03:00
Andreea Pavel
0dada2bb52 Merge inbound to mozilla-central. a=merge 2018-05-24 01:00:23 +03:00
Jonathan Kew
71787557ea Bug 1392147 - Test/expectation adjustments for the change in default font on Android. r=xidorn 2018-05-23 13:52:08 +01:00
Andreea Pavel
4f7d00d030 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-05-24 01:08:00 +03:00
Jonathan Kew
07d3fd7107 Bug 1392147 followup, remove obsolete fuzzy() annotation that was inadvertently left in the patch. r=me 2018-05-23 20:03:18 +01:00