-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Always check paintable boxes children during hit-testing
Children of a paintable box are not guaranteed to be contained within its border box. Therefore, during hit-testing, we must always check them. Fixes #23219
- Loading branch information
1 parent
c1dbde7
commit 16f33aa
Showing
5 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...s/LibWeb/Text/expected/hit_testing/box-outside-of-abspos-containing-block-border-rect.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Run Clicked! |
1 change: 1 addition & 0 deletions
1
Tests/LibWeb/Text/expected/hit_testing/open-details-by-clicking-on-triangle.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
here be bugsyou can't see me toggle open |
28 changes: 28 additions & 0 deletions
28
Tests/LibWeb/Text/input/hit_testing/box-outside-of-abspos-containing-block-border-rect.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html><style> | ||
body { | ||
margin: 0; | ||
} | ||
|
||
* { | ||
border: 1px solid black; | ||
} | ||
|
||
nav { | ||
position: absolute; | ||
height: 600px; | ||
} | ||
|
||
nav > div { | ||
height: 100%; | ||
} | ||
</style><nav><div></div><button id="btn">Run</button></nav> | ||
<script src="../include.js"></script> | ||
<script> | ||
asyncTest(done => { | ||
btn.onclick = () => { | ||
println("Clicked!"); | ||
done(); | ||
}; | ||
internals.click(20, 615); | ||
}); | ||
</script> |
16 changes: 16 additions & 0 deletions
16
Tests/LibWeb/Text/input/hit_testing/open-details-by-clicking-on-triangle.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<style> | ||
body { | ||
margin: 0; | ||
} | ||
</style> | ||
<details id="details"><summary><span>here be bugs</span></summary><span>you can't see me</span></details> | ||
<script src="../include.js"></script> | ||
<script> | ||
asyncTest(done => { | ||
details.ontoggle = (event) => { | ||
println(`toggle ${event.newState}`); | ||
done(); | ||
}; | ||
internals.click(5, 5); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters