Forráskód Böngészése

Render local stacking context after the element's background and borders

Michael Ragazzon 2 éve
szülő
commit
72fc7bf7a8
1 módosított fájl, 3 hozzáadás és 8 törlés
  1. 3 8
      Source/Core/Element.cpp

+ 3 - 8
Source/Core/Element.cpp

@@ -225,11 +225,6 @@ void Element::Render()
 
 
 	UpdateTransformState();
 	UpdateTransformState();
 
 
-	// Render all elements in our local stacking context that have a z-index beneath our local index of 0.
-	size_t i = 0;
-	for (; i < stacking_context.size() && stacking_context[i]->z_index < 0; ++i)
-		stacking_context[i]->Render();
-
 	// Apply our transform
 	// Apply our transform
 	ElementUtilities::ApplyTransform(*this);
 	ElementUtilities::ApplyTransform(*this);
 
 
@@ -246,9 +241,9 @@ void Element::Render()
 		}
 		}
 	}
 	}
 
 
-	// Render the rest of the elements in the stacking context.
-	for (; i < stacking_context.size(); ++i)
-		stacking_context[i]->Render();
+	// Render all elements in our local stacking context.
+	for (Element* element : stacking_context)
+		element->Render();
 }
 }
 
 
 // Clones this element, returning a new, unparented element.
 // Clones this element, returning a new, unparented element.