Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SVG] Default for x1, y1 and y2 is 0% for LinearGradient #6731

Merged
merged 1 commit into from Nov 26, 2022

Conversation

Ahmad-S792
Copy link
Contributor

@Ahmad-S792 Ahmad-S792 commented Nov 22, 2022

7a2abd4

[SVG] Default for x1, y1 and y2 is 0% for LinearGradient

[SVG] Default for x1, y1 and y2 is 0% for LinearGradient
https://bugs.webkit.org/show_bug.cgi?id=248212

Reviewed by Nikolas Zimmermann.

This patch is to align Webkit with Blink / Chrome and Gecko / Firefox.

Merge - https://chromium.googlesource.com/chromium/blink/+/219dff463987f53c22f5f96f35a794246a13538d

As per the spec, if the x1|y1|y2 attribute is not specified,
the effect is as if a value of "0%" were specified.

* Source/WebCore/svg/SVGLinearGradientElement.h: Update default values for x1, y1 and y2
* LayoutTests/svg/gradient/linear-gradient-default-length.html: Add Test Case
* LayoutTests/svg/gradient/linear-gradient-default-length-expected.txt: Add Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-y2-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-y2-default-length-expected.svg: Added Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-y1-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-y1-default-length-expected.svg: Added Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-x1-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-x1-default-length-expected.svg: Added Test Case Expectations

Canonical link: https://commits.webkit.org/257032@main

a757bd5

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@Ahmad-S792 Ahmad-S792 self-assigned this Nov 22, 2022
@Ahmad-S792 Ahmad-S792 added the SVG For bugs in the SVG implementation. label Nov 22, 2022
@Ahmad-S792 Ahmad-S792 marked this pull request as ready for review November 22, 2022 13:28
Copy link
Contributor

@nikolaszimmermann nikolaszimmermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any WPT test that already covers this?
A reftest that checks the rendering would be useful, to proof the visual effect is correct too.

I checked via some keywords to see if there is any WPT but I couldn't manage to find it. :-( You want new tests beside this test for linear gradient? Or want me to change "expected file" of this test?

@Ahmad-S792
Copy link
Contributor Author

@nikolaszimmermann - I added the tests but it seems that it might not be an easy fix and would need some more changes. Since prior to my latest push, the added test was still failing after the changes. So I think it might need more fixing.

Copy link
Contributor

@nikolaszimmermann nikolaszimmermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to say, svg/gradients is a more natural place for these tests. However, I still wonder if there is WPT coverage?

Source/WebCore/svg/SVGLinearGradientElement.h Outdated Show resolved Hide resolved
Source/WebCore/svg/SVGLinearGradientElement.h Outdated Show resolved Hide resolved
Source/WebCore/svg/SVGLinearGradientElement.h Outdated Show resolved Hide resolved
@Ahmad-S792
Copy link
Contributor Author

Forgot to say, svg/gradients is a more natural place for these tests. However, I still wonder if there is WPT coverage?

Do you want me to change them to gradient or wait till whole EWS to run to see if there is any WPT coverage and then do one final push to get everything sorted?

@Ahmad-S792
Copy link
Contributor Author

@nikolaszimmermann - Moved to SVG/Gradient and also fixed the other stuff. :-)

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 22, 2022
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Nov 22, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 22, 2022
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label Nov 22, 2022
@Ahmad-S792
Copy link
Contributor Author

@nikolaszimmermann - Moved to SVG/Gradient and also fixed the other stuff. :-)

Now it is good to go for your review. mac-wk1 is platform / infra issue.

Copy link
Contributor

@nikolaszimmermann nikolaszimmermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, r=me if EWS is fine.

@Ahmad-S792 Ahmad-S792 added the merge-queue Applied to send a pull request to merge-queue label Nov 26, 2022
[SVG] Default for x1, y1 and y2 is 0% for LinearGradient
https://bugs.webkit.org/show_bug.cgi?id=248212

Reviewed by Nikolas Zimmermann.

This patch is to align Webkit with Blink / Chrome and Gecko / Firefox.

Merge - https://chromium.googlesource.com/chromium/blink/+/219dff463987f53c22f5f96f35a794246a13538d

As per the spec, if the x1|y1|y2 attribute is not specified,
the effect is as if a value of "0%" were specified.

* Source/WebCore/svg/SVGLinearGradientElement.h: Update default values for x1, y1 and y2
* LayoutTests/svg/gradient/linear-gradient-default-length.html: Add Test Case
* LayoutTests/svg/gradient/linear-gradient-default-length-expected.txt: Add Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-y2-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-y2-default-length-expected.svg: Added Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-y1-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-y1-default-length-expected.svg: Added Test Case Expectations
* LayoutTests/svg/gradient/linear-gradient-x1-default-length.svg: Added Test Case
* LayoutTests/svg/gradient/linear-gradient-x1-default-length-expected.svg: Added Test Case Expectations

Canonical link: https://commits.webkit.org/257032@main
@webkit-commit-queue
Copy link
Collaborator

Committed 257032@main (7a2abd4): https://commits.webkit.org/257032@main

Reviewed commits have been landed. Closing PR #6731 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 7a2abd4 into WebKit:main Nov 26, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 26, 2022
@Ahmad-S792 Ahmad-S792 deleted the fix248212 branch December 14, 2022 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SVG For bugs in the SVG implementation.
Projects
None yet
5 participants