XML document builder should create render tree asynchronously
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Dec 2013 14:04:44 +0000 (14:04 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Dec 2013 14:04:44 +0000 (14:04 +0000)
commitfded5091dead5806ba2fe94b077634cd90fafdc1
treeefccdb8a06e8321611fcf8c5a1e14c599bd9b0c3
parent5ec71acd1a1c61718685f020fb6e32f880548894
XML document builder should create render tree asynchronously
https://bugs.webkit.org/show_bug.cgi?id=126285

Source/WebCore:

Reviewed by Andreas Kling.

Stop creating renderers explicitly.
Fix SVG <use> element to not rely on parse time render tree construction.

* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::svgAttributeChanged):

    Remove renderer check, we may not have created the render tree yet.

(WebCore::SVGUseElement::willAttachRenderers):

    Switch to willAttachRenderers from willRecalcStyle. The latter is only called as long as style
    recalc doesn't start creating new renderers.

(WebCore::SVGUseElement::invalidateShadowTree):

    Remove renderer check, we may not have created the render tree yet.
    Invalidate with ReconstructRenderTree so willAttachRenderers will always get called.

* svg/SVGUseElement.h:
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::exitText):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
(WebCore::XMLDocumentParser::cdataBlock):

    Remove explicit call to attachRenderTree. The render tree will be created lazily.

LayoutTests:

Reviewed by Andreas Kling.

* platform/mac/fast/table/dynamic-caption-add-before-child-expected.png:
* platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt:

    This is progression. Captions are now correctly in document order.

* svg/custom/object-no-size-attributes-expected.txt:

    Unnecessary text renderer disappears.

* svg/custom/resource-invalidation-crash-expected.txt:

    Progression, the dump has the correct fill.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.png
LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt
LayoutTests/svg/custom/object-no-size-attributes-expected.txt
LayoutTests/svg/custom/resource-invalidation-crash-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGUseElement.cpp
Source/WebCore/svg/SVGUseElement.h
Source/WebCore/xml/parser/XMLDocumentParser.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp