| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 { | 52 { |
| 53 resetEffectiveZoom(styleResolver); | 53 resetEffectiveZoom(styleResolver); |
| 54 styleResolver->setZoom(styleResolver->parentStyle()->zoom()); | 54 styleResolver->setZoom(styleResolver->parentStyle()->zoom()); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolver* styleResolv
er, CSSValue* value) | 57 void StyleBuilderFunctions::applyValueCSSPropertyZoom(StyleResolver* styleResolv
er, CSSValue* value) |
| 58 { | 58 { |
| 59 ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue()); | 59 ASSERT_WITH_SECURITY_IMPLICATION(value->isPrimitiveValue()); |
| 60 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 60 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 61 | 61 |
| 62 if (primitiveValue->getIdent() == CSSValueNormal) { | 62 if (primitiveValue->getValueID() == CSSValueNormal) { |
| 63 resetEffectiveZoom(styleResolver); | 63 resetEffectiveZoom(styleResolver); |
| 64 styleResolver->setZoom(RenderStyle::initialZoom()); | 64 styleResolver->setZoom(RenderStyle::initialZoom()); |
| 65 } else if (primitiveValue->getIdent() == CSSValueReset) { | 65 } else if (primitiveValue->getValueID() == CSSValueReset) { |
| 66 styleResolver->setEffectiveZoom(RenderStyle::initialZoom()); | 66 styleResolver->setEffectiveZoom(RenderStyle::initialZoom()); |
| 67 styleResolver->setZoom(RenderStyle::initialZoom()); | 67 styleResolver->setZoom(RenderStyle::initialZoom()); |
| 68 } else if (primitiveValue->getIdent() == CSSValueDocument) { | 68 } else if (primitiveValue->getValueID() == CSSValueDocument) { |
| 69 float docZoom = styleResolver->rootElementStyle() ? styleResolver->rootE
lementStyle()->zoom() : RenderStyle::initialZoom(); | 69 float docZoom = styleResolver->rootElementStyle() ? styleResolver->rootE
lementStyle()->zoom() : RenderStyle::initialZoom(); |
| 70 styleResolver->setEffectiveZoom(docZoom); | 70 styleResolver->setEffectiveZoom(docZoom); |
| 71 styleResolver->setZoom(docZoom); | 71 styleResolver->setZoom(docZoom); |
| 72 } else if (primitiveValue->isPercentage()) { | 72 } else if (primitiveValue->isPercentage()) { |
| 73 resetEffectiveZoom(styleResolver); | 73 resetEffectiveZoom(styleResolver); |
| 74 if (float percent = primitiveValue->getFloatValue()) | 74 if (float percent = primitiveValue->getFloatValue()) |
| 75 styleResolver->setZoom(percent / 100.0f); | 75 styleResolver->setZoom(percent / 100.0f); |
| 76 } else if (primitiveValue->isNumber()) { | 76 } else if (primitiveValue->isNumber()) { |
| 77 resetEffectiveZoom(styleResolver); | 77 resetEffectiveZoom(styleResolver); |
| 78 if (float number = primitiveValue->getFloatValue()) | 78 if (float number = primitiveValue->getFloatValue()) |
| 79 styleResolver->setZoom(number); | 79 styleResolver->setZoom(number); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace WebCore | 83 } // namespace WebCore |
| OLD | NEW |