| 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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 CASE("user-scalable") { | 327 CASE("user-scalable") { |
| 328 description->userZoom = parseViewportValueAsUserZoom(keyString, valu
eString); | 328 description->userZoom = parseViewportValueAsUserZoom(keyString, valu
eString); |
| 329 return; | 329 return; |
| 330 } | 330 } |
| 331 CASE("target-densitydpi") { | 331 CASE("target-densitydpi") { |
| 332 description->deprecatedTargetDensityDPI = parseViewportValueAsDPI(ke
yString, valueString); | 332 description->deprecatedTargetDensityDPI = parseViewportValueAsDPI(ke
yString, valueString); |
| 333 reportViewportWarning(TargetDensityDpiUnsupported, String(), String(
)); | 333 reportViewportWarning(TargetDensityDpiUnsupported, String(), String(
)); |
| 334 return; | 334 return; |
| 335 } | 335 } |
| 336 CASE("minimal-ui") { |
| 337 // Ignore vendor-specific argument. |
| 338 return; |
| 339 } |
| 336 } | 340 } |
| 337 reportViewportWarning(UnrecognizedViewportArgumentKeyError, keyString, Strin
g()); | 341 reportViewportWarning(UnrecognizedViewportArgumentKeyError, keyString, Strin
g()); |
| 338 } | 342 } |
| 339 | 343 |
| 340 static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode) | 344 static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode) |
| 341 { | 345 { |
| 342 static const char* const errors[] = { | 346 static const char* const errors[] = { |
| 343 "The key \"%replacement1\" is not recognized and ignored.", | 347 "The key \"%replacement1\" is not recognized and ignored.", |
| 344 "The value \"%replacement1\" for key \"%replacement2\" is invalid, and h
as been ignored.", | 348 "The value \"%replacement1\" for key \"%replacement2\" is invalid, and h
as been ignored.", |
| 345 "The value \"%replacement1\" for key \"%replacement2\" was truncated to
its numeric prefix.", | 349 "The value \"%replacement1\" for key \"%replacement2\" was truncated to
its numeric prefix.", |
| 346 "The value for key \"maximum-scale\" is out of bounds and the value has
been clamped.", | 350 "The value for key \"maximum-scale\" is out of bounds and the value has
been clamped.", |
| 347 "The key \"target-densitydpi\" is not supported.", | 351 "The key \"target-densitydpi\" is not supported.", |
| 348 }; | 352 }; |
| 349 | 353 |
| 350 return errors[errorCode]; | 354 return errors[errorCode]; |
| 351 } | 355 } |
| 352 | 356 |
| 353 static MessageLevel viewportErrorMessageLevel(ViewportErrorCode errorCode) | 357 static MessageLevel viewportErrorMessageLevel(ViewportErrorCode errorCode) |
| 354 { | 358 { |
| 355 switch (errorCode) { | 359 switch (errorCode) { |
| 356 case TruncatedViewportArgumentValueError: | 360 case TruncatedViewportArgumentValueError: |
| 357 case TargetDensityDpiUnsupported: | 361 case TargetDensityDpiUnsupported: |
| 358 return WarningMessageLevel; | |
| 359 case UnrecognizedViewportArgumentKeyError: | 362 case UnrecognizedViewportArgumentKeyError: |
| 360 case UnrecognizedViewportArgumentValueError: | 363 case UnrecognizedViewportArgumentValueError: |
| 361 case MaximumScaleTooLargeError: | 364 case MaximumScaleTooLargeError: |
| 362 return ErrorMessageLevel; | 365 return WarningMessageLevel; |
| 363 } | 366 } |
| 364 | 367 |
| 365 ASSERT_NOT_REACHED(); | 368 ASSERT_NOT_REACHED(); |
| 366 return ErrorMessageLevel; | 369 return ErrorMessageLevel; |
| 367 } | 370 } |
| 368 | 371 |
| 369 void HTMLMetaElement::reportViewportWarning(ViewportErrorCode errorCode, const S
tring& replacement1, const String& replacement2) | 372 void HTMLMetaElement::reportViewportWarning(ViewportErrorCode errorCode, const S
tring& replacement1, const String& replacement2) |
| 370 { | 373 { |
| 371 if (!document().frame()) | 374 if (!document().frame()) |
| 372 return; | 375 return; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 { | 482 { |
| 480 return getAttribute(http_equivAttr); | 483 return getAttribute(http_equivAttr); |
| 481 } | 484 } |
| 482 | 485 |
| 483 const AtomicString& HTMLMetaElement::name() const | 486 const AtomicString& HTMLMetaElement::name() const |
| 484 { | 487 { |
| 485 return getNameAttribute(); | 488 return getNameAttribute(); |
| 486 } | 489 } |
| 487 | 490 |
| 488 } | 491 } |
| OLD | NEW |