Skip to content

Commit

Permalink
Bug 265040 follow-up: add missing test coverage
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=265445
rdar://118872368

Reviewed by Darin Adler.

Add test cases for all the `canTweakShape` conditions.

* LayoutTests/interaction-region/inline-link-expected.txt:
* LayoutTests/interaction-region/inline-link.html:

Canonical link: https://commits.webkit.org/271207@main
  • Loading branch information
etiennesegonzac committed Nov 28, 2023
1 parent 921f26d commit ad2aba0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
22 changes: 19 additions & 3 deletions LayoutTests/interaction-region/inline-link-expected.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a link. This is a wiki-style link. This is a link with visible edges. border-bottom link This is a JavaScript link. This link does nothing.
This is a link. This is a wiki-style link. This is a link with a background. This is a link with an outline. This is a link with borders on all sides. This is a link with border-radius explicitly set. This is a link with a box shadow. border-bottom link This is a JavaScript link. This link does nothing.
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
Expand All @@ -20,9 +20,25 @@ This is a link. This is a wiki-style link. This is a link with visible edges. bo
(borderRadius 0.00),
(interaction (250,0) width=29 height=19)
(borderRadius 0.00),
(interaction (456,-4) width=130 height=27)
(guard (464,-10) width=29 height=39)
(borderRadius 0.00),
(interaction (464,0) width=29 height=19)
(borderRadius 0.00),
(guard (657,-10) width=29 height=39)
(borderRadius 0.00),
(interaction (657,0) width=29 height=19)
(borderRadius 0.00),
(guard (131,10) width=30 height=39)
(borderRadius 0.00),
(interaction (131,20) width=30 height=19)
(borderRadius 0.00),
(guard (431,10) width=30 height=39)
(borderRadius 0.00),
(interaction (431,20) width=30 height=19)
(borderRadius 0.00),
(interaction (642,16) width=130 height=27)
(borderRadius 8.00),
(interaction (581,-4) width=38 height=27)
(interaction (767,16) width=37 height=27)
(borderRadius 8.00)])
)
)
Expand Down
6 changes: 5 additions & 1 deletion LayoutTests/interaction-region/inline-link.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
<body>
<a href="#">This</a> is a link.
<a href="#" style="border: 0; background: none;">This</a> is a wiki-style link.
<a href="#" style="background: green;">This</a> is a link with visible edges.
<a href="#" style="background: green;">This</a> is a link with a background.
<a href="#" style="outline: 2px red solid;">This</a> is a link with an outline.
<a href="#" style="border: 2px red solid;">This</a> is a link with borders on all sides.
<a href="#" style="border-radius: 0px;">This</a> is a link with border-radius explicitly set.
<a href="#" style="box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);">This</a> is a link with a box shadow.
<a href="#" style="text-decoration: none; border-bottom: 1px blue solid;">border-bottom link</a>
<a onclick="alert('click!')">This</a> is a JavaScript link.
<a>This</a> link does nothing.
Expand Down

0 comments on commit ad2aba0

Please sign in to comment.