| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * Copyright (C) 2013 Google Inc. All rights reserved. |   2  * Copyright (C) 2013 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 21 matching lines...) Expand all  Loading... | 
|  32 #include "core/dom/shadow/ShadowRoot.h" |  32 #include "core/dom/shadow/ShadowRoot.h" | 
|  33  |  33  | 
|  34 namespace WebCore { |  34 namespace WebCore { | 
|  35  |  35  | 
|  36 EventPathWalker::EventPathWalker(const Node* node) |  36 EventPathWalker::EventPathWalker(const Node* node) | 
|  37     : m_node(node) |  37     : m_node(node) | 
|  38     , m_distributedNode(node) |  38     , m_distributedNode(node) | 
|  39     , m_isVisitingInsertionPointInReprojection(false) |  39     , m_isVisitingInsertionPointInReprojection(false) | 
|  40 { |  40 { | 
|  41     ASSERT(node); |  41     ASSERT(node); | 
|  42     // FIXME: It's not clear if we need this document check, but I think we do |  42     node->document()->updateDistributionForNodeIfNeeded(const_cast<Node*>(node))
    ; | 
|  43     // since DocType nodes from document.implementation.createDocumentType |  | 
|  44     // don't have a document(). |  | 
|  45     if (Document* document = node->document()) |  | 
|  46         document->updateDistributionForNodeIfNeeded(const_cast<Node*>(node)); |  | 
|  47 } |  43 } | 
|  48  |  44  | 
|  49 Node* EventPathWalker::parent(const Node* node) |  45 Node* EventPathWalker::parent(const Node* node) | 
|  50 { |  46 { | 
|  51     EventPathWalker walker(node); |  47     EventPathWalker walker(node); | 
|  52     walker.moveToParent(); |  48     walker.moveToParent(); | 
|  53     return walker.node(); |  49     return walker.node(); | 
|  54 } |  50 } | 
|  55  |  51  | 
|  56 void EventPathWalker::moveToParent() |  52 void EventPathWalker::moveToParent() | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|  77         m_node = insertionPoint; |  73         m_node = insertionPoint; | 
|  78         m_isVisitingInsertionPointInReprojection = true; |  74         m_isVisitingInsertionPointInReprojection = true; | 
|  79         return; |  75         return; | 
|  80     } |  76     } | 
|  81     m_node = shadowRoot->host(); |  77     m_node = shadowRoot->host(); | 
|  82     m_distributedNode = m_node; |  78     m_distributedNode = m_node; | 
|  83     m_isVisitingInsertionPointInReprojection = false; |  79     m_isVisitingInsertionPointInReprojection = false; | 
|  84 } |  80 } | 
|  85  |  81  | 
|  86 } // namespace |  82 } // namespace | 
| OLD | NEW |