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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.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
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. 2 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 CSSValueID valueID = toCSSIdentifierValue(value)->getValueID(); 210 CSSValueID valueID = toCSSIdentifierValue(value)->getValueID();
211 if (valueID == CSSValueInternalExtendToZoom) 211 if (valueID == CSSValueInternalExtendToZoom)
212 return Length(ExtendToZoom); 212 return Length(ExtendToZoom);
213 if (valueID == CSSValueAuto) 213 if (valueID == CSSValueAuto)
214 return Length(Auto); 214 return Length(Auto);
215 } 215 }
216 216
217 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 217 const CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
218 ComputedStyle* documentStyle = m_document->mutableComputedStyle(); 218 ComputedStyle* documentStyle = m_document->mutableComputedStyle();
219 219
220 // If we have viewport units the conversion will mark the document style as ha ving viewport units. 220 // If we have viewport units the conversion will mark the document style as
221 // having viewport units.
221 bool documentStyleHasViewportUnits = documentStyle->hasViewportUnits(); 222 bool documentStyleHasViewportUnits = documentStyle->hasViewportUnits();
222 documentStyle->setHasViewportUnits(false); 223 documentStyle->setHasViewportUnits(false);
223 224
224 CSSToLengthConversionData::FontSizes fontSizes(documentStyle, documentStyle); 225 CSSToLengthConversionData::FontSizes fontSizes(documentStyle, documentStyle);
225 CSSToLengthConversionData::ViewportSize viewportSize( 226 CSSToLengthConversionData::ViewportSize viewportSize(
226 m_document->layoutViewItem()); 227 m_document->layoutViewItem());
227 228
228 Length result = primitiveValue->convertToLength( 229 Length result = primitiveValue->convertToLength(
229 CSSToLengthConversionData(documentStyle, fontSizes, viewportSize, 1.0f)); 230 CSSToLengthConversionData(documentStyle, fontSizes, viewportSize, 1.0f));
230 if (documentStyle->hasViewportUnits()) 231 if (documentStyle->hasViewportUnits())
231 m_document->setHasViewportUnits(); 232 m_document->setHasViewportUnits();
232 documentStyle->setHasViewportUnits(documentStyleHasViewportUnits); 233 documentStyle->setHasViewportUnits(documentStyleHasViewportUnits);
233 234
234 return result; 235 return result;
235 } 236 }
236 237
237 DEFINE_TRACE(ViewportStyleResolver) { 238 DEFINE_TRACE(ViewportStyleResolver) {
238 visitor->trace(m_propertySet); 239 visitor->trace(m_propertySet);
239 visitor->trace(m_document); 240 visitor->trace(m_document);
240 } 241 }
241 242
242 } // namespace blink 243 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/TransformBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698