Ignore <rt> children when determining WebVTT text direction (LTR/RTL)

In the previous implementation of determineTextDirection the
node.localName() == rtTag check would always be false, because the
isTextNode() check would guarantee that localName() was a null String.

Even if it had worked, it would only have skipped the <rt> elements
themselves, not its descendant text nodes.

Rewrite the traversal to skip the children of <rt>.

The two cases added to captions-rtl.vtt would previously detect the
wrong text direction.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@185878 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed
tree: 212f7c5a61d88e7c4758b0de76f8e0bbe1a2815c
  1. third_party/