Commit Graph

67741 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
37d6170f7f Bug 1530177 - Downgrade an assertion to a diagnostic assert since it exposes pre-existing bugs. r=dholbert
nsIconChannel (for moz-icon:// images) is unsound, see bug 1438939.

nsMenuPopupFrame::Init is also unsound on mac, looks like...

I'll try to get them fixed on trunk, but it's not worth crashing release for
this IMO, given it's pre-existing. The assert in PresShell::~PresShell hopefully
avoids exploitable issues.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 23:37:44 +00:00
violet
3f63d086cd Bug 1528635 - Check urlExtraReferrer not null before dereference to avoid crash r=longsonr
urlExtraReferrer could be null, we should check before dereference.  Otherwise
it will cause crash when webrender is enabled by gfx.webrender.enabled=true
and gfx.webrender.all=true,

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

--HG--
extra : moz-landing-system : lando
2019-03-03 19:35:42 +00:00
Masayuki Nakano
3ea27c2fd8 Bug 1466208 - part 28: Make PresShell::EventHandler::HandleEvent() handle non-using-coordinates events without frame before with frame case r=smaug
When the event is not handled with coordinates and there is no frame for
`mPresShell`, `PresShell::EventHandler::HandleEvent()` handles the events
simpler than the case there is a frame.  Therefore, this patch moves the
`else` block of `if (aFrame)` and reduce the indent of `if (aFrame)` case.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 20:35:21 +00:00
Hiroyuki Ikezoe
f0fc35f1b8 Bug 1531470 - Use nsLayoutUtils::GetNearestScrollableFrame with SAME_DOC and INCLUDE_HIDDEN flags to get position:sticky target scrollable frame. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D21835

--HG--
extra : moz-landing-system : lando
2019-03-03 00:33:55 +00:00
Emilio Cobos Álvarez
f02f6a3545 Bug 1218257 - Use rust lengths for the SVG lengths. r=boris
As it turns out we need this to avoid losing precision both during painting and
during serialization.

This patch also changes to serialize `context-value` if it's the computed value.

I could keep the previous behavior, but it makes no sense to serialize the
initial value. We're the only ones to support this value anyway, and I couldn't
find a definition or spec for this.

Also update tests and expectations for:

 * New unexpected passes.
 * Always serializing the unit in getComputedStyle.
 * Calc and interpolation support.

Chrome also always serializes the unit in getComputedStyle, so I'm pretty sure
this is compatible with them. Chrome is inconsistent and keeps numbers in
specified style, but that's inconsistent with itself and with other quirky
lengths, so I updated the tests instead.

Differential Revision: https://phabricator.services.mozilla.com/D21819
2019-03-03 00:16:24 +01:00
Emilio Cobos Álvarez
7e10c7b612 Bug 1218257 - Cleanup and fix interpolation of SVG lengths. r=boris
Instead of storing them as LengthPercentage | Number, always store as
LengthPercentage, and use the unitless length quirk to parse numbers instead.

Further cleanups to use the rust representation can happen as a followup, which
will also get rid of the boolean argument (since we can poke at the rust length
itself). That's why I didn't bother to convert it to an enum class yet.

Differential Revision: https://phabricator.services.mozilla.com/D21804
2019-03-03 00:16:13 +01:00
Jeff Muizelaar
70f8b5c221 Bug 1532088. Use ImageMask directly instead of duplicating it as WrImageMask. r=kats
WrImageMask is a relic from before we had good bindings generation.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 21:48:06 +00:00
Masayuki Nakano
291457b9da Bug 1466208 - part 27: Create PresShell::EventHandler::HandleEventUsingCoordinates() r=smaug
Now, the block in HandleEvent(), which handles event using coordinates is
less than 200 lines.  Perhaps, this is good amount to be split to a method.

This patch just moves the block to a new method.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 00:03:01 +00:00
Razvan Maries
cfdc9fc660 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-03-02 12:06:27 +02:00
Razvan Maries
c51046f730 Merge mozilla-inbound to mozilla-central a=merge 2019-03-02 11:41:18 +02:00
Daniel Varga
65ee224091 Backed out changeset 2e63fa41257b (bug 1530594) for mochitest failure use-after-poison /builds/worker/workspace/build/src/layout/xul/nsMenuPopupFrame.h:280:42 in PopupType 2019-03-02 06:45:31 +02:00
Dorel Luca
db32a5e766 Bug 1456855 - Fix syntax for test layout/inspector/tests/chrome/test_fontVariationsAPI.xul r=aryx 2019-03-02 01:16:36 +02:00
Neil Deakin
986bb46eaa Bug 1530594, generate frames before setting the active child in a menulist, so that menulists with sizetopopup='none' will still allow keyboard navigation when the menulist has not yet been opened, r=tnikkel 2019-03-01 22:07:58 -05:00
Masayuki Nakano
fcb0072133 Bug 1466208 - part 26: Create PresShell::EventHandler::EventTargetData::UpdateTouchEventTarget() r=smaug
After dispatching pointer events, `PresShell::EventHandler::HandleEvent()`
updates event target only when the event is a touch event.  We should do it in
a new method of `EventTargetData`.

Although I don't know why this is done in
`PresShell::EventHandler::DispatchPrecedingPointerEvent()`.

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

--HG--
extra : moz-landing-system : lando
2019-03-02 00:02:10 +00:00
Boris Chiou
192a13d12f Bug 1526850 - Part 4: Add nsCSSPropertyIDSet::IsSubsetOf() for checking the restrictions of some arguments. r=hiro
We restrict the argument (i.e. `nsCSSPropertyIDSet`) of some functions is
the subset of other property set (e.g. transform-like properties), so
add this function for better readability.

Depends on D19629

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:07 +00:00
Boris Chiou
a47dc39197 Bug 1526850 - Part 3: Use DisplayItemType as the input of AddTransitionsAndAnimationsToLayer. r=hiro
Transform display item may have multiple properties, so it's better to
use display item type as the input.

Also, factor some code out of AddAnimationsForProperty, so we can easier
to extend this for multiple properties.

We will pass a list of layers::Animation to the compositor thread. In
this list, the animations belonging to the same property are grouped together,
so we can easily separate the animations by property and sample the animations
for each property on the compositor thread. (Will do this in Bug 1425837.)

Depends on D19628

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:05 +00:00
Boris Chiou
97ae508f2d Bug 1526850 - Part 2: Let FindAnimationsForCompositor take nsCSSPropertyIDSet. r=hiro
We use DisplayItemType as the input of HasAnimationsForCompositor, and
nsCSSPropertyIDSet as the input of GetAnimationsForCompositor.

The caller of HasAnimationsForCompositor just wants to check if there is
any compositor animation for a display item, so we can replace it by the
display item, and get the properties from this display item.

However, the caller of GetAnimationsForCompositor may use a subset of
transform-like properties for getting scale factors, or use all the
transform-like properties for sending all transform animations to the
compositor thread.

Depends on D19630

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:03 +00:00
Boris Chiou
55287b9a0b Bug 1526850 - Part 1: Add a function which sets RunningOnCompositor by DisplayItemType. r=hiro
FrameLayerBuilder needs to clear this flag by DisplayItemType, so we add
a new function for it.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 21:13:01 +00:00
Joel Maher
d99950f9a4 Bug 1456855 - adjust manifests for tests that now run with the new linux64 FreeType. r=ahal
Depends on D21559

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

--HG--
extra : moz-landing-system : lando
2019-03-01 20:35:47 +00:00
Botond Ballo
83a64ce389 Bug 1519621 - Make sure ScrollToRestoredPosition() restores both the layout and visual scroll positions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D18367

--HG--
extra : moz-landing-system : lando
2019-03-01 20:18:35 +00:00
Masayuki Nakano
72ca6260c0 Bug 1466208 - part 25: Create PresShell::EventHandler::DispatchPrecedingPointerEvent() r=smaug
Now, we can move the block dispatching preceding pointer event to separated
method.  Then, we can hide the complicated retarget process after dispatching
a pointer event from HandleEvent().

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

--HG--
extra : moz-landing-system : lando
2019-03-01 02:02:31 +00:00
Gurzau Raul
a218f01445 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-01 15:14:00 +02:00
Gurzau Raul
cdf9392948 Merge inbound to mozilla-central. a=merge 2019-03-01 15:01:31 +02:00
Emilio Cobos Álvarez
3d044b1111 Bug 1296042 - Make word-break: break-word behave like word-break: normal; overflow-wrap: anywhere. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D21398

--HG--
extra : moz-landing-system : lando
2019-03-01 02:33:07 +00:00
Narcis Beleuzu
98480534f6 Backed out changeset 60128088f862 (bug 1531582) for reftest failures on value-prop.html . CLOSED TREE 2019-03-01 07:55:22 +02:00
Narcis Beleuzu
60f9321340 Backed out 2 changesets (bug 1531025) for WR failures on outline-013.html . CLOSED TREE
Backed out changeset fd71937c6f25 (bug 1531025)
Backed out changeset e4028e1ca6c7 (bug 1531025)
2019-03-01 07:22:50 +02:00
Emilio Cobos Álvarez
94bec57b28 Bug 1531582 - Don't drop the change hint for ContentStateChanged on the floor. r=heycam
This doesn't matter yet because all the states that return a change hint are on
stylesheets, but will matter with bug 1472637.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 02:04:12 +00:00
Masayuki Nakano
cfd764b949 Bug 1466208 - part 24: Move overrideClickTarget into EventTargetData r=smaug
Currently, PresShell::EventHandler::HandleEvent() sets `overrideClickTarget`
only when Pointer Events is enabled and there is pointer capturing content,
and this is computed while dispatching a pointer event.

So, if we move it into EventTargetData, we can move the pointer event
dispatching block into a separated method and caller can receive it with
an EventTargetData instance which is anyway necessary to receive new
target frame after dispatching a pointer event.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 01:58:02 +00:00
Gurzau Raul
6b94d177d1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Mike Conley
ca728851ca Bug 1530862 - Add an Init() method to HTMLMediaElement to be called right after construction to do any AddRef / Release-ing. r=jya,mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D21400

--HG--
extra : moz-landing-system : lando
2019-02-28 19:02:55 +00:00
Emilio Cobos Álvarez
5696ae7e4c Bug 1531582 - Don't drop the change hint for ContentStateChanged on the floor. r=heycam
This doesn't matter yet because all the states that return a change hint are on
stylesheets, but will matter with bug 1472637.

Differential Revision: https://phabricator.services.mozilla.com/D21616
2019-03-01 11:16:36 +01:00
Daniel Holbert
416ea2613e Bug 1531025 part 2: Skip an unnecessary border-radius calculation if the radii are 0 (to avoid division by 0). r=boris
This patch avoids a potential division by 0 (one that's unlikely to be
triggered by real content), for correctness and robustness.

This patch isn't really changing the logic, because the newly-guarded code is
already guarded by a "length < sum" check, and "length" is expected to be
nonnegative [1], which means "sum" would already have been nonzero in cases
where the existing strict less-than comparison returned true.

[1] except for integer overflow or other bizarreness.

Depends on D21578

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

--HG--
extra : moz-landing-system : lando
2019-02-28 23:52:51 +00:00
Daniel Holbert
b28b09a5fc Bug 1531025 part 1: Add braces around conditions in nsIFrame::ComputeBorderRadii(). r=boris
This patch doesn't change any logic/behavior -- it's just adding braces for clarity.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 23:50:39 +00:00
Lee Salzman
a330f87601 Bug 1530471 - remove Moz2D/thebes SkiaGL glue r=jrmuizel
Depends on D21052

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

--HG--
extra : moz-landing-system : lando
2019-02-28 14:59:16 +00:00
Cosmin Sabou
00f3836a87 Merge mozilla-inbound to mozilla-central. a=merge 2019-02-28 12:57:50 +02:00
Ciure Andrei
14dcb83669 Backed out changeset 28bc841f06fc (bug 1530862) for failing HTMLMediaElement CLOSED TREE 2019-02-28 07:52:37 +02:00
Mike Conley
55a5944b50 Bug 1530862 - Add an Init() method to HTMLMediaElement to be called right after construction to do any AddRef / Release-ing. r=jya,mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D21400

--HG--
extra : moz-landing-system : lando
2019-02-27 23:40:00 +00:00
Masayuki Nakano
1a1542b28c Bug 1466208 - part 23: Create PresShell::EventHandler::ComputeEventTargetFrameAndPresShellAtEventPoint() r=smaug
We cannot move each block into separated methods while computing EventTargetData
because we need to check capturing contents, etc.  Therefore, only each block
should be moved to separated methods for now.

This moves a block which computes event target from point of the event.  If
this can be moved to EventTargetData, it might be easier to understand, but
its helper method GetFrameToHandleNonTouchEvent() requires to access members
of EventHandler.  Therefore, we need to treat EventTargetData as an out param
of the new method.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 13:59:30 +00:00
Hiroyuki Ikezoe
163a45f495 Bug 1531173 - Drop nsIContentViewer.scrollToNode. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D21458

--HG--
extra : moz-landing-system : lando
2019-02-28 01:31:47 +00:00
Boris Zbarsky
2e5c884144 Bug 1489308 part 5. Align the work we do on document.open with the spec. r=mccr8,smaug
The main behavior changes are:

1) We no longer create a new Window when doing document.open().  We use the
same Window but remove all the event listeners on it and on the existing DOM
tree before removing the document's existing kids.

