Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Support ray() shape in offset-path
https://bugs.webkit.org/show_bug.cgi?id=233344 Reviewed by Simon Fraser. Source/WebCore: Add support for rendering ray path. Involves getting containing block and offset of the element from the containing block. Using the size of the containing block and offset, calculate the length of the ray and create a Line path using the length and angle. Calculating closest/farthest-side and closest/farthest-corner are simple but calculating side requires some explanation. First, we get the two possible sides of the containing block the ray could be intersecting with, based on the angle. To calculate which side is being intersected, if tan(theta) * top/bottom is outside of the containing block, this means that the ray is intersecting with the other side. Finally, we calculate the acute angle based on which side we intersected with. Using the length and angle, we calculate the length of the hypotenuse, which corresponds with the length of the start point of the ray to its intersection with a side of the containing block. Test 7 is still failing due to getting incorrect width of containing block (doesn't happen when animating the path for some reason). Will implement contain in another patch. * WebCore.xcodeproj/project.pbxproj: * rendering/PathOperation.cpp: (WebCore::toPositiveAngle): (WebCore::RayPathOperation::getLengthForPath const): (WebCore::RayPathOperation::pathForReferenceRect const): * rendering/PathOperation.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::setReferenceBoxForPathOperations): (WebCore::RenderLayer::updateTransform): * rendering/RenderLayer.h: * rendering/style/RenderStyle.cpp: (WebCore::getPathFromPathOperation): LayoutTests: * TestExpectations: Canonical link: https://commits.webkit.org/250437@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294001 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
13 changed files
with
225 additions
and
25 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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