diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-02-27 12:14:49 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-02-27 13:15:37 +0800 |
commit | 047e44d5c731b972b858160ee4f27020c60cfc62 (patch) | |
tree | 3837d022a058103cbb831bd6d9066d691ff444d6 /layout | |
parent | eff173129ad13777d54f61afbc93818dd0473d70 (diff) | |
download | uxp-047e44d5c731b972b858160ee4f27020c60cfc62.tar.gz |
Issue #1375 - Follow-up: Remove shadow tree hacks in the frame constructor
This should've been removed alongside bug 1404789 when it landed.
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/nsCSSFrameConstructor.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 8b91e38e8f..91fa4ec778 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -7205,21 +7205,6 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer, return; } - if (aContainer && aContainer->HasFlag(NODE_IS_IN_SHADOW_TREE) && - !aContainer->IsInNativeAnonymousSubtree() && - !aFirstNewContent->IsInNativeAnonymousSubtree()) { - // Recreate frames if content is appended into a ShadowRoot - // because children of ShadowRoot are rendered in place of children - // of the host. - //XXXsmaug This is super unefficient! - nsIContent* bindingParent = aContainer->GetBindingParent(); - LAYOUT_PHASE_TEMP_EXIT(); - RecreateFramesForContent(bindingParent, InsertionKind::Sync, - REMOVE_FOR_RECONSTRUCTION); - LAYOUT_PHASE_TEMP_REENTER(); - return; - } - // See comment in ContentRangeInserted for why this is necessary. if (!GetContentInsertionFrameFor(aContainer) && !aContainer->IsActiveChildrenElement()) { @@ -7680,22 +7665,6 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer, return; } - if (aContainer->HasFlag(NODE_IS_IN_SHADOW_TREE) && - !aContainer->IsInNativeAnonymousSubtree() && - (!aStartChild || !aStartChild->IsInNativeAnonymousSubtree()) && - (!aEndChild || !aEndChild->IsInNativeAnonymousSubtree())) { - // Recreate frames if content is inserted into a ShadowRoot - // because children of ShadowRoot are rendered in place of - // the children of the host. - //XXXsmaug This is super unefficient! - nsIContent* bindingParent = aContainer->GetBindingParent(); - LAYOUT_PHASE_TEMP_EXIT(); - RecreateFramesForContent(bindingParent, InsertionKind::Sync, - REMOVE_FOR_RECONSTRUCTION); - LAYOUT_PHASE_TEMP_REENTER(); - return; - } - // Put 'parentFrame' inside a scope so we don't confuse it with // 'insertion.mParentFrame' later. { @@ -8180,21 +8149,6 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer, } } - if (aContainer && aContainer->HasFlag(NODE_IS_IN_SHADOW_TREE) && - !aContainer->IsInNativeAnonymousSubtree() && - !aChild->IsInNativeAnonymousSubtree()) { - // Recreate frames if content is removed from a ShadowRoot - // because it may contain an insertion point which can change - // how the host is rendered. - //XXXsmaug This is super unefficient! - nsIContent* bindingParent = aContainer->GetBindingParent(); - *aDidReconstruct = true; - LAYOUT_PHASE_TEMP_EXIT(); - RecreateFramesForContent(bindingParent, insertionKind, aFlags); - LAYOUT_PHASE_TEMP_REENTER(); - return; - } - if (aFlags == REMOVE_DESTROY_FRAMES) { CaptureStateForFramesOf(aChild, mTempFrameTreeState); } |