diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-23 10:25:11 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-23 10:25:11 +0200 |
| commit | 5ea819f80c6840c492386bfafbffb059c7e2091f (patch) | |
| tree | 42ad0b1d82eff090d14278a088ea0f4840a0f938 /Source/WebCore/dom/ComposedShadowTreeWalker.cpp | |
| parent | 43a42f108af6bcbd91f2672731c3047c26213af1 (diff) | |
| download | qtwebkit-5ea819f80c6840c492386bfafbffb059c7e2091f.tar.gz | |
Imported WebKit commit 20434eb8eb95065803473139d8794e98a7672f75 (http://svn.webkit.org/repository/webkit/trunk@132191)
New snapshot that should fix build with latest qtbase and the QPlastiqueStyle removal
Diffstat (limited to 'Source/WebCore/dom/ComposedShadowTreeWalker.cpp')
| -rw-r--r-- | Source/WebCore/dom/ComposedShadowTreeWalker.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/WebCore/dom/ComposedShadowTreeWalker.cpp b/Source/WebCore/dom/ComposedShadowTreeWalker.cpp index 8b0ec7e24..e88230e64 100644 --- a/Source/WebCore/dom/ComposedShadowTreeWalker.cpp +++ b/Source/WebCore/dom/ComposedShadowTreeWalker.cpp @@ -30,6 +30,7 @@ #include "ContentDistributor.h" #include "Element.h" #include "ElementShadow.h" +#include "HTMLContentElement.h" #include "InsertionPoint.h" namespace WebCore { @@ -51,11 +52,22 @@ static inline ElementShadow* shadowOfParent(const Node* node) return 0; } +static inline ElementShadow* shadowOfParentForDistribution(const Node* node) +{ + if (!node) + return 0; + + if (Element* parent = parentElementForDistribution(node)) + return parent->shadow(); + + return 0; +} + static inline InsertionPoint* resolveReprojection(const Node* node) { InsertionPoint* insertionPoint = 0; const Node* current = node; - while (ElementShadow* shadow = shadowOfParent(current)) { + while (ElementShadow* shadow = shadowOfParentForDistribution(current)) { shadow->ensureDistribution(); if (InsertionPoint* insertedTo = shadow->insertionPointFor(node)) { current = insertedTo; @@ -260,7 +272,7 @@ Node* ComposedShadowTreeWalker::traverseParent(const Node* node, ParentTraversal ASSERT(toShadowRoot(node)->isYoungest()); return 0; } - if (ElementShadow* shadow = shadowOfParent(node)) { + if (ElementShadow* shadow = shadowOfParentForDistribution(node)) { shadow->ensureDistribution(); if (InsertionPoint* insertionPoint = resolveReprojection(node)) { if (details) |
