| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 2 * Copyright (C) 2012 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return primitiveValue->getFloatValue(); | 118 return primitiveValue->getFloatValue(); |
| 119 | 119 |
| 120 if (primitiveValue->isFontRelativeLength()) | 120 if (primitiveValue->isFontRelativeLength()) |
| 121 return primitiveValue->getFloatValue() * m_document->documentElement()->
renderStyle()->fontDescription().computedSize(); | 121 return primitiveValue->getFloatValue() * m_document->documentElement()->
renderStyle()->fontDescription().computedSize(); |
| 122 | 122 |
| 123 if (primitiveValue->isPercentage()) { | 123 if (primitiveValue->isPercentage()) { |
| 124 float percentValue = primitiveValue->getFloatValue() / 100.0f; | 124 float percentValue = primitiveValue->getFloatValue() / 100.0f; |
| 125 switch (id) { | 125 switch (id) { |
| 126 case CSSPropertyMaxHeight: | 126 case CSSPropertyMaxHeight: |
| 127 case CSSPropertyMinHeight: | 127 case CSSPropertyMinHeight: |
| 128 ASSERT(m_document->initialViewportSize().height() > 0); | |
| 129 return percentValue * m_document->initialViewportSize().height(); | 128 return percentValue * m_document->initialViewportSize().height(); |
| 130 case CSSPropertyMaxWidth: | 129 case CSSPropertyMaxWidth: |
| 131 case CSSPropertyMinWidth: | 130 case CSSPropertyMinWidth: |
| 132 ASSERT(m_document->initialViewportSize().width() > 0); | |
| 133 return percentValue * m_document->initialViewportSize().width(); | 131 return percentValue * m_document->initialViewportSize().width(); |
| 134 case CSSPropertyMaxZoom: | 132 case CSSPropertyMaxZoom: |
| 135 case CSSPropertyMinZoom: | 133 case CSSPropertyMinZoom: |
| 136 case CSSPropertyZoom: | 134 case CSSPropertyZoom: |
| 137 return percentValue; | 135 return percentValue; |
| 138 default: | 136 default: |
| 139 ASSERT_NOT_REACHED(); | 137 ASSERT_NOT_REACHED(); |
| 140 break; | 138 break; |
| 141 } | 139 } |
| 142 } | 140 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 155 case CSSValueZoom: | 153 case CSSValueZoom: |
| 156 return defaultValue; | 154 return defaultValue; |
| 157 case CSSValueFixed: | 155 case CSSValueFixed: |
| 158 return 0; | 156 return 0; |
| 159 default: | 157 default: |
| 160 return defaultValue; | 158 return defaultValue; |
| 161 } | 159 } |
| 162 } | 160 } |
| 163 | 161 |
| 164 } // namespace WebCore | 162 } // namespace WebCore |
| OLD | NEW |