Commit a61bd05e authored by kjk's avatar kjk
Browse files

Not reviewed - gdk build fixes.

        * platform/gdk/EditorClientGdk.cpp:
        (WebCore::EditorClientGdk::handleKeypress):
        * platform/graphics/cairo/ImageSourceCairo.cpp:
        (WebCore::ImageSource::setData):
        * platform/graphics/gdk/ImageGdk.cpp:
        (WebCore::Image::loadPlatformResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5e10a81c
2007-03-15 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
Not reviewed - gdk build fixes.
* platform/gdk/EditorClientGdk.cpp:
(WebCore::EditorClientGdk::handleKeypress):
* platform/graphics/cairo/ImageSourceCairo.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/gdk/ImageGdk.cpp:
(WebCore::Image::loadPlatformResource):
2007-03-14 Justin Garcia <justin.garcia@apple.com>
 
Reviewed by john
......
......@@ -242,7 +242,7 @@ void EditorClientGdk::handleKeypress(KeyboardEvent* event)
frame->editor()->execCommand("MoveDown");
break;
default:
frame->editor()->insertText(kevent->text(), false, event);
frame->editor()->insertText(kevent->text(), event);
}
event->setDefaultHandled();
}
......
......@@ -25,6 +25,7 @@
#include "config.h"
#include "ImageSource.h"
#include "SharedBuffer.h"
#if PLATFORM(CAIRO)
......@@ -104,17 +105,17 @@ bool ImageSource::initialized() const
return m_decoder;
}
void ImageSource::setData(const Vector<char>* data, bool allDataReceived)
void ImageSource::setData(SharedBuffer* data, bool allDataReceived)
{
// Make the decoder by sniffing the bytes.
// This method will examine the data and instantiate an instance of the appropriate decoder plugin.
// If insufficient bytes are available to determine the image type, no decoder plugin will be
// made.
delete m_decoder;
m_decoder = createDecoder(*data);
m_decoder = createDecoder(data->buffer());
if (!m_decoder)
return;
m_decoder->setData(*data, allDataReceived);
m_decoder->setData(data->buffer(), allDataReceived);
}
bool ImageSource::isSizeAvailable()
......
......@@ -47,7 +47,8 @@ Image* Image::loadPlatformResource(const char *name)
{
Vector<char> arr = loadResourceIntoArray(name);
BitmapImage* img = new BitmapImage;
img->setNativeData(&arr, true);
RefPtr<SharedBuffer> buffer = new SharedBuffer(arr.data(), arr.size());
img->setData(buffer, true);
return img;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment