Commit Graph

12158 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
0b0dd2d95f Bug 1512328 - Use cbindgen for a couple more CSS properties. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D13886
2018-12-07 15:06:07 -05:00
Bastien Orivel
e648c4dee9 Bug 1511811 - Update syn and related dependencies. r=emilio 2018-12-07 09:00:20 -05:00
Daniel Varga
860ad350dd Merge mozilla-central to autoland. a=merge
--HG--
extra : rebase_source : 8ee1e412347621306f50b7d0dd1d8121ddcd498e
2018-12-06 23:48:46 +02:00
Olli Pettay
1ceeb71b80 Bug 1512256 - Move FragmentOrElement::mAttrs to Element, r=ehsan 2018-12-06 15:58:40 +02:00
Cameron McCormack
4ec3ded8ab Bug 1511718 - Remove eSafeAgentSheetFeatures. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D13866

--HG--
extra : moz-landing-system : lando
2018-12-05 21:18:21 +00:00
Emilio Cobos Álvarez
79ea897cf5 Bug 1511811 - Minor build fixup after the Servo crossbeam_channel update. 2018-12-03 08:48:25 -05:00
Bastien Orivel
87addfd044 Bug 1511811 - Update crossbeam-channel to 0.3.
Cherry-picks https://github.com/servo/servo/pull/22142
2018-12-03 08:48:15 -05:00
Emilio Cobos Álvarez
c11d6bcf14 Bug 1511811 - Update Servo's version of encoding_rs. 2018-12-03 08:47:30 -05:00
Paul Rouget
f17cf51bfd Bug 1511811 - Update mozjs and enable 'init_once' feature for Android.
Cherry-picks https://github.com/servo/servo/pull/22200
2018-12-03 08:47:06 -05:00
Emilio Cobos Álvarez
59e1f1e9ec Bug 1511811 - Rustfmt new changes to ensure Servo-tidy doesn't complain. 2018-12-03 08:45:08 -05:00
Emilio Cobos Álvarez
41f6c49a69 Bug 1511811 - Make page-break-* Gecko-only.
Servo doesn't support it.
2018-12-03 08:44:49 -05:00
Emilio Cobos Álvarez
1f4fecfcd2 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:43:48 -05:00
shindli
6c6e4a960d Backed out 13 changesets (bug 1511811) for Btup bustages
Backed out changeset d71cde918f43 (bug 1511811)
Backed out changeset 0ae2634de8e1 (bug 1511811)
Backed out changeset 53d1f5ca4099 (bug 1511811)
Backed out changeset 5a08148928ef (bug 1511811)
Backed out changeset da7816ec50ef (bug 1511811)
Backed out changeset 5fe23889cccc (bug 1511811)
Backed out changeset 800bc60c75a7 (bug 1511811)
Backed out changeset 2392d8199cd0 (bug 1511811)
Backed out changeset 7bc486fbd195 (bug 1511811)
Backed out changeset d2c997426108 (bug 1511811)
Backed out changeset ddd573878432 (bug 1511811)
Backed out changeset 29c8ec1559a4 (bug 1511811)
Backed out changeset f5851346109d (bug 1511811)

--HG--
rename : third_party/rust/darling_core/src/macros_private.rs => third_party/rust/darling_core/src/macros.rs
2018-12-03 15:39:11 +02:00
Emilio Cobos Álvarez
ee324a2b68 Bug 1511811 - Minor build fixup after the Servo crossbeam_channel update. 2018-12-03 08:15:30 -05:00
Emilio Cobos Álvarez
9ba570d998 Bug 1511811 - Go back to bindgen 0.43 since I can't manage to make the tup build succeed. 2018-12-03 08:15:29 -05:00
Emilio Cobos Álvarez
bd99a5f577 Bug 1511811 - Fix formatting of inverse transform matrix to appease tidy. 2018-12-03 08:15:27 -05:00
Bastien Orivel
768dd101be Bug 1511811 - Update crossbeam-channel to 0.3.
Cherry-picks https://github.com/servo/servo/pull/22142
2018-12-03 08:15:26 -05:00
Emilio Cobos Álvarez
6461b805b2 Bug 1511811 - Update Servo's version of encoding_rs. 2018-12-03 08:15:24 -05:00
Paul Rouget
0faf4cc0c4 Bug 1511811 - Update mozjs and enable 'init_once' feature for Android.
Cherry-picks https://github.com/servo/servo/pull/22200
2018-12-03 08:15:23 -05:00
Emilio Cobos Álvarez
920bd15066 Bug 1511811 - Make page-break-* Gecko-only.
Servo doesn't support it.
2018-12-03 08:15:22 -05:00
Emilio Cobos Álvarez
6359ab5223 Bug 1511811 - Use https for the MPL license URL.
Cherry-picks https://github.com/servo/servo/pull/22198
2018-12-03 08:15:21 -05:00
Emilio Cobos Álvarez
f2451c8b17 Bug 1511811 - Rustfmt new changes to ensure Servo-tidy doesn't complain. 2018-12-03 08:15:19 -05:00
Bastien Orivel
d9cbef23e2 Bug 1511811 - Update syn and related dependencies. r=emilio 2018-12-03 08:15:15 -05:00
Emilio Cobos Álvarez
b54948124d Bug 1509717 - Use cbindgen for border-style and outline-style. r=heycam
I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 05:27:28 +00:00
Emilio Cobos Álvarez
31b0b0f833 Bug 1509717 - Move BorderStyle to border.rs. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D12858

