Emilio Cobos Álvarez
52026f602b
style: Don't allow to parse XUL tree pseudo-elements with a single colon.
...
Now that they're not exposed to the web we can remove this special case.
Differential Revision: https://phabricator.services.mozilla.com/D28071
2019-05-07 12:55:27 +02:00
Emilio Cobos Álvarez
c0b17cc844
style: Don't keep two list of stylesheets in ServoStyleSet.
...
Just one set of stylesheets is enough. While at it, unify SheetType and Origin.
Differential Revision: https://phabricator.services.mozilla.com/D27564
2019-05-07 12:55:26 +02:00
Mats Palmgren
098eb300ac
style: [cssom][css-grid] 'grid-auto-flow: row dense' should serialize to 'dense' since 'row' is implied.
...
Differential Revision: https://phabricator.services.mozilla.com/D28058
2019-05-07 12:55:25 +02:00
Emilio Cobos Álvarez
477bda81d3
style: Unify a bit Servo and Gecko code in properties.mako.rs.
...
Mostly removing #[cfg] statements, so npotb.
2019-05-07 12:55:24 +02:00
Emilio Cobos Álvarez
09d497db3d
style: Refactor the selector parser to make implementing ::part() easier.
...
::slotted() is already weird in the sense that it supports a pseudo-element
afterwards (so ::slotted(*)::before is valid for example).
::part() is weirder because you are supposed to allow stuff like
::part(foo):hover, ::part(foo):hover::before, etc.
In order to avoid making the already-complex parse_compound_selector more
complex, shuffle stuff so that we pass the progress of our current compound
selector around, and is the parsing code for each selector which decides whether
it's ok to parse at the given point.
Differential Revision: https://phabricator.services.mozilla.com/D27158
2019-05-07 12:55:23 +02:00
Emilio Cobos Álvarez
498a163cdf
style: The counters code should use atoms rather than strings.
...
Servo already atomizes the counter names, it makes no sense to copy the string
rather than bumping the refcount.
Differential Revision: https://phabricator.services.mozilla.com/D27061
2019-05-07 12:55:22 +02:00
Jonathan Kew
a9e473c6e8
style: Allow full-width and/or full-size-kana values of text-transform to be combined with a case transformation.
...
Differential Revision: https://phabricator.services.mozilla.com/D27402
2019-05-07 12:55:21 +02:00
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