Commit 6eb2b0d2 authored by kocienda's avatar kocienda

Finished getting khtml/css to compile

Added khtml/css to build system


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a37f138c
......@@ -18,6 +18,7 @@ include $(TOPSRCDIR)/Makefile.vars
SUBDIRS = \
src/kdelibs/kjs \
src/kdelibs/khtml/css \
src/kdelibs/khtml/dom \
src/kdelibs/khtml/xml \
$(NULL)
......
This diff is collapsed.
......@@ -40,6 +40,7 @@ dnl
SUBDIRS='
src/kdelibs/kjs
src/kdelibs/khtml/css
src/kdelibs/khtml/dom
src/kdelibs/khtml/xml
'
......@@ -182,6 +183,7 @@ AC_OUTPUT(
Makefile.vars
Makefile.rules
src/kdelibs/kjs/Makefile
src/kdelibs/khtml/css/Makefile
src/kdelibs/khtml/dom/Makefile
src/kdelibs/khtml/xml/Makefile
)
......
......@@ -32,7 +32,10 @@
typedef QArray<char> QByteArray;
// added to help in compilation of khtml/dom/html_documnent.cpp:182
class QCString {
class QCString : public QByteArray {
public:
QCString();
QCString(uint);
};
bool operator!=(const char *s1, const QCString &s2);
......
......@@ -29,11 +29,15 @@
// Forward declaration for khtml/html/html_imageimpl.h:58
class QImage;
class QString;
class QColor {
public:
QString name() const;
int red() const;
int green() const;
int blue() const;
bool isValid() const;
bool operator==(const QColor &x) const;
bool operator!=(const QColor &x) const;
......
......@@ -26,4 +26,20 @@
#ifndef QFILE_H_
#define QFILE_H_
class QString;
QString locate(const char *type, const QString& filename, const KInstance* instance = KGlobal::instance());
class QFile {
public:
QFile();
QFile(const QString &name);
bool open(int);
void close();
uint size() const;
int readBlock(char *data, uint len);
};
#endif
......@@ -30,7 +30,18 @@ class QString;
class QFont {
public:
void setFamily( const QString &);
enum Weight { Normal = 50, Bold = 63 };
int pixelSize() const;
QString family() const;
void setFamily(const QString &);
void setPixelSizeFloat(float);
void setWeight(int);
int weight() const;
bool setItalic(bool);
bool italic() const;
bool bold() const;
bool operator==(const QFont &x) const;
bool operator!=(const QFont &x) const;
enum CharSet {};
......
......@@ -26,6 +26,12 @@
#ifndef QFONTMETRICS_H_
#define QFONTMETRICS_H_
class QFontMetrics;
class QRect;
class QChar;
class QFontMetrics {
public:
QRect boundingRect(QChar) const;
};
#endif
......@@ -31,7 +31,9 @@ class QString;
class KCharsets {
public:
void setQFont(QFont &f, QString charset) const;
void setQFont(QFont &f, QString charset) const;
QString xCharsetName(QFont::CharSet) const;
bool supportsScript(const QFont &f, QFont::CharSet charset);
};
#endif
......@@ -33,11 +33,12 @@ typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
class kdbgstream {
public:
kdbgstream &operator<<(const char *string);
kdbgstream &operator<<(const void *p);
kdbgstream &operator<<(const QString& string);
kdbgstream &operator<<(const QCString& string);
kdbgstream &operator<<(KDBGFUNC f);
kdbgstream &operator<<(int);
kdbgstream &operator<<(const char *);
kdbgstream &operator<<(const void *);
kdbgstream &operator<<(const QString&);
kdbgstream &operator<<(const QCString&);
kdbgstream &operator<<(KDBGFUNC);
};
inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; }
......
......@@ -27,9 +27,11 @@
#define KGLOBAL_H_
class KCharsets;
class KInstance;
class KGlobal {
public:
static KInstance *instance();
static KCharsets *charsets();
};
......
......@@ -31,6 +31,8 @@ class QFont;
class KGlobalSettings {
public:
static QFont generalFont();
static QFont windowTitleFont();
static QFont menuFont();
};
#endif
......@@ -32,7 +32,7 @@
// added to help in compilation of khtml/khtml_part.h:867
namespace KIO {
class Job;
}
} // namespace KIO
// forward declaration hack to help in compilation of khtml/khtml_part.h:166
class QWidget;
......@@ -55,6 +55,6 @@ class ReadOnlyPart : public Part {
class GUIActivateEvent {
};
};
} // namespace KParts
#endif
......@@ -30,7 +30,12 @@ class QString;
class KURL {
public:
KURL();
KURL(const QString& url, int encoding_hint = 0);
QString url() const;
void setQuery(const QString& _txt, int encoding_hint = 0);
void setRef(const QString& _txt);
void setPath(const QString& path);
bool isEmpty() const;
};
......
......@@ -26,7 +26,16 @@
#ifndef QARRAY_H_
#define QARRAY_H_
#include <kwq.h>
template <class T> class QArray {
public:
T *data() const;
uint size() const;
bool resize(uint size);
T& operator[](int i) const;
};
#endif
......@@ -28,13 +28,13 @@
class QColorGroup {
public:
enum ColorRole {};
enum ColorRole { Shadow, Light, Mid, Dark, Base, ButtonText, Button, Background };
void setColor(ColorRole role, const QColor &color);
};
class QPalette {
public:
enum ColorGroup {};
enum ColorGroup { Active, Inactive };
void setColor(ColorGroup, QColorGroup::ColorRole role, const QColor &color);
};
......
......@@ -37,9 +37,10 @@ public:
T *at(uint);
void append(const T *);
void setAutoDelete(bool);
bool remove(const T *d);
bool insert(uint i, const T *);
bool remove(const T *);
bool removeLast();
void prepend(const T *d);
void prepend(const T *);
T *take(uint i);
T *first();
T *next();
......@@ -47,6 +48,8 @@ public:
void clear();
bool isEmpty() const;
bool removeRef(const T *);
uint containsRef(const T *) const;
void sort();
};
template <class T> class QListIterator {
......
......@@ -30,6 +30,8 @@ class QRect {
public:
QRect();
QRect(int l, int t, int w, int h);
int height() const;
};
#endif
......@@ -30,8 +30,8 @@
#include <string.h>
#include "qcstring.h"
#include "qregexp.h"
class QRegExp;
class QString;
class QChar {
......@@ -46,11 +46,13 @@ public:
bool isDigit() const;
bool isSpace() const;
bool isLetterOrNumber() const;
friend inline int operator==(QChar, char);
friend inline int operator==(QChar, QChar);
friend inline int operator!=(QChar, QChar);
friend inline int operator!=(char, QChar);
friend inline int operator!=(QChar, char);
operator char() const;
ushort unicode() const;
static const QChar null;
......@@ -63,6 +65,9 @@ public:
class QString {
public:
static QString fromLatin1(const char*, int len=-1);
QString();
QString(const QChar *, uint);
QString(const char *s);
......@@ -78,10 +83,15 @@ public:
QString simplifyWhiteSpace() const;
bool isEmpty() const;
int contains(const char *) const;
int find(char c, int index) const;
int find(const char *s, int index, bool b=0) const;
int find(const QRegExp &regexp, int index, bool b=0) const;
int findRev(char c) const;
int find(char c, int index=0) const;
int find(const char *s, int index=0, bool b=0) const;
int find(const QRegExp &regexp, int index=0, bool b=0) const;
int findRev(char c, int index=0) const;
int findRev(const char *s, int index=0) const;
QString left(uint len) const;
QString &remove(uint index, uint len);
QString &replace(const QRegExp &, const QString &);
void truncate(uint pos);
QString arg(const QString& a, int fieldwidth=0) const;
......@@ -94,10 +104,11 @@ public:
const char *ascii() const;
// FIXME: is there a standard parameter type for overloaded operators?
QChar operator[](int) const;
QString &operator+(QChar c);
QString &operator+(const QString &s);
QString &operator+=(QChar c);
QString &operator+=(const QString &s);
QString &operator+(QChar);
QString &operator+(const QString &);
QString &operator+=(char);
QString &operator+=(QChar);
QString &operator+=(const QString &);
QString &append(const char *);
QString &append(const QString &);
......
......@@ -30,7 +30,9 @@
#include "qvaluelist.h"
class QStringList : public QValueList<QString> {
public:
static QStringList split(const QChar &sep, const QString &str, bool allowEmptyEntries = FALSE);
QString join(const QString &sepx ) const;
};
#endif
......@@ -33,9 +33,19 @@ public:
T& operator*();
};
template<class T> class QValueListConstIterator {
public:
QValueListConstIterator operator++();
bool operator!=(const QValueListConstIterator<T>& it);
T& operator*();
};
template <class T> class QValueList {
public:
typedef QValueListIterator<T> Iterator;
typedef QValueListConstIterator<T> ConstIterator;
void clear();
uint count() const;
bool isEmpty() const;
void append(const T& x);
void remove(const T& x);
......@@ -44,6 +54,8 @@ public:
const T& last() const;
Iterator begin();
Iterator end();
ConstIterator begin() const;
ConstIterator end() const;
T& operator[] (uint i);
};
......
......@@ -31,7 +31,9 @@ class QString;
class KCharsets {
public:
void setQFont(QFont &f, QString charset) const;
void setQFont(QFont &f, QString charset) const;
QString xCharsetName(QFont::CharSet) const;
bool supportsScript(const QFont &f, QFont::CharSet charset);
};
#endif
......@@ -33,11 +33,12 @@ typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
class kdbgstream {
public:
kdbgstream &operator<<(const char *string);
kdbgstream &operator<<(const void *p);
kdbgstream &operator<<(const QString& string);
kdbgstream &operator<<(const QCString& string);
kdbgstream &operator<<(KDBGFUNC f);
kdbgstream &operator<<(int);
kdbgstream &operator<<(const char *);
kdbgstream &operator<<(const void *);
kdbgstream &operator<<(const QString&);
kdbgstream &operator<<(const QCString&);
kdbgstream &operator<<(KDBGFUNC);
};
inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; }
......
......@@ -27,9 +27,11 @@
#define KGLOBAL_H_
class KCharsets;
class KInstance;
class KGlobal {
public:
static KInstance *instance();
static KCharsets *charsets();
};
......
......@@ -31,6 +31,8 @@ class QFont;
class KGlobalSettings {
public:
static QFont generalFont();
static QFont windowTitleFont();
static QFont menuFont();
};
#endif
......@@ -30,7 +30,12 @@ class QString;
class KURL {
public:
KURL();
KURL(const QString& url, int encoding_hint = 0);
QString url() const;
void setQuery(const QString& _txt, int encoding_hint = 0);
void setRef(const QString& _txt);
void setPath(const QString& path);
bool isEmpty() const;
};
......
......@@ -32,7 +32,7 @@
// added to help in compilation of khtml/khtml_part.h:867
namespace KIO {
class Job;
}
} // namespace KIO
// forward declaration hack to help in compilation of khtml/khtml_part.h:166
class QWidget;
......@@ -55,6 +55,6 @@ class ReadOnlyPart : public Part {
class GUIActivateEvent {
};
};
} // namespace KParts
#endif
......@@ -42,4 +42,7 @@ class CSS2AzimuthImpl;
#define TRUE (1)
#define FALSE (0)
void qDebug(const char *msg, ...);
#endif
......@@ -26,7 +26,16 @@
#ifndef QARRAY_H_
#define QARRAY_H_
#include <kwq.h>
template <class T> class QArray {
public:
T *data() const;
uint size() const;
bool resize(uint size);
T& operator[](int i) const;
};
#endif
......@@ -29,11 +29,15 @@
// Forward declaration for khtml/html/html_imageimpl.h:58
class QImage;
class QString;
class QColor {
public:
QString name() const;
int red() const;
int green() const;
int blue() const;
bool isValid() const;
bool operator==(const QColor &x) const;
bool operator!=(const QColor &x) const;
......
......@@ -32,7 +32,10 @@
typedef QArray<char> QByteArray;
// added to help in compilation of khtml/dom/html_documnent.cpp:182
class QCString {
class QCString : public QByteArray {
public:
QCString();
QCString(uint);
};
bool operator!=(const char *s1, const QCString &s2);
......
......@@ -34,10 +34,11 @@ public:
QDataStream( QByteArray, int mode );
virtual ~QDataStream();
QDataStream &operator<<( const char *str );
QDataStream &operator<<( const QString &str );
QDataStream &operator<<( const QCString &str );
QDataStream &operator>>( const QString &str );
QDataStream &operator<<(long int);
QDataStream &operator<<(const char *);
QDataStream &operator<<(const QString &);
QDataStream &operator<<(const QCString &);
QDataStream &operator>>(const QString &);
};
#endif
......@@ -26,4 +26,20 @@
#ifndef QFILE_H_
#define QFILE_H_
class QString;
QString locate(const char *type, const QString& filename, const KInstance* instance = KGlobal::instance());
class QFile {
public:
QFile();
QFile(const QString &name);
bool open(int);
void close();
uint size() const;
int readBlock(char *data, uint len);
};
#endif
......@@ -30,7 +30,18 @@ class QString;
class QFont {
public:
void setFamily( const QString &);
enum Weight { Normal = 50, Bold = 63 };
int pixelSize() const;
QString family() const;
void setFamily(const QString &);
void setPixelSizeFloat(float);
void setWeight(int);
int weight() const;
bool setItalic(bool);
bool italic() const;
bool bold() const;
bool operator==(const QFont &x) const;
bool operator!=(const QFont &x) const;
enum CharSet {};
......
......@@ -26,4 +26,16 @@
#ifndef QFONTDATABASE_H_
#define QFONTDATABASE_H_
#include "qvaluelist.h"
class QFont;
class QString;
class QFontDatabase {
public:
bool isSmoothlyScalable(const QString &family, const QString &style = QString::null, const QString &charSet = QString::null) const;
QValueList<int> smoothSizes(const QString &family, const QString &style, const QString &charSet = QString::null);
QString styleString(const QFont &);
};
#endif
......@@ -26,6 +26,12 @@
#ifndef QFONTMETRICS_H_
#define QFONTMETRICS_H_
class QFontMetrics;
class QRect;
class QChar;
class QFontMetrics {
public:
QRect boundingRect(QChar) const;
};
#endif
......@@ -37,9 +37,10 @@ public:
T *at(uint);
void append(const T *);
void setAutoDelete(bool);
bool remove(const T *d);
bool insert(uint i, const T *);
bool remove(const T *);
bool removeLast();
void prepend(const T *d);
void prepend(const T *);
T *take(uint i);
T *first();
T *next();
......@@ -47,6 +48,8 @@ public:
void clear();
bool isEmpty() const;
bool removeRef(const T *);
uint containsRef(const T *) const;
void sort();
};
template <class T> class QListIterator {
......
......@@ -28,13 +28,13 @@
class QColorGroup {
public:
enum ColorRole {};
enum ColorRole { Shadow, Light, Mid, Dark, Base, ButtonText, Button, Background };