Przeglądaj źródła

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

Erik Crevel 4 lat temu
rodzic
commit
486d47b974
1 zmienionych plików z 4 dodań i 1 usunięć
  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();
 				move_original_position.y = move_target->GetOffsetTop();
 			}
 			}
 			if (size_target)
 			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)
 		else if (event == EventId::Drag)
 		{
 		{