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

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: Created 4 years, 6 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)
80 { 80 {
81 m_customPropertySetsForApplyAtRule.set(string, customPropertySet); 81 m_customPropertySetsForApplyAtRule.set(string, customPropertySet);
82 } 82 }
83 83
84 StylePropertySet* StyleResolverState::customPropertySetForApplyAtRule(const Stri ng& string) 84 StylePropertySet* StyleResolverState::customPropertySetForApplyAtRule(const Stri ng& string)
85 { 85 {
86 return m_customPropertySetsForApplyAtRule.get(string); 86 return m_customPropertySetsForApplyAtRule.get(string);
87 } 87 }
88 88
89 } // namespace blink 89 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698