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