Commit b2ab5d61 authored by Oriol Brufau's avatar Oriol Brufau Committed by Commit Bot

[css-pseudo] Hide newly created ::marker behind flag in devtools tree

The ::marker pseudo-element is being implemented behind a flag, so it
shouldn't be exposed in devtools unless this flag is enabled.

That was already happening for ::markers that already existed before
opening the devtools tree. However, if a ::marker was created
afterwards (e.g. by setting 'display: list-item' to some element), then
the ::marker was shown even if the flag was disabled.

This patch fixes the issue so that ::marker is only shown when the flag
is enabled.

BUG=457718

Change-Id: Ie2261c15a1211599355ca687b38cc525be8e2bb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2027909
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736575}
parent 868e15ef
...@@ -2083,6 +2083,10 @@ void InspectorDOMAgent::FrameOwnerContentUpdated( ...@@ -2083,6 +2083,10 @@ void InspectorDOMAgent::FrameOwnerContentUpdated(
} }
void InspectorDOMAgent::PseudoElementCreated(PseudoElement* pseudo_element) { void InspectorDOMAgent::PseudoElementCreated(PseudoElement* pseudo_element) {
if (pseudo_element->IsMarkerPseudoElement() &&
!RuntimeEnabledFeatures::CSSMarkerPseudoElementEnabled()) {
return;
}
Element* parent = pseudo_element->ParentOrShadowHostElement(); Element* parent = pseudo_element->ParentOrShadowHostElement();
if (!parent) if (!parent)
return; return;
......
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