2006-09-06 Nikolas Zimmermann <zimmermann@kde.org>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Sep 2006 17:17:42 +0000 (17:17 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Sep 2006 17:17:42 +0000 (17:17 +0000)
        Reviewed and landed by ap.

        Fix Qt/Linux build.

        * CMakeLists.txt: Take out CharacterData.cpp from build / add new Text* files to build.
        * platform/qt/BrowserExtensionQt.cpp: Add wtf/Platform.h include.
        * platform/qt/FontCacheQt.cpp: Add FontData.h include.
        * platform/qt/FontQt.cpp:
        (WebCore::Font::drawGlyphs): Fix constness in reinterpret_cast.
        * platform/qt/FrameQt.cpp:
        (WebCore::FrameQt::markMisspellings): Change "SelectionController" param type to "Selection".
        (WebCore::FrameQt::respondToChangedSelection): Ditto.
        (WebCore::FrameQt::respondToChangedContents): Ditto.
        (WebCore::FrameQt::shouldChangeSelection): Ditto.
        * platform/qt/FrameQt.h: Ditto.
        * platform/qt/ImageQt.cpp:
        (WebCore::Image::supportsType): Fix String->QString conversion.
        * platform/qt/ResourceLoaderManager.cpp:
        (WebCore::ResourceLoaderManager::add): Fix String->DeprecatedString conversion.
        * platform/qt/ScrollViewCanvasQt.cpp:
        (WebCore::ScrollViewCanvasQt::handleKeyEvent): Adapt to SelectionController signature changes.
        * platform/qt/qt-encodings.txt: Removed.

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

WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/platform/qt/BrowserExtensionQt.cpp
WebCore/platform/qt/FontCacheQt.cpp
WebCore/platform/qt/FontQt.cpp
WebCore/platform/qt/FrameQt.cpp
WebCore/platform/qt/FrameQt.h
WebCore/platform/qt/ImageQt.cpp
WebCore/platform/qt/ResourceLoaderManager.cpp
WebCore/platform/qt/ScrollViewCanvasQt.cpp
WebCore/platform/qt/qt-encodings.txt [deleted file]

index b399f96b52a47296be19b95caf002bbce6a1e783..61d0a775f9b1cfe28fe0e0030b4ec2f42fb81897 100644 (file)
@@ -353,11 +353,6 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/UserAgentStyleSheets.h ${C
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/css/html4.css ${CMAKE_CURRENT_SOURCE_DIR}/css/quirks.css ${CMAKE_CURRENT_SOURCE_DIR}/css/svg.css
 )
 
-add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/CharacterData.cpp
-  COMMAND perl ${CMAKE_CURRENT_SOURCE_DIR}/platform/make-charset-table.pl ${CMAKE_CURRENT_SOURCE_DIR}/platform/character-sets.txt ${CMAKE_CURRENT_SOURCE_DIR}/platform/qt/qt-encodings.txt \" \" > ${CMAKE_CURRENT_BINARY_DIR}/CharacterData.cpp
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/platform/make-charset-table.pl ${CMAKE_CURRENT_SOURCE_DIR}/platform/character-sets.txt
-)
-
 # source stuff
 IF (WEBKIT_USE_SVG_SUPPORT)
 set (SVG_STUFF
@@ -547,7 +542,6 @@ set(WebCore_SRCS
     ${CMAKE_CURRENT_BINARY_DIR}/CSSValueKeywords.h
     ${CMAKE_CURRENT_BINARY_DIR}/CSSGrammar.h
     ${CMAKE_CURRENT_BINARY_DIR}/CSSGrammar.cpp
-    ${CMAKE_CURRENT_BINARY_DIR}/CharacterData.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/UserAgentStyleSheets.h
     ${CMAKE_CURRENT_BINARY_DIR}/UserAgentStyleSheetsData.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/html/HTMLNames.cpp
@@ -850,7 +844,6 @@ set(WebCore_SRCS
     platform/GraphicsTypes.cpp
     platform/IntRect.cpp
     platform/Arena.cpp
-    platform/CharsetNames.cpp
     platform/ArrayImpl.cpp
     platform/FloatPoint.cpp
     platform/SegmentedString.cpp
@@ -858,7 +851,11 @@ set(WebCore_SRCS
     platform/StreamingTextDecoderICU.cpp
     platform/DeprecatedString.cpp
     platform/DeprecatedCString.cpp
+    platform/TextCodecLatin1.cpp
+    platform/TextCodecUTF16.cpp
+    platform/TextDecoder.cpp
     platform/TextEncoding.cpp
+    platform/TextEncodingRegistry.cpp
     platform/GraphicsContext.cpp
     platform/Logging.cpp
     platform/Color.cpp
index b6e64ad31ba40ab97bdc14a523a5195eb73fde6b..417e5971fd2b022e9947adf473e959cf6797a083 100644 (file)
@@ -1,3 +1,28 @@
+2006-09-06  Nikolas Zimmermann  <zimmermann@kde.org>
+
+        Reviewed and landed by ap.
+
+        Fix Qt/Linux build.
+
+        * CMakeLists.txt: Take out CharacterData.cpp from build / add new Text* files to build.
+        * platform/qt/BrowserExtensionQt.cpp: Add wtf/Platform.h include.
+        * platform/qt/FontCacheQt.cpp: Add FontData.h include.
+        * platform/qt/FontQt.cpp:
+        (WebCore::Font::drawGlyphs): Fix constness in reinterpret_cast.
+        * platform/qt/FrameQt.cpp:
+        (WebCore::FrameQt::markMisspellings): Change "SelectionController" param type to "Selection".
+        (WebCore::FrameQt::respondToChangedSelection): Ditto.
+        (WebCore::FrameQt::respondToChangedContents): Ditto.
+        (WebCore::FrameQt::shouldChangeSelection): Ditto.
+        * platform/qt/FrameQt.h: Ditto.
+        * platform/qt/ImageQt.cpp:
+        (WebCore::Image::supportsType): Fix String->QString conversion.
+        * platform/qt/ResourceLoaderManager.cpp:
+        (WebCore::ResourceLoaderManager::add): Fix String->DeprecatedString conversion.
+        * platform/qt/ScrollViewCanvasQt.cpp:
+        (WebCore::ScrollViewCanvasQt::handleKeyEvent): Adapt to SelectionController signature changes.
+        * platform/qt/qt-encodings.txt: Removed.
+
 2006-09-06  Darin Adler  <darin@apple.com>
 
         Reviewed by Tim Hatcher.
index 47489155903111802430fce2db9f1fa1d38dfd63..b24bd37025c8de7f4830140c506241a670413eb5 100644 (file)
@@ -26,6 +26,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <wtf/Platform.h>
+
 #include "BrowserExtensionQt.h"
 
 #define notImplemented() do { fprintf(stderr, "FIXME: UNIMPLEMENTED: %s:%d\n", __FILE__, __LINE__); } while(0)
index fb3020c1a62f53322be7cc39093f80987f541dd4..358e10b66c766edeabad529a7fbc607d01d285ca 100644 (file)
@@ -32,6 +32,7 @@
 #include "FontCache.h"
 
 #include "Font.h"
+#include "FontData.h"
 #include "FontPlatformData.h"
 
 namespace WebCore {
index 3bd43b9df4f1efc6d8806bf02f4859d33d9a4ac8..cabeb696da76f29864b3a8229c85c02f6b5f9996 100644 (file)
@@ -52,7 +52,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, const FontData* font, co
     p.setPen(QColor(color));
     p.setFont(font->platformData().font());
 
-    QChar* buffer = reinterpret_cast<QChar*>(glyphBuffer.glyphs(from));
+    const QChar* buffer = reinterpret_cast<const QChar*>(glyphBuffer.glyphs(from));
     QString str = QString::fromRawData(buffer, numGlyphs);
 
     p.drawText(QPointF(point.x(),point.y()), str);
index 41cb567c84cd1e0ab98551770ea3c3e97d11d34f..026190cc1317009a5c9ef036db3d10ba53c50435 100644 (file)
@@ -277,7 +277,7 @@ void FrameQt::markMisspellingsInAdjacentWords(const VisiblePosition&)
     notImplemented();
 }
 
-void FrameQt::markMisspellings(const SelectionController&)
+void FrameQt::markMisspellings(const Selection&)
 {
     notImplemented();
 }
@@ -402,17 +402,17 @@ void FrameQt::issueTransposeCommand()
     notImplemented();
 }
 
-void FrameQt::respondToChangedSelection(const SelectionController& oldSelection, bool closeTyping)
+void FrameQt::respondToChangedSelection(const Selection& oldSelection, bool closeTyping)
 {
     notImplemented();
 }
 
-void FrameQt::respondToChangedContents(const SelectionController& endingSelection)
+void FrameQt::respondToChangedContents(const Selection& endingSelection)
 {
     notImplemented();
 }
 
-bool FrameQt::shouldChangeSelection(const SelectionController& oldSelection, const SelectionController& newSelection, EAffinity affinity, bool stillSelecting) const
+bool FrameQt::shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity affinity, bool stillSelecting) const
 {
     notImplemented();
     return true;
index 49c79c31b5ad5f29dd3e0e1cac5b3f0d2882a07e..1dee5d471f9db4b401071df5f77301a3d603d9b2 100644 (file)
@@ -86,7 +86,7 @@ public:
     virtual String mimeTypeForFileName(const String&) const;
 
     virtual void markMisspellingsInAdjacentWords(const VisiblePosition&);
-    virtual void markMisspellings(const SelectionController&);
+    virtual void markMisspellings(const Selection&);
 
     virtual bool lastEventIsMouseUp() const;
 
@@ -109,9 +109,9 @@ public:
     virtual void issuePasteCommand();
     virtual void issuePasteAndMatchStyleCommand();
     virtual void issueTransposeCommand();
-    virtual void respondToChangedSelection(const SelectionController& oldSelection, bool closeTyping);
-    virtual void respondToChangedContents(const SelectionController& endingSelection);
-    virtual bool shouldChangeSelection(const SelectionController& oldSelection, const SelectionController& newSelection, EAffinity, bool stillSelecting) const;
+    virtual void respondToChangedSelection(const Selection& oldSelection, bool closeTyping);
+    virtual void respondToChangedContents(const Selection& endingSelection);
+    virtual bool shouldChangeSelection(const Selection& oldSelection, const Selection& newSelection, EAffinity, bool stillSelecting) const;
     virtual void partClearedInBegin();
 
     virtual bool canGoBackOrForward(int distance) const;
index 37a2b5b1cdd5cc9066b1913004f2b7768ffa0354..3e2c3d907376869852cf99b81251f4f9abb3af45 100644 (file)
@@ -31,6 +31,7 @@
 #include "Image.h"
 
 #include "FloatRect.h"
+#include "PlatformString.h"
 #include "GraphicsContext.h"
 
 #include <QPixmap>
@@ -80,7 +81,7 @@ bool Image::supportsType(const String& type)
 {
     QList<QByteArray> formats = QImageReader::supportedImageFormats();
     foreach(QByteArray format, formats) {
-        if (format == (QString) type)
+        if (format == QString(type))
             return true;
     }
 
index 9832c2608ae0806aaee301777e97e010c9427c8f..07720cc5b1c6dd6f12e70b7ea283222d72f3fb38 100644 (file)
@@ -157,7 +157,7 @@ void ResourceLoaderManager::add(ResourceLoader* job)
     if (job->method() == "GET")
         kioJob = KIO::get(KUrl(url), false, false);
     else if (job->method() == "POST") {
-        DeprecatedString postData = job->postData().flattenToString();
+        DeprecatedString postData = job->postData().flattenToString().deprecatedString();
         QByteArray postDataArray(postData.ascii(), postData.length());
 
         kioJob = KIO::http_post(KUrl(url), postDataArray, false);
index ab32ae8444a672b6dd16a747ebcf6e3a0f439e4e..d8899d2155cabf8d310c5903d8b598d8995b7ed2 100644 (file)
@@ -124,7 +124,7 @@ void ScrollViewCanvasQt::handleKeyEvent(QKeyEvent* ev, bool isKeyUp)
     bool handled = frame->keyEvent(kevent);
 
     if (!handled && !kevent.isKeyUp()) {
-        Node* start = frame->selection().start().node();
+        Node* start = frame->selectionController()->start().node();
         if (start && start->isContentEditable()) {
             switch(kevent.WindowsKeyCode()) {
                 case VK_BACK:
@@ -134,16 +134,16 @@ void ScrollViewCanvasQt::handleKeyEvent(QKeyEvent* ev, bool isKeyUp)
                     TypingCommand::forwardDeleteKeyPressed(frame->document());
                     break;
                 case VK_LEFT:
-                    frame->selection().modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity);
+                    frame->selectionController()->modify(SelectionController::MOVE, SelectionController::LEFT, CharacterGranularity);
                     break;
                 case VK_RIGHT:
-                    frame->selection().modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity);
+                    frame->selectionController()->modify(SelectionController::MOVE, SelectionController::RIGHT, CharacterGranularity);
                     break;
                 case VK_UP:
-                    frame->selection().modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity);
+                    frame->selectionController()->modify(SelectionController::MOVE, SelectionController::BACKWARD, ParagraphGranularity);
                     break;
                 case VK_DOWN:
-                    frame->selection().modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
+                    frame->selectionController()->modify(SelectionController::MOVE, SelectionController::FORWARD, ParagraphGranularity);
                     break;
                 default:
                     TypingCommand::insertText(frame->document(), kevent.text(), false);
diff --git a/WebCore/platform/qt/qt-encodings.txt b/WebCore/platform/qt/qt-encodings.txt
deleted file mode 100644 (file)
index 0b9bfc7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# The items on the left are names of TextEncodingID values
-# The items on the right are IANA character set names. Names listed in character-sets.txt are not
-# repeated here; mentioning any one character set from a group in there pulls in all the aliases in
-# that group.
-
-WinLatin1Encoding: windows-1252, winlatin1, xansi
-Latin1Encoding: ISO-8859-1, 88591
-ASCIIEncoding: US-ASCII, isoir6us
-UTF16Encoding: ISO-10646-UCS-2, ucs2, unicode, utf16
-UTF16Encoding, BigEndian: UTF-16BE, unicodefffe
-UTF16Encoding, LittleEndian: UTF-16LE, unicodefeff
-UTF8Encoding: UTF-8, unicode11utf8, unicode20utf8, xunicode20utf8