Compute directionality for frame correctly

Use OO.ui.Element.getDir instead of looking for a
dir attribute.

Change-Id: I0e6003b19dea0cd25c069ecb726ad9d4c078ddcc
Merge "Compute directionality for frame correctly"