Commit graph

71 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
90c0ec0cf7 Fix servo build and rustfmt recent changes.
We need to introduce another Cursor enum that is specific to embedder_traits and
that layout converts to to avoid dependency hell.
2019-01-20 16:31:01 +01:00
Jan Andre Ikenmeyer
6b0c111126
Update MPL license to https (part 2) 2018-11-19 14:46:57 +01:00
Emilio Cobos Álvarez
719209316c
Fix servo build. 2018-07-01 00:54:30 +02:00
Emilio Cobos Álvarez
aea5e146fe
dom: Remove CSSStyleDeclaration.setPropertyValue/setPropertyPriority. 2018-06-02 17:24:12 +02:00
Emilio Cobos Álvarez
15b0a32035
style: Put all the multicol props under the same pref for Servo.
Otherwise it becomes insane.
2018-02-28 12:04:47 +01:00
Emilio Cobos Álvarez
650e947c94
style: Make Servo deal with CSS property prefs more correctly.
Right now you could still set preffed-off properties from CSSStyleDeclaration.
2018-02-27 19:29:07 +01:00
CJ Ku
174f5f7128 Implement scale property styling 2018-01-31 22:12:34 +00:00
CJ Ku
de3e8c9a8b Implement translate property styling 2018-01-31 22:12:33 +00:00
CJ Ku
62c0c6feee Implement rotate property styling 2018-01-31 22:12:26 +00:00
Connor Brewster
2460997ee1 Add CEReactions where needed 2017-07-18 12:22:20 -06:00
Cameron McCormack
91e2119636 style: Support the all shorthand.
Fixes #15055.
2017-04-14 15:39:58 +08:00
Hiroyuki Ikezoe
6ae5af17ce Make font-variant shorthand. 2017-04-14 08:50:16 +09:00
projektir
b4c50de31e Don't serialize initial text-decoration-style #15790 2017-03-09 00:33:17 -05:00
Glenn Watson
ffcb319324 Add support for most of the border-image properties, pass to WR.
This adds support for:
 * border-image (images, not gradients yet)
 * border-image-source
 * border-image-slice
 * border-image-repeat (stretch + repeat only for now)

Remaining work:
 * Connect border-image-outset (WR supports this).
 * border-image-width
2017-02-23 14:15:20 +10:00
bors-servo
e58ef9115f Auto merge of #15289 - montrivo:webidl-exposed, r=cbrewster
Expose interfaces only where they should be. #12415 - Partial

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

I verified the following interfaces:
CSSStyleDeclaration.webidl
ElementCSSInlineStyle.webidl
ElementContentEditable.webidl
EventHandler.webidl
Screen.webidl
StyleSheetList.webidl
StyleSheet.webidl
Client.webidl

---
<!-- 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
- [ ] These changes fix #12415 (github issue number if applicable).

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

<!-- 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/15289)
<!-- Reviewable:end -->
2017-01-29 00:00:19 -08:00
montrivo
d5c6c24d2a Expose interfaces only where they should be. #12415 - Partial 2017-01-29 01:29:29 +01:00
Matt Brubeck
b3820c1296 Convert text-orientation to a Gecko-only property
Remove incomplete and buggy support for text-orientation in Servo.
Make the property values align with Gecko and the latest draft of CSS
Writing Modes Level 3.
2017-01-27 21:12:38 -08:00
Nazım Can Altınova
ed806efade Make background-position a shorthand instead of a longhand 2016-12-15 01:36:30 +03:00
Manish Goregaokar
1bd6e5ff9b Support offset- logical properties 2016-11-29 09:27:13 -08:00
Manish Goregaokar
71a2b379c8 Unexpose CSSOM interfaces 2016-11-15 06:58:16 -08:00
Manish Goregaokar
5fad7b0ff6 Add support for inline-size, block-size, and max-*-size/min-*-size 2016-11-11 11:56:27 -08:00
Manish Goregaokar
f974719d9f Add logical padding, margin longhands and border shorthands 2016-11-11 11:55:59 -08:00
Manish Goregaokar
e34eb13d65 Support logical properties 2016-11-11 11:55:57 -08:00
Ms2ger
ed743bb50c Explicitly expose everything everywhere. 2016-07-12 13:06:48 +02:00
Emilio Cobos Álvarez
411ae84908
style: Add support to the animation shorthand and fix parsing of animation-name. 2016-07-07 16:05:22 -07:00
Pu Xingyu
7badba01ea Support flexbox shorthand properties
Support the `flex` and `flex-flow` shorthand properties in
servo. Currently they are marked as experimental, so they are added to
'__dir__.ini'.

Thanks SimonSapin and jdm for help :)
2016-06-30 12:56:25 +08:00
Emilio Cobos Álvarez
818bc6d4a2
style: parse the remaining animation longhands. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
f529786700
style: Add animation-iteration-count parsing under experimental flag 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
b6ecb1ccb1
style: Add animation-timing-function parsing as experimental. 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
c80084cd29
style: Add animation-duration parsing under experimental flag 2016-06-28 15:09:53 +00:00
Emilio Cobos Álvarez
60192bb830
style: Refactor to pass animations cleanly, land animation-name parsing as experimental 2016-06-28 15:09:53 +00:00
bors-servo
09e6f4ac54 Auto merge of #11428 - g-k:csstext, r=SimonSapin
csstext

