Граф коммитов

12263 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 318ef24ef6 Bug 1492958 - Remove unimplemented values of the user-select property. r=mats
Can't believe we literally had no code to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D11581
2018-11-12 13:47:40 +01:00
Emilio Cobos Álvarez 33b3044c08 Bug 1492958 - Move user-select outside of mako. r=xidorn
This is the first step to unprefix user-select.

This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).

Differential Revision: https://phabricator.services.mozilla.com/D11580
2018-11-12 13:46:52 +01:00
Margareta Eliza Balazs cccd9d1083 Backed out 5 changesets (bug 1492958) for bc failures in browser/base/content/test/static/browser_parsable_css.js CLOSED TREE
Backed out changeset d7c8793ee054 (bug 1492958)
Backed out changeset e59edfbbd327 (bug 1492958)
Backed out changeset 5e643bc2e17b (bug 1492958)
Backed out changeset 59cf251c1a59 (bug 1492958)
Backed out changeset edc955448df6 (bug 1492958)
2018-11-12 14:36:43 +02:00
Emilio Cobos Álvarez 3825f8f77b Bug 1492958 - Allow user-select: -moz-text on user-agent stylesheets only. r=mats
It's only used in contenteditable.css, and same usage in comm-central. That
sheet is loaded as a ua sheet so let's restrict it to that. No relevant
external usage either. This value was introduced in bug 1181130.

Differential Revision: https://phabricator.services.mozilla.com/D11584
2018-11-12 11:51:51 +01:00
Emilio Cobos Álvarez 740de114a9 Bug 1492958 - Remove user-select: -moz-all. r=mats
It's an attempt of an alias to `all`, except it doesn't get handled in all
places.

Seems unused both in comm-central and mozilla-central, and all external usage I
could find is followed by -webkit-user-select: all.

Differential Revision: https://phabricator.services.mozilla.com/D11582
2018-11-12 11:51:50 +01:00
Emilio Cobos Álvarez e0b5a6ba3e Bug 1492958 - Remove unimplemented values of the user-select property. r=mats
Can't believe we literally had no code to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D11581
2018-11-12 11:51:48 +01:00
Emilio Cobos Álvarez 47eb45a0b5 Bug 1492958 - Move user-select outside of mako. r=xidorn
This is the first step to unprefix user-select.

This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).

Differential Revision: https://phabricator.services.mozilla.com/D11580
2018-11-12 11:51:46 +01:00
Emilio Cobos Álvarez c316a1e452 No bug - Remove outdated comment. 2018-11-12 11:51:44 +01:00
Emilio Cobos Álvarez 03ce7b0699 Bug 1392185 - Remove dynamic HTML5 atoms. r=njn,hsivonen
This is a rebase + manual refcounting on some places, + cleanup of the original
patch in the bug.

Co-authored-by: Nicholas Nethercote <nnethercote@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D11035
2018-11-09 14:45:30 +01:00
Gurzau Raul ff7bbb9936 Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : dom/media/ipc/RemoteVideoDecoder.cpp => dom/media/ipc/GpuDecoderModule.cpp
rename : dom/media/ipc/RemoteVideoDecoder.h => dom/media/ipc/GpuDecoderModule.h
extra : rebase_source : 0503e2d45fffafb1e8dd1ddcd2115af2778a5c66
2018-11-09 07:46:56 +02:00
Mats Palmgren 754a89bb89 Bug 1501506 - Add -webkit-appearance:progress-bar and make that the default for <progress> for compatibility with other UAs. r=jwatt
Keep our old 'progressbar' as an alias for now, but unship
'progresschunk' by restricting it to UA/chrome sheets only.
Unship 'progresschunk-vertical' by removing it since it's
not used internally for anything.
2018-11-09 04:25:56 +01:00
Mats Palmgren 2882783137 Bug 1501483 - Add -webkit-appearance:meter and make that the default for <meter> for compatibility with other UAs. r=jwatt
Keep our old value 'meterbar' as an alias for now, but unship 'meterchunk'
by restricting it to UA/chrome sheets only.
2018-11-09 04:25:56 +01:00
Emilio Cobos Álvarez 4a4b56f77f Bug 1505565 - Split up push_applicable_declarations. r=heycam
Introduce RuleCollector, which contains all the state we need during the
cascade, and allows to reuse a bit of code.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 23:07:40 +00:00
Emilio Cobos Álvarez b96f400afd Bug 1505816 - Cleanup text-align. r=heycam
Use derive(FromPrimitive) instead.

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

--HG--
extra : moz-landing-system : lando
2018-11-08 22:57:18 +00:00
Emilio Cobos Álvarez 56f2b4fded Bug 1505786 - Implement overflow-wrap: anywhere. r=xidorn,jfkthame
Per https://github.com/w3c/csswg-drafts/issues/2682

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

--HG--
extra : moz-landing-system : lando
2018-11-08 22:39:34 +00:00
Ting-Yu Lin d1f5945760 Bug 1421105 Part 4 - Enable CSS column-span in UA stylesheet, and update test expectations. r=dbaron
We use "column-span: all" in ua.css in Part 3. To be able to flip the pref
in individual wpt tests, we need column-span to be always enabled
in UA stylesheets.

Depends on D5210

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

--HG--
extra : moz-landing-system : lando
2018-10-27 06:14:13 +00:00
Emilio Cobos Álvarez 7fd8b03229 Bug 1505213 - Allow ::slotted()::placeholder. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D11132

--HG--
extra : moz-landing-system : lando
2018-11-08 13:33:59 +00:00
Emilio Cobos Álvarez cef8f5cd0c Bug 1505618 - Some minor follow-up formatting nits. 2018-11-08 01:05:36 +01:00
Emilio Cobos Álvarez 5c47b93415 Bug 1505618 - Add Servo's rustfmt.toml to the servo/ directory. r=heycam 2018-11-08 00:50:17 +01:00
Emilio Cobos Álvarez 176fa6315c Bug 1505618 - Import formatting changes from servo/servo#22126. 2018-11-08 00:50:12 +01:00
Emilio Cobos Álvarez 53c419d84d Bug 1505618 - Fix code style of a recent commit. 2018-11-08 00:50:05 +01:00
Boris Chiou d781fa81ce Bug 1500107 - Fix the default behavior of scale:<number>{1}. r=birtles
The current spec says: "If only the X value is given, the Y value
defaults to the same value.", so we should update the behavior.

Besides, we also update the serialization, so we serialization both
specified and computed value by servo. We enable the preference
for all the css-transforms, so some of them are passed now.

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

--HG--
extra : moz-landing-system : lando
2018-11-06 23:44:24 +00:00
Emilio Cobos Álvarez 3765945097 Bug 1504034 - followup post-review nit. r=heycam 2018-11-07 00:41:40 +01:00
Cameron McCormack 3f7283c980 Bug 1504034 - Followup to address review comments. r=emilio 2018-11-07 00:12:07 +01:00
Cameron McCormack 17ce17ad00 Bug 1504034 - Part 3: Store the Rust QuotePair slice as the computed quotes value in Gecko style structs r=emilio
Depends on D10651

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

--HG--
extra : moz-landing-system : lando
2018-11-06 23:03:24 +00:00
Cameron McCormack 456c4dd5c4 Bug 1504034 - Part 1: Make quotes property representation allocate less r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D10650

--HG--
extra : moz-landing-system : lando
2018-11-06 23:03:33 +00:00
Cameron McCormack d10e0ca0c2 Bug 1501261 - Part 2: Serialize `background-size: auto auto` as "auto" r=firefox-style-system-reviewers,emilio
With this change, all of Chrome, Edge, Firefox, and Safari serialize
background-size by omitting the second "auto" if the value is "auto
auto".  Other keywords are still repeated.

Depends on D10445

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

--HG--
extra : moz-landing-system : lando
2018-11-05 02:21:41 +00:00
Ting-Yu Lin f1ae18f596 Bug 1504387 - Remove preference "layout.css.shape-outside.enabled". r=bradwerth,xidorn
shape-outside, shape-margin, shape-image-threshold have been shipped in Firefox
62. We can remove the preference.

The change in devtools/shared/css/generated/properties-db.js is generated by
"./mach devtools-css-db"

The actual shape-image CORS mode tests in file_shape_outside_CORS.html are
moved into test_shape_outside_CORS.html because we don't need the <iframe>
trick to enable the feature.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 15:27:36 +00:00
Emilio Cobos Álvarez 8babb8a035 Bug 1504644 - Fix servo build. 2018-11-05 12:47:03 +01:00
Emilio Cobos Álvarez 0fce47dc20 Bug 1504644 - Fix tidy issues. 2018-11-05 12:25:59 +01:00
Emilio Cobos Álvarez dddb8d0f6a Bug 1504644 - Cherry-pick servo/servo#21644. 2018-11-05 12:25:24 +01:00
Emilio Cobos Álvarez 5d6e408a75 Bug 1462233 - Simplify invalid custom property handling. r=xidorn
It's a bit useless to keep a set of invalid properties if we're going
to use them just to reject lookups into another key. This makes it more
consistent with the cascade / no-references code, and should not change
behavior.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 10:42:12 +00:00
Emilio Cobos Álvarez bc8766b7fc Bug 1462233 - Implement the env() function with hardcoded zeros for safe-area-inset. r=heycam,firefox-style-system-reviewers
Intent to Implement and Ship: https://groups.google.com/d/msg/mozilla.dev.platform/EVKyR1B87T0/_l-_qK8SAAAJ

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

