Changeset 80483 in webkit
- Timestamp:
- Mar 7, 2011 11:41:31 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r80471 r80483 1 2011-03-07 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Viewport Warning/Error Messages Are Now Inaccurate 6 https://bugs.webkit.org/show_bug.cgi?id=53707 7 8 Added tests specifically to test Console warnings. 9 10 * fast/viewport/viewport-warnings-1.html: Added. 11 * fast/viewport/viewport-warnings-2.html: Added. 12 * fast/viewport/viewport-warnings-3.html: Added. 13 * fast/viewport/viewport-warnings-4.html: Added. 14 * fast/viewport/viewport-warnings-5.html: Added. 15 * fast/viewport/viewport-warnings-6.html: Added. 16 1 17 2011-03-07 Jeremy Orlow <jorlow@chromium.org> 2 18 -
trunk/Source/WebCore/ChangeLog
r80482 r80483 1 2011-03-07 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Viewport Warning/Error Messages Are Now Inaccurate 6 https://bugs.webkit.org/show_bug.cgi?id=53707 7 8 Correct and improve the error messages for viewport parsing. 9 10 Tests: fast/viewport/viewport-warnings-1.html 11 fast/viewport/viewport-warnings-2.html 12 fast/viewport/viewport-warnings-3.html 13 fast/viewport/viewport-warnings-4.html 14 fast/viewport/viewport-warnings-5.html 15 fast/viewport/viewport-warnings-6.html 16 17 * dom/ViewportArguments.cpp: 18 (WebCore::numericPrefix): 19 (WebCore::findSizeValue): remove incorrect device-width / height tips. 20 (WebCore::setViewportFeature): report a warning for an unrecognized key. 21 (WebCore::viewportErrorMessageTemplate): added template for unrecognized key. 22 (WebCore::viewportErrorMessageLevel): classify an unrecognized key is an error. 23 * dom/ViewportArguments.h: removed no longer used warnings. 24 1 25 2011-03-07 James Robinson <jamesr@chromium.org> 2 26 -
trunk/Source/WebCore/dom/ViewportArguments.cpp
r80077 r80483 191 191 if (!didReadNumber) { 192 192 ASSERT(!value); 193 reportViewportWarning(document, UnrecognizedViewportArgument Error, valueString, keyString);193 reportViewportWarning(document, UnrecognizedViewportArgumentValueError, valueString, keyString); 194 194 return value; 195 195 } … … 221 221 if (value < 0) 222 222 return ViewportArguments::ValueAuto; 223 224 if (keyString == "width")225 reportViewportWarning(document, DeviceWidthShouldBeUsedWarning, String(), String());226 else if (keyString == "height")227 reportViewportWarning(document, DeviceHeightShouldBeUsedWarning, String(), String());228 223 229 224 return value; … … 333 328 else if (keyString == "target-densitydpi") 334 329 arguments->targetDensityDpi = findTargetDensityDPIValue(keyString, valueString, document); 330 else 331 reportViewportWarning(document, UnrecognizedViewportArgumentKeyError, keyString, String()); 335 332 } 336 333 … … 338 335 { 339 336 static const char* const errors[] = { 340 "Viewport width or height set to physical device width, try using \"device-width\" constant instead for future compatibility.", 341 "Viewport height or height set to physical device height, try using \"device-height\" constant instead for future compatibility.", 337 "Viewport argument key \"%replacement1\" not recognized and ignored.", 342 338 "Viewport argument value \"%replacement1\" for key \"%replacement2\" not recognized. Content ignored.", 343 339 "Viewport argument value \"%replacement1\" for key \"%replacement2\" was truncated to its numeric prefix.", … … 352 348 { 353 349 switch (errorCode) { 354 case DeviceWidthShouldBeUsedWarning:355 case DeviceHeightShouldBeUsedWarning:356 350 case TruncatedViewportArgumentValueError: 357 351 case TargetDensityDpiTooSmallOrLargeError: 358 352 return TipMessageLevel; 359 case UnrecognizedViewportArgumentError: 353 case UnrecognizedViewportArgumentKeyError: 354 case UnrecognizedViewportArgumentValueError: 360 355 case MaximumScaleTooLargeError: 361 356 return ErrorMessageLevel; -
trunk/Source/WebCore/dom/ViewportArguments.h
r80077 r80483 36 36 37 37 enum ViewportErrorCode { 38 DeviceWidthShouldBeUsedWarning, 39 DeviceHeightShouldBeUsedWarning, 40 UnrecognizedViewportArgumentError, 38 UnrecognizedViewportArgumentKeyError, 39 UnrecognizedViewportArgumentValueError, 41 40 TruncatedViewportArgumentValueError, 42 41 MaximumScaleTooLargeError,
Note: See TracChangeset
for help on using the changeset viewer.