| 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 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 String message = viewportErrorMessageTemplate(errorCode); | 390 String message = viewportErrorMessageTemplate(errorCode); |
| 391 if (!replacement1.isNull()) | 391 if (!replacement1.isNull()) |
| 392 message.replace("%replacement1", replacement1); | 392 message.replace("%replacement1", replacement1); |
| 393 if (!replacement2.isNull()) | 393 if (!replacement2.isNull()) |
| 394 message.replace("%replacement2", replacement2); | 394 message.replace("%replacement2", replacement2); |
| 395 | 395 |
| 396 // FIXME: This message should be moved off the console once a solution to ht
tps://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 396 // FIXME: This message should be moved off the console once a solution to ht
tps://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 397 document->addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, v
iewportErrorMessageLevel(errorCode), message)); | 397 document->addConsoleMessage(ConsoleMessage::create(RenderingMessageSource, v
iewportErrorMessageLevel(errorCode), message)); |
| 398 } | 398 } |
| 399 | 399 |
| 400 void HTMLMetaElement::getViewportDescriptionFromContentAttribute(const String& c
ontent, ViewportDescription::Type origin, ViewportDescription& description, Docu
ment* document, bool viewportMetaZeroValuesQuirk) | 400 void HTMLMetaElement::getViewportDescriptionFromContentAttribute(const String& c
ontent, ViewportDescription& description, Document* document, bool viewportMetaZ
eroValuesQuirk) |
| 401 { | 401 { |
| 402 parseContentAttribute(content, (void*)&description, document, viewportMetaZe
roValuesQuirk); | 402 parseContentAttribute(content, (void*)&description, document, viewportMetaZe
roValuesQuirk); |
| 403 | 403 |
| 404 if (description.minZoom == ViewportDescription::ValueAuto) | 404 if (description.minZoom == ViewportDescription::ValueAuto) |
| 405 description.minZoom = 0.25; | 405 description.minZoom = 0.25; |
| 406 | 406 |
| 407 if (description.maxZoom == ViewportDescription::ValueAuto) { | 407 if (description.maxZoom == ViewportDescription::ValueAuto) { |
| 408 description.maxZoom = 5; | 408 description.maxZoom = 5; |
| 409 description.minZoom = std::min(description.minZoom, float(5)); | 409 description.minZoom = std::min(description.minZoom, float(5)); |
| 410 } | 410 } |
| 411 } | 411 } |
| 412 void HTMLMetaElement::processViewportContentAttribute(const String& content, Vie
wportDescription::Type origin) | 412 void HTMLMetaElement::processViewportContentAttribute(const String& content, Vie
wportDescription::Type origin) |
| 413 { | 413 { |
| 414 ASSERT(!content.isNull()); | 414 ASSERT(!content.isNull()); |
| 415 | 415 |
| 416 if (!document().shouldOverrideLegacyDescription(origin)) | 416 if (!document().shouldOverrideLegacyDescription(origin)) |
| 417 return; | 417 return; |
| 418 | 418 |
| 419 ViewportDescription descriptionFromLegacyTag(origin); | 419 ViewportDescription descriptionFromLegacyTag(origin); |
| 420 if (document().shouldMergeWithLegacyDescription(origin)) | 420 if (document().shouldMergeWithLegacyDescription(origin)) |
| 421 descriptionFromLegacyTag = document().viewportDescription(); | 421 descriptionFromLegacyTag = document().viewportDescription(); |
| 422 | 422 |
| 423 getViewportDescriptionFromContentAttribute(content, origin, descriptionFromL
egacyTag, &document(), document().settings() && document().settings()->viewportM
etaZeroValuesQuirk()); | 423 getViewportDescriptionFromContentAttribute(content, descriptionFromLegacyTag
, &document(), document().settings() && document().settings()->viewportMetaZeroV
aluesQuirk()); |
| 424 | 424 |
| 425 document().setViewportDescription(descriptionFromLegacyTag); | 425 document().setViewportDescription(descriptionFromLegacyTag); |
| 426 } | 426 } |
| 427 | 427 |
| 428 | 428 |
| 429 void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) | 429 void HTMLMetaElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& value) |
| 430 { | 430 { |
| 431 if (name == http_equivAttr || name == contentAttr) { | 431 if (name == http_equivAttr || name == contentAttr) { |
| 432 process(); | 432 process(); |
| 433 return; | 433 return; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 { | 498 { |
| 499 return getAttribute(http_equivAttr); | 499 return getAttribute(http_equivAttr); |
| 500 } | 500 } |
| 501 | 501 |
| 502 const AtomicString& HTMLMetaElement::name() const | 502 const AtomicString& HTMLMetaElement::name() const |
| 503 { | 503 { |
| 504 return getNameAttribute(); | 504 return getNameAttribute(); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } | 507 } |
| OLD | NEW |