| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All rights reserved. | 4 * All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "core/dom/shadow/InsertionPoint.h" | 29 #include "core/dom/shadow/InsertionPoint.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 ElementResolveContext::ElementResolveContext(const Document& document) | 33 ElementResolveContext::ElementResolveContext(const Document& document) |
| 34 : m_element(nullptr), | 34 : m_element(nullptr), |
| 35 m_parentNode(nullptr), | 35 m_parentNode(nullptr), |
| 36 m_rootElementStyle(document.documentElement() | 36 m_rootElementStyle(document.documentElement() |
| 37 ? document.documentElement()->computedStyle() | 37 ? document.documentElement()->computedStyle() |
| 38 : document.computedStyle()), | 38 : document.computedStyle()), |
| 39 m_elementLinkState(NotInsideLink), | 39 m_elementLinkState(EInsideLink::kNotInsideLink), |
| 40 m_distributedToInsertionPoint(false) {} | 40 m_distributedToInsertionPoint(false) {} |
| 41 | 41 |
| 42 ElementResolveContext::ElementResolveContext(Element& element) | 42 ElementResolveContext::ElementResolveContext(Element& element) |
| 43 : m_element(&element), | 43 : m_element(&element), |
| 44 m_elementLinkState( | 44 m_elementLinkState( |
| 45 element.document().visitedLinkState().determineLinkState(element)), | 45 element.document().visitedLinkState().determineLinkState(element)), |
| 46 m_distributedToInsertionPoint(false) { | 46 m_distributedToInsertionPoint(false) { |
| 47 LayoutTreeBuilderTraversal::ParentDetails parentDetails; | 47 LayoutTreeBuilderTraversal::ParentDetails parentDetails; |
| 48 m_parentNode = | 48 m_parentNode = |
| 49 element.isActiveSlotOrActiveInsertionPoint() | 49 element.isActiveSlotOrActiveInsertionPoint() |
| 50 ? nullptr | 50 ? nullptr |
| 51 : LayoutTreeBuilderTraversal::parent(element, &parentDetails); | 51 : LayoutTreeBuilderTraversal::parent(element, &parentDetails); |
| 52 m_distributedToInsertionPoint = parentDetails.insertionPoint(); | 52 m_distributedToInsertionPoint = parentDetails.insertionPoint(); |
| 53 | 53 |
| 54 const Document& document = element.document(); | 54 const Document& document = element.document(); |
| 55 Node* documentElement = document.documentElement(); | 55 Node* documentElement = document.documentElement(); |
| 56 const ComputedStyle* documentStyle = document.computedStyle(); | 56 const ComputedStyle* documentStyle = document.computedStyle(); |
| 57 m_rootElementStyle = documentElement && element != documentElement | 57 m_rootElementStyle = documentElement && element != documentElement |
| 58 ? documentElement->computedStyle() | 58 ? documentElement->computedStyle() |
| 59 : documentStyle; | 59 : documentStyle; |
| 60 if (!m_rootElementStyle) | 60 if (!m_rootElementStyle) |
| 61 m_rootElementStyle = documentStyle; | 61 m_rootElementStyle = documentStyle; |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace blink | 64 } // namespace blink |
| OLD | NEW |