Commit graph

35 commits

Author SHA1 Message Date
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
Patrick Walton
f9cdd05d58 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-09 17:13:45 -07:00
Simon Sapin
4c1d778ced Revert "layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1"
This reverts commit 30fd28d107.
2015-03-03 21:16:24 +01:00
bors-servo
e1a50c7719 auto merge of #5133 : servo/servo/background-size, r=SimonSapin
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.

Rebase of #4368. Fixes #4368.
2015-03-03 11:48:54 -07:00
bors-servo
5cd6316add auto merge of #5067 : servo/servo/counters, r=SimonSapin
Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.

Moved from #4544, because Critic.

Fixes #4544.
2015-03-03 10:42:52 -07:00
Patrick Walton
09c53f461d layout: Implement image-rendering per CSS-IMAGES-3 § 5.3 and
`background-size` per CSS-BACKGROUNDS § 3.9.

Nearest neighbor interpolation is used for `crisp-edges`, like Firefox.
A note has been added that we could do better if we wanted to.

Multiple backgrounds are not yet supported.
2015-03-03 17:54:12 +01:00
Patrick Walton
30fd28d107 layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1
§ 12.3-12.5.

Only simple alphabetic and numeric counter styles are supported. (This
is most of them though.)

Although this PR adds a sequential pass to layout, I verified that on
pages that contain a reasonable number of ordered lists (Reddit
`/r/rust`), the time spent in generated content resolution is dwarfed by
the time spent in the parallelizable parts of layout. So I don't expect
this to negatively affect our parallelism expect perhaps in pathological
cases.
2015-03-03 17:31:19 +01:00
Patrick Walton
a82fc00806 layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.
Fragmentation is not yet supported.
2015-03-03 17:03:27 +01:00
Patrick Walton
09358b908d layout: Implement text-shadow per CSS-TEXT-DECORATION-3 § 4. 2015-03-02 13:28:51 -08:00
Patrick Walton
5fdaba05a6 layout: Implement text-align: justify and text-justify per
CSS-TEXT-3 § 7.3.

`text-justify: distribute` is not supported.

The behavior of `text-justify: none` does not seem to match what Firefox
and Chrome do, but it seems to match the spec.

Closes #213.
2015-01-29 17:00:41 -08:00
bors-servo
c8e68fa45c auto merge of #4592 : pcwalton/servo/text-overflow, r=mbrubeck
Only the one-value syntax is supported for now.

r? @mbrubeck
2015-01-28 17:24:50 -07:00
Patrick Walton
0f8e436745 layout: Implement text-overflow: ellipsis per CSS-UI-3 § 6.2.
Only the one-value syntax is supported for now.
2015-01-28 16:23:31 -08:00
Patrick Walton
abddfa742f gfx: Implement font-stretch per CSS3-FONTS § 3.3 in the Core Text
font backend.
2015-01-28 12:42:52 -08:00
Bruno de Oliveira Abinader
dc008977f9 Share supported CSS properties between style and CSSStyleDeclaration
Avoids duplicated code when implementing the CSS properties accessors in
CSSStyleDeclaration WebIDL. Servo internal CSS properties are not
accessible.

CSS property "float" is unnacessible because we currently lack support
for BinaryName IDL annotation (#4435).

Fixes #4429, #4430.
2015-01-19 13:21:03 -04:00
ProgramFOX
18d8ee6ce0 Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
Adam Sunderland
674fe910c1 Add GetPropertyPriority to CSSStyleDeclaration
Tweak getPropertyPriority to match recommendations

Adding Tests for Style Priority

Use else if

Adding Content Test for GetPropertyPriority

Revert "Adding Tests for Style Priority"

This reverts commit 8666a37f833b06c3e43f27acd8a9678e94425e55.
2014-12-23 11:41:33 -06:00
ProgramFOX
07d37af37e Implemented CSSStyleDeclaration.setPropertyPriority
Implemented CSSStyleDeclaration.setPropertyPriority, resolves #4433
2014-12-23 17:14:45 +01:00
Josh Matthews
0a54665444 Add missing supported CSS properties. 2014-12-18 12:54:03 -05:00
Josh Matthews
c8557c44a9 Merge CSS2Properties and CSSStyleDeclaration. 2014-12-18 12:54:03 -05:00
Josh Matthews
3cfe8ab53e Address review comments. 2014-12-18 12:54:02 -05:00
Josh Matthews
9d82e06e64 Implement RemoveProperty, SetProperty, and supported property indices. 2014-12-18 12:54:02 -05:00
Cameron Zwarich
1c5d58180d Add the basic CSSStyleDeclaration CSSOM interface.
This just includes the .webidl file (with some of the functionality
commented out) and the stub implementations for the bindings.

This is another step towards #1721.
2014-12-18 12:54:02 -05:00