|
|
DescriptionAssert that ComputedStyleBase is only templated with ComputedStyle
This patch adds a static_assert to assert at compile time that a
ComputedStyleBase can only be templated with a ComputedStyle.
Diff: https://gist.github.com/nainar/ea6c15963c9fe91a4d0c8c9cc5eddbad/revisions
BUG=710938
Review-Url: https://codereview.chromium.org/2896233002
Cr-Commit-Position: refs/heads/master@{#474146}
Committed: https://chromium.googlesource.com/chromium/src/+/ef53b0adb151b2eb77e4c5dcda0d9cea47e97a6d
Patch Set 1 #
Total comments: 4
Patch Set 2 : shend@'s suggestions #
Total comments: 1
Messages
Total messages: 22 (16 generated)
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. BUG=710938 ========== to ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. Diff: https://gist.github.com/3affcfa60b17f63a997f87ab3d821a92/revisions BUG=710938 ==========
nainar@chromium.org changed reviewers: + shend@chromium.org
shend@, PTAL? Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm with nits https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl (right): https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl:155: nit: don't need extra space. https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl:174: static_assert(std::is_same<ComputedStyle, ComputedStyleFinal>::value, "ComputedStyleBase can only be templated with ComputedStyle"); nit: I would move this closer to the top of the class e.g. template <class T> class ComputedStyle : public ComputedStyleBase { static_assert(...); }; also wow what magic is this? how does it even know what ComputedStyle is...
Description was changed from ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. Diff: https://gist.github.com/3affcfa60b17f63a997f87ab3d821a92/revisions BUG=710938 ========== to ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. Diff: https://gist.github.com/nainar/ea6c15963c9fe91a4d0c8c9cc5eddbad/revisions BUG=710938 ==========
The CQ bit was checked by nainar@chromium.org to run a CQ dry run
nainar@chromium.org changed reviewers: + alancutter@chromium.org
alancutter@, PTAL? Thanks! https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... File third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl (right): https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl:155: Done https://codereview.chromium.org/2896233002/diff/1/third_party/WebKit/Source/b... third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl:174: static_assert(std::is_same<ComputedStyle, ComputedStyleFinal>::value, "ComputedStyleBase can only be templated with ComputedStyle"); Done. Since we talked about this IRL. One of the classes imported by ComputedStyleBase has a forward declaration of ComputedStyle. Makes this build and work.
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2896233002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl (right): https://codereview.chromium.org/2896233002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl:169: static_assert(std::is_same<ComputedStyle, ComputedStyleFinal>::value, "ComputedStyleBase can only be templated with ComputedStyle"); Woah magic.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by nainar@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from shend@chromium.org Link to the patchset: https://codereview.chromium.org/2896233002/#ps20001 (title: "shend@'s suggestions")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1495595904135550, "parent_rev": "41d3ae1f3a5267fbf65cef8fde127f50fbe4cd71", "commit_rev": "ef53b0adb151b2eb77e4c5dcda0d9cea47e97a6d"}
Message was sent while issue was closed.
Description was changed from ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. Diff: https://gist.github.com/nainar/ea6c15963c9fe91a4d0c8c9cc5eddbad/revisions BUG=710938 ========== to ========== Assert that ComputedStyleBase is only templated with ComputedStyle This patch adds a static_assert to assert at compile time that a ComputedStyleBase can only be templated with a ComputedStyle. Diff: https://gist.github.com/nainar/ea6c15963c9fe91a4d0c8c9cc5eddbad/revisions BUG=710938 Review-Url: https://codereview.chromium.org/2896233002 Cr-Commit-Position: refs/heads/master@{#474146} Committed: https://chromium.googlesource.com/chromium/src/+/ef53b0adb151b2eb77e4c5dcda0d... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/ef53b0adb151b2eb77e4c5dcda0d... |