Commit graph

19254 commits

Author SHA1 Message Date
Xidorn Quan
eb554044db
style: Add SequenceWriter::item_str for writing str items.
This will be used in the next patch for font-variant bitflag types.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: 2IvcsnYBNqA
2018-04-29 03:28:41 +02:00
Xidorn Quan
26c3aeda97
style: Add collect_values function to SpecifiedValueInfo trait for collecting possible values.
This is the basic structure of the stuff. Following patches will fill
the gap between Gecko and Servo on value generating, and finally hook
it into InspectorUtils.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: KNLAfFBiY6e
2018-04-29 03:28:40 +02:00
Xidorn Quan
3b9c40dd14
style: Skip system font variant for ToCss in font subproperties.
System font keywords are not a valid value for those properties.

The newly-added #[css(skip)] would be reused by deriving algorithm of
SpecifiedValueInfo to skip them as well.

Bug: 1434130
Reviewed-by: emilio
MozReview-Commit-ID: EmnhkaA9RR5
2018-04-29 03:28:39 +02:00
Emilio Cobos Álvarez
6e3fa68f46
style: Fix serialization order of the outline shorthand.
This is going to be tested in
https://github.com/w3c/web-platform-tests/pull/10700.

Bug: 1457652
Reviewed-by: xidorn
MozReview-Commit-ID: 7Oi1it70YFw
2018-04-29 03:28:38 +02:00
Gerald Squelart
361046d4fa
style: Remove "layout.css.text-combine-upright.enabled" pref.
Shipped since Firefox 48, other browsers have similar impls, and the related
spec has been in CR since a while ago.
The syntax of this property as implemented should be considered to be pretty
stable, so we can remove this pref.

Bug: 1417761
Reviewed-by: xidorn
MozReview-Commit-ID: H7lDsdbUamD
2018-04-29 03:28:38 +02:00
Xidorn Quan
7fe7b2ffb1
style: Add a ValueInfo trait for exposing types needed by devtools.
Most of types just derive it using proc_macro directly. Some of value
types need manual impl.

In my current plan, this new trait will be used in bug 1434130 to expose
values as well.

Bug: 1455576
Reviewed-by: emilio
MozReview-Commit-ID: LI7fy45VkRw
2018-04-29 03:28:34 +02:00
Emilio Cobos Álvarez
276fb7e04b
style: Unify MediaList and ServoMediaList.
Bug: 1456471
Reviewed-by: xidorn
MozReview-Commit-ID: KFWxoohpGlb
2018-04-29 03:28:33 +02:00
Brad Werth
b91ae6b1f9
style: support shape-margin.
Bug: 1265342
Reviewed-by: xidorn
MozReview-Commit-ID: 99pLZsFA9mj
2018-04-29 03:28:32 +02:00
Bobby Holley
48558e313a
style: Update StyleSource to use ArcUnion.
Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: AT4sud9goGV
2018-04-29 03:28:32 +02:00
Bobby Holley
cbbefebdba
servo_arc: ArcUnion.
Bug: 1455784
Reviewed-by: Manishearth
MozReview-Commit-ID: Jxp2A7cj6CV
2018-04-29 03:28:31 +02:00
Xidorn Quan
89fba41e1d
style: Support calc in cursor.
Bug: 1453258
Reviewed-by: emilio
MozReview-Commit-ID: 1ZzxkYboWZg
2018-04-29 03:17:19 +02:00
Emilio Cobos Álvarez
54b444992d
Fix servo build. 2018-04-28 10:26:47 +02:00
Emilio Cobos Álvarez
16ca8de6df
style: Compare degrees for font-style to account for compute_angle introducing error. 2018-04-28 10:26:40 +02:00
Emilio Cobos Álvarez
1f5d90568d
style: Make tidy happy. 2018-04-28 10:26:08 +02:00
Mats Palmgren
62c6f58a5b
style: Add 'row-gap' and 'gap' properties; make 'grid-[column|row]-gap' and 'grid-gap' alias the respective unprefixed properties.
This also makes 'normal' the initial value for the grid-*
properties, per:
https://github.com/w3c/csswg-drafts/issues/2294#issuecomment-369313438

