Commit graph

7402 commits

Author SHA1 Message Date
bors-servo
62031e3cb0
Auto merge of #23289 - CYBAI:regex-1.1, r=jdm
Update regex to 1.1

I just found the `aho-corasick` dependency is still `0.6.9` and then I found `regex` depends on it.

I remember there's a rewrite of `aho-corasick` at BurntSushi/aho-corasick@e8493baf54 to improve itself.

---

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it just updates `regex` crate

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23289)
<!-- Reviewable:end -->
2019-04-29 15:37:25 -04:00
CYBAI
5b9f151f03 Update regex to 1.1 2019-04-29 22:25:12 +09:00
Fernando Jiménez Moreno
d0b2e826ef Move StylesheetSetRef to script 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
e4f34fde1b Rename StylesheetSet to StylesheetSetRef 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
9df1c2f2cc Revert unnecessary format changes 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
6bf1ca20a2 Make Node and Element rare_data an Option 2019-04-26 12:00:25 +02:00
Fernando Jiménez Moreno
0ca4792dc6 Revert changes in sheet_set_methods macro 2019-04-26 11:42:38 +02:00
Fernando Jiménez Moreno
5a165c6bd8 Move is_connected function from style to layout, where it is used 2019-04-26 11:42:38 +02:00
Fernando Jiménez Moreno
5be6779f9a Revert style/dom_apis changes 2019-04-26 11:42:37 +02:00
Fernando Jiménez Moreno
ea1fe15dfe Do not store composed parent node 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
542699691e Derive MallocSizeOf for QuirksMode 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
8b353ee3ce Make StylesheetSet an enum instead of a trait object 2019-04-26 11:31:18 +02:00
Fernando Jiménez Moreno
d7b6a6f509 Do not set dirty out-of-doc nodes 2019-04-26 11:31:16 +02:00
Fernando Jiménez Moreno
23b92d54d4 Remove stylesheets ownership from DocumentOrShadowRoot 2019-04-26 10:17:47 +02:00
Fernando Jiménez Moreno
441357b74e Add is_connected flag to node and use it to replace most uses of is_in_doc 2019-04-26 10:17:45 +02:00
Ian Moody
8d7fe68ac3 Remove :-servo-case-sensitive-type-attr()
No longer needed now that the case-sensitive flag for attributes selectors is
supported.
Update user-agent CSS sheet to use the standard flag.

Fixes #23227
2019-04-18 13:46:59 +01:00
bors-servo
a16110682b
Auto merge of #23197 - jdm:bindgen, r=paulrouget
Update bindgen and crates that depend on it.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23197)
<!-- Reviewable:end -->
2019-04-16 03:08:47 -04:00
Josh Matthews
cdf5aa7a32 Update bindgen and crates that depend on it. 2019-04-15 21:25:38 -04:00
Anthony Ramine
44163148c2 Make use of RefCell::try_borrow_unguarded 2019-04-12 19:02:07 +02:00
Emilio Cobos Álvarez
49842f5031 style: Fix servo build, and appease tidy / fmt. 2019-04-12 12:20:15 +02:00
Emilio Cobos Álvarez
8c004c0858 style: Reformat recent changes. 2019-04-12 12:20:14 +02:00
Emilio Cobos Álvarez
7c4f9bbf49 style: Make the list-item increment not visible from the computed style.
This is per https://drafts.csswg.org/css-lists/#declaring-a-list-item.

I intentionally kept <li value> defined using attribute mapping, I think that's
saner than special-casing it in layout.

Differential Revision: https://phabricator.services.mozilla.com/D24935
2019-04-12 12:20:14 +02:00
Hiroyuki Ikezoe
cf7f64c9dc style: Enable the new scroll snap and disable the old scroll snap on nightly.
Differential Revision: https://phabricator.services.mozilla.com/D22804
2019-04-12 12:20:13 +02:00
Hiroyuki Ikezoe
21481e315e style: Switch to the new scroll-snap-type syntax for the old scroll snap implementation and drop the scroll-snap-type-{x,y} longhands.
Now scroll-snap-type is a longhand property.

Differential Revision: https://phabricator.services.mozilla.com/D21622
2019-04-12 12:20:12 +02:00
Hiroyuki Ikezoe
2f457ed144 style: Rename ScrollSnapType to ScrollSnapStrictness.
The scroll snap strictness is defined in the new spec [1], and the structure
is the exactly same as the old scroll snap type structure.

[1] https://drafts.csswg.org/css-scroll-snap-1/#snap-strictness

Differential Revision: https://phabricator.services.mozilla.com/D21621
2019-04-12 12:20:12 +02:00
Emilio Cobos Álvarez
0a84073767 style: Use rust lengths for row-gap / column-gap.
Differential Revision: https://phabricator.services.mozilla.com/D26915
2019-04-12 12:20:11 +02:00
Emilio Cobos Álvarez
0f57b7b833 style: Fix ToResolvedValue implementation for caret-color, and serialize some color properties with Servo.
Differential Revision: https://phabricator.services.mozilla.com/D26785
2019-04-12 12:20:10 +02:00
Emilio Cobos Álvarez
5fd4e17020 style: Use ToResolvedValue for computed style serialization.
Differential Revision: https://phabricator.services.mozilla.com/D26784
2019-04-12 12:20:09 +02:00
Emilio Cobos Álvarez
a47dcb5707 style: Derive ToResolvedValue.
Differential Revision: https://phabricator.services.mozilla.com/D26783
2019-04-12 12:20:09 +02:00
Emilio Cobos Álvarez
6ac777ebf2 style: Add derive code for a new ToResolvedValue trait, and a few trivial implementations.
Differential Revision: https://phabricator.services.mozilla.com/D26782
2019-04-12 12:20:08 +02:00
Mats Palmgren
9b66f452cb style: Remove a note about <li value> style mapping that is no longer true.
Differential Revision: https://phabricator.services.mozilla.com/D26814
2019-04-12 12:20:07 +02:00
Emilio Cobos Álvarez
fce58015d6 style: Cleanup unused style traversal flags.
Some of these were unused, some of them were only used in combination with
others, so I've unified them.

