Commit Graph

18864 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
5b05fdd61a Bug 1472076 - Introduce nsATimerAdjustmentObserver in nsRefreshDriver. r=birtles
mMostRecentRefresh is changed not only in Tick() but also in
EnsureTimerStarted().  In the case where it happens in Tick() refresh observers
can know it through WillRefresh(), but there is no way in the case of
EnsureTimerStarted().  This patch introduces a new abstract class to be notified
when mMostRecentRefresh was changed in EnsureTimerStarted() so that animations
can use the *real* most recent refresh time until the next tick happens.

The reason why we have another observer array in parallel with existing array
(mObservers) is that the refresh driver should stop the timer if there is no
normal observes but there are still any timer adjustment observes.

MozReview-Commit-ID: FaDcl5GrvI3

--HG--
extra : rebase_source : a6a362366f4eda9fb51003ef4cff5bea886836f0
2018-07-03 10:57:12 +09:00
Ciure Andrei
177ceadc18 Backed out 3 changesets (bug 1466897) for xpcshell failures test_ext_schemas_interactive.js and test_ext_contentscript_create_iframe.js CLOSED TREE
Backed out changeset 87bb8b686a7e (bug 1466897)
Backed out changeset 4443f1f6e8f3 (bug 1466897)
Backed out changeset 067ee6342782 (bug 1466897)

--HG--
rename : layout/xul/nsIPopupContainer.h => layout/xul/nsIRootBox.h
2018-07-03 06:03:15 +03:00
Matt Woodrow
7391f4b580 Bug 1467688 - Make sure we invalidate for perspective changes even if the frame isn't otherwise transformed. r=dbaron
MozReview-Commit-ID: JQGb41kp76P

--HG--
extra : rebase_source : f9105e949f8fa02697a94718ea69742ac115f8e6
2018-07-02 21:35:14 -04:00
Brendan Dahl
79c6912c4e Bug 1466897 - Rename nsIRootBox to nsIPopupContainer. r=mats
MozReview-Commit-ID: D4GgReAEelG

--HG--
rename : layout/xul/nsIRootBox.h => layout/xul/nsIPopupContainer.h
extra : rebase_source : 5f4c2f2da75bac4f499a23cecc368e996991c6fe
2018-06-26 17:29:55 -07:00
Ciure Andrei
a43e1b09ad Backed out 1 changesets (bug 1467688) for reftest failures crashtests/1467688.html CLOSED TREE
Backed out changeset b976829f826a (bug 1467688)
2018-07-03 01:55:17 +03:00
Matt Woodrow
dc37a6b69c Bug 1467688 - Make sure we invalidate for perspective changes even if the frame isn't otherwise transformed. r=dbaron
MozReview-Commit-ID: DpND8Jwr226

--HG--
extra : rebase_source : c6f51b9e8f91978a1783eb27de5ca89f75a3f2a5
2018-07-02 17:46:10 -04:00
Olli Pettay
f3c69361dc Bug 1472430, PresShell::RenderNode should work with elements in Shadow DOM, r=emilio 2018-07-01 22:29:42 +03:00
Simon Montagu
a16336fd91 Bug 827192 - Add a crashtest. r=mats 2013-01-30 01:13:02 -08:00
Simon Montagu
af9a205460 Bug 989994 - Add tests. r=mats 2014-04-25 00:03:49 -07:00
Emilio Cobos Álvarez
fac54cd7df Bug 1472443: Make StyleContentType an enum class. r=xidorn
Most of it is automated by:

  %s/eStyleContentType_/StyleContentType::/g
  %s/nsStyleContentType/StyleContentType/g

But I removed some parentheses by hand.

Differential Revision: https://phabricator.services.mozilla.com/D1900

MozReview-Commit-ID: 3IcirjIYX5p
2018-06-30 17:13:07 +02:00
Andreea Pavel
91a9c110e2 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-30 12:49:32 +03:00
Emilio Cobos Álvarez
c4900d4847 Bug 215083: Fix CreateContinuingFrame to account for non-nsImageLoadingContent image frames. r=heycam
MozReview-Commit-ID: CLx3siPe4Cx
2018-06-30 03:45:12 +02:00
Emilio Cobos Álvarez
6d73d28803 Bug 215083: Implement content: url(..) for elements. r=tnikkel,dholbert
Dynamic changes are handled correctly because content property changes already
cause a reframe.

This implements the same bits as Blink / WebKit do (single content item which is
an image, otherwise gets ignored), except for the edge cases where you use this
on an image.

In order to handle the edge cases right, we completely isolate the
nsImageLoadingContent usage based on `mKind`.

