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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 arguments->deprecatedTargetDensityDPI = findTargetDensityDPIValue(keyStr
ing, valueString, document); | 346 arguments->deprecatedTargetDensityDPI = findTargetDensityDPIValue(keyStr
ing, valueString, document); |
347 reportViewportWarning(document, TargetDensityDpiUnsupported, String(), S
tring()); | 347 reportViewportWarning(document, TargetDensityDpiUnsupported, String(), S
tring()); |
348 } else { | 348 } else { |
349 reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, ke
yString, String()); | 349 reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, ke
yString, String()); |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode) | 353 static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode) |
354 { | 354 { |
355 static const char* const errors[] = { | 355 static const char* const errors[] = { |
356 "Note that ';' is not a key-value pair separator. The list should be com
ma-separated.", | |
357 "The key \"%replacement1\" is not recognized and ignored.", | 356 "The key \"%replacement1\" is not recognized and ignored.", |
358 "The value \"%replacement1\" for key \"%replacement2\" is invalid, and h
as been ignored.", | 357 "The value \"%replacement1\" for key \"%replacement2\" is invalid, and h
as been ignored.", |
359 "The value \"%replacement1\" for key \"%replacement2\" was truncated to
its numeric prefix.", | 358 "The value \"%replacement1\" for key \"%replacement2\" was truncated to
its numeric prefix.", |
360 "The value for key \"maximum-scale\" is out of bounds and the value has
been clamped.", | 359 "The value for key \"maximum-scale\" is out of bounds and the value has
been clamped.", |
361 "The key \"target-densitydpi\" is not supported.", | 360 "The key \"target-densitydpi\" is not supported.", |
362 }; | 361 }; |
363 | 362 |
364 return errors[errorCode]; | 363 return errors[errorCode]; |
365 } | 364 } |
366 | 365 |
367 static MessageLevel viewportErrorMessageLevel(ViewportErrorCode errorCode) | 366 static MessageLevel viewportErrorMessageLevel(ViewportErrorCode errorCode) |
368 { | 367 { |
369 switch (errorCode) { | 368 switch (errorCode) { |
370 case InvalidKeyValuePairSeparatorError: | |
371 case TruncatedViewportArgumentValueError: | 369 case TruncatedViewportArgumentValueError: |
372 case TargetDensityDpiUnsupported: | 370 case TargetDensityDpiUnsupported: |
373 return WarningMessageLevel; | 371 return WarningMessageLevel; |
374 case UnrecognizedViewportArgumentKeyError: | 372 case UnrecognizedViewportArgumentKeyError: |
375 case UnrecognizedViewportArgumentValueError: | 373 case UnrecognizedViewportArgumentValueError: |
376 case MaximumScaleTooLargeError: | 374 case MaximumScaleTooLargeError: |
377 return ErrorMessageLevel; | 375 return ErrorMessageLevel; |
378 } | 376 } |
379 | 377 |
380 ASSERT_NOT_REACHED(); | 378 ASSERT_NOT_REACHED(); |
(...skipping 10 matching lines...) Expand all Loading... |
391 if (!replacement1.isNull()) | 389 if (!replacement1.isNull()) |
392 message.replace("%replacement1", replacement1); | 390 message.replace("%replacement1", replacement1); |
393 if (!replacement2.isNull()) | 391 if (!replacement2.isNull()) |
394 message.replace("%replacement2", replacement2); | 392 message.replace("%replacement2", replacement2); |
395 | 393 |
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. | 394 // 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(RenderingMessageSource, viewportErrorMessageLeve
l(errorCode), message); | 395 document->addConsoleMessage(RenderingMessageSource, viewportErrorMessageLeve
l(errorCode), message); |
398 } | 396 } |
399 | 397 |
400 } // namespace WebCore | 398 } // namespace WebCore |
OLD | NEW |