2) We no longer create a new session history entry.  The existing one always
gets replaced instead.

3) We now support document.open on documents that are not in a Window.

The reasons for the various test changes are as follows:

The change to browser_modifiedclick_inherit_principal.js is because we no
longer set the docshell to a wyciwyg URL when document.open() happens and the
test was depending on that to terminate.

browser_wyciwyg_urlbarCopying.js is being removed because it's trying to test
wyciwyg URIs, which no longer exist.

The changes in docshell/test/navigation are because document.open() no longer
affects session history.  One of the tests was testing the interactions there
and is being removed; another is being repurposed to just test that
document.open() does not affect history.length.

The change to test_x-frame-options.html is because document.open() now removes
event listeners on the window, which it didn't use to do (and in the specific
case in this test reused the existing inner too, so the listener was still
around in practice).  The new behavior matches other browsers.

The removal of test_bug172261.html is because document.open() no longer affects
session history, so you can't go back across it or forward to the "opened"
state, so the situation that test is trying to test no longer exists.

The changes to test_bug255820.html are because reloading a document after
document.open() will now just load the URL of the document that was the entry
document for the open() call, not reload the written content.  So there's not
much point testing reload behavior, and in this test it was just reloading the
toplevel test file inside the frames.

The change to test_bug346659.html is because now we no longer create a new
Window on document.open().

The change to test_bug1232829.html is because document.open() (implicit in this
test) no longer adds history entries, so the back() was just leaving the test
page instead of going back across the document.open().  The test is a
crashtest in practice, so might still be testing something useful about how
document.open() interacts with animations.

The change to test_bug715739.html is because the URL of the document after
document.open() is now the URL of the entry document, not a wyciwyg URL, so
reload() has different behavior than it used to.

The change to test_bug329869.html is because now when we go back we're
reloading the original document we had, not doing a wyciwyg load, and the
security info now doesn't include the untrusted script.

The changes to the wpt expectations are removing a bunch of expected failures
now that we pass those tests and disabling some tests that are fundamentally
racy and hence fail randomly.  The latter all have github issues filed for the
test problem.

The change to testing/web-platform/tests/common/object-association.js is fixing
tests that were not matching the spec (and were failing in other browsers).

The change to parser-uses-registry-of-owner-document.html is fixing tests that
were not matching the spec (and were failing in other browsers).

The change to document-write.tentative.html is because the test was buggy: it
was using the same iframe element for all its tests and racing loads from some
tests against API calls from other tests, etc.  It's a wonder it ever managed
to pass, independent of these patches (and in fact it doesn't pass according to
wpt.fyi data, even in Firefox).

The changes in html/browsers/history/the-history-interface are because
document.open() no longer adds history entries.  The test was failing in all
other browsers for the same reason.

