Chromium Code Reviews| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 || id == CSSPropertyMaxWidth | 177 || id == CSSPropertyMaxWidth |
| 178 || id == CSSPropertyMinWidth); | 178 || id == CSSPropertyMinWidth); |
| 179 | 179 |
| 180 RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(id); | 180 RefPtr<CSSValue> value = m_propertySet->getPropertyCSSValue(id); |
| 181 if (!value || !value->isPrimitiveValue()) | 181 if (!value || !value->isPrimitiveValue()) |
| 182 return Length(); // auto | 182 return Length(); // auto |
| 183 | 183 |
| 184 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get()); | 184 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value.get()); |
| 185 | 185 |
| 186 if (primitiveValue->isLength()) | 186 if (primitiveValue->isLength()) |
| 187 return primitiveValue->computeLength<Length>(CSSToLengthConversionData(m _document->renderStyle(), m_document->renderStyle(), 1.0f)); | 187 return primitiveValue->computeLength<Length>(CSSToLengthConversionData(m _document->renderStyle(), m_document->renderStyle(), m_document->renderView(), 1 .0f)); |
|
rune
2013/12/04 07:44:06
This change means also viewport descriptors need t
Timothy Loh
2013/12/15 23:41:19
Updated patch to re-resolve on resize.
| |
| 188 | |
| 189 if (primitiveValue->isViewportPercentageLength()) | |
| 190 return primitiveValue->viewportPercentageLength(); | |
| 191 | 188 |
| 192 if (primitiveValue->isPercentage()) | 189 if (primitiveValue->isPercentage()) |
| 193 return Length(primitiveValue->getFloatValue(), Percent); | 190 return Length(primitiveValue->getFloatValue(), Percent); |
| 194 | 191 |
| 195 switch (primitiveValue->getValueID()) { | 192 switch (primitiveValue->getValueID()) { |
| 196 case CSSValueInternalExtendToZoom: | 193 case CSSValueInternalExtendToZoom: |
| 197 return Length(ExtendToZoom); | 194 return Length(ExtendToZoom); |
| 198 case CSSValueAuto: | 195 case CSSValueAuto: |
| 199 return Length(); | 196 return Length(); |
| 200 default: | 197 default: |
| 201 // Unrecognized keyword. | 198 // Unrecognized keyword. |
| 202 ASSERT_NOT_REACHED(); | 199 ASSERT_NOT_REACHED(); |
| 203 return Length(0, Fixed); | 200 return Length(0, Fixed); |
| 204 } | 201 } |
| 205 } | 202 } |
| 206 | 203 |
| 207 } // namespace WebCore | 204 } // namespace WebCore |
| OLD | NEW |