Moved the WebCore::Image specific function loadResourcePixmap from qwebsettings.cpp to ImageQt.cpp and made it static.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index a703be7..136685c 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -36,6 +36,7 @@
#include "GraphicsContext.h"
#include "AffineTransform.h"
#include "NotImplemented.h"
+#include "qwebsettings.h"
#include <QPixmap>
#include <QPainter>
@@ -50,7 +51,23 @@
#include <math.h>
// This function loads resources into WebKit
-QPixmap loadResourcePixmap(const char*);
+static QPixmap loadResourcePixmap(const char *name)
+{
+ const QWebSettings settings = QWebSettings::global();
+ const QString resource = name;
+
+ QPixmap pixmap;
+ if (resource == "missingImage")
+ pixmap = settings.webGraphic(QWebSettings::MissingImageGraphic);
+ else if (resource == "nullPlugin")
+ pixmap = settings.webGraphic(QWebSettings::MissingPluginGraphic);
+ else if (resource == "urlIcon")
+ pixmap = settings.webGraphic(QWebSettings::DefaultFaviconGraphic);
+ else if (resource == "textAreaResizeCorner")
+ pixmap = settings.webGraphic(QWebSettings::TextAreaResizeCornerGraphic);
+
+ return pixmap;
+}
namespace WebCore {