The changes in html/browsers/history/the-location-interface are because
reloading a document.open()-created thing now loads the URL of the page that
was the entry document for the open() call.  The test was failing in all other
browsers.

The change to reload_document_open_write.html is because we now reload the url
of the document that entered the script that called open() when we reload, not
the written content.  Other browsers were failing this test too; Gecko with
the old document.open implementation was the only one that passed.

The change to http-refresh.py is to fix a test bug: it was not returning a
Content-Type header, so we were putting up helper app dialogs, etc.

The change to test_ext_contentscript.js is because we no create a new global
for document.open() calls.  Kris Maglione OKed this part.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 23:24:48 +00:00
Jonathan Kingston
f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston
c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston
f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Ciure Andrei
b7e9c5588b Backed out changeset 2c0ca241bd4b (bug 1519621) for frame-reconstruction-scroll-clamping.html high frequency failures CLOSED TREE 2019-02-28 01:52:04 +02:00
Ciure Andrei
56434d5988 Backed out 2 changesets (bug 1509466) for rusttests build bustages CLOSED TREE
Backed out changeset 65c438efa01f (bug 1509466)
Backed out changeset e1cdaf345c39 (bug 1509466)
2019-02-28 01:29:15 +02:00
Brian Birtles
bcad38978b Bug 1509466 - Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
As per the following change to the HTML spec:

  86b05f8a07