--HG--
extra : moz-landing-system : lando
2018-11-05 10:39:46 +00:00
Emilio Cobos Álvarez 82d06eb342 Bug 1504536 - Simplify the SVG animation code. r=hiro,heycam
It's overly generic for no good reason.

Differential Revision: https://phabricator.services.mozilla.com/D10844
2018-11-05 10:36:07 +01:00
Emilio Cobos Álvarez 41b924baf1 Bug 1504536 - Move animation of svg-related bits outside of animated_properties. r=hiro
Being in mako is unnecessary, and makes it harder to debug and such.

Differential Revision: https://phabricator.services.mozilla.com/D10843
2018-11-05 10:35:55 +01:00
Emilio Cobos Álvarez 53dca96aa3 Bug 1504536 - Remove nscsspropertyid_is_{animatable,transitionable}. r=hiro
There are better ways, plus the existing code didn't handle aliases at
all (not that it needed to, but it's better if it does).

Differential Revision: https://phabricator.services.mozilla.com/D10838
2018-11-05 10:35:44 +01:00
Emilio Cobos Álvarez c2a166db23 Bug 1504536 - Move various font-related animation code to its own file. r=hiro
Similarly, the code is not trivial and doesn't really need to be in
mako.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:18:18 +00:00
Emilio Cobos Álvarez 0549a1d065 Bug 1504536 - Move various length animation implementations to its own file. r=hiro
It's nicer, I think.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:16:07 +00:00
Emilio Cobos Álvarez ecf9afe80c Bug 1504536 - Move the keyframes property priority stuff outside of animated_properties. r=hiro
Similarly, no need to be here.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:12:24 +00:00
Emilio Cobos Álvarez d6b32c443b Bug 1504536 - Move shorthand IDL order stuff out of animated_properties. r=hiro
Doesn't really need to be in a mako file.

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

--HG--
extra : moz-landing-system : lando
2018-11-04 23:10:17 +00:00
Emilio Cobos Álvarez 3a9e249141 Bug 1502751 - Don't keep a separate list of ignored-when-colors-disabled longhands. r=heycam
Most of the change is moving sets around to be static functions on
LonghandIdSet. I think I like that pattern, but I can also make the new set a
global static and add mako code to be `pub` or something.

Though I think the LonghandIdSet::foo().contains(..) pattern is nice to read :)

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

--HG--
extra : moz-landing-system : lando
2018-11-05 00:16:58 +00:00
Emilio Cobos Álvarez bb25a09e27 Bug 1502893 - Don't match document author rules if not needed for revalidation. r=heycam,firefox-style-system-reviewers
When you're in a ShadowRoot and can share style with a sibling, the sharing code
is smart enough to skip document author rules.

But then it could get confused if you also include document rules, since
revalidation selectors are matched against these.

This is not a correctness issue, because we're matching more than what we need,
and avoid sharing if we failed.

Also fix the detection for user rules in any_applicable_rule_data.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 00:05:12 +00:00
Emilio Cobos Álvarez c52a218234 Bug 1504078 - Use references in the shapes code. r=bradwerth,TYLin
It doesn't make much sense to return const UniquePtr<Foo>& for something that
can't be null, it's just confusing.

Also make more stuff actually const.

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

--HG--
extra : moz-landing-system : lando
2018-11-02 18:19:06 +00:00
Boris Chiou e3efce4cc6 Bug 1501117 - Part 2: Serialize timing function from web animation api with servo. r=emilio,birtles
It's worth to serialize the timing function from web animation api with
servo, too. However, we need an FFI to do that, so this patch also add a
new FFI.

Depends on D10443

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

--HG--
extra : moz-landing-system : lando
2018-11-01 21:33:56 +00:00
Cameron McCormack 53d47bc1b0 Bug 1496617 - Part 2: Fix inconsistent CRISPEDGES constant name r=emilio
Depends on D10451

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

--HG--
extra : moz-landing-system : lando
2018-11-01 01:37:26 +00:00
Cameron McCormack a94e23e1cd Bug 1496617 - Part 1: Support unprefixed image-rendering:crisp-edges r=firefox-style-system-reviewers,emilio
For now, we keep supporting the prefixed version, since there are examples/instructions
on the Web that don't include an unprefixed value.

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

--HG--
extra : moz-landing-system : lando
2018-11-01 01:35:26 +00:00
Cameron McCormack b74ebf7c27 Bug 1497076 - Handle reversed ranges in @font-face descriptors r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D10327

--HG--
extra : moz-landing-system : lando
2018-10-31 10:40:56 +00:00
Boris Chiou 72e9ae1148 Bug 1501116 - Part 8: Drop "mozilla" prefix in cbindgen_types in ServoBindings.toml. r=emilio
A minor update to drop the redundant "mozilla" namespace prefix in
`cbindgen_types` array.

Depends on D10305

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

--HG--
extra : moz-landing-system : lando
2018-10-31 10:58:24 +00:00
Boris Chiou 3219a21d7b Bug 1501116 - Part 6: Use alias for StylePathCommand. r=emilio
So we could drop transmute in svg_path related functions.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:32 +00:00
Boris Chiou 2b5db49d22 Bug 1501116 - Part 5: Use alias for StyleFillRule. r=emilio
This needs to update the "fill-rule" and "clip-rule" to use
predefined_type to avoid some compilation errors.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 10:57:48 +00:00
Boris Chiou 3ff7857977 Bug 1501116 - Part 4: Use alias for font related types. r=emilio
Map the following types:
1. StyleComputedFontWeightRange.
2. StyleComputedFontStretchRange.
3. StyleComputedFontStyleDescriptor.
4. StyleFontDisplay.
5. StyleFontFaceSourceListComponent
6. StyleFontLanguageOverride.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:15 +00:00
Boris Chiou 82b7d6a4e9 Bug 1501116 - Part 3: Use alias for StyleDisplay and StyleDisplayMode. r=emilio
Map these two types to their original rust type in rust-bindgen.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:07 +00:00
Boris Chiou e09f87319f Bug 1501116 - Part 2: Use alias for StyleAppearance. r=emilio
So we could avoid generating it in rust-bindgen and drop transmute.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:20:00 +00:00
Boris Chiou 7e0bfa77d7 Bug 1501116 - Part 1: Add a special list for cbindgen types to avoid generating redundant rust types. r=emilio
We will blacklist this type and add a module raw line to map the gecko
type to its rust type (as an alias).

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

--HG--
extra : moz-landing-system : lando
2018-10-31 06:19:52 +00:00
Ciure Andrei 608de3193c Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-10-31 00:14:49 +02:00
Brian Birtles b1132a8092 Bug 1501176 - Interpolate the angle between mis-matched rotate() functions when the angle of one is zero; r=hiro
--HG--
extra : rebase_source : b94d2751404db1a0b52b2e943da06bd3f9d82660
2018-10-30 19:57:46 +09:00
Emilio Cobos Álvarez b85791110f Bug 1503401 - Update cbindgen due to breaking change. r=boris
https://github.com/eqrion/cbindgen/pull/233 changed the way one of the options
we use work.

I think the new behavior is better, but we should do this sooner rather than
later, and fix broken builds.

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

--HG--
extra : moz-landing-system : lando
2018-10-30 21:25:17 +00:00
Emilio Cobos Álvarez d62f59fe3d Bug 1502617 - Support ::before / ::after on ::slotted pseudos. r=heycam
See https://github.com/w3c/csswg-drafts/issues/3150 for the issue that would
expand this to all pseudos.

Differential Revision: https://phabricator.services.mozilla.com/D9994
2018-10-29 23:42:22 +01:00
Sean Voisen 7b694bc60c Bug 1430969: Ignore border-image-source when overriding document colors r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D10017

--HG--
extra : moz-landing-system : lando
2018-10-29 10:38:50 +00:00
Emilio Cobos Álvarez 21bd600cbd Bug 1497389 - Add a fast path for querySelector{,All} when we have classes or tags in the rightmost compound. r=heycam,firefox-style-system-reviewers
Before this patch we were only optimizing the case of a single selector, which
is fine, but not enough to catch ones like .foo .bar or so.

This patch allows us to optimize classes and tags in the rightmost compound,
while keeping the current optimization for #id selectors.

Need to profile this, but code-wise should be ready for review.

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

--HG--
extra : moz-landing-system : lando
2018-10-29 12:04:25 +00:00
Emilio Cobos Álvarez 968454aa33 Bug 1502185 - Don't allow auto in grid line names. r=mats
See https://github.com/w3c/csswg-drafts/issues/2856.

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

