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

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

Issue 2056303002: [Layout API] Use Document::layoutViewItem() in ViewportStyleResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed both declarations to const ref as per rune Created 4 years, 5 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. 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // For performance reasons, explicitly clear HeapVectors and 59 // For performance reasons, explicitly clear HeapVectors and
60 // HeapHashMaps to avoid giving a pressure on Oilpan's GC. 60 // HeapHashMaps to avoid giving a pressure on Oilpan's GC.
61 m_animationUpdate.clear(); 61 m_animationUpdate.clear();
62 } 62 }
63 63
64 CSSToLengthConversionData StyleResolverState::fontSizeConversionData() const 64 CSSToLengthConversionData StyleResolverState::fontSizeConversionData() const
65 { 65 {
66 float em = parentStyle()->specifiedFontSize(); 66 float em = parentStyle()->specifiedFontSize();
67 float rem = rootElementStyle() ? rootElementStyle()->specifiedFontSize() : 1 ; 67 float rem = rootElementStyle() ? rootElementStyle()->specifiedFontSize() : 1 ;
68 CSSToLengthConversionData::FontSizes fontSizes(em, rem, &parentStyle()->font ()); 68 CSSToLengthConversionData::FontSizes fontSizes(em, rem, &parentStyle()->font ());
69 CSSToLengthConversionData::ViewportSize viewportSize(document().layoutView() ); 69 CSSToLengthConversionData::ViewportSize viewportSize(document().layoutViewIt em());
70 70
71 return CSSToLengthConversionData(style(), fontSizes, viewportSize, 1); 71 return CSSToLengthConversionData(style(), fontSizes, viewportSize, 1);
72 } 72 }
73 73
74 void StyleResolverState::loadPendingResources() 74 void StyleResolverState::loadPendingResources()
75 { 75 {
76 m_elementStyleResources.loadPendingResources(style()); 76 m_elementStyleResources.loadPendingResources(style());
77 } 77 }
78 78
79 void StyleResolverState::setCustomPropertySetForApplyAtRule(const String& string , StylePropertySet* customPropertySet) 79 void StyleResolverState::setCustomPropertySetForApplyAtRule(const String& string , StylePropertySet* customPropertySet)
(...skipping 10 matching lines...) Expand all
90 { 90 {
91 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = m_parsedProperties ForPendingSubstitution.get(&value); 91 HeapHashMap<CSSPropertyID, Member<const CSSValue>>* map = m_parsedProperties ForPendingSubstitution.get(&value);
92 if (!map) { 92 if (!map) {
93 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>; 93 map = new HeapHashMap<CSSPropertyID, Member<const CSSValue>>;
94 m_parsedPropertiesForPendingSubstitution.set(&value, map); 94 m_parsedPropertiesForPendingSubstitution.set(&value, map);
95 } 95 }
96 return *map; 96 return *map;
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698