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 15 matching lines...) Expand all Loading... |
26 #include "core/dom/Node.h" | 26 #include "core/dom/Node.h" |
27 #include "core/dom/NodeRenderStyle.h" | 27 #include "core/dom/NodeRenderStyle.h" |
28 #include "core/dom/NodeRenderingContext.h" | 28 #include "core/dom/NodeRenderingContext.h" |
29 #include "core/dom/VisitedLinkState.h" | 29 #include "core/dom/VisitedLinkState.h" |
30 #include "core/page/Page.h" | 30 #include "core/page/Page.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 ElementResolveContext::ElementResolveContext(Element* element) | 34 ElementResolveContext::ElementResolveContext(Element* element) |
35 : m_element(element) | 35 : m_element(element) |
36 , m_styledElement(element && element->isStyledElement() ? element : 0) | |
37 , m_elementLinkState(element ? element->document()->visitedLinkState()->dete
rmineLinkState(element) : NotInsideLink) | 36 , m_elementLinkState(element ? element->document()->visitedLinkState()->dete
rmineLinkState(element) : NotInsideLink) |
38 , m_distributedToInsertionPoint(false) | 37 , m_distributedToInsertionPoint(false) |
39 , m_resetStyleInheritance(false) | 38 , m_resetStyleInheritance(false) |
40 { | 39 { |
41 NodeRenderingContext context(element); | 40 NodeRenderingContext context(element); |
42 m_parentNode = context.parentNodeForRenderingAndStyle(); | 41 m_parentNode = context.parentNodeForRenderingAndStyle(); |
43 m_distributedToInsertionPoint = context.insertionPoint(); | 42 m_distributedToInsertionPoint = context.insertionPoint(); |
44 m_resetStyleInheritance = context.resetStyleInheritance(); | 43 m_resetStyleInheritance = context.resetStyleInheritance(); |
45 | 44 |
46 Node* documentElement = document()->documentElement(); | 45 Node* documentElement = document()->documentElement(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 m_fontDirty = false; | 89 m_fontDirty = false; |
91 | 90 |
92 // FIXME: StyleResolverState is never passed between documents | 91 // FIXME: StyleResolverState is never passed between documents |
93 // so we should be able to do this initialization at StyleResolverState | 92 // so we should be able to do this initialization at StyleResolverState |
94 // createion time instead of now, correct? | 93 // createion time instead of now, correct? |
95 if (Page* page = newDocument->page()) | 94 if (Page* page = newDocument->page()) |
96 m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor()); | 95 m_elementStyleResources.setDeviceScaleFactor(page->deviceScaleFactor()); |
97 } | 96 } |
98 | 97 |
99 } // namespace WebCore | 98 } // namespace WebCore |
OLD | NEW |