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.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 #include "core/dom/Node.h" | 25 #include "core/dom/Node.h" |
26 #include "core/dom/NodeRenderStyle.h" | 26 #include "core/dom/NodeRenderStyle.h" |
27 #include "core/dom/NodeRenderingTraversal.h" | 27 #include "core/dom/NodeRenderingTraversal.h" |
28 #include "core/dom/VisitedLinkState.h" | 28 #include "core/dom/VisitedLinkState.h" |
29 | 29 |
30 namespace WebCore { | 30 namespace WebCore { |
31 | 31 |
32 ElementResolveContext::ElementResolveContext(Element* element) | 32 ElementResolveContext::ElementResolveContext(Element* element) |
33 : m_element(element) | 33 : m_element(element) |
34 , m_elementLinkState(element ? element->document()->visitedLinkState()->dete
rmineLinkState(element) : NotInsideLink) | 34 , m_elementLinkState(element ? element->document().visitedLinkState()->deter
mineLinkState(element) : NotInsideLink) |
35 , m_distributedToInsertionPoint(false) | 35 , m_distributedToInsertionPoint(false) |
36 , m_resetStyleInheritance(false) | 36 , m_resetStyleInheritance(false) |
37 { | 37 { |
38 NodeRenderingTraversal::ParentDetails parentDetails; | 38 NodeRenderingTraversal::ParentDetails parentDetails; |
39 m_parentNode = NodeRenderingTraversal::parent(element, &parentDetails); | 39 m_parentNode = NodeRenderingTraversal::parent(element, &parentDetails); |
40 m_distributedToInsertionPoint = parentDetails.insertionPoint(); | 40 m_distributedToInsertionPoint = parentDetails.insertionPoint(); |
41 m_resetStyleInheritance = parentDetails.resetStyleInheritance(); | 41 m_resetStyleInheritance = parentDetails.resetStyleInheritance(); |
42 | 42 |
43 Node* documentElement = document()->documentElement(); | 43 Node* documentElement = document().documentElement(); |
44 RenderStyle* documentStyle = document()->renderStyle(); | 44 RenderStyle* documentStyle = document().renderStyle(); |
45 m_rootElementStyle = documentElement && element != documentElement ? documen
tElement->renderStyle() : documentStyle; | 45 m_rootElementStyle = documentElement && element != documentElement ? documen
tElement->renderStyle() : documentStyle; |
46 } | 46 } |
47 | 47 |
48 } // namespace WebCore | 48 } // namespace WebCore |
OLD | NEW |