Only swap positions if both characters actually are absolute positioned

When re-ordering inline boxes within a "line", character-based absolute
positioning attributes are re-ordered to match. However, when attempting
to re-order/swap a inline box that does have a absolute positioning
attribute (and is of length 1) with one that doesn't, the positioning
attribute is copied rather than swapped - leading to additional chunks
being created and consequently additional adjustments being performed.
However, swapping is not needed/required in this case, since the attribute
is already in the correct (logical) position.
To mitigate this, only perform the attribute swap if both characters
(and consequently inline boxes) have attributes in the first place.

BUG=343486

Review URL: https://codereview.chromium.org/177263003

git-svn-id: svn://svn.chromium.org/blink/trunk@167777 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: c1be7f39db644ebc5509b5724c82f4f754316624
  1. third_party/