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

Only send one drawing command per list marker #6842

Conversation

Ahmad-S792
Copy link
Contributor

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

5e81d33

Only send one drawing command per list marker

Only send one drawing command per list marker
https://bugs.webkit.org/show_bug.cgi?id=248378

Reviewed by Tim Nguyen.

Merge - https://src.chromium.org/viewvc/blink?view=revision&;revision=151161

Previously, some list markers (notably list-style-type: disc, circle, square)
would send two drawing commands per marker: one to fill the marker, and
then a second one to fill it. This constructs unnecessary paints and causes
a weird visual effect if the color is translucent.

This should have a minor visible effect on these list markers, but it's not
identical: since the stroke area isn't drawn again, the antialiasing varies.

* Source/WebCore/rendering/RenderListMarker.cpp:
(RenderListMarker::paint): Update draw to fill or stroke for "disc", "circle" and "square"
* LayoutTests/fast/lists/list-type-translucent-color.html: Added Test Case
* LayoutTests/fast/lists/list-type-translucent-color-expected.html: Added Test Case Expectation

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

de1364b

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 28, 2022
@Ahmad-S792 Ahmad-S792 added the Layout and Rendering For bugs with layout and rendering of Web pages. label Nov 28, 2022
@Ahmad-S792 Ahmad-S792 marked this pull request as ready for review November 28, 2022 13:39
smfr
smfr previously requested changes Nov 28, 2022
Copy link
Contributor

@smfr smfr left a comment

Choose a reason for hiding this comment

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

It should be possible to make a ref test for this.

@Ahmad-S792 Ahmad-S792 force-pushed the one-drawing-command-per-list-marker branch from 5583788 to dc96715 Compare November 28, 2022 17:31
@Ahmad-S792 Ahmad-S792 force-pushed the one-drawing-command-per-list-marker branch from dc96715 to 5b558cb Compare November 28, 2022 19:37
@Ahmad-S792 Ahmad-S792 dismissed smfr’s stale review November 28, 2022 20:02

Added Test case and Tim reviewed it.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Nov 29, 2022
@Ahmad-S792 Ahmad-S792 force-pushed the one-drawing-command-per-list-marker branch from 5b558cb to de1364b Compare November 29, 2022 13:41
@Ahmad-S792
Copy link
Contributor Author

@nt1m - I had to add tolerance / fuzzy to testcase since it had 0.01% difference on macOS, do you want to have quick review or if it passes EWS, I can commit it?

@Ahmad-S792 Ahmad-S792 added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Nov 30, 2022
Only send one drawing command per list marker
https://bugs.webkit.org/show_bug.cgi?id=248378

Reviewed by Tim Nguyen.

Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=151161

Previously, some list markers (notably list-style-type: disc, circle, square)
would send two drawing commands per marker: one to fill the marker, and
then a second one to fill it. This constructs unnecessary paints and causes
a weird visual effect if the color is translucent.

This should have a minor visible effect on these list markers, but it's not
identical: since the stroke area isn't drawn again, the antialiasing varies.

* Source/WebCore/rendering/RenderListMarker.cpp:
(RenderListMarker::paint): Update draw to fill or stroke for "disc", "circle" and "square"
* LayoutTests/fast/lists/list-type-translucent-color.html: Added Test Case
* LayoutTests/fast/lists/list-type-translucent-color-expected.html: Added Test Case Expectation

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

Committed 257175@main (5e81d33): https://commits.webkit.org/257175@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 5e81d33 into WebKit:main Nov 30, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Nov 30, 2022
@Ahmad-S792 Ahmad-S792 deleted the one-drawing-command-per-list-marker branch December 3, 2022 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layout and Rendering For bugs with layout and rendering of Web pages.
Projects
None yet
6 participants