| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights |
| 7 * reserved. | 7 * reserved. |
| 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 compareIgnoringAuto(resultMaxHeight, initialViewportSize.height(), | 181 compareIgnoringAuto(resultMaxHeight, initialViewportSize.height(), |
| 182 std::min), | 182 std::min), |
| 183 std::max); | 183 std::max); |
| 184 | 184 |
| 185 // Resolve width value. | 185 // Resolve width value. |
| 186 if (resultWidth == ViewportDescription::ValueAuto) { | 186 if (resultWidth == ViewportDescription::ValueAuto) { |
| 187 if (resultHeight == ViewportDescription::ValueAuto || | 187 if (resultHeight == ViewportDescription::ValueAuto || |
| 188 !initialViewportSize.height()) | 188 !initialViewportSize.height()) |
| 189 resultWidth = initialViewportSize.width(); | 189 resultWidth = initialViewportSize.width(); |
| 190 else | 190 else |
| 191 resultWidth = resultHeight * (initialViewportSize.width() / | 191 resultWidth = |
| 192 initialViewportSize.height()); | 192 resultHeight * |
| 193 (initialViewportSize.width() / initialViewportSize.height()); |
| 193 } | 194 } |
| 194 | 195 |
| 195 // Resolve height value. | 196 // Resolve height value. |
| 196 if (resultHeight == ViewportDescription::ValueAuto) { | 197 if (resultHeight == ViewportDescription::ValueAuto) { |
| 197 if (!initialViewportSize.width()) | 198 if (!initialViewportSize.width()) |
| 198 resultHeight = initialViewportSize.height(); | 199 resultHeight = initialViewportSize.height(); |
| 199 else | 200 else |
| 200 resultHeight = resultWidth * initialViewportSize.height() / | 201 resultHeight = resultWidth * initialViewportSize.height() / |
| 201 initialViewportSize.width(); | 202 initialViewportSize.width(); |
| 202 } | 203 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 metaTagTypeHistogram.count(MetaMobileOptimized); | 298 metaTagTypeHistogram.count(MetaMobileOptimized); |
| 298 } | 299 } |
| 299 #endif | 300 #endif |
| 300 } | 301 } |
| 301 | 302 |
| 302 bool ViewportDescription::matchesHeuristicsForGpuRasterization() const { | 303 bool ViewportDescription::matchesHeuristicsForGpuRasterization() const { |
| 303 return isSpecifiedByAuthor(); | 304 return isSpecifiedByAuthor(); |
| 304 } | 305 } |
| 305 | 306 |
| 306 } // namespace blink | 307 } // namespace blink |
| OLD | NEW |