Script: Enable SVG presentation attributes with updated stylo dependency - #45405
Conversation
|
🔨 Triggering try run (#26994757902) for Linux (WPT) |
|
Test results for linux-wpt from try job (#26994757902): Flaky unexpected result (48)
Stable unexpected results that are known to be intermittent (16)
Stable unexpected results (81)
|
|
|
|
You can run |
d88a679 to
86d93c3
Compare
|
Test results look good. Are your PRs ready for review? If so, please unmark them as draft so folks can take a look. Thanks a lot for tackling these! |
1556c57 to
e7526f0
Compare
| if let Ok(decl) = parser.parse_entirely(|p| { | ||
| style::properties::longhands::$css_property::parse_declared(&parser_context, p) |
There was a problem hiding this comment.
Can we make this little Rusty aka Rust Style
| if let Ok(decl) = parser.parse_entirely(|p| { | |
| style::properties::longhands::$css_property::parse_declared(&parser_context, p) | |
| parser.parse_entirely(|p| { | |
| style::properties::longhands::$css_property::parse_declared(&parser_context, p) | |
| }).map(|decl| push(decl)).ok(); |
Same for below.
shubhamg13
left a comment
There was a problem hiding this comment.
Cheers. A lot of WPT Passing
| @@ -0,0 +1,3 @@ | |||
| [spaces-at-end-of-path-data.html] | |||
| [Allow trailing empty entry in value list] | |||
| expected: FAIL | |||
There was a problem hiding this comment.
We can allow some new FAIL cases when the amount of PASS is out number.
It's good to explain when the PR is finalized.
3e0ff78 to
3c945f2
Compare
497ec27 to
9d701bb
Compare
| attr_to_css_decl!("stroke-miterlimit" => stroke_miterlimit); | ||
| attr_to_css_decl!("stroke-opacity" => stroke_opacity); | ||
|
|
||
| if *name == *local_name!("circle") { |
There was a problem hiding this comment.
It seems wrong to directly look at the local name. Eventually we should inspect the runtime type. However, that's currently not possible without introducing SVGXXXElement types and adding parser support.
Let's remove them from this PR and add them in the next PR where we add the new DOM types for the basic shapes.
| macro_rules! attr_to_css_decl { | ||
| ($attr_name:tt => $css_property:ident) => { | ||
| if let Some(val) = self.get_attr_val_for_layout(&ns!(), &local_name!($attr_name)) { | ||
| let mut input = ParserInput::new(val); | ||
| let mut parser = Parser::new(&mut input); | ||
| parser.parse_entirely(|p| { | ||
| style::properties::longhands::$css_property::parse_declared(&parser_context, p) | ||
| }).map(|decl| push(decl)).ok(); | ||
| } | ||
| }; | ||
| } |
There was a problem hiding this comment.
I think we should avoid the usage of a macro here and in addition do not use abbreviations for variable names: https://book.servo.org/contributing/style-guide.html
There was a problem hiding this comment.
Done
- Replaced the macro with the
SVGElement::parse_svg_attributehelper function - Expanded abbreviated variable names (
val → value, p → parse_input, decl → declaration)
50a5ed0 to
5f34a3e
Compare
04cd4be to
7c77faf
Compare
Removes `engine = "gecko"` from 11 SVG-specific CSS properties to be enabled for servo: - **Fill (3):** `fill`, `fill-opacity`, `fill-rule` - **Stroke (8):** `stroke`, `stroke-width`, `stroke-linecap`, `stroke-linejoin`, `stroke-dasharray`, `stroke-dashoffset`, `stroke-miterlimit`, `stroke-opacity` Also updates the `ComputedValues` size test (224 → 232) for the new fields. Servo [PR](servo/servo#45405) --------- Signed-off-by: Mohamed Mostafa [email protected] Co-authored-by: Mohamed Mostafa <[email protected]>
7c77faf to
022b9a4
Compare
|
Bleach, pressed the wrong button and triggered the branch update. |
Head branch was pushed to by a user without write access
4e3f83d to
1ce76cb
Compare
The PR now uses the latest stylo |
Signed-off-by: Mohamed Mostafa <[email protected]>
Co-authored-by: Josh Matthews <[email protected]> Signed-off-by: Mohamed Mostafa <[email protected]>
Co-authored-by: Josh Matthews <[email protected]> Signed-off-by: Mohamed Mostafa <[email protected]>
Signed-off-by: Mohamed Mostafa <[email protected]>
Signed-off-by: Mohamed Mostafa <[email protected]>
Signed-off-by: Mohamed Mostafa <[email protected]>
Signed-off-by: Mohamed Mostafa <[email protected]>
Signed-off-by: Mohamed Mostafa <[email protected]>
1ce76cb to
e416a5e
Compare
|
Rebased after #45492 |
for Servo.