--HG--
extra : moz-landing-system : lando
2018-11-30 05:16:52 +00:00
Emilio Cobos Álvarez
c279a94301 Bug 775618 - Implement page-break-{before,after} as legacy shorthands for {before,after}. r=heycam
This is all the style-system work needed for this.

This implements the concept of legacy shorthands, teaches tests to understand
it, and adds a few more tests for these properties in particular.

The WPT even caught a few WebKit / Blink bugs:

  https://bugs.chromium.org/p/chromium/issues/detail?id=906336
  https://bugs.webkit.org/show_bug.cgi?id=191803

This doesn't change the layout behavior for page-break-before: always, since
it'd stop breaking in multicol and such. Similarly, break-before / break-after:
column and page still behave the same, I'll file followups for those given
comment 22.

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

--HG--
extra : moz-landing-system : lando
2018-11-30 05:35:47 +00:00
Emilio Cobos Álvarez
cd451a8c96 Bug 775618 - Introduce the concept of legacy shorthands. r=heycam
We need this because there's a weird mapping between these properties' values
('always' maps to 'page').

See https://drafts.csswg.org/css-cascade-4/#legacy-shorthand.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 04:39:36 +00:00
Emilio Cobos Álvarez
c76f00a8ad Bug 775618 - Introduce break-inside, and alias page-break-inside to it. r=heycam
This property has no weird value mapping, so we can just do this.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 05:07:52 +00:00
Shubham Kumaram
b87c4f4c0c Bug 1509664 - Change Text Rendering constants to enum classes in nsStyleConsts.h. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D12839

--HG--
extra : moz-landing-system : lando
2018-11-30 05:08:46 +00:00
Emilio Cobos Álvarez
e119964c92 Bug 1510862 - Prevent exponential blowup of custom properties. r=jwatt
Put a hard cap on the value length instead of counting substitutions, because it
works best, see the comment.

Differential Revision: https://phabricator.services.mozilla.com/D13352
2018-11-29 12:14:01 +01:00
Dorel Luca
12d48b559b Backed out changeset 3e5ea9da2cbb (bug 1510862) for Linting failure. CLOSED TREE 2018-11-29 12:35:42 +02:00
Emilio Cobos Álvarez
6ae5fdab0a Bug 1510862 - Prevent exponential blowup of custom properties. r=jwatt
Put a hard cap on the value length instead of counting substitutions, because it
works best, see the comment.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:16:38 +00:00
Hiroyuki Ikezoe
22056382c0 Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 00:58:46 +00:00
Andreea Pavel
f97b59258b Backed out 2 changesets (bug 1504065) for failing Win reftest at child-in-animating-element-display-none.html on a CLOSED TREE
Backed out changeset 129188370231 (bug 1504065)
Backed out changeset 359e81b35cfb (bug 1504065)
2018-11-27 15:33:29 +02:00
Hiroyuki Ikezoe
212fa4884a Bug 1504065 - Run background-color animations on the compositor. r=birtles
Changes for nsIDOMWindowUtils.getOMTAValue is in the next commit with come test
cases.

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

--HG--
extra : moz-landing-system : lando
2018-11-27 09:26:51 +00:00
Emilio Cobos Álvarez
ef08f4f834 Bug 1509945 - Remove the display: -moz-box overrides display: -webkit-box hack. r=dholbert
display: -moz-box is no longer exposed to content so this is not necessary.

See bug 1407701 for context.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 18:56:14 +00:00
Emilio Cobos Álvarez
9ed36d7ba6 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 09:21:37 +00:00
Brindusan Cristian
31f0c21cca Backed out changeset 1575904619b5 (bug 1506547) for mochitest failures on test_reftests_with_caret.html. 2018-11-26 03:03:14 +02:00
Emilio Cobos Álvarez
b74c31e4d9 Bug 1506547 - Align user-select behavior more with other UAs. r=mats
There's a few subtle behavior changes here, which I'll try to break down in the
commit message.

The biggest one is the EditableDescendantCount stuff going away. This
was added in bug 1181130, to prevent clicking on the non-editable div from
selecting the editable div inside. This is problematic for multiple reasons:

 * First, I don't think non-editable regions of an editable element should
   be user-select: all.

 * Second, it just doesn't work in Shadow DOM (the editable descendant count is
   not kept up-to-date when not in the uncomposed doc), so nested
   contenteditables behave differently inside vs. outside a Shadow Tree.

 * Third, I think it's user hostile to just entirely disable selection if you
   have a contenteditable descendant as a child of a user-select: all thing.

   WebKit behaves like this patch in the following test-case (though not Blink):

     https://crisal.io/tmp/user-select-all-contenteditable-descendant.html

   Edge doesn't seem to support user-select: all at all (no pun intended).

   But we don't allow to select anything at all which looks wrong.

 * Fourth, it's not tested at all (which explains how we broke it in Shadow DOM
   and not even notice...).

