[RenderTreeBuilder] Move RenderMenuList::addChild() tree mutation to RenderTreeBuilder
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Dec 2017 20:43:35 +0000 (20:43 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Dec 2017 20:43:35 +0000 (20:43 +0000)
commitd08b796947b340a9e6af6014ac30b9c072921a42
tree018d7dcfc98a3e1ba73a2b70faadcfa54c38d28a
parentfc8f637e165688219dedec0c4128981b84061bad
[RenderTreeBuilder] Move RenderMenuList::addChild() tree mutation to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=181130
<rdar://problem/36196266>

Reviewed by Antti Koivisto.

This patch also creates a dedicated class for form control related tree mutations.

Covered by existing tests.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setInnerRenderer): Update the style here instead.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::setInnerRenderer):
(RenderMenuList::addChild):
(RenderMenuList::showPopup): We should't really call showPopup on a detached renderer.
(WebCore::RenderMenuList::createInnerBlock): Deleted.
* rendering/RenderMenuList.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::RenderTreeBuilder):
(WebCore::RenderTreeBuilder::insertChild):
(WebCore::createInnerRendererForButtonIfNeeded): Deleted.
* rendering/updating/RenderTreeBuilder.h:
(WebCore::RenderTreeBuilder::formControlsBuilder):
* rendering/updating/RenderTreeBuilderFormControls.cpp: Copied from Source/WebCore/rendering/updating/RenderTreeBuilder.h.
(WebCore::RenderTreeBuilder::FormControls::FormControls):
(WebCore::RenderTreeBuilder::FormControls::createInnerRendererIfNeeded):
* rendering/updating/RenderTreeBuilderFormControls.h: Copied from Source/WebCore/rendering/updating/RenderTreeBuilder.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/RenderButton.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMenuList.h
Source/WebCore/rendering/updating/RenderTreeBuilder.cpp
Source/WebCore/rendering/updating/RenderTreeBuilder.h
Source/WebCore/rendering/updating/RenderTreeBuilderFormControls.cpp [new file with mode: 0644]
Source/WebCore/rendering/updating/RenderTreeBuilderFormControls.h [new file with mode: 0644]