- [x] These changes fix #4431.
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy --faster` reports one error for the `css_properties_accessors!` macro not having a spec link

```
$ git log -1 --format=oneline
91fb9bf1d3 fixup! implement cssText
$ ./mach build -d
   Compiling style v0.0.1 (file:///Users/greg/servo/components/style)
   Compiling gfx v0.0.1 (file:///Users/greg/servo/components/gfx)
   Compiling script v0.0.1 (file:///Users/greg/servo/components/script)
   Compiling layout_traits v0.0.1 (file:///Users/greg/servo/components/layout_traits)
   Compiling compositing v0.0.1 (file:///Users/greg/servo/components/compositing)
   Compiling glutin_app v0.0.1 (file:///Users/greg/servo/ports/glutin)
   Compiling constellation v0.0.1 (file:///Users/greg/servo/components/constellation)
   Compiling layout v0.0.1 (file:///Users/greg/servo/components/layout)
   Compiling servo v0.0.1 (file:///Users/greg/servo/components/servo)
Build completed in 0:05:11.475584
$ ./mach test-tidy --faster
Checking files for tidiness...
./components/script/dom/cssstyledeclaration.rs:386: method declared in webidl is missing a comment with a specification link
  Progress: 100% (12/12)
```

- [x] There are tests for these changes.  More CSSOM tests pass, but others fail that probably shouldn't:

* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-002.htm` and a bunch of the other tests in `/css-tests/cssom-1_dev/html/ crash when run individually
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssom-cssText-serialize.htm` fails to strip a trailing semicolon (`left: 10px` vs `left: 10px;`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/index-001.htm` shared shorthand values aren't coalesced (`margin: 20px` vs. `margin: 20px 20px 20px 20px`)
* `./mach test-css tests/wpt/css-tests/cssom-1_dev/html/cssstyledeclaration-csstext.htm` also crashes and fails for `color: red;` vs. `color: RED;`,  preserving declaration insertion order, whitespace in the value, and setting an unknown style property.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11428)
<!-- Reviewable:end -->
2016-06-01 01:59:12 -05:00
Glenn Watson
ff995d739c implement cssText 2016-05-31 19:32:30 -04:00
Pu Xingyu
a7733b38d4 Add remaining longhand flexbox style properties
Add the remaining longhand CSS properties of flexbox for servo,
including `flex-wrap`, `flex-grow`, `flex-shrink`, `justify-content`,
`align-items`, `align-self` and `align-content`.

tests for the remaining longhand properties are also enabled. Test for
default value of `align-self` is modified because the new default value
for this property is "auto" is current flexbox CR.
2016-05-25 21:40:34 +08:00
Daniel Robertson
2d9d31ee04
Add style property for flex-basis
Add the style property for flex-basis. The property should allow all
values acceptable for `width`|`height` with the addition of `content`.
2016-04-24 14:04:40 -04:00
Daniel Robertson
3580f91291 Implement flexbox reordering
Add style property for order and implement reordering by this property
in flex flow. Based on previous work by @zentner-kyle.
2016-04-11 16:55:16 -04:00
Josh Matthews
b62d1a1c43 Add dashed CSS properties to CSSStyleDeclaration. 2015-08-28 13:15:17 -04:00
Kyle Zentner
45b7ee9bdb Parse flex-direction CSS property. 2015-08-21 15:59:16 -07:00
David Zbarsky
a3ee46fc9c Make CSSStyleDeclaration setters rethrow errors instead of unwrapping and crashing. 2015-08-11 00:34:41 -04:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
Corey Farwell
ee224bc3e5 Add/format license headers for WebIDLs 2015-07-26 22:12:18 +07:00
Glenn Watson
39ddbbb0e1 Implement enough of 3d transforms spec to run the CSS FPS demo. 2015-06-23 14:10:44 +10:00
Jinwoo Song
a51d5de860 Implement 'background-clip' property in CSS3 Background
This property determines the background painting area, which determines the area
within which the background is painted.

Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-clip

Fixes #6066.
2015-05-16 09:43:46 +09:00
Jinwoo Song
b1b22c0c53 Implement 'background-origin' property in CSS3 Background
This property determines the background positioning area, that is the position of
the origin of an image specified using the 'background-image' CSS property.

'background-origin' is ignored when background-attachment is fixed.

Spec: http://dev.w3.org/csswg/css-backgrounds-3/#background-origin

Fixes #6045.
2015-05-15 10:02:58 +09:00
Simon Sapin
f30cd4f377 Add column-width, column-count, columns and column-gap properties in the style system. 2015-04-29 02:29:32 +02:00
Patrick Walton
48299a53cb layout: Implement most of border-collapse per CSS 2.1 § 17.6.2.
Known issues:

* Collapsed borders do not correctly affect the border-box of the table
  itself.

* The content widths of all cells in a column and the content height of
  all cells in a row is the same in this patch, but not in Gecko and
  WebKit.

* Corners are not painted well. The spec does not say what to do here.

* Column spans are not handled well. The spec does not say what to do
  here either.
2015-04-27 17:12:07 +02:00
Anthony Ramine
b636481ca3 Implement CSSStyleDeclaration.float (fixes #5101)
It just needs to be prefixed by an underscore.
2015-04-21 19:34:52 +02:00
Patrick Walton
66dd8c8a6c layout: Implement CSS transitions per CSS-TRANSITIONS § 2.
Transition events are not yet supported, and the only animatable
properties are `top`, `right`, `bottom`, and `left`. However, all other
features of transitions are supported. There are no automated tests at
present because I'm not sure how best to test it, but three manual tests
are included.
2015-03-31 08:46:11 -07:00
Patrick Walton
d10627a2b3 layout: Implement 2D CSS transforms per CSS-TRANSFORMS § 5, 6, 7, and 8. 2015-03-17 11:30:55 -07:00
Patrick Walton
586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00