Don't optimize-out whitespace children of flex/grid containers if the parent has display: contents.

Text nodes of display: contents elements can be coalesced with other text nodes
siblings of the display: contents element, so optimizing out the whitespace
layout object may produce incorrect behavior in cases like:

  <non-whitespace-1>
  <div style="display: contents">
    <whitespace>
  </div>
  <non-whitespace-2>

Where we should generate a flex item with:

  <non-whitespace-1><whitespace><non-whitespace-2>

But instead we generate the following right now:

  <non-whitespace-1><non-whitespace-2>

Bug: 657748
Change-Id: I684cb20d500d45afe3eda4a48319f293ddb48024
Reviewed-on: https://chromium-review.googlesource.com/573021
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Emilio Cobos Álvarez <ecobos@igalia.com>
Cr-Commit-Position: refs/heads/master@{#487833}
2 files changed