Commit fdc7de4c authored by Kyoko Muto's avatar Kyoko Muto Committed by Commit Bot

Remove SlotsInFlatTree Runtime flag

BUG=859429

Change-Id: Iaa998db509f9c9b4a38c2af1fa3c6be576e2d27f
Reviewed-on: https://chromium-review.googlesource.com/1160068
Commit-Queue: Kyoko Muto <kymuto@google.com>
Reviewed-by: default avatarHayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581833}
parent ecb1b145
......@@ -60,8 +60,7 @@ TEST_F(CSSComputedStyleDeclarationTest, CleanShadowAncestorsNoRecalc) {
EXPECT_STREQ("rgb(0, 128, 0)",
computed->GetPropertyValue(CSSPropertyColor).Utf8().data());
EXPECT_EQ(RuntimeEnabledFeatures::SlotInFlatTreeEnabled(),
GetDocument().NeedsLayoutTreeUpdate());
EXPECT_TRUE(GetDocument().NeedsLayoutTreeUpdate());
}
} // namespace blink
......@@ -27,12 +27,9 @@ namespace blink {
namespace flat_tree_traversal_test {
class FlatTreeTraversalTest : public PageTestBase,
private ScopedSlotInFlatTreeForTest,
ScopedIncrementalShadowDOMForTest {
public:
FlatTreeTraversalTest()
: ScopedSlotInFlatTreeForTest(true),
ScopedIncrementalShadowDOMForTest(true) {}
FlatTreeTraversalTest() : ScopedIncrementalShadowDOMForTest(true) {}
protected:
// Sets |mainHTML| to BODY element with |innerHTML| property and attaches
......
......@@ -876,10 +876,7 @@ static ContainerNode* GetReattachParent(Node& node) {
if (node.IsPseudoElement())
return node.ParentOrShadowHostNode();
if (node.IsChildOfV1ShadowHost()) {
HTMLSlotElement* slot = RuntimeEnabledFeatures::SlotInFlatTreeEnabled()
? node.AssignedSlot()
: node.FinalDestinationSlot();
if (slot)
if (HTMLSlotElement* slot = node.AssignedSlot())
return slot;
}
if (node.IsInV0ShadowTree() || node.IsChildOfV0ShadowHost()) {
......@@ -1181,10 +1178,7 @@ bool Node::IsStyledElement() const {
bool Node::CanParticipateInFlatTree() const {
// TODO(hayato): Return false for pseudo elements.
if (RuntimeEnabledFeatures::SlotInFlatTreeEnabled()) {
return !IsShadowRoot() && !IsActiveV0InsertionPoint(*this);
}
return !IsShadowRoot() && !IsActiveSlotOrActiveV0InsertionPoint();
}
bool Node::IsActiveSlotOrActiveV0InsertionPoint() const {
......
......@@ -231,7 +231,6 @@ void HTMLSlotElement::AppendDistributedNodesFrom(const HTMLSlotElement& other) {
for (const auto& node : other.distributed_nodes_)
distributed_indices_.Set(node.Get(), index++);
}
void HTMLSlotElement::ClearAssignedNodes() {
DCHECK(RuntimeEnabledFeatures::IncrementalShadowDOMEnabled());
assigned_nodes_.clear();
......@@ -357,17 +356,12 @@ void HTMLSlotElement::AttachLayoutTree(AttachContext& context) {
// of IncementalShadowDOM.
const HeapVector<Member<Node>>&
HTMLSlotElement::ChildrenInFlatTreeIfAssignmentIsSupported() {
if (RuntimeEnabledFeatures::SlotInFlatTreeEnabled())
return AssignedNodes();
DCHECK(!NeedsDistributionRecalc());
return distributed_nodes_;
return AssignedNodes();
}
void HTMLSlotElement::DetachLayoutTree(const AttachContext& context) {
if (SupportsAssignment()) {
const HeapVector<Member<Node>>& flat_tree_children =
RuntimeEnabledFeatures::SlotInFlatTreeEnabled() ? assigned_nodes_
: distributed_nodes_;
const HeapVector<Member<Node>>& flat_tree_children = assigned_nodes_;
for (auto& node : flat_tree_children)
node->LazyReattachIfAttached();
}
......@@ -490,24 +484,8 @@ void HTMLSlotElement::RemovedFrom(ContainerNode* insertion_point) {
HTMLElement::RemovedFrom(insertion_point);
}
void HTMLSlotElement::WillRecalcStyle(StyleRecalcChange change) {
if (RuntimeEnabledFeatures::SlotInFlatTreeEnabled())
return;
if (change < kIndependentInherit &&
GetStyleChangeType() < kSubtreeStyleChange) {
return;
}
for (auto& node : distributed_nodes_) {
node->SetNeedsStyleRecalc(
kLocalStyleChange,
StyleChangeReasonForTracing::Create(
StyleChangeReason::kPropagateInheritChangeToDistributedNodes));
}
}
void HTMLSlotElement::DidRecalcStyle(StyleRecalcChange change) {
if (!RuntimeEnabledFeatures::SlotInFlatTreeEnabled())
return;
if (change < kIndependentInherit)
return;
for (auto& node : assigned_nodes_) {
......
......@@ -136,7 +136,6 @@ class CORE_EXPORT HTMLSlotElement final : public HTMLElement {
InsertionNotificationRequest InsertedInto(ContainerNode*) final;
void RemovedFrom(ContainerNode*) final;
void WillRecalcStyle(StyleRecalcChange) final;
void DidRecalcStyle(StyleRecalcChange) final;
void EnqueueSlotChangeEvent();
......
......@@ -1161,10 +1161,6 @@
{
name: "SlimmingPaintV2",
},
{
name: "SlotInFlatTree",
status: "stable",
},
{
name: "SMIL",
status: "stable",
......
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