Commit 7e1df239 authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

DCHECK that CSSVariableResolver isn't used when CSSCascade is on

Change-Id: Id8b9b3ede1a3589ee8ce19afa0ca84db303a7c4b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132196Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756073}
parent b8c6b97c
...@@ -536,6 +536,9 @@ CSSVariableResolver::CSSVariableResolver(const StyleResolverState& state) ...@@ -536,6 +536,9 @@ CSSVariableResolver::CSSVariableResolver(const StyleResolverState& state)
: state_(state), : state_(state),
inherited_variables_(state.Style()->InheritedVariables()), inherited_variables_(state.Style()->InheritedVariables()),
non_inherited_variables_(state.Style()->NonInheritedVariables()), non_inherited_variables_(state.Style()->NonInheritedVariables()),
registry_(state.GetDocument().GetPropertyRegistry()) {} registry_(state.GetDocument().GetPropertyRegistry()) {
DCHECK(!RuntimeEnabledFeatures::CSSCascadeEnabled())
<< "Use StyleCascade instead";
}
} // namespace blink } // namespace blink
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "third_party/blink/renderer/core/style/computed_style.h" #include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h" #include "third_party/blink/renderer/core/testing/page_test_base.h"
#include "third_party/blink/renderer/platform/heap/heap.h" #include "third_party/blink/renderer/platform/heap/heap.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h" #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
namespace blink { namespace blink {
...@@ -43,8 +44,11 @@ static const Color kTestColor = Color(255, 0, 0); ...@@ -43,8 +44,11 @@ static const Color kTestColor = Color(255, 0, 0);
} // namespace } // namespace
class CSSVariableResolverTest : public PageTestBase { class CSSVariableResolverTest : public PageTestBase,
private ScopedCSSCascadeForTest {
public: public:
CSSVariableResolverTest() : ScopedCSSCascadeForTest(false) {}
void SetUp() override { void SetUp() override {
PageTestBase::SetUp(); PageTestBase::SetUp();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment