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 18 matching lines...) Expand all Loading... |
29 #include "core/layout/api/LayoutViewItem.h" | 29 #include "core/layout/api/LayoutViewItem.h" |
30 | 30 |
31 namespace blink { | 31 namespace blink { |
32 | 32 |
33 StyleResolverState::StyleResolverState( | 33 StyleResolverState::StyleResolverState( |
34 Document& document, | 34 Document& document, |
35 const ElementResolveContext& elementContext, | 35 const ElementResolveContext& elementContext, |
36 const ComputedStyle* parentStyle) | 36 const ComputedStyle* parentStyle) |
37 : m_elementContext(elementContext), | 37 : m_elementContext(elementContext), |
38 m_document(document), | 38 m_document(document), |
39 m_style(nullptr) | 39 m_style(nullptr), |
40 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com
/468152) | 40 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com
/468152) |
41 , | |
42 m_parentStyle(const_cast<ComputedStyle*>(parentStyle)), | 41 m_parentStyle(const_cast<ComputedStyle*>(parentStyle)), |
43 m_applyPropertyToRegularStyle(true), | 42 m_applyPropertyToRegularStyle(true), |
44 m_applyPropertyToVisitedLinkStyle(false), | 43 m_applyPropertyToVisitedLinkStyle(false), |
45 m_hasDirAutoAttribute(false), | 44 m_hasDirAutoAttribute(false), |
46 m_fontBuilder(document), | 45 m_fontBuilder(document), |
47 m_elementStyleResources(document, document.devicePixelRatio()) { | 46 m_elementStyleResources(document, document.devicePixelRatio()) { |
48 if (!m_parentStyle) { | 47 if (!m_parentStyle) { |
49 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com/4
68152) | 48 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com/4
68152) |
50 m_parentStyle = const_cast<ComputedStyle*>(m_elementContext.parentStyle()); | 49 m_parentStyle = const_cast<ComputedStyle*>(m_elementContext.parentStyle()); |
51 } | 50 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = | 106 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = |
108 m_parsedPropertiesForPendingSubstitutionCache.get(&value); | 107 m_parsedPropertiesForPendingSubstitutionCache.get(&value); |
109 if (!map) { | 108 if (!map) { |
110 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; | 109 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; |
111 m_parsedPropertiesForPendingSubstitutionCache.set(&value, map); | 110 m_parsedPropertiesForPendingSubstitutionCache.set(&value, map); |
112 } | 111 } |
113 return *map; | 112 return *map; |
114 } | 113 } |
115 | 114 |
116 } // namespace blink | 115 } // namespace blink |
OLD | NEW |