Changeset 73744 in webkit
- Timestamp:
- Dec 10, 2010 10:47:54 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r73743 r73744 1 2010-12-08 Mihai Parparita <mihaip@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 fast/canvas/canvas-getImageData-negative-source.html fails on Mac 6 https://bugs.webkit.org/show_bug.cgi?id=47901 7 8 Add test for rounding behavior. Remove now-passing tests from 9 test_expectations.txt. 10 11 * fast/canvas/canvas-getImageData-rounding-expected.txt: Added. 12 * fast/canvas/canvas-getImageData-rounding.html: Added. 13 * platform/chromium/test_expectations.txt: 14 1 15 2010-12-10 Alejandro G. Castro <alex@igalia.com> 2 16 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r73742 r73744 2416 2416 BUGWK45991 MAC : canvas/philip/tests/2d.shadow.enable.y.html = TEXT 2417 2417 BUGWK45991 MAC : canvas/philip/tests/2d.strokeRect.zero.4.html = TEXT 2418 BUGWK45991 MAC : canvas/philip/tests/2d.imageData.get.source.outside.html = TEXT2419 2418 BUGWK45991 WIN : canvas/philip/tests/2d.gradient.radial.touch2.html = TEXT 2420 2419 BUGWK40147 : canvas/philip/tests/toDataURL.jpeg.alpha.html = TEXT 2421 2420 BUG61824 : canvas/philip/tests/2d.pattern.image.string.html = TEXT 2422 2423 // Failures after WebKit roll 70949:710002424 BUGWK45991 MAC : canvas/philip/tests/2d.imageData.get.source.negative.html = TEXT2425 2421 2426 2422 // Flaky tests … … 2924 2920 2925 2921 BUG59647 WIN : svg/dom/length-list-parser.html = PASS CRASH 2926 2927 BUGWK47901 MAC : fast/canvas/canvas-getImageData-negative-source.html = TEXT2928 2922 2929 2923 // We don't support layoutTestController.nodesFromRect so this test just times out -
trunk/WebCore/ChangeLog
r73736 r73744 1 2010-12-08 Mihai Parparita <mihaip@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 fast/canvas/canvas-getImageData-negative-source.html fails on Mac 6 https://bugs.webkit.org/show_bug.cgi?id=47901 7 8 Test: fast/canvas/canvas-getImageData-rounding.html 9 10 static_cast<unsigned> is generally not what we want in 11 convertLogicalToDevice. It produces inconsistent results when compiling 12 for 32-bit vs. 64-bit, and in any case we weren't getting correct 13 rounding behavior for source rectangles (e.g. we should get a source rect 14 of width 2 if the source X is 0.9 and the source width is 0.2, but we 15 were getting only one of width 1). 16 17 * html/HTMLCanvasElement.cpp: 18 (WebCore::HTMLCanvasElement::convertLogicalToDevice): 19 (WebCore::HTMLCanvasElement::convertToValidDeviceSize): 20 * html/HTMLCanvasElement.h: 21 1 22 2010-12-10 Hironori Bono <hbono@chromium.org> 2 23 -
trunk/WebCore/html/HTMLCanvasElement.cpp
r70143 r73744 323 323 IntRect HTMLCanvasElement::convertLogicalToDevice(const FloatRect& logicalRect) const 324 324 { 325 return IntRect(convertLogicalToDevice(logicalRect.location()), convertLogicalToDevice(logicalRect.size())); 325 float left = floorf(logicalRect.left() * m_pageScaleFactor); 326 float top = floorf(logicalRect.top() * m_pageScaleFactor); 327 float right = ceilf(logicalRect.right() * m_pageScaleFactor); 328 float bottom = ceilf(logicalRect.bottom() * m_pageScaleFactor); 329 330 return IntRect(IntPoint(left, top), convertToValidDeviceSize(right - left, bottom - top)); 326 331 } 327 332 328 333 IntSize HTMLCanvasElement::convertLogicalToDevice(const FloatSize& logicalSize) const 329 334 { 330 float wf = ceilf(logicalSize.width() * m_pageScaleFactor); 331 float hf = ceilf(logicalSize.height() * m_pageScaleFactor); 332 333 if (!(wf >= 1 && hf >= 1 && wf * hf <= MaxCanvasArea)) 335 return convertToValidDeviceSize(logicalSize.width() * m_pageScaleFactor, logicalSize.height() * m_pageScaleFactor); 336 } 337 338 IntSize HTMLCanvasElement::convertToValidDeviceSize(float width, float height) const 339 { 340 width = ceilf(width); 341 height = ceilf(height); 342 343 if (width < 1 || height < 1 || width * height > MaxCanvasArea) 334 344 return IntSize(); 335 345 336 346 #if PLATFORM(SKIA) 337 if (w f > MaxSkiaDim || hf> MaxSkiaDim)347 if (width > MaxSkiaDim || height > MaxSkiaDim) 338 348 return IntSize(); 339 349 #endif 340 350 341 return IntSize(static_cast<unsigned>(wf), static_cast<unsigned>(hf)); 342 } 343 344 IntPoint HTMLCanvasElement::convertLogicalToDevice(const FloatPoint& logicalPos) const 345 { 346 float xf = logicalPos.x() * m_pageScaleFactor; 347 float yf = logicalPos.y() * m_pageScaleFactor; 348 349 return IntPoint(static_cast<unsigned>(xf), static_cast<unsigned>(yf)); 351 return IntSize(width, height); 350 352 } 351 353 -
trunk/WebCore/html/HTMLCanvasElement.h
r68221 r73744 108 108 IntRect convertLogicalToDevice(const FloatRect&) const; 109 109 IntSize convertLogicalToDevice(const FloatSize&) const; 110 Int Point convertLogicalToDevice(const FloatPoint&) const;110 IntSize convertToValidDeviceSize(float width, float height) const; 111 111 112 112 const SecurityOrigin& securityOrigin() const;
Note: See TracChangeset
for help on using the changeset viewer.