In particular, Forgetful and ClearAnimationOnlyDirtyDescendants were used only
together for a very specific task (the final animation traversal), so I merged
them into something that has that name.

ClearDirtyBits was unused, so I removed along with some code that would no
longer be called.

Differential Revision: https://phabricator.services.mozilla.com/D25454
2019-04-12 12:20:07 +02:00
Emilio Cobos Álvarez
a7636010ee style: Remove a redundant use statement. 2019-04-12 12:20:06 +02:00
Emilio Cobos Álvarez
ae32e4df40 style: Use an explicit stack to measure rule tree memory usage.
A patch of mine that makes us measure the rule tree more often triggers this.

Differential Revision: https://phabricator.services.mozilla.com/D26595
2019-04-12 12:20:04 +02:00
Emilio Cobos Álvarez
369acffea8 style: Make color and text-decoration-line not early properties.
The text-decoration-line is a drive-by thing, but I can put it in a separate
patch if you want. It was needed for Servo (to compute
-servo-text-decorations-in-effect), but I moved Servo away from that model a
while ago.

Differential Revision: https://phabricator.services.mozilla.com/D26254
2019-04-12 12:20:03 +02:00
Emilio Cobos Álvarez
5d2724994c style: Remove the last usage of lossy currentcolor.
We don't have lossy currentcolor in the style system anymore, except for a
single property -moz-font-smoothing-background-color.

I could've converted it into a proper StyleColor and thread down all the
necessary information to the font metrics code.

But it doesn't really seem worth it given it's not exposed to the web, so I just
did the simplest thing, which is making currentcolor compute to transparent to
that specific property.

This patch also removes the stores_complex_colors_lossily code and related,
since now we always can cache computed colors.

Differential Revision: https://phabricator.services.mozilla.com/D26187
2019-04-12 12:20:02 +02:00
Emilio Cobos Álvarez
681f861018 style: Use rust lengths for outline-offset.
Differential Revision: https://phabricator.services.mozilla.com/D26156
2019-04-12 12:20:02 +02:00
Emilio Cobos Álvarez
f8fce03e82 style: Use Servo lengths for column-width.
Differential Revision: https://phabricator.services.mozilla.com/D26155
2019-04-12 12:20:01 +02:00
Emilio Cobos Álvarez
ef0b6bb225 style: Trivially remove some dead code.
Differential Revision: https://phabricator.services.mozilla.com/D26154
2019-04-12 12:20:01 +02:00
Emilio Cobos Álvarez
79fc59c75f style: Use only the new name for StyleColor.
That is, change all uses of StyleComplexColor to just StyleColor.

Differential Revision: https://phabricator.services.mozilla.com/D25977
2019-04-12 12:20:00 +02:00
Emilio Cobos Álvarez
53ccbc5751 style: Use the rust color representation.
Differential Revision: https://phabricator.services.mozilla.com/D25976
2019-04-12 12:19:59 +02:00
Emilio Cobos Álvarez
691eb36ffe style: Expose colors via cbindgen.
Also s/Foreground/CurrentColor.

Differential Revision: https://phabricator.services.mozilla.com/D25975
2019-04-12 12:19:59 +02:00
Emilio Cobos Álvarez
a6f32bc762 style: Fix revalidation in <svg:use> subtree.
So as to avoid incorrectly sharing styles across elements.

Differential Revision: https://phabricator.services.mozilla.com/D25918
2019-04-12 12:19:58 +02:00
Emilio Cobos Álvarez
b268ef6aed style: Remove some redundant use statements. 2019-04-12 12:19:57 +02:00
Emilio Cobos Álvarez
c106fb1231 style: Remove comment that is outdated since I fixed it in bug 1483808. 2019-04-12 12:19:56 +02:00
Emilio Cobos Álvarez
0406be7b68 style: Make the fixed generic family a parse-time alias to monospace.
As discussed on IRC, fixed is only used for prefs right now, and:

 * We already copy the fixed size to the monospace font.
 * We already serialize the fixed family as "monospace" in the style system.

So it already works somewhat inconsistently. Making it an alias makes it
work consistently.

Differential Revision: https://phabricator.services.mozilla.com/D24288
2019-04-12 12:19:56 +02:00
Emilio Cobos Álvarez
2184e3f2e5 style: Cleanup generic font-family handling.
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.

As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.

The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).

Differential Revision: https://phabricator.services.mozilla.com/D24272
2019-04-12 12:19:55 +02:00
Emilio Cobos Álvarez
c49a88ec84 style: Trivially cleanup and remove some dead font code.
Differential Revision: https://phabricator.services.mozilla.com/D24271
2019-04-12 12:19:54 +02:00
Emilio Cobos Álvarez
2f8e05e9e0 style: Autogenerate Servo_ binding functions with cbindgen.
This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.

There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.

But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).

I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.

Differential Revision: https://phabricator.services.mozilla.com/D24798
2019-04-12 12:19:54 +02:00
Cameron McCormack
debd837bf0 style: Add FFI API to create a StyleSheet backed by shared data.
Differential Revision: https://phabricator.services.mozilla.com/D17199
2019-04-12 12:19:53 +02:00