Replace DataPersistent with DataRefs in ComputedStyle.

Currently, there are two fields of type DataPersistent in ComputedStyle:
filter and backdrop-filter. DataPersistent acts as a wrapper around
Persistent that has copy-on-write semantics (cheap shallow copies).

Previously, filter was stored like:

    class StyleRareNonInheritedData {
      // ...
      DataPersistent<StyleFilterData> filter_;
    };

    class DataPersistent {
      std::unique_ptr<Persistent<StyleFilterData>> data_;
    };

After this patch, it will look like:

    class StyleRareNonInheritedData {
      // ...
      DataRef<StyleFilterOpsData> filter_ops_;
    };

    class FilterOpsData : RefCounted<FilterOpsData> {
      Persistent<StyleFilterData> filter_;
    };

As we can see, this patch essentially wraps Persistent in a ref-counted
FilterOpsData class (which is generated).

The main differences that this patch introduces is what happens
when we do a shallow vs deep copy.

Before:
  Shallow copy:
    Allocate a new Persistent<StyleFilterData>.
  Deep copy:
    Allocate and copy a new StyleFilterData.

With patch:
  Shallow copy:
    No allocations (increment ref).
  Deep copy:
    Allocate a new StyleFilterOpsData.
    Allocate and copy a new StyleFilterData.

In summary, there are two main differences:
- Before, we allocated a Persistent, but with this patch we allocate a
  StyleFilterOpsData.
- Before, a shallow copy allocated a Persistent (which requires thread
  related logic), but with this patch, this allocation is delayed to
  deep copy.

Hence, this patch essentially moves a heap allocation from shallow to
deep copy. Since shallow copies occur more often than deep, this
should not harm performance.

We are also able to remove the DataPersistent class because it is no
longer useful.

Diff of generated files:
https://gist.github.com/d8aa34402e30e764c6d331d786c6fcdd/revisions

Bug: 628043
Change-Id: Idc745555da232e0c903d1646d50dbc0e1393024c
Reviewed-on: https://chromium-review.googlesource.com/554590
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Alan Cutter <alancutter@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484447}
9 files changed