2006-12-28  Daniel Molkentin <molkentin@kde.org>

        Reviewed by Eric Seidel <eric@webkit.org>

        - Fix font sizes
        - Make Qt plattform build again:
          - Adjust Qt platform to the Image class split.
          - Introduce BitmapImage class
          - add stub PDFDocumentImage class

        * WebCore.pro:
        * editing/qt/EditorQt.cpp:
        (WebCore::Editor::markMisspellingsAfterTypingToPosition):
        * loader/qt/FrameLoaderQt.cpp:
        (WebCore::FrameLoader::partClearedInBegin):
        * platform/graphics/qt/ImageQt.cpp:
        (WebCore::BitmapImage::initPlatformData):
        (WebCore::BitmapImage::invalidatePlatformData):
        (WebCore::Image::loadPlatformResource):
        (WebCore::BitmapImage::draw):
        (WebCore::BitmapImage::drawTiled):
        (WebCore::BitmapImage::checkForSolidColor):
        * platform/graphics/svg/SVGPaintServerLinearGradient.h:
        * platform/graphics/svg/SVGPaintServerRadialGradient.h:
        * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
        (WebCore::SVGPaintServerLinearGradient::setup):
        * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
        (WebCore::SVGPaintServerPattern::setup):
        * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
        (WebCore::SVGPaintServer::teardown):
        * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
        (WebCore::SVGPaintServerRadialGradient::setup):
        * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
        (WebCore::SVGPaintServerSolid::setup):
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::FrameQt):
        (WebCore::FrameQt::bindingRootObject):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e34a60e..52099a6 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,41 @@
+2006-12-28  Daniel Molkentin <molkentin@kde.org>
+
+        Reviewed by Eric Seidel <eric@webkit.org>
+
+        - Fix font sizes
+        - Make Qt plattform build again:
+          - Adjust Qt platform to the Image class split.
+          - Introduce BitmapImage class
+          - add stub PDFDocumentImage class
+
+        * WebCore.pro:
+        * editing/qt/EditorQt.cpp:
+        (WebCore::Editor::markMisspellingsAfterTypingToPosition):
+        * loader/qt/FrameLoaderQt.cpp:
+        (WebCore::FrameLoader::partClearedInBegin):
+        * platform/graphics/qt/ImageQt.cpp:
+        (WebCore::BitmapImage::initPlatformData):
+        (WebCore::BitmapImage::invalidatePlatformData):
+        (WebCore::Image::loadPlatformResource):
+        (WebCore::BitmapImage::draw):
+        (WebCore::BitmapImage::drawTiled):
+        (WebCore::BitmapImage::checkForSolidColor):
+        * platform/graphics/svg/SVGPaintServerLinearGradient.h:
+        * platform/graphics/svg/SVGPaintServerRadialGradient.h:
+        * platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp:
+        (WebCore::SVGPaintServerLinearGradient::setup):
+        * platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp:
+        (WebCore::SVGPaintServerPattern::setup):
+        * platform/graphics/svg/qt/SVGPaintServerQt.cpp:
+        (WebCore::SVGPaintServer::teardown):
+        * platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp:
+        (WebCore::SVGPaintServerRadialGradient::setup):
+        * platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp:
+        (WebCore::SVGPaintServerSolid::setup):
+        * platform/qt/FrameQt.cpp:
+        (WebCore::FrameQt::FrameQt):
+        (WebCore::FrameQt::bindingRootObject):
+
 2006-12-28  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Brady Eidson.
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 80dc5b3..5201157 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -456,6 +456,7 @@
     page/DOMWindow.cpp \
     page/MouseEventWithHitTestResults.cpp \
     page/Frame.cpp \
+    page/Settings.cpp \
     page/Page.cpp \
     page/Chrome.cpp \
     page/FrameView.cpp \
@@ -580,6 +581,7 @@
     platform/network/qt/ResourceHandleQt.cpp \
     platform/network/qt/ResourceHandleManagerQt.cpp \
     platform/network/HTTPParsers.cpp \
+    platform/graphics/BitmapImage.cpp \
     platform/graphics/qt/FloatPointQt.cpp \
     platform/graphics/qt/FloatRectQt.cpp \
     platform/graphics/qt/GraphicsContextQt.cpp \
@@ -943,6 +945,7 @@
         ksvg2/svg/SVGStopElement.cpp \
         ksvg2/svg/SVGDefsElement.cpp \
         ksvg2/svg/SVGMetadataElement.cpp \
+        ksvg2/svg/SVGParserUtilities.cpp \
         ksvg2/misc/SVGImageLoader.cpp \
         ksvg2/misc/SVGDocumentExtensions.cpp \
         ksvg2/misc/KSVGTimeScheduler.cpp \
