Issue #4986: May exceed the maximum margin of rect

May exceed the maximum margin of rect.
FF throw error.
Create sprite rect exceed the maximum.