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

Adjust error-handling for invalid filter primitive references #28314

Conversation

Ahmad-S792
Copy link
Contributor

@Ahmad-S792 Ahmad-S792 commented May 8, 2024

8e02837

Adjust error-handling for invalid filter primitive references

https://bugs.webkit.org/show_bug.cgi?id=250276
rdar://problem/104262208

Reviewed by Simon Fraser and Darin Adler.

This patch aligns LegacySVG engine in WebKit with
Gecko / Firefox and Blink / Chromium.

Merge: https://chromium.googlesource.com/chromium/blink/+/ffa39ae78904542a2864e2cb7d1c16c24ee2324e

When a filter primitive has an 'in' (or, where applicable, 'in2') attribute
that references a non-existent result, treat that reference as having the
default value (==no value) instead of producing an error.

* Source/WebCore/svg/graphics/filters/SVGFilterGraph.h:
(WebCore::SVGFilterGraph::getNamedNode const):
* LayoutTests/svg/filters/in-attribute-error-handling.html: Add Test Case
* LayoutTests/svg/filters/in-attribute-error-handling-expected.html: Add Test Case Expectation
* LayoutTests/css3/filters/invalid-reference-filter-in-chain.html: Add Pixel Tolerance for GTK and WPE

> Rebaselines:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:
* LayoutTests/svg/filters/feMerge-wrong-input-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:

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

3daa0c9

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

@Ahmad-S792 Ahmad-S792 added the SVG For bugs in the SVG implementation. label May 8, 2024
@Ahmad-S792 Ahmad-S792 self-assigned this May 8, 2024
@webkit-early-warning-system

This comment was marked as outdated.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 9, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from 889715b to 9655b17 Compare May 9, 2024 01:29
@webkit-early-warning-system

This comment was marked as outdated.

@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from 9655b17 to 9ef6800 Compare May 13, 2024 19:57
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from 9ef6800 to bce89aa Compare May 28, 2024 07:03
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from bce89aa to e005eeb Compare May 28, 2024 08:12
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@Ahmad-S792 Ahmad-S792 marked this pull request as ready for review May 28, 2024 09:21
@Ahmad-S792 Ahmad-S792 requested review from shallawa and smfr May 28, 2024 09:22
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from e005eeb to 39a4bb3 Compare May 28, 2024 16:25
@Ahmad-S792 Ahmad-S792 removed the merging-blocked Applied to prevent a change from being merged label May 28, 2024
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from 39a4bb3 to ca6e425 Compare May 28, 2024 17:53
@Ahmad-S792 Ahmad-S792 force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from ca6e425 to 3daa0c9 Compare May 29, 2024 00:23
@Ahmad-S792 Ahmad-S792 added the merge-queue Applied to send a pull request to merge-queue label May 29, 2024
@webkit-commit-queue webkit-commit-queue added merging-blocked Applied to prevent a change from being merged and removed merge-queue Applied to send a pull request to merge-queue labels May 29, 2024
@Ahmad-S792 Ahmad-S792 added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged labels May 29, 2024
https://bugs.webkit.org/show_bug.cgi?id=250276
rdar://problem/104262208

Reviewed by Simon Fraser and Darin Adler.

This patch aligns LegacySVG engine in WebKit with
Gecko / Firefox and Blink / Chromium.

Merge: https://chromium.googlesource.com/chromium/blink/+/ffa39ae78904542a2864e2cb7d1c16c24ee2324e

When a filter primitive has an 'in' (or, where applicable, 'in2') attribute
that references a non-existent result, treat that reference as having the
default value (==no value) instead of producing an error.

* Source/WebCore/svg/graphics/filters/SVGFilterGraph.h:
(WebCore::SVGFilterGraph::getNamedNode const):
* LayoutTests/svg/filters/in-attribute-error-handling.html: Add Test Case
* LayoutTests/svg/filters/in-attribute-error-handling-expected.html: Add Test Case Expectation
* LayoutTests/css3/filters/invalid-reference-filter-in-chain.html: Add Pixel Tolerance for GTK and WPE

> Rebaselines:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/mac/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:
* LayoutTests/svg/filters/feMerge-wrong-input-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-background-01-f-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-composite-03-f-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-01-b-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-02-b-manual-expected.txt:
* LayoutTests/platform/ios/imported/w3c/web-platform-tests/svg/import/filters-overview-03-b-manual-expected.txt:

Canonical link: https://commits.webkit.org/279421@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Adjust-error-handling-for-invalid-filter-primitive-references branch from 3daa0c9 to 8e02837 Compare May 29, 2024 02:38
@webkit-commit-queue
Copy link
Collaborator

Committed 279421@main (8e02837): https://commits.webkit.org/279421@main

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

@webkit-commit-queue webkit-commit-queue merged commit 8e02837 into WebKit:main May 29, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 29, 2024
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
7 participants