DescriptionMake ComputedStyleBase internal pointer setters move-only.
This patch removes the const ref overload for setters on pointer types.
This means that the internal setter can only be used with an rvalue ref.
This has two consequences:
- We can generate code that works for RefPtrs and std::unique_ptrs
(since std::unique_ptrs are not copyable, the const ref overload is
meaningless [*]).
- RefPtrs are passed to internal setters using std::move, which avoids
ref churn.
[*] Whilst we could make the const ref overload copy the unique_ptr, we
feel that this implicit copying behaviour is bad.
Diff of generated files:
https://gist.github.com/darrnshn/d809ec84cd6418bb1f65ca6dae986630/revisions
This patch does not change behaviour, only the internal API for
ComputedStyleBase.
BUG=628043
Review-Url: https://codereview.chromium.org/2923493003
Cr-Commit-Position: refs/heads/master@{#477111}
Committed: https://chromium.googlesource.com/chromium/src/+/525a0e6f0d79296a4da4f109f7a704ebbcf7f20a
Patch Set 1 #
Messages
Total messages: 12 (8 generated)
|