--HG--
extra : moz-landing-system : lando
2018-10-28 23:26:53 +00:00
Cosmin Sabou b722307359 Merge inbound to mozilla-central. a=merge 2018-10-29 06:17:11 +02:00
Emilio Cobos Álvarez d6266e508a Bug 1502754 - Synchronize style system unit tests.
These are not part of the Gecko build, just prevent that they end up out of
sync.
2018-10-29 00:11:39 +01:00
Emilio Cobos Álvarez 585bf5454b Bug 1502754 - Fix Servo build and tidy lints. 2018-10-29 00:11:37 +01:00
Mats Palmgren 5f7f645601 Bug 1501908 - Force line-height:normal for themed comboboxes for compat with other UAs. r=emilio 2018-10-28 23:00:13 +01:00
Emilio Cobos Álvarez 9f8636dee7 Bug 1500885 - Remove tests and other similar bits. r=mats
Also remove specified-value-only keywords, since those are handled
only in Rust code and C++ doesn't need to know about them.

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

--HG--
extra : moz-landing-system : lando
2018-10-24 20:32:16 +00:00
Emilio Cobos Álvarez 9e99ffed7b Bug 1502679 - Properly handle exhaustive matches in animation keywords to avoid a warning.
Need to do the gecko_inexhaustive thing because those animation properties have
an EndGuard_ generated by IPDL I suspect.
2018-10-27 23:47:34 +02:00
Emilio Cobos Álvarez 0aa7e19522 Bug 1416282 - Assert earlier to try to get a more helpful stack. 2018-10-27 13:18:18 +02:00
Emilio Cobos Álvarez 802b24d578 Bug 1416282 - Back out diagnostics for not being helpful enough at diagnosing.
The selectors that crash seem just corrupted data structures, none of the
selectors from crash dumps make sense, and the ones for which I could trace the
source found no issue.
2018-10-27 13:17:32 +02:00
Boris Chiou 3015824e8d Bug 1496619 - part 7: Implement steps(jump-*) functions r=birtles
1. Add a new preference, layout.css.step-position-jump.enabled, for
   step(_, jump-*) timing functions.
2. We still keep JumpEnd and End tags, even though there is no difference
   between them. Therefore, we could disable the preference if needed.
3. Update the calculation of StepTiming to match the algorithm in the spec.
4. For servo, we implement the correct step function algorithm except
   for the handling of before_flag. This could be fixed later.

Depends on D9313

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:37 +00:00
Boris Chiou 04b273259e Bug 1496619 - part 6: Generate StyleTimingFunction and drop ns_timing_function.rs r=emilio,birtles
First, we generate StyleComputedTimingFunction by cbindgen from Rust, and use
it in nsTimingFunction, so we could copy it directly without handling
the different memory layout. However, we have to rewrite the
nsTimingFunction and mozilla::ComputedTimingFunction for this.

