| 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 reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. |
| 10 * | 10 * |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 PageScaleConstraints result; | 160 PageScaleConstraints result; |
| 161 result.minimumScale = resultMinZoom; | 161 result.minimumScale = resultMinZoom; |
| 162 result.maximumScale = resultMaxZoom; | 162 result.maximumScale = resultMaxZoom; |
| 163 result.initialScale = resultZoom; | 163 result.initialScale = resultZoom; |
| 164 result.layoutSize.setWidth(resultWidth); | 164 result.layoutSize.setWidth(resultWidth); |
| 165 result.layoutSize.setHeight(resultHeight); | 165 result.layoutSize.setHeight(resultHeight); |
| 166 return result; | 166 return result; |
| 167 } | 167 } |
| 168 | 168 |
| 169 if (type == ViewportArguments::ViewportMetaLayoutSizeAndZeroValuesQuirk) { |
| 170 if (!static_cast<int>(resultWidth)) { |
| 171 resultWidth = ViewportArguments::ValueDeviceWidth; |
| 172 if (!static_cast<int>(resultZoom)) |
| 173 resultZoom = 1.0; |
| 174 } |
| 175 if (!static_cast<int>(resultHeight)) |
| 176 resultHeight = ViewportArguments::ValueDeviceHeight; |
| 177 if (!static_cast<int>(resultMinZoom)) |
| 178 resultMinZoom = ViewportArguments::ValueAuto; |
| 179 if (!static_cast<int>(resultMaxZoom)) |
| 180 resultMaxZoom = ViewportArguments::ValueAuto; |
| 181 } |
| 182 |
| 169 switch (static_cast<int>(resultWidth)) { | 183 switch (static_cast<int>(resultWidth)) { |
| 170 case ViewportArguments::ValueDeviceWidth: | 184 case ViewportArguments::ValueDeviceWidth: |
| 171 resultWidth = initialViewportSize.width(); | 185 resultWidth = initialViewportSize.width(); |
| 172 break; | 186 break; |
| 173 case ViewportArguments::ValueDeviceHeight: | 187 case ViewportArguments::ValueDeviceHeight: |
| 174 resultWidth = initialViewportSize.height(); | 188 resultWidth = initialViewportSize.height(); |
| 175 break; | 189 break; |
| 176 } | 190 } |
| 177 | 191 |
| 178 switch (static_cast<int>(resultHeight)) { | 192 switch (static_cast<int>(resultHeight)) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 if (!replacement1.isNull()) | 448 if (!replacement1.isNull()) |
| 435 message.replace("%replacement1", replacement1); | 449 message.replace("%replacement1", replacement1); |
| 436 if (!replacement2.isNull()) | 450 if (!replacement2.isNull()) |
| 437 message.replace("%replacement2", replacement2); | 451 message.replace("%replacement2", replacement2); |
| 438 | 452 |
| 439 // FIXME: This message should be moved off the console once a solution to ht
tps://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 453 // FIXME: This message should be moved off the console once a solution to ht
tps://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 440 document->addConsoleMessage(RenderingMessageSource, viewportErrorMessageLeve
l(errorCode), message); | 454 document->addConsoleMessage(RenderingMessageSource, viewportErrorMessageLeve
l(errorCode), message); |
| 441 } | 455 } |
| 442 | 456 |
| 443 } // namespace WebCore | 457 } // namespace WebCore |
| OLD | NEW |