when running a requestAnimationFrame callback it should be possible to cancel
another requestAnimationFrame callback scheduled to run in the same frame by
using cancelAnimationFrame.

See issue:

  https://github.com/whatwg/html/issues/4359

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

--HG--
extra : moz-landing-system : lando
2019-02-27 10:18:48 +00:00
Brian Birtles
c2a7b658ea Bug 1509466 - Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre
In the next patch in this series we want to compare the handle of frame
callbacks we are about to run,  with a set of canceled handles stored on the
document. This patch makes us pass the handles along with the callbacks so we
can do that.

Incidentally doing this allows us to just swap array elements when building up
the refresh driver's set of callbacks to run. That is hopefully a little more
efficient than running the implicit conversion operator on each item and then
appending to an array.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 13:43:23 +00:00
Botond Ballo
34d9171482 Bug 1519621 - Make sure ScrollToRestoredPosition() restores both the layout and visual scroll positions. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D18367

--HG--
extra : moz-landing-system : lando
2019-02-27 20:19:33 +00:00
Ehsan Akhgari
f9817933f0 Bug 1531019 - Ignore the return value of IsSelectable in order to make sure Coverity isn't confused by unchecked return value with IsSelectable returning a boolean; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D21362

--HG--
extra : moz-landing-system : lando
2019-02-27 16:25:52 +00:00
arthur.iakab
20c9fd087e Bug 1525117 - disable long-url-list-stack-overflow.html on Windows 7 debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D21165

--HG--
extra : moz-landing-system : lando
2019-02-26 11:09:24 +00:00