Bug: 1398482
Reviewed-by: emilio
2018-04-28 10:26:08 +02:00
Emilio Cobos Álvarez
e5878b96a9
style: Remove Valgrind workaround to make ::slotted use the rule hash.
Bug: 1426516
Reviewed-by: emilio
MozReview-Commit-ID: 2q14kHjajIr
2018-04-28 10:26:07 +02:00
Emilio Cobos Álvarez
b5c18c24fe
style: Pack the shadow cascade order in ApplicableDeclarationBlock.
I didn't bother not shifting there. We need to load the whole thing and shift
for at least one of cascade level / shadow cascade order.

Callers of level() other than for_rule_tree are non-existent in release builds,
so we'd be doing the shift anyway. I can implement the same thing for
shadow_cascade_order too, but I don't think that optimization is measurable in
any way, either, the compiler should make the decision.

And just in case, the simpler version actually generated less instructions in:

  https://play.rust-lang.org/?gist=ceadb0d3cbce4eeca76e4d9ab9a1c744&version=nightly

with the simple thing.

Bug: 1455032
Reviewed-by: heycam
MozReview-Commit-ID: 8xPBJmlcyKh
2018-04-28 10:26:07 +02:00
Emilio Cobos Álvarez
b1fbb28b8a
style: Only parse font-stretch keywords in the font shorthand.
Bug: 1454883
Reviewed-by: xidorn
MozReview-Commit-ID: 4BqnOSz83w4
2018-04-28 10:26:07 +02:00
Jonathan Watt
36cef8ec68
style: Use user defined types for font-stretch / font-style.
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>
Bug: 1436048
Reviewed-by: jfkthame,jwatt
MozReview-Commit-ID: 7ONYtICeAqb
2018-04-28 10:26:06 +02:00
Emilio Cobos Álvarez
b2722e965c
style: Cleanup (a bit) system font copypasta.
If I had to write that again I would've killed myself :).

This is still not perfect, and the system font code is still quite a mess, but
well, little steps.

Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: BmrZlCSejo7
2018-04-28 10:26:06 +02:00
Emilio Cobos Álvarez
0a8518b452
style: Fix clamping on animations for fort-style.
Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: Awyub0dMOmq
2018-04-28 10:26:06 +02:00
Emilio Cobos Álvarez
737501153b
style: Use a generic type in preparation to fix animation.
Apart from a bit more code reuse.

Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: 2BNOK6v30lX
2018-04-28 10:26:05 +02:00
Emilio Cobos Álvarez
32d4da8a99
style: Update font-style to css-fonts-4.
Bug: 1455358
Reviewed-by: xidorn
MozReview-Commit-ID: 1Nq5DyCjaZe
2018-04-28 10:26:05 +02:00
Emilio Cobos Álvarez
f7636e6662
style: Update font-stretch to css-fonts-4.
These won't "just work", pending changes from bug 1436048 to use a floating
point representation for those.

Bug: 1454883
Reviewed-by: xidorn
MozReview-Commit-ID: Bi5iTdFreMA
2018-04-28 10:26:04 +02:00
Xidorn Quan
91be6c31c3
style: Not copy generated binding files into dist.
Bug: 1455623
Reviewed-by: emilio
MozReview-Commit-ID: GBnkmwjDS8Y
2018-04-28 10:26:04 +02:00
Emilio Cobos Álvarez
91c3214772
style: Update bindings. 2018-04-28 10:26:03 +02:00
Emilio Cobos Álvarez
48de556f8c
style: Fixups for css-fonts-4 font-weight. 2018-04-28 10:26:03 +02:00
Xidorn Quan
0f19c25706
style: Add CAN_ANIMATE_ON_COMPOSITOR in Servo side and propagate it to ServoCSSPropList.h.
Bug: 1454830
Reviewed-by: emilio
MozReview-Commit-ID: 2OBCliDY02g
2018-04-28 10:26:02 +02:00
Xidorn Quan
bc81f09833
style: Add GETCS_NEEDS_LAYOUT_FLUSH flag in Servo side and propagate it to ServoCSSPropList.h.
Bug: 1454830
Reviewed-by: emilio
MozReview-Commit-ID: 5k08FWjobCg
2018-04-28 10:26:02 +02:00
Xidorn Quan
cfffff33a0
style: Generate nsCSSPropertyID.h from data file directly.
Bug: 1454831
Reviewed-by: emilio
MozReview-Commit-ID: CcX2uzgjWFo
2018-04-28 10:26:02 +02:00
Emilio Cobos Álvarez
84d6c13871
style: Fix cascade order of !important in Shadow DOM.
No cleaner ideas right now that carrying that counter around... Maybe a custom
type may be cleaner?

