| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2012 Google Inc. All rights reserved. | 2  * Copyright (C) 2012 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions are | 5  * modification, are permitted provided that the following conditions are | 
| 6  * met: | 6  * met: | 
| 7  * | 7  * | 
| 8  *     * Redistributions of source code must retain the above copyright | 8  *     * Redistributions of source code must retain the above copyright | 
| 9  * notice, this list of conditions and the following disclaimer. | 9  * notice, this list of conditions and the following disclaimer. | 
| 10  *     * Neither the name of Google Inc. nor the names of its | 10  *     * Neither the name of Google Inc. nor the names of its | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 31 #include "core/dom/shadow/ComposedTreeWalker.h" | 31 #include "core/dom/shadow/ComposedTreeWalker.h" | 
| 32 | 32 | 
| 33 namespace WebCore { | 33 namespace WebCore { | 
| 34 | 34 | 
| 35 namespace NodeRenderingTraversal { | 35 namespace NodeRenderingTraversal { | 
| 36 | 36 | 
| 37 void ParentDetails::didTraverseInsertionPoint(InsertionPoint* insertionPoint) | 37 void ParentDetails::didTraverseInsertionPoint(InsertionPoint* insertionPoint) | 
| 38 { | 38 { | 
| 39     if (!m_insertionPoint) { | 39     if (!m_insertionPoint) { | 
| 40         m_insertionPoint = insertionPoint; | 40         m_insertionPoint = insertionPoint; | 
| 41         m_resetStyleInheritance  = m_resetStyleInheritance || insertionPoint->re
    setStyleInheritance(); | 41         m_resetStyleInheritance = m_resetStyleInheritance || insertionPoint->res
    etStyleInheritance(); | 
| 42     } | 42     } | 
| 43 } | 43 } | 
| 44 | 44 | 
| 45 void ParentDetails::didTraverseShadowRoot(const ShadowRoot* root) | 45 void ParentDetails::didTraverseShadowRoot(const ShadowRoot* root) | 
| 46 { | 46 { | 
| 47     m_resetStyleInheritance  = m_resetStyleInheritance || root->resetStyleInheri
    tance(); | 47     m_resetStyleInheritance = m_resetStyleInheritance || root->resetStyleInherit
    ance(); | 
| 48 } | 48 } | 
| 49 | 49 | 
| 50 ContainerNode* parent(const Node* node, ParentDetails* details) | 50 ContainerNode* parent(const Node* node, ParentDetails* details) | 
| 51 { | 51 { | 
| 52     // FIXME: Once everything lazy attaches we should assert that we don't need 
    a distribution recalc here. | 52     // FIXME: We should probably ASSERT(!node->document().childNeedsDistribution
    Recalc()) here. | 
| 53     ComposedTreeWalker walker(node, ComposedTreeWalker::CanStartFromShadowBounda
    ry); | 53     ComposedTreeWalker walker(node, ComposedTreeWalker::CanStartFromShadowBounda
    ry); | 
| 54     ContainerNode* found = toContainerNode(walker.traverseParent(walker.get(), d
    etails)); | 54     ContainerNode* found = toContainerNode(walker.traverseParent(walker.get(), d
    etails)); | 
| 55     return details->outOfComposition() ? 0 : found; | 55     return details->outOfComposition() ? 0 : found; | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 Node* nextSibling(const Node* node) | 58 Node* nextSibling(const Node* node) | 
| 59 { | 59 { | 
| 60     ComposedTreeWalker walker(node); | 60     ComposedTreeWalker walker(node); | 
| 61     if (node->isBeforePseudoElement()) { | 61     if (node->isBeforePseudoElement()) { | 
| 62         walker.parent(); | 62         walker.parent(); | 
| (...skipping 26 matching lines...) Expand all  Loading... | 
| 89     Node* parent = walker.traverseParent(node); | 89     Node* parent = walker.traverseParent(node); | 
| 90     if (parent && parent->isElementNode()) | 90     if (parent && parent->isElementNode()) | 
| 91         return toElement(parent)->pseudoElement(BEFORE); | 91         return toElement(parent)->pseudoElement(BEFORE); | 
| 92 | 92 | 
| 93     return 0; | 93     return 0; | 
| 94 } | 94 } | 
| 95 | 95 | 
| 96 } | 96 } | 
| 97 | 97 | 
| 98 } // namespace | 98 } // namespace | 
| OLD | NEW | 
|---|