Explorar o código

Fix ElementHandle resizing incorrectly when the size_target has "box-sizing: border-box".

Erik Crevel %!s(int64=4) %!d(string=hai) anos
pai
achega
486d47b974
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Source/Core/ElementHandle.cpp

+ 4 - 1
Source/Core/ElementHandle.cpp

@@ -94,7 +94,10 @@ void ElementHandle::ProcessDefaultAction(Event& event)
 				move_original_position.y = move_target->GetOffsetTop();
 			}
 			if (size_target)
-				size_original_size = size_target->GetBox().GetSize(Box::CONTENT);
+				size_original_size = size_target->GetBox().GetSize(
+					(size_target->GetComputedValues().box_sizing == Style::BoxSizing::BorderBox)
+					? Box::BORDER
+					: Box::CONTENT);
 		}
 		else if (event == EventId::Drag)
 		{