Failure to dispatch didFinishLoadForFrame if font load fails synchronously 
https://bugs.webkit.org/show_bug.cgi?id=91018

Reviewed by Enrica Casucci.

New font loads may be triggered by layout after the document load is complete but before we have dispatched
didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke 
FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
        
Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Typo: ParentTranversalDetails should be ParentTraversalDetails
https://bugs.webkit.org/show_bug.cgi?id=91059

Reviewed by Andreas Kling.

Did a bare rename from ParentTranversalDetails to ParentTraversalDetails

No new tests, just a rename.

* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
(WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
(WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
(WebCore::ComposedShadowTreeWalker::findParent):
(WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
(WebCore::ComposedShadowTreeWalker::traverseParent):
(WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
(WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
* dom/ComposedShadowTreeWalker.h:
(WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
(ComposedShadowTreeWalker):
* dom/NodeRenderingContext.h:
(NodeRenderingContext):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening, fixing a typo in test's filename in TestExpectations.

* platform/gtk/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Incorrect handling of chained pending resources in SVGUseElement
https://bugs.webkit.org/show_bug.cgi?id=89686

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Currently SVGUseElement builds the shadow tree when the target first
becomes available. This is normally OK, but if the target itself (or
one of its children) is a <use> element with pending resources, then
the shadow expansion only captures the current state of the tree and
never gets updated when the pending resource becomes available.

In order to support arbitrary <use>-on-<use> constructs, this patch
tracks nested <use> dependencies and rebuilds the dependent trees
whenever the target gets updated.

Tests: svg/custom/use-nested-expected.svg
       svg/custom/use-nested.svg

* svg/SVGElement.cpp:
(WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
element being removed as a valid target in SVGUseElement::buildInstanceTree because its
InDocument flag is not cleared yet.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::~SVGUseElement):
(WebCore::SVGUseElement::clearResourceReferences):
(WebCore::SVGUseElement::buildPendingResource):
(WebCore::SVGUseElement::buildShadowAndInstanceTree):
(WebCore::SVGUseElement::buildInstanceTree):
* svg/SVGUseElement.h:
(SVGUseElement):
Track <use> -> <use> dependencies using SVGDocumentExtensions'
m_elementDependencies framework and ensure dependent trees are rebuilt
when the target itself gets rebuilt.

LayoutTests:

Added reftest to verify that nested/indirect <use> constructs are
handled correctly WRT pending resource tracking.

Also updated the svg/hixie/error/017-expected.txt to match the current
results. Per comments in SVGUseElement::buildShadowAndInstanceTree, the
new behavior is correct: <use> cycles are to be ignored.

* platform/chromium-win/svg/hixie/error/017-expected.txt:
* platform/efl/svg/hixie/error/017-expected.txt:
* platform/gtk/svg/hixie/error/017-expected.txt:
* platform/mac/svg/hixie/error/017-expected.txt:
* platform/qt/svg/hixie/error/017-expected.txt:
* svg/custom/use-nested-expected.svg: Added.
* svg/custom/use-nested.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122449 268f45cc-cd09-0410-ab3c-d52691b4dbfc