Browse Source

Initial clip element should be the element's offset parent, fixes `overflow_hidden` visual test

Michael Ragazzon 1 year ago
parent
commit
5ba31165af
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/Core/ElementUtilities.cpp

+ 1 - 1
Source/Core/ElementUtilities.cpp

@@ -182,7 +182,7 @@ bool ElementUtilities::GetClippingRegion(Element* element, Rectanglei& out_clip_
 	// Search through the element's ancestors, finding all elements that clip their overflow and have overflow to clip.
 	// Search through the element's ancestors, finding all elements that clip their overflow and have overflow to clip.
 	// For each that we find, we combine their clipping region with the existing clipping region, and so build up a
 	// For each that we find, we combine their clipping region with the existing clipping region, and so build up a
 	// complete clipping region for the element.
 	// complete clipping region for the element.
-	Element* clipping_element = (force_clip_self ? element : element->GetParentNode());
+	Element* clipping_element = (force_clip_self ? element : element->GetOffsetParent());
 
 
 	Rectanglef clip_region = Rectanglef::MakeInvalid();
 	Rectanglef clip_region = Rectanglef::MakeInvalid();