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 11 matching lines...) Expand all Loading... |
22 #include "core/css/resolver/StyleResolverState.h" | 22 #include "core/css/resolver/StyleResolverState.h" |
23 | 23 |
24 #include "core/animation/css/CSSAnimations.h" | 24 #include "core/animation/css/CSSAnimations.h" |
25 #include "core/css/StylePropertySet.h" | 25 #include "core/css/StylePropertySet.h" |
26 #include "core/dom/Node.h" | 26 #include "core/dom/Node.h" |
27 #include "core/dom/NodeComputedStyle.h" | 27 #include "core/dom/NodeComputedStyle.h" |
28 #include "core/frame/FrameHost.h" | 28 #include "core/frame/FrameHost.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
| 32 StyleResolverState::StyleResolverState(const ComputedStyle* parentStyle) |
| 33 : m_document(nullptr) |
| 34 , m_style(nullptr) |
| 35 , m_parentStyle(const_cast<ComputedStyle*>(parentStyle)) |
| 36 , m_applyPropertyToRegularStyle(true) |
| 37 , m_applyPropertyToVisitedLinkStyle(false) |
| 38 , m_hasDirAutoAttribute(false) |
| 39 { |
| 40 } |
| 41 |
32 StyleResolverState::StyleResolverState(Document& document, const ElementResolveC
ontext& elementContext, const ComputedStyle* parentStyle) | 42 StyleResolverState::StyleResolverState(Document& document, const ElementResolveC
ontext& elementContext, const ComputedStyle* parentStyle) |
33 : m_elementContext(elementContext) | 43 : m_elementContext(elementContext) |
34 , m_document(document) | 44 , m_document(document) |
35 , m_style(nullptr) | 45 , m_style(nullptr) |
36 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com/4
68152) | 46 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com/4
68152) |
37 , m_parentStyle(const_cast<ComputedStyle*>(parentStyle)) | 47 , m_parentStyle(const_cast<ComputedStyle*>(parentStyle)) |
38 , m_applyPropertyToRegularStyle(true) | 48 , m_applyPropertyToRegularStyle(true) |
39 , m_applyPropertyToVisitedLinkStyle(false) | 49 , m_applyPropertyToVisitedLinkStyle(false) |
40 , m_hasDirAutoAttribute(false) | 50 , m_hasDirAutoAttribute(false) |
41 , m_fontBuilder(document) | 51 , m_fontBuilder(document) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 { | 100 { |
91 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = m_parsedProperties
ForPendingSubstitution.get(&value); | 101 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = m_parsedProperties
ForPendingSubstitution.get(&value); |
92 if (!map) { | 102 if (!map) { |
93 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; | 103 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; |
94 m_parsedPropertiesForPendingSubstitution.set(&value, map); | 104 m_parsedPropertiesForPendingSubstitution.set(&value, map); |
95 } | 105 } |
96 return *map; | 106 return *map; |
97 } | 107 } |
98 | 108 |
99 } // namespace blink | 109 } // namespace blink |
OLD | NEW |