Second, the rust-bindgen seems cannot generate the correct generic members
from complex C++ templates, especially for the nested template struct,
(https://github.com/rust-lang-nursery/rust-bindgen/issues/1429)
So we have to hide StyleTimingFunction to avoid the compilation errors.

Depends on D9312

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:35 +00:00
Boris Chiou c3df288596 Bug 1496619 - Part 4: Replace u32 with computed::Integer for computed::TimingFunction r=emilio
We make sure the step number is always positive, so using
computed::Integer is safe and can derive ToComputedValue.

Depends on D9311

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:31 +00:00
Boris Chiou 368a3350df Bug 1496619 - Part 3: Split TimingFunction into a separate file to match spec r=emilio
TimingFunction is defined in a separate spec (i.e. css-easing), instead
of transform, so we move it into a different file.

Depends on D9310

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:29 +00:00
Boris Chiou adff31eff9 Bug 1496619 - Part 1: Drop frames() timing function r=birtles
frames() timing function was removed from the spec, so we drop it.
Besides, some devtool tests are removed because they use frame(). I will
add them back by using new step function later.

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

--HG--
extra : moz-landing-system : lando
2018-10-26 18:03:24 +00:00
Brian Birtles 99201827d6 Bug 1500820 - Compare absolute dot-product to 1.0 when interpolating quaternions; r=hiro
See the extended commit message for the following spec change:

  6b36d41ebc

Basically, by failing to take the absolute value, for certain content we can end
up doing division by zero which will mean that the test included in this patch
will cause an assertion to fail in debug builds and return
"matrix(NaN, NaN....)" in release builds.

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

--HG--
extra : moz-landing-system : lando
2018-10-24 07:06:43 +00:00
tb120 e996e1e744 Convert NS_STYLE_ANIMATION_PLAY_STATE_* to scoped enum StyleAnimationPlayState (Bug 1500439) r=emilio
This change removes directives NS_STYLE_ANIMATION_PLAY_STATE_* and replaces the values with those from a scoped enum called StyleAnimationPlayState.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 21:58:01 +00:00
Sebastian Hengst 602fbb8422 merge mozilla-inbound to mozilla-central. a=merge 2018-10-22 20:26:16 +03:00
Emilio Cobos Álvarez 3f8b370d35 Bug 1500849 - Update bindgen. r=heycam,bbouvier
This pulls a new nom version, which is slightly unfortunate, but I do want some
of the fixes upstream, and it's build-only, so I think it's not a huge deal.

Differential Revision: https://phabricator.services.mozilla.com/D9362
2018-10-22 13:20:01 +02:00
Emilio Cobos Álvarez c47414a8f9 Bug 1500892 - Use searchfox links instead of dxr links for nsRuleNode. r=heycam,firefox-style-system-reviewers
Searchfox has better blame.

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

--HG--
extra : moz-landing-system : lando
2018-10-22 11:59:09 +00:00
Narcis Beleuzu 90d51e6cd9 Merge inbound to mozilla-central. a=merge 2018-10-19 16:11:27 +03:00
Brian Birtles fede6e4628 Bug 1472917 - Implement the even more forgiving interpolation rules for transform lists; r=hiro
As discussed in:

  https://github.com/w3c/csswg-drafts/issues/927

with tentative spec text:

  https://github.com/w3c/csswg-drafts/pull/3215

Depends on D9184

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

--HG--
extra : moz-landing-system : lando
2018-10-19 04:41:12 +00:00
Emilio Cobos Álvarez 6dff7031ef Bug 1500260 - Fix various tidy issues and Servo build. r=emilio 2018-10-19 01:17:24 +02:00
Josh Matthews 1feab6797d Bug 1500260 - Update servo malloc_size_of after webrender update. r=emilio
This cherry-picks part of servo/servo#21725.
2018-10-19 01:17:22 +02:00
Pyfisch dcc0b09eed Bug 1500260 - Use keyboard-types crate. r=emilio
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331

This cherry-picks part of servo/servo#21881.
2018-10-19 01:17:20 +02:00
Emilio Cobos Álvarez dc07212084 Bug 1500260 - More useful logging for transition-related stuff. r=emilio
Transitions are still broken, but I found these messages more helpful than the
previous ones when diagnosing problems.

This cherry-picks part of servo/servo#20757.
2018-10-19 01:17:18 +02:00
Emilio Cobos Álvarez 833de85131 Bug 1500260 - Expire keyframes animations when no longer referenced by the style. r=emilio
It's a long way to make this sound in general...

Fixes #20731

This cherry-picks part of servo/servo#20757.
2018-10-19 01:17:16 +02:00
Emilio Cobos Álvarez 9ee318b187 Bug 1500260 - Remove unused expired boolean in Animation::Transition. r=emilio
The last caller who used was #14418, which did fix a problem but introduced
multiple. In particular, now transitions don't get expired ever, until they
finish running of course.

That is not ok, given you can have something that the user can trigger to change
the style (hi, :hover, for example), and right now that triggers new
transitions, getting this into a really funny state.

I should give fixing this a shot, but it's non-trivial at all.

This cherry-picks part of servo/servo#20757.
2018-10-19 01:17:15 +02:00
Emilio Cobos Álvarez 3f29fd8d37 Bug 1500260 - Cleanup some of the animation starting code. r=emilio
This cherry-picks part of servo/servo#20757.
2018-10-19 01:17:13 +02:00
Emilio Cobos Álvarez cc4aeaeb05 Bug 1500260 - Stop using PseudoElement::inherits_all. r=emilio
This was done that way just because Servo didn't support the `all` property at
the time.

We should do it this way and optimize it if it's slow. Though I suspect that
most of stuff doesn't actually need to be inherited, my patch at bug 1498943
should make it much faster than what it would otherwise be.

This cherry-picks servo/servo#21946.
2018-10-19 01:17:11 +02:00
Emilio Cobos Álvarez 6bcab9b72b Bug 1499778 - Remove StaticId. r=xidorn
Destructors in statics are ok now.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 19:48:35 +00:00
Emilio Cobos Álvarez d7751dd7ee Bug 1499408 - followup test fix to the followup build fix. 2018-10-17 17:19:39 +02:00
Emilio Cobos Álvarez 81d70d88d1 Bug 1499386 - Implement @supports selector() syntax. r=heycam
This implements the selector(<complex-selector>) syntax for @supports.

See https://github.com/w3c/csswg-drafts/issues/3207 for explainer and
discussion.

Probably would should wait for that to be sorted out to land this, or maybe we
should put it behind a pref to get the code landed and change our
implementation if the discussion there leads to a change.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:08:14 +00:00
Cameron McCormack 13feafe016 Bug 1499408 - Followup build fix.
MozReview-Commit-ID: F88mB13Mwa1
2018-10-17 06:56:00 +03:00
Emilio Cobos Álvarez 410243369d Bug 1499603 - Clear host rules from clear_cascade_data. r=heycam
While at it, also measure them for about:memory.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 13:37:47 +00:00
Cameron McCormack 16007d2b66 Bug 1495984 - Make css::URLValue::IsLocalRef call into CssUrlData::is_fragment. r=emilio
This fixes the issue that we should no longer be looking for control characters.



MozReview-Commit-ID: 8k89Aheq3NY

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:45 +00:00
Cameron McCormack a7510da8d0 Bug 1499408 - Part 2: Have css::URLValue get URLExtraData from its CssUrlData. r=emilio
MozReview-Commit-ID: IqZGzkHlSZD

Depends on D8874

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

--HG--
extra : moz-landing-system : lando
2018-10-17 09:43:32 +00:00
Cameron McCormack b5d216cfa1 Bug 1499408 - Part 1: Make css::URLValue hold on to a CssUrlData, not just its serialization. r=emilio
MozReview-Commit-ID: EWcbnVtDJCS

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

--HG--
extra : moz-landing-system : lando
2018-10-17 12:36:49 +00:00
shindli 2eb594138a Merge inbound to mozilla-central. a=merge 2018-10-17 03:55:26 +03:00
Boris Chiou 8ad4fbf685 Bug 1496558 - Part 2: Move MozLength and MaxLength into generics r=emilio
Move MozLength and MaxLength into generics, and drop the manual implementation
of ToComputedValue.

Depends on D8290

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

--HG--
extra : moz-landing-system : lando
2018-10-16 01:07:41 +00:00
Boris Chiou 09a7c9a305 Bug 1496558 - Part 1: Store the correct computed values for keywords for sizing properties r=mats
In order to get the correct computed value of these keywords, we have to
make sure we store the correct computed values in sizing properties in
both inline axis and block axis.

-moz-max-content and -moz-min-content should behave as the property's
initial value in block axis. -moz-fit-content and -moz-available are not
supported in block axis, so we also treat them as initial values.

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

--HG--
extra : moz-landing-system : lando
2018-10-16 19:38:41 +00:00
Noemi Erli 014b37a409 Merge inbound to mozilla-central. a=merge 2018-10-16 01:20:08 +03:00
Emilio Cobos Álvarez 076f7d04f7 Bug 1498943 - Remove PseudoElement::inherits_all. r=heycam
I plan to change servo to use all: inherit on its UA sheet.

I hope the patch below should make it good enough performance-wise. And also,
it's probably broken so I don't think it's worth supporting it specially.

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

--HG--
extra : moz-landing-system : lando
2018-10-15 03:13:09 +00:00
Emilio Cobos Álvarez fae0e8e687 Bug 1498943 - Don't copy structs to write the same value to them. r=heycam
This makes us not allocate useless style structs when you're doing something
like resetting an already-reset property, or inheriting an already-inherited
property.

Seemed simple enough that I think we should do it. In practice we don't even
should pay an extra branch because I expect the compiler to be smart enough and
merge it with the one in the mutate() call.

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

--HG--
extra : moz-landing-system : lando
2018-10-15 03:04:44 +00:00
Cameron McCormack b43c0e36fb Bug 1498755 - Followup build fix. r=birtles 2018-10-14 21:24:00 +03:00
Benjamin Bouvier db0cd81fb4 Bug 1495669: Share bindgen flags globally; r=emilio, r=froydnj
--HG--
extra : rebase_source : 83bfa2a61e523048d0e618ed5920c4aa143a2582
extra : histedit_source : cfc8de67959c5a2dffc5fea3ee5be172bfc370e1%2C53a6b4c0de444b4a7ee04cdd015568069bca893a
2018-10-09 15:01:52 +02:00
Cameron McCormack 8fead1bc77 Bug 1497406 - Use helper function to set length and copy into nsTArrays of PODs from Rust r=boris
Differential Revision: https://phabricator.services.mozilla.com/D8058

--HG--
extra : moz-landing-system : lando
2018-10-09 08:49:51 +00:00
Cameron McCormack 332883a726 Bug 1498755 - Part 11: Move Gecko borrowed FFI types to a separate header file r=emilio
Depends on D8652

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:06:13 +00:00
Cameron McCormack ef98f7b9be Bug 1498755 - Part 10: Move list of Servo Boxed types to a separate header file r=emilio
Depends on D8651

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

--HG--
extra : moz-landing-system : lando
2018-10-14 00:06:05 +00:00
Cameron McCormack 0733335852 Bug 1498755 - Part 8: Add comments to ServoBindingTypes.h r=emilio
Depends on D8649

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

--HG--
extra : moz-landing-system : lando
2018-10-14 23:29:59 +00:00
Diego Pino Garcia 4520a114b1 Bug 1498148 - Implement text-transform: full-size-kana. r=xidorn 2018-10-14 09:42:24 +11:00
Noemi Erli e350ad46ad Backed out changeset a00b402fb8e8 (bug 1498148) for Linting failure in builds/worker/checkouts/gecko/tools/lint/wpt.yml CLOSED TREE 2018-10-14 00:12:12 +03:00
Diego Pino Garcia d8fa9f97a3 Bug 1498148 - Implement text-transform: full-size-kana. r=xidorn 2018-10-13 05:03:00 +03:00
Ciure Andrei 26b40a4469 Merge inbound to mozilla-central. a=merge 2018-10-13 12:36:04 +03:00
Emilio Cobos Álvarez 8eb1220474 Bug 1498734 - remove unneeded cast. r=me 2018-10-13 03:14:36 +02:00
Emilio Cobos Álvarez 40b1e83d81 Bug 1498734 - Always compute angle values to degrees. r=xidorn
This matches the spec, https://drafts.csswg.org/css-values/#angles, which says:

> All <angle> units are compatible, and deg is their canonical unit.

And https://drafts.csswg.org/css-values/#compat, which says:

>When serializing computed values [...], compatible units [...] are converted into a single canonical unit.

And also other implementations (Blink always serializes angles as degrees in
computed style for example).

Also allows us to get rid of quite a bit of code, and makes computed angle value
representation just a number, which is nice.

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

--HG--
extra : moz-landing-system : lando
2018-10-13 00:41:03 +00:00
Mats Palmgren 9ea1c13256 Bug 1496720 - [css-compat] Unship most of the -moz-appearance values that aren't supported by -webkit-appearance in other UAs. r=emilio 2018-10-12 21:36:02 +02:00
Emilio Cobos Álvarez 571fa7dcd9 Bug 1497986 - Some more nsCSSValue cleanup. r=mats
I had this around, I couldn't work on more stuff today, but I may as well land
this.

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

--HG--
extra : moz-landing-system : lando
2018-10-10 20:26:45 +00:00
Daniel Varga 2ad5744e7f Merge mozilla-central to mozilla-inbound. a=merge 2018-10-10 13:56:40 +03:00
Cameron McCormack eeb8da104f Bug 1495994 - Part 4: Merge css::{URLValueData, ImageValue} into css::URLValue r=emilio
Depends on D7595

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

--HG--
extra : moz-landing-system : lando
2018-10-10 02:58:20 +00:00
Emilio Cobos Álvarez 24a88a3376 Bug 1497607 - Fix some style issues caught by servo-tidy. r=me 2018-10-09 20:31:53 +02:00
Emilio Cobos Álvarez 8a3d09ee15 Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 19:07:44 +02:00
Emilio Cobos Álvarez c6c06c7f48 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 19:07:41 +02:00
Narcis Beleuzu e7a8994c37 Backed out 5 changesets (bug 1496486) for valgrind bustages. CLOSED TREE
Backed out changeset d2f1e35ee4b7 (bug 1496486)
Backed out changeset 7f843f4ee162 (bug 1496486)
Backed out changeset 2f629a60f12c (bug 1496486)
Backed out changeset 4dd15fa31474 (bug 1496486)
Backed out changeset e8d8e2f3f00b (bug 1496486)
2018-10-09 19:44:51 +03:00
Emilio Cobos Álvarez bce0418466 Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 17:33:27 +02:00
Emilio Cobos Álvarez 804148c319 Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 17:33:24 +02:00
Brindusan Cristian 3b4ca07db8 Backed out 5 changesets (bug 1496486) for build bustages on gfxUserFontSet.h. CLOSED TREE
Backed out changeset 6b740afea403 (bug 1496486)
Backed out changeset 5cf44e254ac3 (bug 1496486)
Backed out changeset 8e465202c355 (bug 1496486)
Backed out changeset 86382b2249f6 (bug 1496486)
Backed out changeset ab92ed3e0a23 (bug 1496486)
2018-10-09 16:58:38 +03:00
Emilio Cobos Álvarez a03dd78e3f Bug 1496486 - Remove some more leftover code. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7755
2018-10-09 15:33:05 +02:00
Emilio Cobos Álvarez d6c743191f Bug 1496486 - Remove nsCSSValue usage from font code. r=heycam
Really sorry for the size of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D7753
2018-10-09 15:33:03 +02:00
Emilio Cobos Álvarez e929975273 Bug 1496008 - Serialize a bunch of image properties with Servo. r=heycam
I had to fix the conversion for BackgroundSize too, hopefully we can
simplify all this using cbindgen in the future instead of CalcValue.

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

--HG--
extra : moz-landing-system : lando
2018-10-05 20:08:55 +00:00
Narcis Beleuzu bcd56bfa14 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-04 12:29:16 +03:00
Cameron McCormack 924e3d96d8 Bug 1496287 - Fix unused import warning r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D7676

--HG--
extra : moz-landing-system : lando
2018-10-04 05:45:25 +00:00
Cosmin Sabou d20960ffed Merge mozilla-inbound to mozilla-central. a=merge 2018-10-04 00:56:04 +03:00
Ryan Hunt 359480b484 Bug 1352643 - Implement multi-position gradient color-stops syntax. r=emilio
This commit adds the multi-position gradient color-stops syntax.

GradientItem::parse_comma_separated is extended to attempt to parse
a LengthOrPercent after each color stop. If it succeeds, it appends
an additional color stop with a duplicate color and the specified
position.

This change is only to the parsing, serialization is left unchanged
as per [1].

[1] https://github.com/w3c/csswg-drafts/issues/2714

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

--HG--
extra : rebase_source : c580e4bd0e4013d19d8418870aa04eb56fa29303
extra : intermediate-source : e85309ff67f47c2ee52944499f6ababe1278fabd
extra : source : 18e81538f6f439a8c02a03f21fff22cc5e6128f4
2018-10-01 14:26:23 -05:00
Emilio Cobos Álvarez c620c6f47a Bug 1496041 - Remove unused ImageValue constructor. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7589

--HG--
extra : moz-landing-system : lando
2018-10-03 12:13:57 +00:00
Emilio Cobos Álvarez 45ef068d56 Bug 1494622 - Serialize -moz-image-region and clip with Servo. r=xidorn
This changes the serialization of -moz-image-region to be consistent with that
of clip(), but it's an internal property and the specified value is already
serialized by servo so I think it's the right thing to do.

There are also no internal callers of the getter.

Differential Revision: https://phabricator.services.mozilla.com/D7069
2018-09-27 16:11:43 +02:00
Xidorn Quan cb87cec282 Bug 1494501 - Rename pref "layout.css.scrollbar-colors.enabled" to "layout.css.scrollbar-color.enabled". r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D7030

--HG--
extra : moz-landing-system : lando
2018-09-27 00:38:16 +00:00
Martin Stransky 89822d9f40 Bug 1493145 - [CSD] Enable round corners by default by -moz-gtk-csd-transparent-background media query, r=dao
Replace mozilla.widget.use-argb-visuals pref by -moz-gtk-csd-transparent-background media query at browser.css
to draw transparent background. The media query is set by toolkit code and enabled when compatible
window manager is detected.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 11:53:04 +00:00
Margareta Eliza Balazs ffe6eaf2f0 Merge inbound to mozilla-central. a=merge 2018-09-25 12:42:09 +03:00
Emilio Cobos Álvarez 939fb708fe Bug 1493710 - Don't apply containing shadow-host rules to NAC. r=mats
This is a regression from bug 1487856.

Differential Revision: https://phabricator.services.mozilla.com/D6700
2018-09-25 09:21:23 +02:00
Csoregi Natalia 4a5dd87283 Backed out changeset 73a8628576e4 (bug 1493710) for failures on layout/reftests/forms/input/shadow-rules.html. CLOSED TREE 2018-09-25 03:57:36 +03:00
Emilio Cobos Álvarez 7676c03fca No bug - Remove an outdated comment. r=me
This was fixed, css/css-scoping/shadow-cascade-order-001.html tests it.

DONTBUILD, since comment only.
2018-09-24 23:00:59 +02:00
Emilio Cobos Álvarez b2bb6724a5 Bug 1493507 - Avoid walking the rule tree three times from apply_declarations. r=xidorn
Just once is slow enough.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 08:42:15 +00:00
Matt Brubeck 9a8bd3b5d7 Bug 1493435 - Upgrade to uluru 0.3. r=nox,emilio
This cherry-picks servo/servo#21789.
2018-09-23 13:52:36 +02:00
Emilio Cobos Álvarez e049a50395 Bug 1493435 - Partially revert servo/servo#21746. r=ajeffrey
This reverts the relevant bits from #21746 so that style and dependencies can
build with stable.

This is important because:

 * `selectors` is a published crate.

 * Gecko compiles with stable (more or less).

I reviewed that PR under the assumption that the union feature was stable, since
untagged unions are stable since 1.19, but turns out that smallvec uses non-Copy
types in unions, which are still unstable.

This leaves the union feature used on Servo, so that it gets testing, taking
advantage of features being additive.

This cherry-picks servo/servo#21788.
2018-09-23 13:47:26 +02:00
Andre Bogus 52ad6442dc Bug 1493435 - Update smallvec crate and enable the union feature. r=emilio
We had a mix of 0.6.2 and 0.6.5 (which is the current release),
this unifies to the latest version. It also enables the union
feature which removes the discriminant, reducing memory usage.

This cherry-picks servo/servo#21746.
2018-09-23 13:47:13 +02:00
Emilio Cobos Álvarez 2375a01424 Bug 1493710 - Don't apply containing shadow-host rules to NAC. r=mats
This is a regression from bug 1487856.

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

--HG--
extra : moz-landing-system : lando
2018-09-24 21:32:59 +00:00
Andreea Pavel 62ce7b988d Merge mozilla-inbound to mozilla-central. a=merge 2018-09-22 12:34:50 +03:00
Boris Chiou ae2cd2accd Bug 1491954 - Flip boolean half way for path interpolation r=emilio
According to the new svg 2 spec update (#543), we flip the flag half way for
path interpolation.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 18:39:41 +00:00
Emilio Cobos Álvarez 82b6699841 Bug 1386907 - Stop building the style system as a static library. r=froydnj
It's linked as part of gkrust, so this is just wasted work, and compiling it as
two different target just makes rustc do more and probably not so good work.

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

--HG--
extra : moz-landing-system : lando
2018-09-21 12:37:33 +00:00
Brad Werth 4c777072f0 Bug 1418470 Part 1: Provide a specialized parse_method for mask-image to use CORS. r=emilio!
Differential Revision: https://phabricator.services.mozilla.com/D5714

--HG--
extra : rebase_source : 4584b0f4558708d675980f4c5ad4f010c54d8138
2018-09-12 15:54:24 -07:00
Emilio Cobos Álvarez e39bf77494 Bug 1492567 - Back out bug 1481866. r=dbaron
Summary:
The behavior the WG proposed is way more subtle than what that bug implements,
including:

 * Implementing two logical overflow longhands.
 * Expanding the overflow shorthand to different longhands depending on the
   syntax of that.

Meanwhile, Blink hasn't done the swap and will ship the same behavior that we
shipped in Firefox 61 (bug 1453148), that is, overflow-x, then overflow-y.

So I think lacking a clear way forward we should revert this change and preserve
our shipped behavior.

Reviewers: dbaron!

Tags: #secure-revision

Bug #: 1492567

Differential Revision: https://phabricator.services.mozilla.com/D6317
2018-09-20 01:27:55 +02:00
Xidorn Quan 8396cd75c7 Bug 1483075 - Merge the two scrollbar color properties into scrollbar-color. r=heycam,hiro
Differential Revision: https://phabricator.services.mozilla.com/D6115

--HG--
extra : moz-landing-system : lando
2018-09-19 05:33:12 +00:00
Margareta Eliza Balazs fdb780335d Merge inbound to mozilla-central. a=merge 2018-09-18 17:33:09 +03:00
Emilio Cobos Álvarez 29ac8f82e5 Bug 1475691 - Make Servo build. r=me
StrongRuleNode is really Sync.
2018-09-18 11:49:11 +02:00
Emilio Cobos Álvarez 52be7ed562 Bug 1475691 - Fix tidy issues. r=me 2018-09-18 11:48:56 +02:00
Manish Goregaokar b9dfaa50cb Bug 1475691: servo_arc cleanups for publishing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D6034

--HG--
extra : moz-landing-system : lando
2018-09-18 09:19:18 +00:00
Emilio Cobos Álvarez 491be8bc82 Bug 1491622 - Make LonghandId::flags an indexing operation. r=xidorn
I always see a bunch of time in our profiles in the iterator over the
declarations, this ensures it's not something dumb.

I suspect it's just a bunch of cache misses from walking the rule tree but in
any case this is consistent with the other getters we have and such.

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

--HG--
extra : moz-landing-system : lando
2018-09-18 09:15:12 +00:00
Jonathan Kew 0d4dbd1e37 Bug 1490997 - Use nsAtom instead of nsString for font family name in the FontFamilyName struct, and switch its methods from 16-bit to 8-bit strings. r=lsalzman 2018-09-18 09:34:21 +01:00
Emilio Cobos Álvarez 85db10cfb9 Bug 1491622 - Simplify CSSWideKeyword::parse. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5972

--HG--
extra : moz-landing-system : lando
2018-09-17 00:53:37 +00:00
Emilio Cobos Álvarez 509bdd94b4 Bug 1440251 - Allow integer division inside calc() expressions. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5980
2018-09-17 16:30:01 +02:00
Emilio Cobos Álvarez cba6b81da4 Bug 1491622 - Remove DeclaredValue. r=xidorn
I think it used to be the case that all PropertyDeclaration variants had a
DeclaredValueOwned<T> inside. But that's no longer the case, so this abstraction
seems less useful now.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 04:47:02 +00:00
Emilio Cobos Álvarez 7c47b574fc Bug 1491622 - Deindent the non-css-wide-keyword-related code from cascade_property. r=xidorn
There's no good reason we construct a DeclaredValue as an intermediate step.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 14:12:27 +00:00
Emilio Cobos Álvarez 6d38ed406e Bug 1491622 - Remove DeclaredValue::WithVariables. r=xidorn
We never construct it.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 01:33:15 +00:00
Emilio Cobos Álvarez c35c3548c2 Bug 1491622 - Make ExtremumLength::valid_for static. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5975

--HG--
extra : moz-landing-system : lando
2018-09-17 00:54:43 +00:00
Emilio Cobos Álvarez 9eed150bea Bug 1491620 - Split apply_declarations into its own file, and without mako. r=xidorn
All that font code thrown out in the middle was making me mad.

There should be no change in behavior from this patch.

I ran rustfmt on the code but I corrected manually the following:

  https://github.com/rust-lang-nursery/rustfmt/issues/3025

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

--HG--
extra : moz-landing-system : lando
2018-09-17 14:08:29 +00:00
Emilio Cobos Álvarez 570e21fceb Bug 1491579 - Enable nsstring/gecko_debug in a place other than components/style. r=xidorn
That way I can unify Servo's and Gecko's Cargo.toml files.

This is the only conflict that exists since a while ago, and it causes
continuous manual merges when I sync changes around.

This moves it to ports/geckolib, which works equally well and isn't in the Servo
repo.

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

--HG--
extra : moz-landing-system : lando
2018-09-17 05:31:16 +00:00
Emilio Cobos Álvarez 5d7bd126b1 Bug 1491577 - Fix Servo build and drop a FIXME. r=me 2018-09-15 19:26:13 +02:00
Emilio Cobos Álvarez efcb4b34f7 Bug 1491577 - Remove a useless type bound. r=me 2018-09-15 19:25:58 +02:00
Emilio Cobos Álvarez 01f47f288c Bug 1491577 - Fix Gecko build. r=me 2018-09-15 19:21:22 +02:00
Simon Sapin b02f9a04eb Bug 1491577 - Replace mpsc with crossbeam/servo channel, update ipc-channel. r=emilio
This cherry-picks servo/servo#21325.

Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
2018-09-15 19:24:23 +02:00
Anshul Malik 8c98e7eef1 Bug 1491577 - Format components/selectors. r=emilio
This cherry-picks servo/servo#21679.
2018-09-15 19:23:40 +02:00
chansuke 79427e9830 Bug 1491577 - Format component size_of_test. r=emilio
This cherry-picks servo/servo#21661.
2018-09-15 19:23:09 +02:00
Matt Brubeck 0399b9e762 Bug 1491577 - Switch from new-ordered-float back to ordered-float. r=emilio
The `new-ordered-float` fork has been merged back into the original
`ordered-float` crate.

This cherry-pics servo/servo#21681.
2018-09-15 19:22:32 +02:00
chansuke c5695b2220 Bug 1491577 - Format component style_traits. r=emilio
This cherry-picks servo/servo#21620.
2018-09-15 19:21:50 +02:00
kingdido999 f9451c567a Bug 1491577 - Format hashglobe. r=emilio
This cherry-picks servo/servo#21648.
2018-09-15 19:21:23 +02:00
Hiroyuki Ikezoe 17186e2c2f Bug 1483111 - Implement any-hover and any-pointer media queries features. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3609
2018-08-17 20:29:37 +09:00
Nicholas Nethercote 67bc77d4cf Bug 1497734 - Rename nsStaticAtom subclasses. r=heycam
Specifically:
- nsICSSAnonBoxPseudo --> nsCSSAnonBoxPseudoStaticAtom
- nsICSSPseudoElement --> nsCSSPseudoElementStaticAtom

The `nsI` prefix isn't necessary because these are no longer XPIDL types, and
the `StaticAtom` suffix makes their meaning clearer.

--HG--
extra : rebase_source : b68dd7c73f5036dcd6be4c3700b757441f59f9f2
2018-10-10 16:49:13 +11:00
Hiroyuki Ikezoe ef03e2a299 Bug 1035774 - Add media feature keys for hover and pointer. r=heycam,emilio
Summary:
https://drafts.csswg.org/mediaqueries-4/#hover
https://drafts.csswg.org/mediaqueries-4/#pointer

In this patch series, we don't introduce any-hover and any-pointer media
features yet, but functionalities for them on each platform backends will be
introduced in this patch series, so eIntID_AllPointerCapabilities and relevant
stuff is added in this patch for the convenience that each platform backends
can be reviewed at once.

Differential Revision: https://phabricator.services.mozilla.com/D3296
2018-08-14 17:13:04 +09:00
Cameron McCormack fe196275ba Bug 1489529 - Update comments to no longer point to nsRuleNode. r=emilio
There are a few mentions of nsRuleNode left but they are mostly
historical references so it makes sense to keep them.

Differential Revision: https://phabricator.services.mozilla.com/D5505
2018-09-12 17:37:37 +10:00
Brad Werth 0af3cd1d2f Bug 1434963 Part 2: Expand the Parser trait to allow anonymous CORS to be applied. r=emilio
Depends on D5106

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

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:05 +00:00
Brad Werth 1795d0bec9 Bug 1434963 Part 1: Change Gecko_ImageValue_Create to take a CORS mode argument. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D5106

--HG--
extra : moz-landing-system : lando
2018-09-11 18:11:02 +00:00
Emilio Cobos Álvarez e1f2213a03 Bug 1490311 - Remove unused nsStyleFont::{EnableZoom, UnZoomText}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D5530
2018-09-11 20:08:19 +02:00
Emilio Cobos Álvarez 1f3f128954 Bug 1489676 - Teach ComputeSquaredDistance derive about #[animation(constant)]. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5337
2018-09-11 00:12:49 +02:00
Daniel Varga d34223c4cb Backed out changeset 85d1a0c3f60c (bug 1489676) for mochitest failures at dom/animation/test/mozilla/test_distance_of_path_function.html on a CLOSED TREE 2018-09-10 13:36:56 +03:00
Emilio Cobos Álvarez 911670e275 Bug 1489676 - Teach ComputeSquaredDistance derive about #[animation(constant)]. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D5337

--HG--
extra : moz-landing-system : lando
2018-09-10 09:42:27 +00:00
Henri Sivonen 1a38ec4710 Bug 1486711 - Fill logically uninitialized parts of an XPCOM string's buffer with a marker byte in debug builds. r=froydnj
MozReview-Commit-ID: IwLikJpacAW

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

--HG--
extra : moz-landing-system : lando
2018-09-07 05:47:57 +00:00
chansuke 41097313c4 Bug 1489862 - Format style component. r=emilio
This cherry-picks servo/servo#21652.
2018-09-09 17:03:19 +02:00
Boris Chiou 58b7c8f2bd Bug 1486094 - Part 5: Use the standalone struct and enum for the flags in SVG path. r=emilio,birtles
We define the standalone types for using derive macro easily and overriding
the behaviors of this traits. This could avoid defining the general
behavior of booleans.

Depends on D4788

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:25:59 +00:00
Boris Chiou 6604dde882 Bug 1486094 - Part 2: Make offset-path:path() animatable. r=birtles
Here, we change the animation type of offset-path as ComputedValue, so
we could do animation on it. Also enable the wpt for offset-path
interpolation. In test_transition_per_property.html, we add some basic tests
ifor offset-path.

ToAnimatedZero for PathCommand will be dropped later.

Because the animations of arcs with mismatched flags are fallen back to
discrete animations, the result of getComputedValue is not normalized in this
case. This makes some wpt failed even though the progress is 100%.

Depends on D4786

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:29:12 +00:00
Boris Chiou 7f3e5437ff Bug 1486094 - Part 1: Make SVGPathData and |clip-path:path()| animatable. r=birtles
Implement Animate trait for SVGPathData.

The basic idea is: we normalize |this| and |other| svg paths, and then
do interpolation on the normalized svg paths. The normalization is to
convert relative coordinates into absolute coordinates, so we could do
real number interpolation on each path command directly.

In this patch, we also make |clip-path:path()| animatable.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 22:15:50 +00:00
chansuke 0f1a2fb4bc Bug 1489667 - Format component of style_derive. r=emilio
This cherry-picks servo/servo#21635
2018-09-08 00:22:21 +02:00
Nicholas Nethercote 7398ecce66 Bug 1449787 - Make static atom pointers `constexpr`. r=froydnj,emilio
This saves one word per static atom, per process.

The `nsGkAtoms` change is only a small part of this commit.

In regen_atoms.py:

- There is now only one link name per platform: nsGkAtoms::sAtoms[].

- But there is a new constant per atom, giving the index into
  nsGkAtoms::sAtoms[].

- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
  the index constant.

- A couple of `*mut` pointers are now `*const`.

Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.

--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
2018-10-04 09:16:11 +10:00
Nicholas Nethercote a588d0a4e0 Bug 1449787 - Tweak regen_atoms.py. r=emilio
Specifically, give all the string templates the ''' form, and give them all
`_TEMPLATE` suffixes. This requires slightly changing the newline handling.

--HG--
extra : rebase_source : c89a77bc6d2cbc19cfaf51bbc694c4f3f8be10ba
2018-10-02 08:43:37 +10:00
Pyfisch bdac24a9e1 Bug 1488854: Rustfmt malloc_size_of & derive. r=emilio 2018-09-05 19:31:09 +02:00
kingdido999 348835a0d3 Bug 1488854: Format components fallible and geometry. r=emilio
This cherry-picks servo/servo#21598.
2018-09-05 19:31:02 +02:00
Emilio Cobos Álvarez a4f9eea8e5 Bug 1488414 - Use decomposition to interpolate matched perspective transform operations. r=birtles
Looks like this produces sensible results for interpolation with 0, though I'm
not really convinced about the results from, let's say, 1px to 2000px in the
attached test-case, I would've expected a linear interpolation from that to go
through normal length interpolation.

css-transforms-1 says:

  > Two transform functions with the same name and the same number of arguments
  > are interpolated numerically without a former conversion. The calculated
  > value will be of the same transform function type with the same number of
  > arguments.
  >
  > Special rules apply to <matrix()>.

Which is what we do... I was going to file a spec issue but turns out that it's
already addressed in css-transforms-2:

  https://drafts.csswg.org/css-transforms-2/#interpolation-of-transform-functions

Which says:

  > The transform functions <matrix()>, matrix3d() and perspective() get
  > converted into 4x4 matrices first and interpolated as defined in section
  > Interpolation of Matrices afterwards.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 13:35:06 +00:00
Emilio Cobos Álvarez f6e7b25483 Bug 1488155 - Only no-op visited <-> unvisited changes. r=heycam
Other changes should really be (and are) indistinguishable.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 12:52:16 +00:00
Boris Chiou 8e384ca9b3 Bug 1487838 - Add a pref for |clip-path:path()|. r=xidorn
Add a preference, layout.css.clip-path-path.enabled, for |clip-path:path()|.

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

--HG--
extra : moz-landing-system : lando
2018-09-05 04:50:33 +00:00
Emilio Cobos Álvarez ac475c939f Bug 1487856 - Make the author styles disabled stuff actually disable style attribute, animations, and XBL rules. r=heycam
This also removes one of my FIXMEs from when I was looking at this code.

We don't seem to have a pre-existing test for this feature, sigh. I'll try to
write one if I have cycles for it...

Note that it not applying XBL rules is a feature, given the current state of
affairs. Video controls and such are right now unusable with no styles enabled.

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

--HG--
extra : moz-landing-system : lando
2018-09-03 07:31:29 +00:00
Emilio Cobos Álvarez 05121efc1a Bug 1487259 - Make <svg:use> in shadow tree apply the rules from the originating tree. r=xidorn,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D4674

--HG--
extra : moz-landing-system : lando
2018-09-03 22:52:12 +00:00
Emilio Cobos Álvarez 90fb0f988a Bug 1488172 - Fix Servo and unit tests build. r=me 2018-09-03 14:13:36 +02:00
Simon Sapin 6223dfe2a5 Bug 1488172 - Update bindgen to 0.39.0. r=emilio
This imports servo/servo#21516.
2018-09-03 14:14:02 +02:00
Simon Sapin 4970761136 Bug 1488172 - Publish selectors v1.20.0. r=emilio
This imports servo/servo#21494.
2018-09-03 14:13:36 +02:00
Emilio Cobos Álvarez 84ee4596a9 Bug 1488172 - Appease Servo's tidy lint. r=me 2018-09-03 14:13:36 +02:00
Craig Disselkoen 80876a6b23 Bug 1488172 - Remove outdated comment in stylist.rs. r=emilio
This imports servo/servo#21487.
2018-09-03 14:13:36 +02:00
Emilio Cobos Álvarez 9db4ab4300 Bug 1487615 - Simplify the Lang pseudo-class stuff a bit. r=xidorn,firefox-style-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D4754

--HG--
extra : moz-landing-system : lando
2018-09-02 22:54:12 +00:00
Emilio Cobos Álvarez 51ed361ea0 Bug 1487615 - Use proper escaping for pseudo-class strings. r=xidorn
We always serialize as an atom, which is the previous behavior (though previous
code was using string escaping which I think was not totally sound either...).

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

--HG--
extra : moz-landing-system : lando
2018-09-02 22:54:57 +00:00
Emilio Cobos Álvarez 5b48747b22 Bug 1487137 - Shrink CascadeData by turning the bloom filters into hash sets. r=xidorn
We're wasting 1kb there, which is kind of stupid.

The only advantage of using a bloom filter is that memory usage doesn't increase
even if there's a gazillion attribute selectors and such. But:

 * For IDs we already have a bunch of data structures for invalidation and such
   which key on the id, so the bloom filter would be a very minor thing.

 * For attribute selectors we don't have such a data structure, but if people
   used a gazillion attribute selectors we should!

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

--HG--
extra : moz-landing-system : lando
2018-09-02 23:03:47 +00:00
Cameron McCormack f6f506926c Bug 1487598 - Use an Atom to store pseudo-class string arguments. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D4740
2018-08-31 17:05:56 +10:00
Cameron McCormack 8cac942c02 Bug 1487582 - Use an Atom to represent Direction values in pseudo-classes. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D4730
2018-08-31 15:18:59 +10:00
Emilio Cobos Álvarez 20da0ddffb Bug 1487135 - Make the allocation of AuthorStyles for ShadowRoot lazy. r=xidorn,firefox-style-system-reviewers
So that we don't waste a bunch of memory with stuff like <svg:use>. I
plan to shrink AuthorStyles further, but this should help regardless, and isn't
very complex.

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

--HG--
extra : moz-landing-system : lando
2018-08-30 12:00:00 +00:00
Ciure Andrei d716a04e20 Merge inbound to mozilla-central. a=merge 2018-08-29 00:58:21 +03:00
Henri Sivonen c3d01b0fe9 Bug 1484045 - Prohibit shrinking of the string's buffer in appends of Latin1 to UTF-16 and vice versa. r=froydnj
This restores the old allocation semantics for "append" operations between
Latin1 and UTF-16 while keeping the buffer re-use optimization for the
"assign" cases.

MozReview-Commit-ID: 8JCw3AaCNLN

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

--HG--
extra : moz-landing-system : lando
2018-08-28 14:13:17 +00:00
Boris Chiou 4a1bf6f650 Bug 1485433 - Parse byte slice in PathParser. r=emilio
We only care about ascii char for svg path, so we could parse the string
as byte slice.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 18:14:49 +00:00
arthur.iakab 5527acb8d8 Merge inbound to mozilla-central a=merge 2018-08-25 01:08:22 +03:00
Boris Chiou a1909a88ff Bug 1246764 - Part 2: Define path() for clip-path. r=emilio
For now, |clip-path: path()| is chrome-only, and not for shape-outside,
so we only implement the parser for clip-path. Besides, I didn't put
path() in BasicShape because path() doesn't use the reference box to
resolve the percentage or keywords (i.e. SVG path only accept floating
point or integer number as the css pixel value). Therefore, I add it into
ShapeSource, instead of BasicShape.

Differential Revision: https://phabricator.services.mozilla.com/D3633
2018-08-24 11:37:53 -07:00
Boris Chiou 2e062cc88c Bug 1246764 - Part 1: Move SVGPathData and its parser into svg_path.rs. r=emilio
SVGPathData will be used by clip-path and offset-path (and/or more on the
properties which support <basic-shape>). Therefore, let's move
SVGPathData out of motion.rs.

Differential Revision: https://phabricator.services.mozilla.com/D3631
2018-08-24 11:37:44 -07:00
Xidorn Quan 7e1e060971 Bug 1424106 - Accept unknown webkit pseudo-element. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4186

--HG--
extra : source : 9537cee04b53aa60d3f40a1b9d05ab8f739a92f8
2018-08-24 22:17:37 +10:00
Emilio Cobos Álvarez 385e2369c5 Bug 1485951 - Adjust an assertion to account for the changes from bug 1485930. r=me 2018-08-24 13:44:21 +02:00
Boris Chiou c1a2d39873 Bug 1485823 - Use cbindgen for basic_shape::FillRule. r=xidorn
Just a minor fix to use cbindgen to avoid the conversion between
basic_shape::FillRule and mozilla::StyleFillRule.

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

--HG--
extra : moz-landing-system : lando
2018-08-23 23:00:16 +00:00
Boris Chiou 2cddc42d0f Bug 1485766 - Drop the manually implementation of ToCSS for BasicShape::Polygon. r=emilio
The implementation of ToCSS for Polygon has some rule, and we could use skip_if
to handle and serialization of fill-rule. However, we should derive ToCSS for
the pair of LengthOrPercentages, so define a new type for it.

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

--HG--
extra : moz-landing-system : lando
2018-08-23 20:32:53 +00:00
Xidorn Quan 2c6a391e1b Bug 1485930 - Make tree pseudo-element prefix not case-sensitive. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D4185

--HG--
extra : moz-landing-system : lando
2018-08-24 09:23:05 +00:00
Emilio Cobos Álvarez 4a3ec62885 Bug 1485655: Remove an assertion that doesn't hold in some cases. r=me 2018-08-23 16:56:27 +02:00
Emilio Cobos Álvarez ab460a4f52 Bug 1425700 - Make the counters non-atomic counters and merge afterwards. r=bholley
This was consistently faster in the benchmark (even when counters were disabled,
which was slightly suspicious, but...).

Anyway, it's not really much code, most of it is FFI copy-pasta.

Differential Revision: https://phabricator.services.mozilla.com/D3874
2018-08-28 15:58:24 +02:00
Emilio Cobos Álvarez e2379f3921 Bug 1425700 - Add a test for the use counters. r=heycam
Mostly testing that they work, and that they record what we expect them to
record, that is, the actual property that was parsed, and not the properties
that it'd resolve or expand to.

That may be another tricky part for CSSOM, I think style setters would fail an
alias test if implemented with the current setup (we do the property lookup in
C++).

Differential Revision: https://phabricator.services.mozilla.com/D3829
2018-08-28 15:58:21 +02:00
Emilio Cobos Álvarez 7f1f4ab7f0 Bug 1425700 - Hook the use counters into StyleSheet parsing. r=heycam
Still not hooked into telemetry, I talked with :janerik and :gfritzsche about
that, but test incoming!

This intentionally doesn't handle CSSOM and such for now, will file followups
for those, though should be trivial.

I want to unify / clean up how we do the use counters and the error reporting
stuff for CSSOM, since the current function call still shows up in profiles,
but that should be a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D3828
2018-08-28 15:58:19 +02:00
Emilio Cobos Álvarez 62a00ac718 Bug 1425700 - Add a very simple use counter implementation. r=heycam
As simple as I could make it, for now. We can improve on this.

Differential Revision: https://phabricator.services.mozilla.com/D3827
2018-08-28 15:58:17 +02:00
Coroiu Cristina 9c90e3fa96 Backed out changeset e85309ff67f4 (bug 1352643) for wpt failures at /css/css-images/gradient/color-stops-parsing.html on a CLOSED TREE 2018-10-03 02:37:44 +03:00
Ryan Hunt 629e76085a Bug 1352643 - Implement multi-position gradient color-stops syntax. r=emilio
This commit adds the multi-position gradient color-stops syntax.

GradientItem::parse_comma_separated is extended to attempt to parse
a LengthOrPercent after each color stop. If it succeeds, it appends
an additional color stop with a duplicate color and the specified
position.

This change is only to the parsing, serialization is left unchanged
as per [1].

[1] https://github.com/w3c/csswg-drafts/issues/2714

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

--HG--
extra : rebase_source : 88f2e9276c626bf4e195f10c5b5713861eeb5760
extra : source : 18e81538f6f439a8c02a03f21fff22cc5e6128f4
2018-10-01 14:26:23 -05:00
Emilio Cobos Álvarez 26115b46cb Bug 1485044: Unbust unit test build. r=me 2018-08-22 12:00:30 +02:00
Noemi Erli 2d8f83047a Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-22 12:54:34 +03:00
Noemi Erli a3eb003ecf Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string.html => testing/web-platform/tests/css/motion/offset-path-string-001.html
2018-08-22 12:49:02 +03:00
Emilio Cobos Álvarez 3ef3f33868 Bug 1485044: Remove useless StyleDisplay conversion. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3896
2018-08-22 11:25:58 +02:00
Emilio Cobos Álvarez b974be2748 Bug 1485037: Use a consistent style for longhands. r=heycam
It's a bit of a mess.

Differential Revision: https://phabricator.services.mozilla.com/D3892
2018-08-22 11:25:23 +02:00
Emilio Cobos Álvarez ac3701edd3 Bug 1474317: Make text-orientation, unicode-bidi, contain and will-change non-animatable. r=heycam
Per recent CSSWG resolutions:

  https://github.com/w3c/csswg-drafts/issues/2737
  https://github.com/w3c/csswg-drafts/issues/2751

Differential Revision: https://phabricator.services.mozilla.com/D3888
2018-08-22 11:24:39 +02:00
Emilio Cobos Álvarez 0cf34bf459 Bug 1484316: Serialize clip-path and shape-outside using Servo. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3653
2018-08-22 11:20:41 +02:00
Cameron McCormack 61ab3b7383 Bug 1485252 - Add MallocSizeOf impls for 128-bit integers. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3947

--HG--
extra : moz-landing-system : lando
2018-08-22 05:37:39 +00:00
Ciure Andrei 40b18c41b7 Backed out 7 changesets (bug 1429298) for xpcshell failures properties-db.js CLOSED TREE
Backed out changeset 48214a8e1b6b (bug 1429298)
Backed out changeset cc2785ab879e (bug 1429298)
Backed out changeset c217209a3b04 (bug 1429298)
Backed out changeset 196fc7b48b84 (bug 1429298)
Backed out changeset 761e9bb54adb (bug 1429298)
Backed out changeset 0b9ec0d707b5 (bug 1429298)
Backed out changeset 38ad1cc1b0c8 (bug 1429298)

--HG--
rename : testing/web-platform/tests/css/motion/offset-path-string-002.html => testing/web-platform/tests/css/motion/offset-path-string.html
2018-08-22 08:01:49 +03:00
Boris Chiou 9c3c5fcf1d Bug 1429298 - Part 3: Use macro for path parser. r=emilio
There are a lot of duplicates, so we use macro to refine them.

Depends on D2963

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

--HG--
extra : moz-landing-system : lando
2018-08-22 01:20:21 +00:00
Boris Chiou 4171197c25 Bug 1429298 - Part 2: Define offset-path and implement it in style system. r=emilio
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.

The basic flow is:
  - Parse SVG Path String into SVGPathData (in Rust).
  - Use cbindgen to make sure the layout of PathCommand and StylePathCommand, and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
  - Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part will be implemented in a different patch.)

Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.

Depends on D2962

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

--HG--
extra : moz-landing-system : lando
2018-08-22 01:24:13 +00:00
Boris Chiou d935ea329c Bug 1429298 - Part 3: Use macro for path parser. r=emilio
There are a lot of duplicates, so we use macro to refine them.

Differential Revision: https://phabricator.services.mozilla.com/D2966
2018-08-21 22:41:39 -07:00
Boris Chiou a8bd6dfc8a Bug 1429298 - Part 2: Define offset-path and implement it in style system. r=emilio
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion &
StyleSVGPath on the gecko-side. We parse the SVG Path string into a
vector of PathCommand. To build the gfx::Path, we will convert it into
gfx::Path later in a different patch.

The basic flow is:
* Parse SVG Path String into SVGPathData (in Rust).
* Use cbindgen to make sure the layout of PathCommand and StylePathCommand,
  and then set the Box[PathCommand] into nsTArray<StylePathCommand>.
* Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part
  will be implemented in a different patch.)

Finally, we use the gfx::Path to create a motion path transform.
The layout implementation is in the later patch.

Differential Revision: https://phabricator.services.mozilla.com/D2963
2018-08-21 22:41:38 -07:00
Henri Sivonen 9f7d45a15a Bug 1482093 - Make conversions from UTF-16 and Latin1 to UTF-8 utilize the slop in the first ASCII-sized allocation. r=nika
MozReview-Commit-ID: 4Y8K1JZkXWq

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

--HG--
extra : moz-landing-system : lando
2018-08-20 18:47:39 +00:00
Cameron McCormack 771b9fb2f1 Bug 1484575 - Simplify PropertyDeclarationBlock::get a little. r=xidorn
Depends On D3747

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

--HG--
extra : moz-landing-system : lando
2018-08-20 04:11:37 +00:00
Cameron McCormack 2ccae542f5 Bug 1484571 - Replace NormalDeclarationIterator return type with `impl Trait`. r=xidorn
Differential Revision: https://phabricator.services.mozilla.com/D3747

--HG--
extra : moz-landing-system : lando
2018-08-20 05:34:16 +00:00
Emilio Cobos Álvarez 1bffebea0b Bug 1484459: Appease Servo's tidy lint. r=me 2018-08-18 19:07:08 +02:00
Emilio Cobos Álvarez 8d50b26faf Bug 1484459: Port servo to the new media query system. r=me
Port `width`, and also add the `scan` media feature so I don't need to add
ugliness just to workaround the unused keyword_evaluator macro.

This is not part of the Gecko build in any case.
2018-08-18 19:07:06 +02:00
Emilio Cobos Álvarez b68adb6896 Bug 1484459: Update num-traits in style. r=me 2018-08-18 19:07:05 +02:00
Csoregi Natalia 3e61ab4489 Merge inbound to mozilla-central. a=merge 2018-08-18 12:46:20 +03:00
Daniel Varga 3ee92b7a2f Merge mozilla-central to autoland 2018-08-18 01:04:09 +03:00