RenderFlowThread's containing block cache should be invalidated before calling styleD...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 21:20:01 +0000 (21:20 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Nov 2016 21:20:01 +0000 (21:20 +0000)
commit94dc990a30358f9d183169f86b67e8f6cee62ac7
tree1b9412e8e2fd20c6f80ff4f83e31a459f4f67125
parent836f5c429f5ef4df38917355231d0f1b8e820bf0
RenderFlowThread's containing block cache should be invalidated before calling styleDidChange.
https://bugs.webkit.org/show_bug.cgi?id=164646

Reviewed by Simon Fraser.

We have to invalidate the containing block cache for RenderFlowThreads soon after the containing block context
changes. Invalidating it in RenderBlock::styleDidChange is too late since we might run some code in some
of the subclasses that use this stale containing block cache.

No known behaviour change.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange): This change could trigger double invalidation.
However running this code twice shouldn't impact performance greatly.
(WebCore::RenderBlock::resetFlowThreadContainingBlockAndChildInfoIncludingDescendants):
(WebCore::RenderBlock::invalidateFlowThreadContainingBlockIncludingDescendants): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle): We don't need to call the invalidation from initializeStyle(), since
we don't yet have cache at that point.
* rendering/RenderInline.cpp:
(WebCore::RenderInline::splitInlines):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderInline.cpp