[css-grid] Refactor positioned children code
This is a refactoring of LayoutGrid::offsetAndBreadthForPositionedChild()
in order to calculate offset and breadth in a more clean way.
Hopefully making the code easier to follow.
Thanks to the refactoring, now positioned children in RTL
are working fine if they use the static inline position
(when "left" and "right" properties are both "auto").
The other case (not having a static inline position)
will be fixed in a separated patch.
Added RTL cases for most of the positioned tests,
which are now passing with this patch.
Pending to add RTL tests when "left" and "right" are not "auto"
(the item doesn't use the static inline position),
but that will be done in the other patch.
BUG=
568882
Committed:
https://crrev.com/4c3299ff93c072a4c0b10947ab3f79622709f44f
Cr-Commit-Position: refs/heads/master@{#383708}