In any case I've verified that this doesn't regress the editor from that bug. If
this regresses anything we can fix it as outlined in the first bullet point
above, which should also make us more compatible with other UAs in that
test-case.

The other change is `all` not overriding everything else. So, something like:

  <div style="-webkit-user-select: all">All <div style="-webkit-user-select: none">None</div></div>

Totally ignores the -webkit-user-select: none declaration in Firefox before this
change. This doesn't match any other UA nor the spec, and this patch aligns us
with WebKit / Blink.

This in turn makes us not need -moz-text anymore, whose only purpose was to
avoid this.

This also fixes a variety of bugs uncovered by the previous changes, like the
SetIgnoreUserModify(false) call in editor being completely useless, since
presShell->SetCaretEnabled ended in nsCaret::SetVisible, which overrode it.

This in turn uncovered even more bugs, from bugs in the caret painting code,
like not checking -moz-user-modify on the right frame if you're the last frame
of a line, to even funnier bits where before this patch you show the caret but
can't write at all...

In any case, the new setup I came up with is that when you're editing (the
selection is focused on an editable node) moving the caret forces it to end up
in an editable node, thus jumping over non-editable ones.

This has the nice effect of not completely disabling selection of
-moz-user-select: all elements that have editable descendants (which was a very
ad-hoc hack for bug 1181130, and somewhat broken per the above), and also
not needing the -moz-user-select: all for non-editable bits in contenteditable.css
at all.

This also fixes issues with br-skipping like not being able to insert content in
the following test-case:

  <div contenteditable="true"><span contenteditable="false">xyz </span><br>editable</div>

If you start moving to the left from the second line, for example.

I think this yields way better behavior in all the relevant test-cases from bug
1181130 / bug 1109968 / bug 1132768, shouldn't cause any regression, and the
complexity is significantly reduced in some places.

There's still some other broken bits that this patch doesn't fix, but I'll file
follow-ups for those.

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

--HG--
extra : moz-landing-system : lando
2018-11-25 20:01:07 +00:00
Margareta Eliza Balazs
876022232b Merge inbound to mozilla-central. a=merge 2018-11-22 11:21:21 +02:00
Coroiu Cristina
5b23f6f303 Merge mozilla-central to autoland a=merge 2018-11-22 06:33:06 +02:00
Hiroyuki Ikezoe
1c6d6276f9 Bug 1506988 - Set the important rule change flag when a newly important rule is inserted. r=birtles
Without this change an assertion checking IsInStyleRefresh() in
EffectCompositor::PostRestyleForAnimation will be hit when we call
FindAnimationsForCompositor from RestyleManager::DoProcessPendingRestyles
that will be introduced in a subsequent commit in this series.

I wrote a crash test which causes an assertion in KeyframeEffect::CanThrottle()
without the subsequent commit, but we need more work in display item stuff to
make the assertion won't happen (bug 1508466).

Depends on D12367

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

--HG--
extra : moz-landing-system : lando
2018-11-22 04:03:06 +00:00
Mats Palmgren
91372ff9f3 Bug 1507905 - Add -webkit-appearance:textarea and make that the default for <textarea> for compatibility with other UAs. r=jwatt 2018-11-21 22:05:20 +01:00
Cameron McCormack
9c372819c4 Bug 1508013 - Run rustfmt on servo/ports/geckolib/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D12206

--HG--
extra : moz-landing-system : lando
2018-11-20 04:37:53 +00:00
Andreea Pavel
72b0594cb8 Merge mozilla-inbound to mozilla-central. a=merge 2018-11-17 13:27:24 +02:00
Emilio Cobos Álvarez
77a61b05f9 Bug 1508026 - Cherry-pick some changes to malloc_size_of's Cargo.toml. 2018-11-17 10:01:59 +01:00
CYBAI
7433c9192b Bug 1508026 - Fix wrong spec link. r=emilio
This cherry-picks servo/servo#22172.
2018-11-17 10:01:31 +01:00
Emilio Cobos Álvarez
bdd6cb8f48 Bug 1508026 - Fix formatting. 2018-11-17 10:01:24 +01:00
Boris Chiou
e2fc919e91 Bug 1464791 - Add comments for the calculation of Procedure::Add on Scale and transform list. r=birtles
Add more comments to let people know the intention of the special case.

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

--HG--
extra : moz-landing-system : lando
2018-11-16 19:06:16 +00:00
Boris Chiou
727ec2b557 Bug 1424134 - Part 4: Expand the mako code of Matrix3D and move them into transform.rs. r=emilio
Although the methods of Matrix3D in animated_properties.mako.rs could be
simplified by mako, it's a little bit hard to read because they are far
from the usage and definition. Therefore, we move them to the definition of
computed::Matrix3D and expand the mako.

Depends on D11935

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

--HG--
extra : moz-landing-system : lando
2018-11-16 19:29:28 +00:00