Unreviewed, rolling out r156510.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 23:00:26 +0000 (23:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Sep 2013 23:00:26 +0000 (23:00 +0000)
http://trac.webkit.org/changeset/156510
https://bugs.webkit.org/show_bug.cgi?id=121989

Landed in-progress code along with build fix. (Requested by
bfulgham on #webkit).

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSEventListener.h
Source/WebCore/bridge/jsc/BridgeJSC.cpp
Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
Source/WebCore/platform/graphics/win/DIBPixelData.cpp
Source/WebCore/platform/graphics/win/DIBPixelData.h

index 87c634c7361ad8aec662b9f70c98c69f841d1076..a6e52bdd165063a99aecd4288980c89150b269dc 100644 (file)
@@ -1,3 +1,25 @@
+2013-09-26  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r156510.
+        http://trac.webkit.org/changeset/156510
+        https://bugs.webkit.org/show_bug.cgi?id=121989
+
+        Landed in-progress code along with build fix. (Requested by
+        bfulgham on #webkit).
+
+        * bindings/js/JSEventListener.cpp:
+        (WebCore::JSEventListener::JSEventListener):
+        * bindings/js/JSEventListener.h:
+        (WebCore::JSEventListener::jsFunction):
+        * bridge/jsc/BridgeJSC.cpp:
+        (JSC::Bindings::Instance::createRuntimeObject):
+        * platform/graphics/filters/FEGaussianBlur.cpp:
+        (WebCore::FEGaussianBlur::platformApplyGeneric):
+        (WebCore::FEGaussianBlur::platformApply):
+        * platform/graphics/win/DIBPixelData.cpp:
+        (WebCore::DIBPixelData::writeToFile):
+        * platform/graphics/win/DIBPixelData.h:
+
 2013-09-26  Brent Fulgham  <bfulgham@apple.com>
 
         [Windows] Unreviewed build fix after r156487.
index d914e303bd2764bf62b6110d99aa07ce68b1dcc5..9361511fd8a42d6b37cd35d72414d1a01855bccf 100644 (file)
@@ -47,7 +47,7 @@ JSEventListener::JSEventListener(JSObject* function, JSObject* wrapper, bool isA
 {
     if (wrapper) {
         JSC::Heap::writeBarrier(wrapper, function);
-        m_jsFunction = JSC::Weak<JSC::JSObject>(function);
+        m_jsFunction = function;
     } else
         ASSERT(!function);
 #if ENABLE(INSPECTOR)
index 0e7840722fe535100dd23f4da337eed3bbde300c..ccf66254dff1bbada4d70da2211463606afa1177 100644 (file)
@@ -85,7 +85,7 @@ namespace WebCore {
         if (!m_jsFunction) {
             JSC::JSObject* function = initializeJSFunction(scriptExecutionContext);
             JSC::Heap::writeBarrier(m_wrapper.get(), function);
-            m_jsFunction = JSC::Weak<JSC::JSObject>(function);
+            m_jsFunction = function;
         }
 
         // Verify that we have a valid wrapper protecting our function from
index f8bcfbc0c75f6ae2363aa6a3361966c902bbd5a2..d242501c1e5349b223804d45a35d2053e29ce85b 100644 (file)
@@ -82,7 +82,7 @@ JSObject* Instance::createRuntimeObject(ExecState* exec)
 
     JSLockHolder lock(exec);
     RuntimeObject* newObject = newRuntimeObject(exec);
-    m_runtimeObject = JSC::Weak<RuntimeObject>(newObject);
+    m_runtimeObject = newObject;
     m_rootObject->addRuntimeObject(exec->vm(), newObject);
     return newObject;
 }
index f9ead8f096e676a15cc8bb5a6269d3fd3f526787..2f466111f557beb624325d8b9db734f428eb6890 100644 (file)
@@ -163,13 +163,6 @@ inline void FEGaussianBlur::platformApplyGeneric(Uint8ClampedArray* srcPixelArra
     Uint8ClampedArray* src = srcPixelArray;
     Uint8ClampedArray* dst = tmpPixelArray;
 
-    void* dataOrig = src->data();
-    void* dataDone = dst->data();
-    size_t pixelCount = paintSize.height() * paintSize.width() * 4;
-    DIBPixelData original(paintSize, dataOrig, pixelCount, stride, 32);
-    if (0)
-        original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");
-
     for (int i = 0; i < 3; ++i) {
         if (kernelSizeX) {
             kernelPosition(i, kernelSizeX, dxLeft, dxRight);
@@ -198,10 +191,6 @@ inline void FEGaussianBlur::platformApplyGeneric(Uint8ClampedArray* srcPixelArra
         }
     }
 
-    DIBPixelData blurred(paintSize, dataDone, pixelCount, stride, 32);
-    if (0)
-        blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");
-
     // The final result should be stored in srcPixelArray.
     if (dst == srcPixelArray) {
         ASSERT(src->length() == dst->length());
@@ -223,13 +212,6 @@ inline void FEGaussianBlur::platformApply(Uint8ClampedArray* srcPixelArray, Uint
     int extraHeight = 3 * kernelSizeY * 0.5f;
     int optimalThreadNumber = (paintSize.width() * paintSize.height()) / (s_minimalRectDimension + extraHeight * paintSize.width());
 
-    size_t pixelCount = paintSize.width() * paintSize.height() * 4;
-    void* dataOrig = srcPixelArray->data();
-    void* tmpOrig = tmpPixelArray->data();
-    DIBPixelData original(paintSize, dataOrig, pixelCount, scanline, 32);
-    if (0)
-        original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");
-
     if (optimalThreadNumber > 1) {
         WTF::ParallelJobs<PlatformApplyParameters> parallelJobs(&platformApplyWorker, optimalThreadNumber);
 
@@ -283,12 +265,6 @@ inline void FEGaussianBlur::platformApply(Uint8ClampedArray* srcPixelArray, Uint
 
                 memcpy(srcPixelArray->data() + destinationOffset, params.srcPixelArray->data() + sourceOffset, size);
             }
-
-            // Dump the bitmap to disk.
-            DIBPixelData blurred(paintSize, dataOrig, pixelCount, scanline, 32);
-            if (0)
-                blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");
-
             return;
         }
         // Fallback to single threaded mode.
index 25efd89038ec03d5d49a7b9d2495daa23ea68684..e9a0f9b1533f7e05229208ea59e27ad07161875f 100644 (file)
@@ -36,15 +36,6 @@ DIBPixelData::DIBPixelData(HBITMAP bitmap)
     initialize(bitmap);
 }
 
-DIBPixelData::DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel)
-{
-    m_bitmapBuffer = reinterpret_cast<UInt8*>(data);
-    m_bitmapBufferLength = bufferLen;
-    m_size = size;
-    m_bytesPerRow = bytesPerRow;
-    m_bitsPerPixel = bytesPerPixel;
-}
-
 void DIBPixelData::initialize(HBITMAP bitmap)
 {
     BITMAP bmpInfo;
@@ -61,20 +52,8 @@ void DIBPixelData::initialize(HBITMAP bitmap)
 void DIBPixelData::writeToFile(LPCWSTR filePath)
 {
     HANDLE hFile = ::CreateFile(filePath, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
-    if (INVALID_HANDLE_VALUE == hFile) {
-        DWORD error = ::GetLastError();
-
-        static const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
-        static const size_t bufSize = 4096;
-
-        wchar_t errorMessage[bufSize];
-        DWORD len = ::FormatMessageW(kFlags, 0, error, 0, errorMessage, bufSize, 0);
-        if (len >= bufSize)
-            len = bufSize - 1;
-
-        errorMessage[len + 1] = 0;
+    if (INVALID_HANDLE_VALUE == hFile)
         return;
-    }
 
     BITMAPFILEHEADER header;
     header.bfType = bitmapType;
index 83ad95e94567ea2b6187700ad475034a4b784d99..fa2a6c0ba905e4f6f07d7f4762c6ff4db9de82ae 100644 (file)
@@ -48,7 +48,6 @@ class DIBPixelData {
         {
         }
         DIBPixelData(HBITMAP);
-        DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel);
 
         void initialize(HBITMAP);