Commit graph

6850 commits

Author SHA1 Message Date
Xidorn Quan
a0edeb1a92
style: Remove DeclarationPushMode::Update and related code.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: 1fI5YRa54lQ
2018-07-24 03:29:42 +02:00
Xidorn Quan
b14b2beaad
style: Add new algorithm for setting property to be used in later commit.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: CdM8hDB6rFj
2018-07-24 03:29:28 +02:00
Xidorn Quan
d245f8b579
style: Introduce a concept of logical group.
Bug: 1473180
Reviewed-by: emilio
MozReview-Commit-ID: GXlf8JNML4N
2018-07-24 03:29:15 +02:00
Emilio Cobos Álvarez
08dcd7fca0
style: Remove IS_STYLE_IF_VISITED.
Bug: 1474959
Reviewed-by: xidorn
MozReview-Commit-ID: 8rnlaMOJisA
2018-07-24 03:29:03 +02:00
Emilio Cobos Álvarez
4e1606bfaf
style: Push visited style computation a bit further down.
Bug: 1474959
Reviewed-by: xidorn
MozReview-Commit-ID: 1DILenWIw4D
2018-07-24 03:28:50 +02:00
Emilio Cobos Álvarez
45435a57e9
style: Cleanup might_need_transitions_update.
Thought I had to update this as well, but nope. When basically any style changes
we already update transitions.

needs_transitions_update already handles the physical mapping changing by
checking whether any transition for the physical property remain there or not.

Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 6vKwal4yzRU
2018-07-24 03:28:36 +02:00
Emilio Cobos Álvarez
856e5d1db6
style: Update animations if the logical to physical property mapping changes.
Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 1lbOcniojVO
2018-07-24 03:28:23 +02:00
Emilio Cobos Álvarez
5504cbdfd7
style: Animate logical properties.
The setup is that AnimationValue only contains physical properties, and
we physicalize when building keyframes and transitions.

Bug: 1309752
Reviewed-by: birtles
MozReview-Commit-ID: 9dI20N0LFrk
2018-07-24 03:28:10 +02:00
Emilio Cobos Álvarez
be9acba801
style: Introduce PropertyDeclaration::to_physical.
Bug: 1309752
Reviewed-by: heycam
MozReview-Commit-ID: FAL04K5G948
2018-07-24 03:27:56 +02:00
Sylvestre Ledru
498592ff61
style: autopep8
Bug: 1468273
Reviewed-by: ted
MozReview-Commit-ID: 8j8EU3E08GP
2018-07-24 03:26:12 +02:00
Bastien Orivel
ba9cbd87fb Update parking_lot to 0.6 2018-07-20 00:44:08 +02:00
bors-servo
e57187305f
Auto merge of #21181 - nupurbaghel:update_source_set, r=jdm
Implement update source set & select image source

<!-- Please describe your changes on the following line: -->

---
<!-- 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
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11416 (github issue number if applicable).

- [x] These changes require tests but cannot be written until implementation of responsive images is complete

<!-- 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/21181)
<!-- Reviewable:end -->
2018-07-19 08:18:12 -04:00
nupurbaghel
8d06da8afd implement update_source_set, select_image_source 2018-07-19 09:20:46 +05:30
Bastien Orivel
9e446971a8 Update euclid to 0.18 2018-07-18 09:27:24 +02:00
Emilio Cobos Álvarez
5227c7572e
style: Gecko build fix for Servo PR #21156.
MozReview-Commit-ID: FbN0hiUGzYa
2018-07-16 19:44:31 +02:00
Emilio Cobos Álvarez
bad4f7d729
style: Gecko build fix for Servo PR #21139.
MozReview-Commit-ID: 3ocJrRB3jeO
2018-07-16 19:44:23 +02:00
Dan Glastonbury
96e812e732
style: Correct background/foreground ratio mixing.
Bug: 1467622
Reviewed-by: xidorn
MozReview-Commit-ID: InAZVcH2Vkt
2018-07-16 19:44:04 +02:00
Dan Glastonbury
a76f5393d4
style: Change nscolor to StyleComplexColor.
Bug: 1467622
Reviewed-by: xidorn
MozReview-Commit-ID: 1bbQzOoOuBe
2018-07-16 19:43:50 +02:00
Emilio Cobos Álvarez
6f9b47be25
style: Cleanup push_applicable_declarations. r=xidorn
This patch changes the behavior to skipping XBL rules for
getDefaultComputedStyle.

