OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 RefPtrWillBeRawPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(id); | 173 RefPtrWillBeRawPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(id); |
174 if (!value || !value->isPrimitiveValue()) | 174 if (!value || !value->isPrimitiveValue()) |
175 return Length(); // auto | 175 return Length(); // auto |
176 | 176 |
177 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get()); | 177 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get()); |
178 | 178 |
179 if (primitiveValue->getValueID() == CSSValueInternalExtendToZoom) | 179 if (primitiveValue->getValueID() == CSSValueInternalExtendToZoom) |
180 return Length(ExtendToZoom); | 180 return Length(ExtendToZoom); |
181 | 181 |
182 LayoutStyle* documentStyle = m_document->layoutStyle(); | 182 const LayoutStyle* documentStyle = m_document->layoutStyle(); |
183 | 183 |
184 // If we have viewport units the conversion will mark the document style as
having viewport units. | 184 // If we have viewport units the conversion will mark the document style as
having viewport units. |
185 bool documentStyleHasViewportUnits = documentStyle->hasViewportUnits(); | 185 bool documentStyleHasViewportUnits = documentStyle->hasViewportUnits(); |
186 documentStyle->setHasViewportUnits(false); | 186 documentStyle->setHasViewportUnits(false); |
187 | 187 |
188 FrameView* view = m_document->view(); | 188 FrameView* view = m_document->view(); |
189 float width = view ? view->width() : 0; | 189 float width = view ? view->width() : 0; |
190 float height = view ? view->height() : 0; | 190 float height = view ? view->height() : 0; |
191 | 191 |
192 CSSToLengthConversionData::FontSizes fontSizes(documentStyle, documentStyle)
; | 192 CSSToLengthConversionData::FontSizes fontSizes(documentStyle, documentStyle)
; |
(...skipping 10 matching lines...) Expand all Loading... |
203 return result; | 203 return result; |
204 } | 204 } |
205 | 205 |
206 void ViewportStyleResolver::trace(Visitor* visitor) | 206 void ViewportStyleResolver::trace(Visitor* visitor) |
207 { | 207 { |
208 visitor->trace(m_propertySet); | 208 visitor->trace(m_propertySet); |
209 visitor->trace(m_document); | 209 visitor->trace(m_document); |
210 } | 210 } |
211 | 211 |
212 } // namespace blink | 212 } // namespace blink |
OLD | NEW |