RenderListItem - Avoid render tree mutation during layout
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Aug 2017 15:19:38 +0000 (15:19 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Aug 2017 15:19:38 +0000 (15:19 +0000)
commit1cc2c73fea5287700d402e50aba6d866ab9ecac5
tree569354e16ef5f4a54d152c5376ce2a77b0db7eb0
parent91c08b11bb06d69ce333441bf0234b27ec6f6877
RenderListItem - Avoid render tree mutation during layout
https://bugs.webkit.org/show_bug.cgi?id=175666

Reviewed by Andreas Kling.

Source/WebCore:

Mutations should be done by RenderTreeUpdater only.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::updateMarkerRenderer):

    This is now called by RenderTreeUpdater only.
    Remove code dealing with this being called at layout time.
    Merged marker construction code from styleDidChange here and renamed for clarity.

(WebCore::RenderListItem::layout):
(WebCore::RenderListItem::computePreferredLogicalWidths):

    Remove mutating calls.

(WebCore::RenderListItem::styleDidChange): Deleted.
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded): Deleted.
* rendering/RenderListItem.h:
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustTextNodeSizes):

    Call updateMarkerRenderer.

* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):

    Call updateMarkerRenderer.

LayoutTests:

Changes in render tree dumps that don't affect rendering.

* platform/ios/fast/doctypes/002-expected.txt:
* platform/ios/fast/lists/marker-before-empty-inline-expected.txt:
* platform/mac/css2.1/t0805-c5520-brdr-b-01-e-expected.txt:
* platform/mac/fast/doctypes/002-expected.txt:
* platform/mac/fast/lists/marker-before-empty-inline-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220858 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios/fast/doctypes/002-expected.txt
LayoutTests/platform/ios/fast/lists/marker-before-empty-inline-expected.txt
LayoutTests/platform/mac/css2.1/t0805-c5520-brdr-b-01-e-expected.txt
LayoutTests/platform/mac/fast/doctypes/002-expected.txt
LayoutTests/platform/mac/fast/lists/marker-before-empty-inline-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListItem.h
Source/WebCore/rendering/TextAutoSizing.cpp
Source/WebCore/style/RenderTreeUpdater.cpp