This makes ApplicableDeclarationBlock a bit bigger. I could probably try to make
the counter a 4 / 5-bit number or something and pack the counter there in the
SourceOrderAndCascadeLevel somehow...

But doesn't seem really worth the churn, and can be done as a followup in any
case. Let me know if you want to block on that.

Bug: 1454162
Reviewed-by: heycam
MozReview-Commit-ID: 1LdW9S4xA6f
2018-04-28 10:26:01 +02:00
Xidorn Quan
78f9672b6c
style: Generate property list from Servo data.
Bug: 1452542
Reviewed-by: emilio,froydnj
MozReview-Commit-ID: CwK2oL88r6F
2018-04-28 10:26:01 +02:00
Xidorn Quan
2cd06807fa
style: Have ENABLED_IN flags in nsCSSPropList.h match those in Servo side.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 48t5u1D5rZX
2018-04-28 10:26:00 +02:00
Xidorn Quan
ff9325de5e
style: Use snake_case naming for nsCSSPropertyID of alias as well.
Bug: 1452542
Reviewed-by: emilio
MozReview-Commit-ID: 242ms8wBDIU
2018-04-28 10:26:00 +02:00
Bobby Holley
dfa019c884
style: Parse sheets on the thread pool.
Note that we also drop the dead optional aReusableSheets argument from
the async parsing path, since it was always null.

Bug: 1346988
Reviewed-by: bz,emilio
MozReview-Commit-ID: KddpGFdaqEe
2018-04-28 10:25:59 +02:00
Emilio Cobos Álvarez
bc1126ee8c
style: Update font-weight property and descriptor to css-fonts-4.
Bug: 1454596
Reviewed-by: xidorn
MozReview-Commit-ID: 27aS2UrgXjs
2018-04-28 10:25:59 +02:00
Emilio Cobos Álvarez
593e4e4c9e
style: Rename justify-items: auto to legacy.
Bug: 1363875
Reviewed-by: mats,xidorn
MozReview-Commit-ID: Jfwib2XDmSw
2018-04-28 10:25:58 +02:00
OJ Kwon
d94def6b4a
test(net): update test cases 2018-04-27 12:25:18 -07:00
OJ Kwon
9ff11b9af3
refactor(embedder): rename file select message 2018-04-27 12:23:26 -07:00
OJ Kwon
2fab94785b
refactor(filemanager): uses embedderproxy directly 2018-04-27 12:23:25 -07:00
OJ Kwon
7cec47b3fa
refactor(filemanager): use filemanagermsg to request embedder 2018-04-27 12:22:39 -07:00
OJ Kwon
52b9e4f0ab
refactor(constellation): replace constellationmsg to filemanagermsg 2018-04-27 12:22:38 -07:00
OJ Kwon
c4c0d263e9
test(net): update test cases 2018-04-27 12:22:38 -07:00
OJ Kwon
f69b124444
refactor(filemanager): remove awareness to ui behavior 2018-04-27 12:21:18 -07:00
OJ Kwon
2071245e5f
refactor(compositor): expose new embeddermsg 2018-04-27 12:21:17 -07:00
OJ Kwon
b396a2f6ca
refactor(filemanager): send constellationmsg to select file 2018-04-27 12:21:17 -07:00
OJ Kwon
1c465bcd66
refactor(resourcethread): expose constellationmsg channel 2018-04-27 12:21:16 -07:00
bors-servo
d1378d6bad
Auto merge of #20533 - paulrouget:res, r=mbrubeck
Delegate resource reading to embedder

Now the embedder provides the content of the files itself. Now, on Android, we can use regular assets instead of unzipping all the resources on the scared at startup.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [ ] `./mach build-geckolib` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15635 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/20533)
<!-- Reviewable:end -->
2018-04-27 13:50:18 -04:00
bors-servo
b4c86d3eba
Auto merge of #20702 - servo:window-mixins, r=SimonSapin,nox
Implement WindowOrWorkerGlobalScope.origin

This is needed for the next WPT sync.

<!-- 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/20702)
<!-- Reviewable:end -->
2018-04-27 12:34:58 -04:00
Anthony Ramine
73b5bf201f Implement WindowOrWorkerGlobalScope.origin
The test document_domain_setter.html now fails, but AFAIK the origin
comparison can never be true (document.origin is the unprefixed domain,
while the loaded iframe is from www1.…), and that test fails in all
major browsers because of security exceptions anyway.
2018-04-27 16:41:19 +02:00