Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp

Issue 2399633003: reflow comments in core/css/resolver (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.
4 * All rights reserved.
4 * 5 *
5 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
8 * 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.
9 * 10 *
10 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 14 * Library General Public License for more details.
(...skipping 16 matching lines...) Expand all
30 31
31 namespace blink { 32 namespace blink {
32 33
33 StyleResolverState::StyleResolverState( 34 StyleResolverState::StyleResolverState(
34 Document& document, 35 Document& document,
35 const ElementResolveContext& elementContext, 36 const ElementResolveContext& elementContext,
36 const ComputedStyle* parentStyle) 37 const ComputedStyle* parentStyle)
37 : m_elementContext(elementContext), 38 : m_elementContext(elementContext),
38 m_document(document), 39 m_document(document),
39 m_style(nullptr), 40 m_style(nullptr),
40 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com /468152) 41 // TODO(jchaffraix): We should make m_parentStyle const
42 // (https://crbug.com/468152)
41 m_parentStyle(const_cast<ComputedStyle*>(parentStyle)), 43 m_parentStyle(const_cast<ComputedStyle*>(parentStyle)),
42 m_applyPropertyToRegularStyle(true), 44 m_applyPropertyToRegularStyle(true),
43 m_applyPropertyToVisitedLinkStyle(false), 45 m_applyPropertyToVisitedLinkStyle(false),
44 m_hasDirAutoAttribute(false), 46 m_hasDirAutoAttribute(false),
45 m_fontBuilder(document), 47 m_fontBuilder(document),
46 m_elementStyleResources(document, document.devicePixelRatio()) { 48 m_elementStyleResources(document, document.devicePixelRatio()) {
47 if (!m_parentStyle) { 49 if (!m_parentStyle) {
48 // TODO(jchaffraix): We should make m_parentStyle const (https://crbug.com/4 68152) 50 // TODO(jchaffraix): We should make m_parentStyle const
51 // (https://crbug.com/468152)
49 m_parentStyle = const_cast<ComputedStyle*>(m_elementContext.parentStyle()); 52 m_parentStyle = const_cast<ComputedStyle*>(m_elementContext.parentStyle());
50 } 53 }
51 54
52 DCHECK(document.isActive()); 55 DCHECK(document.isActive());
53 } 56 }
54 57
55 StyleResolverState::StyleResolverState(Document& document, 58 StyleResolverState::StyleResolverState(Document& document,
56 Element* element, 59 Element* element,
57 const ComputedStyle* parentStyle) 60 const ComputedStyle* parentStyle)
58 : StyleResolverState(document, 61 : StyleResolverState(document,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = 109 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map =
107 m_parsedPropertiesForPendingSubstitutionCache.get(&value); 110 m_parsedPropertiesForPendingSubstitutionCache.get(&value);
108 if (!map) { 111 if (!map) {
109 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; 112 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>;
110 m_parsedPropertiesForPendingSubstitutionCache.set(&value, map); 113 m_parsedPropertiesForPendingSubstitutionCache.set(&value, map);
111 } 114 }
112 return *map; 115 return *map;
113 } 116 }
114 117
115 } // namespace blink 118 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698