summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/html_summary_element.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/html_summary_element.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/html/html_summary_element.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/html_summary_element.cc b/chromium/third_party/blink/renderer/core/html/html_summary_element.cc
index aa9c582e7ea..953846bcf79 100644
--- a/chromium/third_party/blink/renderer/core/html/html_summary_element.cc
+++ b/chromium/third_party/blink/renderer/core/html/html_summary_element.cc
@@ -38,8 +38,10 @@ namespace blink {
HTMLSummaryElement::HTMLSummaryElement(Document& document)
: HTMLElement(html_names::kSummaryTag, document) {
- SetHasCustomStyleCallbacks();
- EnsureUserAgentShadowRoot();
+ if (!RuntimeEnabledFeatures::SummaryListItemEnabled()) {
+ SetHasCustomStyleCallbacks();
+ EnsureUserAgentShadowRoot();
+ }
}
LayoutObject* HTMLSummaryElement::CreateLayoutObject(const ComputedStyle& style,
@@ -57,6 +59,7 @@ LayoutObject* HTMLSummaryElement::CreateLayoutObject(const ComputedStyle& style,
}
void HTMLSummaryElement::DidAddUserAgentShadowRoot(ShadowRoot& root) {
+ DCHECK(!RuntimeEnabledFeatures::SummaryListItemEnabled());
auto* marker_control =
MakeGarbageCollected<DetailsMarkerControl>(GetDocument());
marker_control->SetIdAttribute(shadow_element_names::kIdDetailsMarker);
@@ -73,6 +76,7 @@ HTMLDetailsElement* HTMLSummaryElement::DetailsElement() const {
}
Element* HTMLSummaryElement::MarkerControl() {
+ DCHECK(!RuntimeEnabledFeatures::SummaryListItemEnabled());
return EnsureUserAgentShadowRoot().getElementById(
shadow_element_names::kIdDetailsMarker);
}
@@ -161,6 +165,7 @@ bool HTMLSummaryElement::WillRespondToMouseClickEvents() {
}
void HTMLSummaryElement::WillRecalcStyle(const StyleRecalcChange) {
+ DCHECK(!RuntimeEnabledFeatures::SummaryListItemEnabled());
if (GetForceReattachLayoutTree() && IsMainSummary()) {
if (Element* marker = MarkerControl()) {
marker->SetNeedsStyleRecalc(