Blink's and WebKit's behavior there makes no sense and it's erratic, what I
implemented is consistent (we apply to images as long as they don't generate a
box, and we don't look at alt text or broken icons), though I'll update to
whatever the WG decides in https://github.com/w3c/csswg-drafts/issues/2831 /
https://github.com/w3c/csswg-drafts/issues/2832.

I don't think it matters in terms of web compat in any case.

MozReview-Commit-ID: JUurhC60hWr
2018-06-30 03:45:13 +02:00
Mats Palmgren
e9805c3053 Bug 1470260 part 2 - Make RefreshDriverTimer ref-counted and hold a strong ref on it on the stack when nsRefreshDriver::Tick can be reached. r=emilio 2018-06-30 01:08:54 +02:00
Mats Palmgren
050942c49c Bug 1470260 part 1 - Ensure that 'this' stays alive for the duration of the TickRefreshDriver call. r=emilio 2018-06-30 01:08:54 +02:00
Masayuki Nakano
36f73c43d8 Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug
Currently, if an event is consumed in the main process, EventStateManager
does not send it to remote process.  However, this is unexpected behavior
for some WidgetKeyboardEvent dispatchers.  OS sometimes has consumed native
key events before sending applications.  For example, Alt key on Windows
should activate menu bar of focused window but Alt key may be consumed before
focused window receives the event.  In such case, we mark Alt keyboard event
as "consumed before dispatch", and chrome treat it like as its preventDefault()
is called in web content.  (Note that for compatibility with other browsers,
the consumed state is not exposed to web content.  So, Event.defaultPrevented
returns false in web content.)

Therefore, we need to treat "consumed" state and "cross process forwarding"
state separately.  This patch makes calling WidgetEvent::PreventDefault()
always stops cross process forwarding for backward compatibility.  Additionally,
for the special case mentioned above, this patch makes
WidgetEvent::PreventDefaultBeforeDispatch() take additional argument,
|aIfStopCrossProcessForwarding|.  If this is CrossProcessForwarding::eStop,
the event won't be sent to remote process as same as calling PreventDefault().
Otherwise, CrossProcessForwarding::eHold, PreventDefaultBeforeDispatch() call
does not change "cross process forwarding" state.  I.e., if the event's
StopCrossProcessForwarding() and PreventDefault() are not called until
EventStateManager::PostHandleEvent(), the event will be sent to remote process
as usual.

MozReview-Commit-ID: IQGWJvXetxV

--HG--
extra : rebase_source : 4ccdd500e80b8fe29e469ac3b85578e1c07c8358
2018-06-25 18:17:18 +09:00
Boris Zbarsky
fcb00cb36f Bug 1471095. Don't do extra work we don't need to in ReparentWrappersInSubtree. r=smaug 2018-06-28 23:36:46 -04:00
sotaro
58705ea969 Bug 1405465 - Handle WR paint codepath with no frame r=kats 2018-06-29 08:32:26 +09:00
Ryan Hunt
6f29815288 Bug 1460753 - Remove TelemetryScrollProbe. r=smaug
The probe is expired and there's no clear owner here so let's remove this
for now.

--HG--
extra : rebase_source : 51c332a790ce5081ce4645633991c3b9213a5d21
extra : source : 98d141e6d651b804cf35040a5c20be74b6fb6c7a
2018-06-26 17:31:27 -05:00
Emilio Cobos Álvarez
d73b4b0679 Bug 1464782: Rename offset-* logical properties to inset-*. r=xidorn
MozReview-Commit-ID: BW44sru99RF
2018-06-27 16:12:01 +02:00
Dorel Luca
f51c4fa5d9 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-27 13:26:49 +03:00
Hiroyuki Ikezoe
7cf6c6e8ac Bug 1471241 - Set dom.animations-api.core.enabled for 1343139-1.html. r=birtles
Since the test relies on missing keyframes handling.

MozReview-Commit-ID: IfbMvRhIeOh

--HG--
extra : rebase_source : 447bec6c7bc8d8a79f00bb738182e0647ee68ec5
2018-06-27 06:04:21 +09:00
Morgan Rae Reschenberg
41f649ace3 Bug 1471267 - Update some baseline-querying utility functions to bail on frames that have 'contain:size'. r=dholbert
MozReview-Commit-ID: Bk2P73tlRqG

--HG--
extra : rebase_source : f20c751b9dd902f295a2a2181a13453451327e2c
2018-06-26 15:34:15 -07:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Margareta Eliza Balazs
c866c30fcf Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-26 12:24:32 +03:00
Chris Peterson
2afd829d0f 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

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Mike Conley
f88719f6e0 Bug 1449756 - Make DisplayPort suppression PresShell specific and not process global. r=kats
Originally, DisplayPort suppression was a process-global static. This change makes it possible
to control DisplayPort suppression on a per-PresShell basis.

Differential Revision: https://phabricator.services.mozilla.com/D1759
2018-06-25 21:42:25 +00:00
Noemi Erli
aaac9a77dd Merge inbound to mozilla-central. a=merge 2018-06-25 22:02:08 +03:00
Emilio Cobos Álvarez
5c4430a03e Bug 1470836: Remove the code to create placeholder continuations. r=mats
Try seems happy with this.

MozReview-Commit-ID: 6XWVYrZxpFy

--HG--
extra : rebase_source : cec1c949fe3db72798ca131bb51fc412dd866f0e
2018-06-25 10:37:56 +02:00
Emilio Cobos Álvarez
8138ef471d Bug 1470163: Don't load mathml/svg.css if MathML/SVG is disabled. r=heycam
This fixes a MathML-disabled reftest with the previous patch.

The reftest assumes the sheet is not loaded, so let's just do that. This
effectively preserves behavior.

MozReview-Commit-ID: KrR4pHslycz
2018-06-25 10:54:48 +02:00
Emilio Cobos Álvarez
71d364bdd1 Bug 1470163: Load mathml.css upfront, and remove the concept of on-demand builtin UA sheets. r=heycam
On top of the two depending bugs.

Funny how there's a comment referencing bug 77999.

Differential Revision: https://phabricator.services.mozilla.com/D1750

MozReview-Commit-ID: LCuJROu92bo
2018-06-25 10:54:38 +02:00
Emilio Cobos Álvarez
27ef769d59 Bug 1469354: Use the first continuation to get the layout parent style. r=mats
Continuations do not have placeholders. There's a bunch of code that already
deals with that in other places in the tree.

MozReview-Commit-ID: Htizql7692e
2018-06-25 02:50:44 +02:00
shindli
7fd12b01a4 Backed out 2 changesets (bug 1470163) for math failures in layout/mathml/tests/test_disabled.html on a CLOSED TREE
Backed out changeset e34a6bdac37a (bug 1470163)
Backed out changeset e2e97e7a605f (bug 1470163)
2018-06-24 06:56:44 +03:00
Emilio Cobos Álvarez
084ced3b22 Bug 1444193: followup: Remove comment which is no longer accurate. r=me
MozReview-Commit-ID: HyynrpMgKis
2018-06-24 03:59:21 +02:00
Emilio Cobos Álvarez
2027465bad Bug 1470163: Don't load mathml/svg.css if MathML/SVG is disabled. r=heycam
This fixes a MathML-disabled reftest with the previous patch.

The reftest assumes the sheet is not loaded, so let's just do that. This
effectively preserves behavior.

MozReview-Commit-ID: KrR4pHslycz
2018-06-24 03:55:59 +02:00
Emilio Cobos Álvarez
a1abd0a493 Bug 1470163: Load mathml.css upfront, and remove the concept of on-demand builtin UA sheets. r=heycam
On top of the two depending bugs.

Funny how there's a comment referencing bug 77999.

Differential Revision: https://phabricator.services.mozilla.com/D1750

MozReview-Commit-ID: LCuJROu92bo
2018-06-24 03:55:58 +02:00
Hiroyuki Ikezoe
10960cad13 Bug 1430884 - Throttle nsChangeHint_UpdateContainingBlock on invisible element. r=birtles
When an animation targets a CSS property that could cause a containing block to
be generated for its descendants, this containing block must be generated even
if the particular property values used by the animation would not normally
trigger generation of a containing block (e.g. transform: none).  This is due
to the implicit application of will-change defined in CSS Animations[1] and Web
Animations[2].

Since this containing block is generated at the start of the animations, we can
throttle animations that produce the UpdateContainingBlock change hint for
animations that are not visible since they shouldn't have any further side
effects beyond the generation of containing blocks (which have already happened).

[1] https://drafts.csswg.org/css-animations/#animations
[2] https://drafts.csswg.org/web-animations-1/#side-effects-section


Unfortunately perspective animations starting with 'none' and transform
animations from 'none' to 'none' don't create a containing block (bug 1470349
and bug 1470370).  That doesn't block the optimization in this patch, however,
since those bugs occur regardless of element visibility.

MozReview-Commit-ID: 8rTl8dShHrD

--HG--
extra : rebase_source : 886b003d0f3c555a12baf0de81b4130ef2d71e82
2018-06-25 18:29:09 +09:00
Hiroyuki Ikezoe
636e9381d5 Bug 1430884 - Throttle animations producing nsChangeHint_UpdateOverflow change hint if the target element is not visible. r=birtles
In the case where the target element is scrolled out or visibility:hidden and
has no visible descendants, we can treat nsChangeHint_UpdateOverflow just like
transform animations which produce nsChangeHint_UpdatePostTransformOverflow,
i.e. unthrottle the animations periodically if the target element is inside a
scrollable element.  Some transform animations produce UpdateOverflow hint,
so it would be really nice to optimize the hint.

MozReview-Commit-ID: E1MgPZRi8mW

--HG--
extra : rebase_source : d29a29e137742f88a64b3b18a5a7d4e64e76f54f
2018-06-25 11:50:56 +09:00
Margareta Eliza Balazs
e1ea59be60 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)

--HG--
extra : rebase_source : 9877dce2438d42eca99898b22c95ecc04dbd748f
2018-06-25 12:23:59 +03:00
Emilio Cobos Álvarez
711587f9ff Bug 1469176: Load svg.css upfront. r=jwatt
Test Plan: Covered by existing tests.

