This website requires JavaScript.
Explore
Help
Sign In
nephele
/
haikuwebkit
Watch
1
Star
0
Fork
You've already forked haikuwebkit
0
Code
Issues
Releases
Activity
haiku
haikuwebkit
/
LayoutTests
/
intersection-observer
/
intersection-clipped-to-tar...
4 lines
88 B
Plaintext
Raw
Permalink
Normal View
History
Unescape
Escape
IntersectionObserverEntry#intersectionRatio can be larger than 1 https://bugs.webkit.org/show_bug.cgi?id=200776 Reviewed by Simon Fraser. Source/WebCore: When computing the intersection between a target and an intersection observer's root, RenderBox::computeVisibleRectInContainer is used to map the target rect up the containing block chain, clipping along the way. When a RenderBox has a transform, this method expands the given rect to the enclosing rect in device pixels. This is fine for the use case of computing an invalidation rect, but for the intersection observer use case it means that it is possible for the computed intersection rect to be slightly larger than the original target rect, resulting in an intersection ratio greater than 1. Fix this by performing a final intersection between the intersection rect as computed above and the target rect. Test: intersection-observer/intersection-clipped-to-target.html * dom/Document.cpp: (WebCore::computeIntersectionState): LayoutTests: * intersection-observer/intersection-clipped-to-target-expected.txt: Added. * intersection-observer/intersection-clipped-to-target.html: Added. Canonical link: https://commits.webkit.org/215401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-13 18:46:56 +00:00
Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) https://bugs.webkit.org/show_bug.cgi?id=217016 Reviewed by Zalan Bujtas. Done with this command: find LayoutTests -name '*-expected.txt' | grep -v imported | xargs awk '/^CONSOLE MESSAGE:/ { next }; /^<\?xml/ { nextfile }; { print FILENAME; nextfile }' | xargs perl -i -pe 's/ +$//g' This affects many files, and it's not helpful to clog the change log with a list of them. Canonical link: https://commits.webkit.org/229803@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-27 02:15:19 +00:00
PASS IntersectionObserverEntry's intersection rect is not larger than the target rect
IntersectionObserverEntry#intersectionRatio can be larger than 1 https://bugs.webkit.org/show_bug.cgi?id=200776 Reviewed by Simon Fraser. Source/WebCore: When computing the intersection between a target and an intersection observer's root, RenderBox::computeVisibleRectInContainer is used to map the target rect up the containing block chain, clipping along the way. When a RenderBox has a transform, this method expands the given rect to the enclosing rect in device pixels. This is fine for the use case of computing an invalidation rect, but for the intersection observer use case it means that it is possible for the computed intersection rect to be slightly larger than the original target rect, resulting in an intersection ratio greater than 1. Fix this by performing a final intersection between the intersection rect as computed above and the target rect. Test: intersection-observer/intersection-clipped-to-target.html * dom/Document.cpp: (WebCore::computeIntersectionState): LayoutTests: * intersection-observer/intersection-clipped-to-target-expected.txt: Added. * intersection-observer/intersection-clipped-to-target.html: Added. Canonical link: https://commits.webkit.org/215401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-09-13 18:46:56 +00:00