Changeset 126023 in webkit
- Timestamp:
- Aug 20, 2012 6:24:50 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r126020 r126023 1 2012-08-20 Dominik Röttsches <dominik.rottsches@intel.com> 2 3 The 2d.imageData.object.round canvas test is failing 4 https://bugs.webkit.org/show_bug.cgi?id=40272 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Fixing expectations for the imageData rounding test, unskipping the tests on all ports. 9 10 * canvas/philip/tests/2d.imageData.object.round.html: Fixing expected results according to "round to even in halfway case". 11 * fast/canvas/canvas-ImageData-behaviour-expected.txt: Fixing expected results according to "round to even in halfway case". 12 * fast/canvas/canvas-ImageData-behaviour.js: Fixing expected results according to "round to even in halfway case". 13 * platform/chromium/TestExpectations: Updating bug id for 2d.imageData.object.round.html and for wrap case, adding SVG case for rebaselining. 14 * platform/efl/Skipped: 2d.imageData.object.round.html 15 * platform/efl/TestExpectations: Moving 2d.imageData.object.wrap.html case here with new bug id. 16 * platform/gtk/TestExpectations: Unskippng 2d.imageData.object.round.html, updating bug id for wrap case. 17 * platform/mac/Skipped: Unskipping 2d.imageData.object.round.html. 18 * platform/qt/Skipped: Unskipping 2d.imageData.object.round.html. 19 1 20 2012-08-20 Christophe Dumez <christophe.dumez@intel.com> 2 21 -
trunk/LayoutTests/canvas/philip/tests/2d.imageData.object.round.html
r79501 r126023 19 19 _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); 20 20 imgdata.data[0] = 0.501; 21 _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");21 _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1"); 22 22 imgdata.data[0] = 1.499; 23 23 _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1"); … … 33 33 _assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252"); 34 34 imgdata.data[0] = 253.5; 35 _assertSame(imgdata.data[0], 25 3, "imgdata.data[\""+(0)+"\"]", "253");35 _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254"); 36 36 imgdata.data[0] = 254.5; 37 37 _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254"); 38 38 imgdata.data[0] = 256.5; 39 _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");39 _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255"); 40 40 imgdata.data[0] = -0.5; 41 41 _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); 42 42 imgdata.data[0] = -1.5; 43 _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");43 _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0"); 44 44 45 45 -
trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour-expected.txt
r79501 r126023 36 36 PASS imageData.data[0] = -0.5, imageData.data[0] is 0 37 37 PASS imageData.data[0] = 0, imageData.data[0] is 0 38 PASS imageData.data[0] = 0.5, imageData.data[0] is 138 PASS imageData.data[0] = 0.5, imageData.data[0] is 0 39 39 PASS imageData.data[0] = 5, imageData.data[0] is 5 40 40 PASS imageData.data[0] = 5.4, imageData.data[0] is 5 -
trunk/LayoutTests/fast/canvas/canvas-ImageData-behaviour.js
r98407 r126023 15 15 var testResults = [0, 1, 0, 0, 0, 16 16 0, 1, 2, 255, 0, 17 0, 0, 0, 1, 5,17 0, 0, 0, 0, 5, 18 18 5, 255, 255, 0, 0]; 19 19 for (var i = 0; i < testValues.length; i++) { -
trunk/LayoutTests/platform/chromium/TestExpectations
r126007 r126023 1873 1873 BUGWK39212 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.get.type.html = TEXT 1874 1874 1875 BUGWK40272 : canvas/philip/tests/2d.imageData.object.round.html = TEXT 1876 BUGWK40272 : canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1877 BUGWK40272 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.object.round.html = TEXT 1878 BUGWK40272 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1875 BUGWK94246 : canvas/philip/tests/2d.imageData.object.round.html = TEXT 1876 BUGWK94246 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.object.round.html = TEXT 1877 BUGWK94246 : fast/canvas/canvas-ImageData-behaviour.html = TEXT 1878 BUGWK94246 : platform/chromium/virtual/gpu/fast/canvas/canvas-ImageData-behaviour.html = TEXT 1879 1880 BUGWK94089 : canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1881 BUGWK94089 : platform/chromium/virtual/gpu/canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1879 1882 1880 1883 BUGWK45991 : canvas/philip/tests/2d.pattern.image.broken.html = TEXT … … 3507 3510 3508 3511 BUGWK94261 DEBUG : http/tests/inspector/indexeddb/resources-panel.html = PASS CRASH TIMEOUT 3512 3513 // Needs a rebaseline. 3514 BUGWK40272 : svg/css/circle-in-mask-with-shadow.svg = IMAGE -
trunk/LayoutTests/platform/efl/Skipped
r125663 r126023 335 335 sputnik/Unicode/Unicode_510/S7.6_A5.3_T1.html 336 336 sputnik/Unicode/Unicode_510/S7.6_A5.3_T2.html 337 338 # Tests failing with other ports too.339 # https://bugs.webkit.org/show_bug.cgi?id=40272340 canvas/philip/tests/2d.imageData.object.round.html341 canvas/philip/tests/2d.imageData.object.wrap.html342 343 # These tests are failing for us, but not for Mac. This likely344 # indicates platform specific problems (via GTK+).345 337 346 338 # A testcase for this failure is already in cairo tree, but has not yet been fixed. -
trunk/LayoutTests/platform/efl/TestExpectations
r126020 r126023 912 912 // Slider thumb can not be displayed without parent slider. 913 913 BUGWK94334 : fast/forms/range/thumbslider-no-parent-slider.html = MISSING 914 915 BUGWK94089 : canvas/philip/tests/2d.imageData.object.wrap.html = TEXT -
trunk/LayoutTests/platform/gtk/TestExpectations
r126014 r126023 1017 1017 BUGWKGTK : http/tests/loading/cross-origin-XHR-willLoadRequest.html = TEXT 1018 1018 1019 BUGWK40272 : canvas/philip/tests/2d.imageData.object.round.html = TEXT 1020 BUGWK40272 : canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1019 BUGWK94089 : canvas/philip/tests/2d.imageData.object.wrap.html = TEXT 1021 1020 1022 1021 // See also https://bugs.webkit.org/show_bug.cgi?id=54926 -
trunk/LayoutTests/platform/mac/Skipped
r125794 r126023 168 168 # effort out to change the spec to the webkit canvas model. 169 169 canvas/philip/tests/2d.composite.operation.darker.html 170 canvas/philip/tests/2d.imageData.object.round.html171 170 canvas/philip/tests/2d.imageData.object.wrap.html 172 171 -
trunk/LayoutTests/platform/qt/Skipped
r125794 r126023 2098 2098 canvas/philip/tests/2d.imageData.create2.type.html 2099 2099 canvas/philip/tests/2d.imageData.get.type.html 2100 canvas/philip/tests/2d.imageData.object.round.html2101 2100 canvas/philip/tests/2d.imageData.object.wrap.html 2102 2101 canvas/philip/tests/2d.imageData.put.unchanged.html -
trunk/Source/WTF/ChangeLog
r125958 r126023 1 2012-08-20 Dominik Röttsches <dominik.rottsches@intel.com> 2 3 The 2d.imageData.object.round canvas test is failing 4 https://bugs.webkit.org/show_bug.cgi?id=40272 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 According to the Uint8ClampedArray spec (http://www.khronos.org/registry/typedarray/specs/latest/#7.1) 9 which references WebIDL's clamping rules, with implications defined in http://www.w3.org/TR/WebIDL/#es-octet 10 we need to round to nearest integer, and to the even one if exactly halfway in between. 11 As a solution: applying C99's lrint which, in default rounding mode, does that. 12 13 The updated version of test 2d.imageData.object.round.html test passes now. 14 15 * wtf/MathExtras.h: 16 (lrint): Assembly based implementation for MSVC under X86, otherwise falling back to casting. 17 * wtf/Uint8ClampedArray.h: 18 (WTF::Uint8ClampedArray::set): lrint instead of simple rounding. 19 1 20 2012-08-17 Michael Saboff <msaboff@apple.com> 2 21 -
trunk/Source/WTF/wtf/MathExtras.h
r123175 r126023 203 203 #define pow(x, y) wtf_pow(x, y) 204 204 205 // MSVC's math functions do not bring lrint. 206 inline long int lrint(double flt) 207 { 208 int intgr; 209 #if CPU(X86) 210 __asm { 211 fld flt 212 fistp intgr 213 }; 214 #else 215 #pragma message("Falling back to casting for lrint(), causes rounding inaccuracy in halfway case.") 216 intgr = static_cast<int>flt; 217 #endif 218 return intgr; 219 } 220 205 221 #endif // COMPILER(MSVC) 206 222 -
trunk/Source/WTF/wtf/Uint8ClampedArray.h
r123935 r126023 29 29 #define Uint8ClampedArray_h 30 30 31 #include <wtf/Platform.h> 32 31 33 #include <wtf/Uint8Array.h> 34 #if COMPILER(MSVC) 35 #include <wtf/MathExtras.h> 36 #endif 32 37 33 38 namespace WTF { … … 101 106 else if (value > 255) 102 107 value = 255; 103 data()[index] = static_cast<unsigned char>( value + 0.5);108 data()[index] = static_cast<unsigned char>(lrint(value)); 104 109 } 105 110
Note: See TracChangeset
for help on using the changeset viewer.