Reviewers: jwatt

Reviewed By: jwatt

Bug #: 1469176

Differential Revision: https://phabricator.services.mozilla.com/D1762
2018-06-22 12:48:40 +02:00
Emilio Cobos Álvarez
bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +02:00
Botond Ballo
f5745eb2a5 Bug 1459696 - Improve const-correctness of nsIFrame methods and functions that accept an nsIFrame* argument. r=mstange
MozReview-Commit-ID: 9IcL8kfMdIH

--HG--
extra : rebase_source : f8f19f528fe42aa119659ed9cb3340a257bb3716
2018-05-28 19:58:25 -04:00
Matt Woodrow
b7382ce595 Bug 1469746 - Rebuild display lists in full when we start/stop computing visibility for plugins. r=miko
MozReview-Commit-ID: 3xHoYBBA4Fy

--HG--
extra : rebase_source : f99344ffe0dbcd020abd745a3168f4b86b2ebba4
2018-06-20 14:24:46 +12:00
Matt Woodrow
668b361a1d Bug 1466024 - Cleanup nsDisplaySubDocument display items when we swap the subdoc into a different outer document. r=miko
MozReview-Commit-ID: E4NKiIdXZsY

--HG--
extra : rebase_source : afdce58ba43dbf9bd93d971bd8b57240461c9954
2018-06-01 17:23:55 +12:00
Hiroyuki Ikezoe
afa2fcd95a 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

--HG--
extra : rebase_source : 102c5532128039dcf8274c214e17d58d9a1aa483
2018-06-18 06:16:07 +09:00
Daniel Holbert
1cbfda11fa Bug 1468590: Preemptively fix unified build bustage in layout/base. r=emilio
This commit just adds some #include directives and "using namespace" directives.

(The "using namespace mozilla::dom;" are the important namespace directives
here, though I've included "using namespace mozilla;" alongside it as well, for
completeness/consistency.)

Differential Revision: https://phabricator.services.mozilla.com/D1647
2018-06-13 20:39:58 +00:00
Emilio Cobos Álvarez
6deecdeacf Bug 1458556: Release wallpaper for bug 1462401. r=xidorn
Just avoid crashing if the element has no data, treat is as display: none.

TakeChangeHint already returns wasRestyled = false, so we won't end up trying to
reconstruct anything, and we don't set frame construction flags in
nsCSSFrameConstructor so we won't traverse children either.

MozReview-Commit-ID: 2gXmHSlj3Jw

--HG--
extra : rebase_source : 9d95a4f3ee8fabc4d73a39699c677ba184061370
2018-06-12 17:21:29 -07:00
Emilio Cobos Álvarez
61320fe78b Bug 1467964: Crashtest. r=me
MozReview-Commit-ID: LgL5APThZiK
2018-06-12 16:55:22 -07:00
Botond Ballo
59adc89262 Bug 1467873 - Fix FrameMetrics::CalculateCompositedRectInCssPixels(). r=kats
- Fix the implementation to return a numerically correct result
  - Change call sites that should have instead been using
    CalculateCompositedSizeInCssPixels(), to do so
  - Rename and document to emphasize that the returned rect is in the
    CSS pixels of the content surrounding the scroll frame

MozReview-Commit-ID: GCPbA1k88rz

--HG--
extra : rebase_source : f5b937936fb84b3ae414d6cf0250add4078a9d53
2018-06-09 16:33:26 -04:00