diff --git a/WebCore/editing/qt/EditorQt.cpp b/WebCore/editing/qt/EditorQt.cpp
index 2448e77..d669f95 100644
--- a/WebCore/editing/qt/EditorQt.cpp
+++ b/WebCore/editing/qt/EditorQt.cpp
@@ -80,7 +80,7 @@
     return Vector<String>();
 }
 
-void Editor::markMisspellingsInAdjacentWords(const VisiblePosition &p)
+void Editor::markMisspellingsAfterTypingToPosition(const VisiblePosition &p)
 {
     if (!isContinuousSpellCheckingEnabled())
         return;
diff --git a/WebCore/loader/qt/FrameLoaderQt.cpp b/WebCore/loader/qt/FrameLoaderQt.cpp
index de3de87..f806183 100644
--- a/WebCore/loader/qt/FrameLoaderQt.cpp
+++ b/WebCore/loader/qt/FrameLoaderQt.cpp
@@ -245,7 +245,7 @@
 
 void FrameLoader::partClearedInBegin()
 {
-    if (m_frame->javaScriptEnabled())
+    if (m_frame->settings()->isJavaScriptEnabled())
         static_cast<FrameLoaderClientQt*>(m_client)->partClearedInBegin();
 }
 
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index 8c5cd51..6bee4d9 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -30,6 +30,7 @@
 #include "config.h"
 #include "Image.h"
 
+#include "BitmapImage.h"
 #include "FloatRect.h"
 #include "PlatformString.h"
 #include "GraphicsContext.h"
@@ -61,24 +62,24 @@
 // Image Class
 // ================================================
 
-void Image::initPlatformData()
+void BitmapImage::initPlatformData()
 {
 }
 
-void Image::invalidatePlatformData()
+void BitmapImage::invalidatePlatformData()
 {
 }
 
 Image* Image::loadPlatformResource(const char* name)
 {
     Vector<char> arr = loadResourceIntoArray(name);
-    Image* img = new Image();
+    Image* img = new BitmapImage();
     img->setNativeData(&arr, true);
     return img;
 }
 
 // Drawing Routines
-void Image::draw(GraphicsContext* ctxt, const FloatRect& dst,
+void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dst,
                  const FloatRect& src, CompositeOperator op)
 {
     if (!m_source.initialized())
@@ -108,7 +109,7 @@
     startAnimation();
 }
 
-void Image::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatPoint& srcPoint,
+void BitmapImage::drawTiled(GraphicsContext* ctxt, const FloatRect& dstRect, const FloatPoint& srcPoint,
                       const FloatSize& tileSize, CompositeOperator op)
 {
     if (!m_source.initialized())
@@ -150,7 +151,13 @@
     startAnimation();
 }
 
-void Image::checkForSolidColor()
+void BitmapImage::drawTiled(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, 
+        TileRule hRule, TileRule vRule, CompositeOperator op)
+{
+    // FIXME: no implemented
+}
+
+void BitmapImage::checkForSolidColor()
 {
     // FIXME: It's easy to implement this optimization. Just need to check the RGBA32 buffer to see if it is 1x1.
     m_isSolidColor = false;
@@ -158,4 +165,5 @@
 
 }
 
+
 // vim: ts=4 sw=4 et
diff --git a/WebCore/platform/graphics/svg/SVGPaintServerLinearGradient.h b/WebCore/platform/graphics/svg/SVGPaintServerLinearGradient.h
index 2599e4b..605841ee 100644
--- a/WebCore/platform/graphics/svg/SVGPaintServerLinearGradient.h
+++ b/WebCore/platform/graphics/svg/SVGPaintServerLinearGradient.h
@@ -49,7 +49,7 @@
         virtual TextStream& externalRepresentation(TextStream&) const;
 
 #if PLATFORM(QT)
-        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType) const;
+        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText=false) const;
 #endif
 
     private:
diff --git a/WebCore/platform/graphics/svg/SVGPaintServerRadialGradient.h b/WebCore/platform/graphics/svg/SVGPaintServerRadialGradient.h
index 4bc327d6..501e6e0 100644
--- a/WebCore/platform/graphics/svg/SVGPaintServerRadialGradient.h
+++ b/WebCore/platform/graphics/svg/SVGPaintServerRadialGradient.h
@@ -52,7 +52,7 @@
         virtual TextStream& externalRepresentation(TextStream&) const;
 
 #if PLATFORM(QT)
-        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType) const;
+        virtual bool setup(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText=false) const;
 #endif
 
     private:
diff --git a/WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp b/WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
index c854720..65e928f 100644
--- a/WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
+++ b/WebCore/platform/graphics/svg/qt/SVGPaintServerLinearGradientQt.cpp
@@ -33,7 +33,7 @@
 
 namespace WebCore {
 
-bool SVGPaintServerLinearGradient::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type) const
+bool SVGPaintServerLinearGradient::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type, bool isPaintingText) const
 {
     QPainter* painter(context ? context->platformContext() : 0);
     Q_ASSERT(painter);
diff --git a/WebCore/platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp b/WebCore/platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp
index 4c0b1da..04c144b 100644
--- a/WebCore/platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp
+++ b/WebCore/platform/graphics/svg/qt/SVGPaintServerPatternQt.cpp
@@ -26,7 +26,7 @@
 
 namespace WebCore {
 
-bool SVGPaintServerPattern::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type) const
+bool SVGPaintServerPattern::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type, bool isPaintingText) const
 {
     // FIXME: Reactivate old pattern code
 
diff --git a/WebCore/platform/graphics/svg/qt/SVGPaintServerQt.cpp b/WebCore/platform/graphics/svg/qt/SVGPaintServerQt.cpp
index 92ae0d0..953815b 100644
--- a/WebCore/platform/graphics/svg/qt/SVGPaintServerQt.cpp
+++ b/WebCore/platform/graphics/svg/qt/SVGPaintServerQt.cpp
@@ -75,7 +75,7 @@
     teardown(context, path, type);
 }
 
-void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType) const
+void SVGPaintServer::teardown(GraphicsContext*&, const RenderObject*, SVGPaintTargetType, bool isPaintingText) const
 {
     // no-op
 }
diff --git a/WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp b/WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp
index 0e7d8b5..93faf08 100644
--- a/WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp
+++ b/WebCore/platform/graphics/svg/qt/SVGPaintServerRadialGradientQt.cpp
@@ -34,7 +34,7 @@
 
 namespace WebCore {
 
-bool SVGPaintServerRadialGradient:: setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type) const
+bool SVGPaintServerRadialGradient::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type, bool isPaintingText) const
 {
     QPainter* painter(context ? context->platformContext() : 0);
     Q_ASSERT(painter);
diff --git a/WebCore/platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp b/WebCore/platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp
index 7128741..ed1bdb9 100644
--- a/WebCore/platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp
+++ b/WebCore/platform/graphics/svg/qt/SVGPaintServerSolidQt.cpp
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 
-bool SVGPaintServerSolid::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type) const
+bool SVGPaintServerSolid::setup(GraphicsContext*& context, const RenderObject* object, SVGPaintTargetType type, bool isPaintingText) const
 {
     QPainter* painter(context ? context->platformContext() : 0);
     Q_ASSERT(painter);
diff --git a/WebCore/platform/qt/FrameQt.cpp b/WebCore/platform/qt/FrameQt.cpp
index 23118e1..4104e75 100644
--- a/WebCore/platform/qt/FrameQt.cpp
+++ b/WebCore/platform/qt/FrameQt.cpp
@@ -105,18 +105,18 @@
     , m_bindingRoot(0)
 {
     Settings* settings = new Settings;
-    settings->setAutoLoadImages(true);
-    settings->setMinFontSize(5);
-    settings->setMinLogicalFontSize(5);
+    settings->setLoadsImagesAutomatically(true);
+    settings->setMinimumFontSize(5);
+    settings->setMinimumLogicalFontSize(5);
     settings->setShouldPrintBackgrounds(true);
-    settings->setIsJavaScriptEnabled(true);
+    settings->setJavaScriptEnabled(true);
 
-    settings->setMediumFixedFontSize(14);
-    settings->setMediumFontSize(14);
-    settings->setSerifFontName("Times New Roman");
-    settings->setSansSerifFontName("Arial");
-    settings->setFixedFontName("Courier");
-    settings->setStdFontName("Arial");
+    settings->setDefaultFixedFontSize(14);
+    settings->setDefaultFontSize(14);
+    settings->setSerifFontFamily("Times New Roman");
+    settings->setSansSerifFontFamily("Arial");
+    settings->setFixedFontFamily("Courier");
+    settings->setStandardFontFamily("Arial");
 
     setSettings(settings);
 
@@ -314,7 +314,7 @@
 
 KJS::Bindings::RootObject* FrameQt::bindingRootObject() 
 {
-    ASSERT(javaScriptEnabled()); 
+    ASSERT(settings()->isJavaScriptEnabled()); 
     if (!m_bindingRoot) {
         JSLock lock;
         m_bindingRoot = new KJS::Bindings::RootObject(0);    // The root gets deleted by JavaScriptCore.