Bug: 1475220
Reviewed-by: xidorn
MozReview-Commit-ID: 52cwDyBAXO
2018-07-16 19:43:39 +02:00
Xidorn Quan
db74d0c579
style: Remove unused parent parameter in ComputedValues::new.
Bug: 1475229
MozReview-Commit-ID: EBG0TS7tI4P
2018-07-16 19:43:30 +02:00
Cameron McCormack
a41127152b
style: Measure heap allocations hanging off selector components.
Bug: 1475191
Reviewed-by: emilio
MozReview-Commit-ID: D7vZQ7v8owS
2018-07-16 19:43:15 +02:00
Xidorn Quan
dd277be487
style: Remove a unused line to fix a warning.
Bug: 1461285
2018-07-16 19:43:08 +02:00
Xidorn Quan
d4ea70fd34
style: Have the CSSOM appending behavior behind a pref and only enable it on Nightly.
Bug: 1461285
Reviewed-by: emilio
MozReview-Commit-ID: 6BzPTNjXjyA
2018-07-16 19:42:53 +02:00
Xidorn Quan
2be1375745
style: Add a declaration iterator to AllShorthand for simplify code.
Bug: 1461285
Reviewed-by: emilio
MozReview-Commit-ID: 9w2B3SpdkQo
2018-07-16 19:42:42 +02:00
Xidorn Quan
36038869aa
style: Rename DeclarationSource to DeclarationPushMode.
Bug: 1461285
Reviewed-by: emilio
MozReview-Commit-ID: Iyv9JrXrpzl
2018-07-16 19:42:27 +02:00
Cameron McCormack
f526af7f01
style: Remove angle values from image-orientation.
Bug: 1473450
Reviewed-by: emilio
MozReview-Commit-ID: FB74ILJM6Fm
2018-07-16 19:42:12 +02:00
Oriol Brufau
4e8d3fce38
style: Honor logical border colors in visited links.
Bug: 1472567
Reviewed-by: emilio
MozReview-Commit-ID: IF8yvkFmPc4
2018-07-16 19:41:58 +02:00
Emilio Cobos Álvarez
1c799dd296
style: Make writing-mode and direction non-animatable.
Per https://github.com/w3c/csswg-drafts/issues/2751

Bug: 1473779
Reviewed-by: heycam
MozReview-Commit-ID: GCG3vJWNPfC
2018-07-16 19:41:46 +02:00
Emilio Cobos Álvarez
4d005cb90e
style: Reformat most of inherited_box.mako.rs.
image-orientation is being changed as we speak, so I left it there to avoid
bitrot.

Bug: 1473779
Reviewed-by: heycam
MozReview-Commit-ID: IwpA5HEuVU
2018-07-16 19:41:28 +02:00
Philipp Klein
5e43fe330d Add doc comments to specified float and clear CSS property 2018-07-11 08:07:58 +02:00
Philipp Klein
85af4145c3 style: Move clear CSS property outside mako
closes #21155
2018-07-10 09:18:33 +02:00
bors-servo
2bc70e738b
Auto merge of #21139 - kleinph:move-float-clear-outside-mako, r=emilio
style: Move `float` CSS property outside mako

Hi, I am fairly new to Rust and this is my first contribution to a Rust project.

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #21130

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

I'm not sure if the approach with the two enums is good. Please let me know if this can be improved.
Regarding the tests I'm unsure: `tests/wpt/web-platform-tests/css/css-display/display-contents-float-001.html` seems to fail already before this PR, (and the cause is maybe not related to the style property definition).

Also I would like to add some docs, is it allowed to use the descriptions from MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/float).

<!-- 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/21139)
<!-- Reviewable:end -->
2018-07-09 22:00:25 -04:00
Philipp Klein
c7871811c8 style: Move float CSS property outside mako
closes #21130
2018-07-09 12:47:07 +02:00
Emilio Cobos Álvarez
628ab7db01
style: Fix servo build. 2018-07-09 03:22:52 +02:00
Emilio Cobos Álvarez
d9d0186117
style: Trivial indentation fix.
MozReview-Commit-ID: JqBxF7i0HQZ
2018-07-09 03:05:45 +02:00
Emilio Cobos Álvarez
9f8c80fb3a
style: Make writing-mode and direction non-animatable.
Per https://github.com/w3c/csswg-drafts/issues/2751

Bug: 1473779
Reviewed-by: heycam
2018-07-09 03:05:32 +02:00
Emilio Cobos Álvarez
a11dcefee7
style: Reformat most of inherited_box.mako.rs.
image-orientation is being changed as we speak, so I left it there to avoid
bitrot.

Bug: 1473779
Reviewed-by: heycam
2018-07-09 03:05:19 +02:00
Emilio Cobos Álvarez
6518b0adfa
style: Other minor properties.mako.rs cleanups and improvements.
Also, add an is_logical method, which we'll use in a bit.

Bug: 1473793
Reviewed-by: heycam
MozReview-Commit-ID: Hq63wgbiRRu
2018-07-09 03:05:04 +02:00
Emilio Cobos Álvarez
263d4258ea
style: Add a clone helper that works regardless of whether the property is logical.
Bug: 1473793
Reviewed-by: heycam
2018-07-09 03:04:36 +02:00
Emilio Cobos Álvarez
769188ddbb
style: Remove dead code.
Bug: 1473793
Reviewed-by: heycam
2018-07-09 03:04:21 +02:00
Bobby Holley
50a85a5dd6
style: Cap the number of style threads at six.
Differential Revision: https://phabricator.services.mozilla.com/D1928
Bug: 1431285
Reviewed-by: emilio
2018-07-09 03:04:01 +02:00
Emilio Cobos Álvarez
c23dca874f
style: Reformat font.mako.rs.
To be consistent, use the block indentation the rest of the Rust code uses.

Differential Revision: https://phabricator.services.mozilla.com/D1906
Bug: 1472552
Reviewed-by: xidorn
2018-07-09 03:03:41 +02:00
Bastien Orivel
1766867cf4 Update regex to 1.0 2018-07-07 12:03:17 +02:00
Emilio Cobos Álvarez
8e5c853fca
style: Appease tidy. 2018-07-01 01:01:46 +02:00
Emilio Cobos Álvarez
e149059608
style: Fix build / unit tests. 2018-07-01 00:54:30 +02:00
Emilio Cobos Álvarez
fc5dbc1bae
style: Remove stray newline. 2018-07-01 00:11:08 +02:00
Emilio Cobos Álvarez
c2d21a8497
style: Serialize content properties using Servo.
Bug: 1472443
Reviewed-by: xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1901
2018-07-01 00:10:46 +02:00
Emilio Cobos Álvarez
856924f167
style: Make StyleContentType an enum class.
Most of it is automated by:

  %s/eStyleContentType_/StyleContentType::/g
  %s/nsStyleContentType/StyleContentType/g

But I removed some parentheses by hand.

Bug: 1472443
Reviewed-by: xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1900
2018-07-01 00:10:31 +02:00
Emilio Cobos Álvarez
28c9820dd9
style: Expose logical props in computed style.
Bug: 1116638
Reviewed-by: xidorn
Differential Revision: https://phabricator.services.mozilla.com/D1862
2018-07-01 00:10:13 +02:00
Olli Pettay
6483a89848
if ExtendedDOMSlots are used before slots, use FatSlots to have fewer allocations.
Bug: 1419661
2018-07-01 00:09:54 +02:00