diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderBlock.cpp')
-rw-r--r-- | Source/WebCore/rendering/RenderBlock.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index bf1a78a7f..b2d056f94 100644 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -2751,7 +2751,9 @@ void RenderBlock::computePreferredLogicalWidths() { ASSERT(preferredLogicalWidthsDirty()); - updateFirstLetter(); + // FIXME: Do not even try to reshuffle first letter renderers when we are not in layout + // until after webkit.org/b/163848 is fixed. + updateFirstLetter(view().frameView().isInRenderTreeLayout() ? RenderTreeMutationIsAllowed::Yes : RenderTreeMutationIsAllowed::No); m_minPreferredLogicalWidth = 0; m_maxPreferredLogicalWidth = 0; @@ -3301,7 +3303,7 @@ void RenderBlock::getFirstLetter(RenderObject*& firstLetter, RenderElement*& fir firstLetterContainer = nullptr; } -void RenderBlock::updateFirstLetter() +void RenderBlock::updateFirstLetter(RenderTreeMutationIsAllowed mutationAllowedOrNot) { RenderObject* firstLetterObj; RenderElement* firstLetterContainer; @@ -3322,6 +3324,8 @@ void RenderBlock::updateFirstLetter() if (!is<RenderText>(*firstLetterObj)) return; + if (mutationAllowedOrNot != RenderTreeMutationIsAllowed::Yes) + return; // Our layout state is not valid for the repaints we are going to trigger by // adding and removing children of firstLetterContainer. LayoutStateDisabler layoutStateDisabler(view()); |