Jelajahi Sumber

Fix clipping on select box

Michael Ragazzon 3 tahun lalu
induk
melakukan
6f6e5a4492
1 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 4 4
      Source/Core/ElementUtilities.cpp

+ 4 - 4
Source/Core/ElementUtilities.cpp

@@ -189,10 +189,6 @@ bool ElementUtilities::GetClippingRegion(Vector2i& clip_origin, Vector2i& clip_d
 		const bool clip_none = (clip_computed.clip == Clip::Type::None);
 		const bool clip_none = (clip_computed.clip == Clip::Type::None);
 		const int clip_number = clip_computed.clip.GetNumber();
 		const int clip_number = clip_computed.clip.GetNumber();
 
 
-		// If this region ignores all clipping regions, then we do too.
-		if (clip_none)
-			break;
-
 		// Merge the existing clip region with the current clip region if we aren't ignoring clip regions.
 		// Merge the existing clip region with the current clip region if we aren't ignoring clip regions.
 		if ((clip_always || clip_enabled) && num_ignored_clips == 0)
 		if ((clip_always || clip_enabled) && num_ignored_clips == 0)
 		{
 		{
@@ -235,6 +231,10 @@ bool ElementUtilities::GetClippingRegion(Vector2i& clip_origin, Vector2i& clip_d
 		// Inherit how many clip regions this ancestor ignores.
 		// Inherit how many clip regions this ancestor ignores.
 		num_ignored_clips = Math::Max(num_ignored_clips, clip_number);
 		num_ignored_clips = Math::Max(num_ignored_clips, clip_number);
 
 
+		// If this region ignores all clipping regions, then we do too.
+		if (clip_none)
+			break;
+
 		// Climb the tree to this region's parent.
 		// Climb the tree to this region's parent.
 		clipping_element = clipping_element->GetParentNode();
 		clipping_element = clipping_element->GetParentNode();
 	}
 	}