Check if value changed when setting nested fields in ComputedStyleBase.

Many of the setters in ComputedStyle use a macro called SET_VAR, which
sets the value of a field stored in a subgroup on ComputedStyle. SET_VAR
first checks if the new value is different to the old value. Only when
the value changes does it modify the field using the Access() method on
the subgroup. Since Access() could potentially do a copy, we would like
to call it as rarely as possible. Hence, SET_VAR is an optimisation that
skips a call to Access() when it is not necessary.

For example, the setter for the 'left' property might look like:

void SetLeft(const Length& v) {
  if (surround_data_->left_ != v)
    surround_data_->Access()->left_ = v;
}

As we can see, we only call Access() when the values are different,
potentially saving a copy.

However, the generated setters on ComputedStyleBase do not perform this
optimisation. This patch changes the generator to use the same
optimisation in ComputedStyleBase.

No behavioural changes are expected, but there should be less memory
allocations in ComputedStyle.

Diff of generated files:
https://gist.github.com/darrnshn/47e96b81c2ade55cb337fd658f0d6785/revisions

BUG=628043

Review-Url: https://codereview.chromium.org/2879493003
Cr-Commit-Position: refs/heads/master@{#470873}
4 files changed