Move WebVTT snap-to-lines layout code to a helper class

Move the bulk of the cue (post "box generation") layout code to a new
helper SnapToLinesLayouter.
This eliminates transient state from RenderVTTCue, and should make is
easier to cache additional values (like the containing block and it's
bounding box for example.) It could eventually also help breaking the
dependency with the physical VTT cue structure, and make it possible to
move the layout to the cue container.
The code that tries to adjust for margin/border/padding is split out into
a method.

No functional changes intended.

BUG=301580

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

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