Compare commits
177 Commits
Author | SHA1 | Date |
---|---|---|
|
8d84fec525 | |
|
ef22c635d9 | |
|
94afd4316c | |
|
1219a66049 | |
|
56ed00d163 | |
|
939958921d | |
|
b940bbcda1 | |
|
ff1ade8f06 | |
|
cbfce4f66a | |
|
5535890a66 | |
|
013ecdf4ea | |
|
a9a6d94bbb | |
|
f1a13dd23d | |
|
3ac9347d18 | |
|
bd33ea2619 | |
|
c063526eb8 | |
|
bd67d82f90 | |
|
0ec8bdd1d3 | |
|
bd0a01dde7 | |
|
a718590344 | |
|
aea3cd2b88 | |
|
97378e4233 | |
|
e88fa0ef72 | |
|
2ecd5ea870 | |
|
3fff7f6dc4 | |
|
083966466c | |
|
ba203e06c2 | |
|
b8a96fe84f | |
|
0609156f0a | |
|
e3229fccf8 | |
|
4ca14cc311 | |
|
43c91a298d | |
|
f6a440f0df | |
|
1ab3b31d2c | |
|
588931c5cc | |
|
51e42df3c0 | |
|
e8758e5268 | |
|
056a4430f6 | |
|
6ee8f55144 | |
|
14030b0887 | |
|
366c6722f2 | |
|
edff063950 | |
|
9cb0ac7470 | |
|
db75a15c55 | |
|
d04614a0c6 | |
|
35178d499a | |
|
5a3ef7aaec | |
|
90629f2976 | |
|
de26be8efc | |
|
b3d66881b2 | |
|
47aa665fbd | |
|
56c49c3c39 | |
|
4b9cb2ee1e | |
|
95b80e0e2e | |
|
5bf93c0bad | |
|
9e3340c1e2 | |
|
1c35e4a548 | |
|
f9cc36f13a | |
|
325be2ecdc | |
|
fc8a99cd6e | |
|
721177e5da | |
|
b5c5bacdab | |
|
f90deb4758 | |
|
c0e4cb75c7 | |
|
06a70a9963 | |
|
275af7b5c7 | |
|
2448e7c0ca | |
|
db47484f16 | |
|
0188957820 | |
|
c7f93f2147 | |
|
afa5bdf81c | |
|
b57c1700d5 | |
|
c5d83d98b7 | |
|
071ae277e7 | |
|
a970f2c825 | |
|
1a6dfa26ea | |
|
ca79519ab0 | |
|
fe053796b8 | |
|
2087bb01ba | |
|
323a6efb47 | |
|
96499f0c0a | |
|
c745eacee8 | |
|
8fc8e93f3d | |
|
d34ba5d614 | |
|
a470fc39f1 | |
|
a17567e2b3 | |
|
6618271e6b | |
|
4f31a17a1c | |
|
78927548fe | |
|
8e6b3b744b | |
|
c0d5b0803b | |
|
e6395815cc | |
|
3ad20b0296 | |
|
961ef0a87d | |
|
29c9b055f5 | |
|
74e99e8280 | |
|
2f6380c198 | |
|
94e6ad0397 | |
|
8be7a045cc | |
|
6a9cd3302c | |
|
6d2ded59ae | |
|
83699e00bc | |
|
20dba29872 | |
|
83855e2e3c | |
|
a2b8f31006 | |
|
c6e8a08e4e | |
|
3769ae3c96 | |
|
9594797803 | |
|
2558811479 | |
|
d1e33e5e08 | |
|
a09f5c0f0f | |
|
ed094589e7 | |
|
57c2a63fbc | |
|
114da64003 | |
|
5d3bbcd120 | |
|
eacdc574c4 | |
|
1e8420940e | |
|
a61b59d020 | |
|
da2185807b | |
|
aba7eff1e9 | |
|
e494461352 | |
|
2e9eef9749 | |
|
d6f59f07d9 | |
|
78225122c9 | |
|
da04275e7f | |
|
ac7af9f55c | |
|
9998bf9e67 | |
|
1109141f52 | |
|
3ce4ea9ad7 | |
|
0fc65a9a95 | |
|
c0e65c64fc | |
|
f628ea71fd | |
|
87f8bf3d44 | |
|
9c0b77bea7 | |
|
a753bd8d3f | |
|
2dcb58b346 | |
|
f307f2daab | |
|
e8024e0bde | |
|
e1ffa33ff8 | |
|
6d1578a22a | |
|
c1648d2554 | |
|
fd4198f382 | |
|
dcb51877da | |
|
02e85afd47 | |
|
5874624d03 | |
|
f25ff6b5bc | |
|
b3ca8bd302 | |
|
d5666b9b35 | |
|
7ef89e2a3e | |
|
b763d216e4 | |
|
7852275c4f | |
|
8642bfaf87 | |
|
cac5c93c14 | |
|
c7eedfb2b0 | |
|
6f3db4b90d | |
|
66b3c6e480 | |
|
ce3061addb | |
|
0a80ab9ce9 | |
|
5ef32c05aa | |
|
f2a7b71d14 | |
|
2449ca94ee | |
|
3cc722a636 | |
|
8bea2c1025 | |
|
d54ab7924a | |
|
5bba8f6296 | |
|
77837b78c4 | |
|
03bf9e8e72 | |
|
827fa4ce3f | |
|
7f818e7e99 | |
|
c780375e0b | |
|
1ff3051071 | |
|
ea87208eb2 | |
|
55f47f6190 | |
|
3da5c17282 | |
|
ce9718aa2c | |
|
ce42d5cee8 | |
|
51ffd27e51 |
|
@ -1,9 +0,0 @@
|
|||
qt-x11-free-3.3.3.tar.bz2
|
||||
qt-x11-immodule-unified-qt3.3.3-20040910.diff.bz2
|
||||
qt-x11-immodule-unified-qt3.3.4-20041203.diff.bz2
|
||||
qt-x11-free-3.3.4.tar.bz2
|
||||
qt-x11-free-3.3.5.tar.bz2
|
||||
qt-x11-immodule-unified-qt3.3.5-20051012.diff.bz2
|
||||
qt-x11-immodule-unified-qt3.3.5-20051018.diff.bz2
|
||||
qt-x11-immodule-unified-qt3.3.7-20061229.diff.bz2
|
||||
qt-x11-free-3.3.8.tar.bz2
|
|
@ -0,0 +1,10 @@
|
|||
hi128-app-qt4-logo.png
|
||||
hi48-app-qt4-logo.png
|
||||
gstreamer-logo.svg
|
||||
hi128-phonon-gstreamer.png
|
||||
hi16-phonon-gstreamer.png
|
||||
hi22-phonon-gstreamer.png
|
||||
hi32-phonon-gstreamer.png
|
||||
hi48-phonon-gstreamer.png
|
||||
hi64-phonon-gstreamer.png
|
||||
qt-everywhere-opensource-src-4.6.2.tar.gz
|
|
@ -0,0 +1,117 @@
|
|||
From b48e2091871516496cf0b133249fbf5326a55831 Mon Sep 17 00:00:00 2001
|
||||
From: Lubos Lunak <l.lunak@kde.org>
|
||||
Date: Sat, 23 Feb 2008 16:44:52 +0100
|
||||
Subject: [PATCH 01/13] This patch uses object name as a fallback for window role if no window
|
||||
role is set explicitly using setWindowRole(). Since Qt3 always used
|
||||
the object name as the window role and most Qt3/KDE3 code is ported to
|
||||
call setObjectName(),
|
||||
|
||||
this makes the window role set in many cases (which KWin uses for window identifying).
|
||||
|
||||
NOTE: It is suggested to apply patch #0209 as well when this patch is used.
|
||||
|
||||
qt-bugs@ issue : 167704
|
||||
Trolltech task ID : 168283 (status: "fixed" for Qt 4.4.0, but effectively refused)
|
||||
---
|
||||
src/corelib/kernel/qobject.cpp | 8 ++++++++
|
||||
src/corelib/kernel/qobject_p.h | 3 +++
|
||||
src/gui/kernel/qwidget_p.h | 1 +
|
||||
src/gui/kernel/qwidget_x11.cpp | 27 +++++++++++++++++++++------
|
||||
4 files changed, 33 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
|
||||
index 6487194..ef0369e 100644
|
||||
--- a/src/corelib/kernel/qobject.cpp
|
||||
+++ b/src/corelib/kernel/qobject.cpp
|
||||
@@ -993,8 +993,16 @@ void QObject::setObjectName(const QString &name)
|
||||
{
|
||||
Q_D(QObject);
|
||||
d->objectName = name;
|
||||
+#if defined(Q_WS_X11)
|
||||
+ d->checkWindowRole();
|
||||
+#endif
|
||||
}
|
||||
|
||||
+#if defined(Q_WS_X11)
|
||||
+void QObjectPrivate::checkWindowRole()
|
||||
+{
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
/*! \internal
|
||||
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
|
||||
index 0bcccba..6ab9e10 100644
|
||||
--- a/src/corelib/kernel/qobject_p.h
|
||||
+++ b/src/corelib/kernel/qobject_p.h
|
||||
@@ -144,6 +144,9 @@ public:
|
||||
mutable quint32 connectedSignals;
|
||||
|
||||
QString objectName;
|
||||
+#if defined(Q_WS_X11)
|
||||
+ virtual void checkWindowRole();
|
||||
+#endif
|
||||
|
||||
// Note: you must hold the signalSlotLock() before accessing the lists below or calling the functions
|
||||
struct Connection
|
||||
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
|
||||
index 774e390..176d6fa 100644
|
||||
--- a/src/gui/kernel/qwidget_p.h
|
||||
+++ b/src/gui/kernel/qwidget_p.h
|
||||
@@ -358,6 +358,7 @@ public:
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
void setWindowRole();
|
||||
+ virtual void checkWindowRole();
|
||||
void sendStartupMessage(const char *message) const;
|
||||
void setNetWmWindowTypes();
|
||||
void x11UpdateIsOpaque();
|
||||
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
|
||||
index 79ee8c9..b56849c 100644
|
||||
--- a/src/gui/kernel/qwidget_x11.cpp
|
||||
+++ b/src/gui/kernel/qwidget_x11.cpp
|
||||
@@ -778,13 +778,17 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
data.fstrut_dirty = 1;
|
||||
|
||||
// declare the widget's window role
|
||||
+ QByteArray windowRole;
|
||||
if (QTLWExtra *topData = maybeTopData()) {
|
||||
- if (!topData->role.isEmpty()) {
|
||||
- QByteArray windowRole = topData->role.toUtf8();
|
||||
- XChangeProperty(dpy, id,
|
||||
- ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
|
||||
- (unsigned char *)windowRole.constData(), windowRole.length());
|
||||
- }
|
||||
+ if (!topData->role.isEmpty())
|
||||
+ windowRole = topData->role.toUtf8();
|
||||
+ }
|
||||
+ if (windowRole.isEmpty()) // use object name as a fallback
|
||||
+ windowRole = objectName.toUtf8();
|
||||
+ if (!windowRole.isEmpty()) {
|
||||
+ XChangeProperty(dpy, id,
|
||||
+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
|
||||
+ (unsigned char *)windowRole.constData(), windowRole.length());
|
||||
}
|
||||
|
||||
// set client leader property
|
||||
@@ -2768,6 +2772,17 @@ void QWidgetPrivate::setWindowRole()
|
||||
(unsigned char *)windowRole.constData(), windowRole.length());
|
||||
}
|
||||
|
||||
+void QWidgetPrivate::checkWindowRole()
|
||||
+{
|
||||
+ Q_Q(QWidget);
|
||||
+ if( !q->windowRole().isEmpty() || !q->internalWinId())
|
||||
+ return;
|
||||
+ QByteArray windowRole = objectName.toUtf8(); // use as a fallback
|
||||
+ XChangeProperty(X11->display, q->internalWinId(),
|
||||
+ ATOM(WM_WINDOW_ROLE), XA_STRING, 8, PropModeReplace,
|
||||
+ (unsigned char *)windowRole.constData(), windowRole.length());
|
||||
+}
|
||||
+
|
||||
Q_GLOBAL_STATIC(QX11PaintEngine, qt_widget_paintengine)
|
||||
QPaintEngine *QWidget::paintEngine() const
|
||||
{
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001
|
||||
From: Lubos Lunak <l.lunak@kde.org>
|
||||
Date: Tue, 2 Oct 2007 16:08:32 +0200
|
||||
Subject: [PATCH 02/13] This patch makes override-redirect windows (popup menu, dropdown menu,
|
||||
tooltip, combobox, etc.) also have more window properties like WM_CLASS,
|
||||
so they can be used when compositing.
|
||||
|
||||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
---
|
||||
src/gui/kernel/qwidget_x11.cpp | 21 +++++++++++++++------
|
||||
1 files changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
|
||||
index 79ee8c9..a74a849 100644
|
||||
--- a/src/gui/kernel/qwidget_x11.cpp
|
||||
+++ b/src/gui/kernel/qwidget_x11.cpp
|
||||
@@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
Q_ASSERT(id);
|
||||
XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder,
|
||||
&wsa);
|
||||
+ XClassHint class_hint;
|
||||
+ QByteArray appName = qAppName().toLatin1();
|
||||
+ class_hint.res_name = appName.data(); // application name
|
||||
+ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class
|
||||
+ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint);
|
||||
} else if (topLevel && !desktop) { // top-level widget
|
||||
if (!X11->wm_client_leader)
|
||||
create_wm_client_leader();
|
||||
@@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
// set EWMH window types
|
||||
setNetWmWindowTypes();
|
||||
|
||||
+ // when we create a toplevel widget, the frame strut should be dirty
|
||||
+ data.fstrut_dirty = 1;
|
||||
+
|
||||
+ } else {
|
||||
+ // non-toplevel widgets don't have a frame, so no need to
|
||||
+ // update the strut
|
||||
+ data.fstrut_dirty = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
|
||||
// set _NET_WM_PID
|
||||
long curr_pid = getpid();
|
||||
XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *) &curr_pid, 1);
|
||||
|
||||
- // when we create a toplevel widget, the frame strut should be dirty
|
||||
- data.fstrut_dirty = 1;
|
||||
|
||||
// declare the widget's window role
|
||||
if (QTLWExtra *topData = maybeTopData()) {
|
||||
@@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
|
||||
XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER),
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *)&X11->wm_client_leader, 1);
|
||||
- } else {
|
||||
- // non-toplevel widgets don't have a frame, so no need to
|
||||
- // update the strut
|
||||
- data.fstrut_dirty = 0;
|
||||
}
|
||||
|
||||
if (initializeWindow && q->internalWinId()) {
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 68eaa07de69e873b89d4aba341c6ed1ca81f6819 Mon Sep 17 00:00:00 2001
|
||||
From: Lubos Lunak <l.lunak@kde.org>
|
||||
Date: Wed, 30 Jan 2008 14:24:01 +0100
|
||||
Subject: [PATCH 03/13] This patch changes QObjectPrivateVersion, thus preventing mixing
|
||||
parts of upstream Qt and qt-copy. In general it is a bad idea to mix
|
||||
e.g. libQtCore from one build and libQtGui from another one, and other
|
||||
qt-copy patches could make changes in Qt internal structures that could
|
||||
cause problems when mixed with upstream Qt.
|
||||
|
||||
This patch does not make qt-copy binary incompatible with upstream Qt.
|
||||
It only further enforces using the same sources for the whole Qt build.
|
||||
|
||||
qt-bugs@ issue : none
|
||||
Trolltech task ID : none
|
||||
bugs.kde.org number : none
|
||||
---
|
||||
src/corelib/kernel/qobject_p.h | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
|
||||
index 0bcccba..88192fd 100644
|
||||
--- a/src/corelib/kernel/qobject_p.h
|
||||
+++ b/src/corelib/kernel/qobject_p.h
|
||||
@@ -83,7 +83,9 @@ extern QSignalSpyCallbackSet Q_CORE_EXPORT qt_signal_spy_callback_set;
|
||||
|
||||
inline QObjectData::~QObjectData() {}
|
||||
|
||||
-enum { QObjectPrivateVersion = QT_VERSION };
|
||||
+// add 0x1000000 to mark it as qt-copy version, with possible modifications
|
||||
+// in some Q*Private class
|
||||
+enum { QObjectPrivateVersion = QT_VERSION + 0x1000000 };
|
||||
|
||||
class Q_CORE_EXPORT QObjectPrivate : public QObjectData
|
||||
{
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Reed <rangerrick@befunk.com>
|
||||
Date: Tue, 19 Feb 2008 17:37:37 +0100
|
||||
Subject: [PATCH 04/13] This patch adds support for using -isystem to allow putting an include
|
||||
directory at the end of the compiler's header search path.
|
||||
|
||||
I don't have the exact output anymore (I've since patched Qt's configure) but
|
||||
essentially, since I have pcre.h in /opt/kde4-deps/include, it was
|
||||
conflicting with Qt's (modified) pcre.h in the WebKit bits, since
|
||||
-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it
|
||||
comes *before* the specific locations in INCPATH on the compile line, and you
|
||||
end up with a conflict with the system-installed pcre.h.
|
||||
|
||||
Presumably, if your pcre.h is in /usr/include as on most Linux systems, you
|
||||
wouldn't notice this issue since /usr/include's already in your include path
|
||||
and people likely don't pass -I /usr/include to configure. I suspect that on
|
||||
any platform with a regular, system-installed pcre.h (or clucene headers),
|
||||
adding -I /usr/include would exhibit this bug, just as a custom-installed
|
||||
pcre/clucene in another root would.
|
||||
|
||||
qt-bugs@ issue : 199610
|
||||
Trolltech task ID :
|
||||
bugs.kde.org number :
|
||||
---
|
||||
configure | 8 ++++++++
|
||||
1 files changed, 8 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 2c108ad..610a201 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do
|
||||
VAL=`echo $1 | sed 's,-D,,'`
|
||||
fi
|
||||
;;
|
||||
+ -isystem)
|
||||
+ VAR="add_isystempath"
|
||||
+ shift
|
||||
+ VAL="$1"
|
||||
+ ;;
|
||||
-I?*|-I)
|
||||
VAR="add_ipath"
|
||||
if [ "$1" = "-I" ]; then
|
||||
@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do
|
||||
add_ipath)
|
||||
I_FLAGS="$I_FLAGS -I\"${VAL}\""
|
||||
;;
|
||||
+ add_isystempath)
|
||||
+ I_FLAGS="$I_FLAGS -isystem \"${VAL}\""
|
||||
+ ;;
|
||||
add_lpath)
|
||||
L_FLAGS="$L_FLAGS -L\"${VAL}\""
|
||||
;;
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Knight <robertknight@gmail.com>
|
||||
Date: Sun, 20 Apr 2008 16:28:31 +0200
|
||||
Subject: [PATCH 05/13] When tabs are inserted or removed in a QTabBar,
|
||||
QTabBarPrivate::refresh() is called to update the layout. If the
|
||||
tabbar widget is hidden, this just sets a boolean variable
|
||||
(layoutDirty) and returns, so the parent widget's layout is not
|
||||
notified about the possible geometry change.
|
||||
|
||||
Prior to Qt 4.4 this was not a problem because the geometry was
|
||||
recalculated in QTabBar::sizeHint() if the layoutDirty variable was
|
||||
set. In Qt 4.4 however the layout caches size hint information in
|
||||
QWidgetItemV2. Since the cache information is not invalidated, the
|
||||
layout may end up using out-of-date size hint information to compute
|
||||
the widget size.
|
||||
|
||||
If the QTabBar is empty when QTabBar::sizeHint() is called, it will
|
||||
return a size with a height of 0, which will be kept in the cache and
|
||||
so the tab bar will never be shown.
|
||||
|
||||
This patch fixes the problem by calling updateGeometry() whenever the
|
||||
tab bar's layout is refreshed.
|
||||
|
||||
qt-bugs@ issue : 208185
|
||||
Trolltech task ID : 208349
|
||||
bugs.kde.org number : 159014
|
||||
---
|
||||
src/gui/widgets/qtabbar.cpp | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
|
||||
index 419d456..41107a0 100644
|
||||
--- a/src/gui/widgets/qtabbar.cpp
|
||||
+++ b/src/gui/widgets/qtabbar.cpp
|
||||
@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh()
|
||||
layoutTabs();
|
||||
makeVisible(currentIndex);
|
||||
q->update();
|
||||
- q->updateGeometry();
|
||||
}
|
||||
+ q->updateGeometry();
|
||||
}
|
||||
|
||||
/*!
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
From 8e28e0603a900e1b18ebfd14c4f87b16dabf4cf6 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
||||
Date: Fri, 19 Sep 2008 17:41:26 +0200
|
||||
Subject: [PATCH 06/13] Fix configure.exe to do an out-of-source build on windows
|
||||
|
||||
qt-bugs@ issue : N227213
|
||||
Trolltech task ID : none yet
|
||||
---
|
||||
bin/syncqt | 6 +++++-
|
||||
projects.pro | 3 +++
|
||||
src/tools/moc/main.cpp | 6 ++++++
|
||||
3 files changed, 14 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/bin/syncqt b/bin/syncqt
|
||||
index 7a9f1d3..b5a8e1c 100755
|
||||
--- a/bin/syncqt
|
||||
+++ b/bin/syncqt
|
||||
@@ -365,9 +365,13 @@ sub fixPaths {
|
||||
$match_dir = $tmp;
|
||||
$i = $slash;
|
||||
}
|
||||
+ my $cnt_ofs = 0;
|
||||
+ if($match_dir =~ /^[a-zA-Z]:$/) {
|
||||
+ $cnt_ofs = 1;
|
||||
+ }
|
||||
if($match_dir) {
|
||||
my $after = substr($dir, length($match_dir));
|
||||
- my $count = ($after =~ tr,/,,);
|
||||
+ my $count = ($after =~ tr,/,,) - $cnt_ofs;
|
||||
my $dots = "";
|
||||
for(my $i = 0; $i < $count; $i++) {
|
||||
$dots .= "../";
|
||||
diff --git a/projects.pro b/projects.pro
|
||||
index 2596c0a..3ba0688 100644
|
||||
--- a/projects.pro
|
||||
+++ b/projects.pro
|
||||
@@ -127,6 +127,9 @@ unix {
|
||||
DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
|
||||
mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
|
||||
}
|
||||
+win32 {
|
||||
+ mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
|
||||
+}
|
||||
INSTALLS += mkspecs
|
||||
|
||||
false:macx { #mac install location
|
||||
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
|
||||
index d519b09..7979836 100644
|
||||
--- a/src/tools/moc/main.cpp
|
||||
+++ b/src/tools/moc/main.cpp
|
||||
@@ -94,7 +94,13 @@ static QByteArray combinePath(const char *infile, const char *outfile)
|
||||
inSplitted.prepend(QLatin1String(".."));
|
||||
}
|
||||
inSplitted.append(inFileInfo.fileName());
|
||||
+#ifdef Q_WS_WIN
|
||||
+ const QString rel = inSplitted.join(QLatin1String("/"));
|
||||
+ const QString abs = inFileInfo.absoluteFilePath();
|
||||
+ return QFile::encodeName(rel.length() < abs.length() ? rel : abs);
|
||||
+#else
|
||||
return QFile::encodeName(inSplitted.join(QLatin1String("/")));
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
From 0afcf33127c6ccbe5dfaae4f4c5e02f28dc10ae1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
||||
Date: Thu, 8 May 2008 21:25:49 +0200
|
||||
Subject: [PATCH 07/13] When using qmake outside qt src tree, it sometimes generates wrong
|
||||
paths (wrong path separator)
|
||||
|
||||
qt-bugs@ issue : none
|
||||
Trolltech task ID : 214661
|
||||
---
|
||||
qmake/property.cpp | 29 ++++++++++++++++-------------
|
||||
1 files changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/qmake/property.cpp b/qmake/property.cpp
|
||||
index 8ba89f9..dd78349 100644
|
||||
--- a/qmake/property.cpp
|
||||
+++ b/qmake/property.cpp
|
||||
@@ -81,29 +81,32 @@ QMakeProperty::keyBase(bool version) const
|
||||
QString
|
||||
QMakeProperty::value(QString v, bool just_check)
|
||||
{
|
||||
+ QString ret;
|
||||
if(v == "QT_INSTALL_PREFIX")
|
||||
- return QLibraryInfo::location(QLibraryInfo::PrefixPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::PrefixPath);
|
||||
else if(v == "QT_INSTALL_DATA")
|
||||
- return QLibraryInfo::location(QLibraryInfo::DataPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::DataPath);
|
||||
else if(v == "QT_INSTALL_DOCS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::DocumentationPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
|
||||
else if(v == "QT_INSTALL_HEADERS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::HeadersPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::HeadersPath);
|
||||
else if(v == "QT_INSTALL_LIBS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::LibrariesPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::LibrariesPath);
|
||||
else if(v == "QT_INSTALL_BINS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::BinariesPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::BinariesPath);
|
||||
else if(v == "QT_INSTALL_PLUGINS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::PluginsPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::PluginsPath);
|
||||
else if(v == "QT_INSTALL_TRANSLATIONS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
|
||||
else if(v == "QT_INSTALL_CONFIGURATION")
|
||||
- return QLibraryInfo::location(QLibraryInfo::SettingsPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::SettingsPath);
|
||||
else if(v == "QT_INSTALL_EXAMPLES")
|
||||
- return QLibraryInfo::location(QLibraryInfo::ExamplesPath);
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::ExamplesPath);
|
||||
else if(v == "QT_INSTALL_DEMOS")
|
||||
- return QLibraryInfo::location(QLibraryInfo::DemosPath);
|
||||
- else if(v == "QMAKE_MKSPECS")
|
||||
+ ret = QLibraryInfo::location(QLibraryInfo::DemosPath);
|
||||
+ if(!ret.isEmpty())
|
||||
+ return QDir::toNativeSeparators(ret);
|
||||
+ if(v == "QMAKE_MKSPECS")
|
||||
return qmake_mkspec_paths().join(Option::target_mode == Option::TARG_WIN_MODE ? ";" : ":");
|
||||
else if(v == "QMAKE_VERSION")
|
||||
return qmake_version();
|
||||
@@ -116,7 +119,7 @@ QMakeProperty::value(QString v, bool just_check)
|
||||
int slash = v.lastIndexOf('/');
|
||||
QVariant var = settings->value(keyBase(slash == -1) + v);
|
||||
bool ok = var.isValid();
|
||||
- QString ret = var.toString();
|
||||
+ ret = var.toString();
|
||||
if(!ok) {
|
||||
QString version = qmake_version();
|
||||
if(slash != -1) {
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
From 8731ab999b849dac4716e3d29f5f55ed8e56438e Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@nokia.com>
|
||||
Date: Thu, 25 Jun 2009 13:50:29 +0200
|
||||
Subject: [PATCH 08/13] This patch makes the raster graphics system use shared images instead
|
||||
of shared pixmaps.
|
||||
|
||||
Shared memory pixmaps are deprecated since they are slower than shared
|
||||
images with modern graphics hardware. They are also not supported by EXA
|
||||
drivers and can be disabled in the latest version of the NVidia driver.
|
||||
|
||||
qt-bugs@ issue : none
|
||||
Qt Software task ID : none
|
||||
bugs.kde.org number : none
|
||||
---
|
||||
src/gui/image/qnativeimage.cpp | 10 ----------
|
||||
src/gui/image/qnativeimage_p.h | 1 -
|
||||
src/gui/painting/qwindowsurface_raster.cpp | 13 ++++++++++---
|
||||
3 files changed, 10 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
|
||||
index 3745708..3c21fce 100644
|
||||
--- a/src/gui/image/qnativeimage.cpp
|
||||
+++ b/src/gui/image/qnativeimage.cpp
|
||||
@@ -147,7 +147,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
|
||||
{
|
||||
if (!X11->use_mitshm) {
|
||||
xshmimg = 0;
|
||||
- xshmpm = 0;
|
||||
image = QImage(width, height, format);
|
||||
return;
|
||||
}
|
||||
@@ -191,11 +190,6 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /*
|
||||
shmctl(xshminfo.shmid, IPC_RMID, 0);
|
||||
return;
|
||||
}
|
||||
- xshmpm = XShmCreatePixmap(X11->display, DefaultRootWindow(X11->display), xshmimg->data,
|
||||
- &xshminfo, width, height, dd);
|
||||
- if (!xshmpm) {
|
||||
- qWarning() << "QNativeImage: Unable to create shared Pixmap.";
|
||||
- }
|
||||
}
|
||||
|
||||
|
||||
@@ -204,10 +198,6 @@ QNativeImage::~QNativeImage()
|
||||
if (!xshmimg)
|
||||
return;
|
||||
|
||||
- if (xshmpm) {
|
||||
- XFreePixmap(X11->display, xshmpm);
|
||||
- xshmpm = 0;
|
||||
- }
|
||||
XShmDetach(X11->display, &xshminfo);
|
||||
xshmimg->data = 0;
|
||||
XDestroyImage(xshmimg);
|
||||
diff --git a/src/gui/image/qnativeimage_p.h b/src/gui/image/qnativeimage_p.h
|
||||
index 07d5dfe..ba01854 100644
|
||||
--- a/src/gui/image/qnativeimage_p.h
|
||||
+++ b/src/gui/image/qnativeimage_p.h
|
||||
@@ -90,7 +90,6 @@ public:
|
||||
|
||||
#elif defined(Q_WS_X11) && !defined(QT_NO_MITSHM)
|
||||
XImage *xshmimg;
|
||||
- Pixmap xshmpm;
|
||||
XShmSegmentInfo xshminfo;
|
||||
|
||||
#elif defined(Q_WS_MAC)
|
||||
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
|
||||
index d6fb03b..09963d9 100644
|
||||
--- a/src/gui/painting/qwindowsurface_raster.cpp
|
||||
+++ b/src/gui/painting/qwindowsurface_raster.cpp
|
||||
@@ -220,9 +220,16 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi
|
||||
|
||||
QRect br = rgn.boundingRect().translated(offset);
|
||||
#ifndef QT_NO_MITSHM
|
||||
- if (d_ptr->image->xshmpm) {
|
||||
- XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc,
|
||||
- br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y());
|
||||
+ if (d_ptr->image->xshmimg && (br.width() * br.height() > 65536)) {
|
||||
+ const QImage &src = d->image->image;
|
||||
+ br = br.intersected(src.rect());
|
||||
+ // Hack to make sure we satisify the PutImage() constraints in the X server,
|
||||
+ // since the doShmPutImage() route currently forces a migration to system ram.
|
||||
+ wbr.setX(wbr.x() - br.x());
|
||||
+ br.setX(0);
|
||||
+ br.setWidth(src.width());
|
||||
+ XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg,
|
||||
+ br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False);
|
||||
XSync(X11->display, False);
|
||||
} else
|
||||
#endif
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From bb8255da422470c5012b6b1c4c24eb2afb6804dc Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@nokia.com>
|
||||
Date: Fri, 26 Jun 2009 11:41:45 +0200
|
||||
Subject: [PATCH 09/13] Restore a section of the file that got removed due to conflict resolution.
|
||||
|
||||
Thanks to Kevin Kofler for pointing this out
|
||||
---
|
||||
src/gui/kernel/qapplication_x11.cpp | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
|
||||
index 33aec9e..53f020b 100644
|
||||
--- a/src/gui/kernel/qapplication_x11.cpp
|
||||
+++ b/src/gui/kernel/qapplication_x11.cpp
|
||||
@@ -1955,9 +1955,9 @@ void qt_init(QApplicationPrivate *priv, int,
|
||||
bool local = displayName.isEmpty() || displayName.lastIndexOf(QLatin1Char(':')) == 0;
|
||||
if (local && (qgetenv("QT_X11_NO_MITSHM").toInt() == 0)) {
|
||||
Visual *defaultVisual = DefaultVisual(X11->display, DefaultScreen(X11->display));
|
||||
- X11->use_mitshm = mitshm_pixmaps && (defaultVisual->red_mask == 0xff0000
|
||||
- && defaultVisual->green_mask == 0xff00
|
||||
- && defaultVisual->blue_mask == 0xff);
|
||||
+ X11->use_mitshm = defaultVisual->red_mask == 0xff0000
|
||||
+ && defaultVisual->green_mask == 0xff00
|
||||
+ && defaultVisual->blue_mask == 0xff;
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_MITSHM
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
From 9eb3560cfd5cd0bc9c7bf79f2c27657ee07b8f95 Mon Sep 17 00:00:00 2001
|
||||
From: Albert Astals Cid <aacid@kde.org>
|
||||
Date: Sat, 8 Aug 2009 14:40:25 +0200
|
||||
Subject: [PATCH 12/13] Add context to tr calls in QShortcut
|
||||
|
||||
Some languages have special rules for using "+" to concatenate strings and
|
||||
for example it needs to be Ctrl + Shift instead of Ctrl+Shift, adding
|
||||
context to these strings helps creating a more correct translation
|
||||
---
|
||||
src/gui/kernel/qkeysequence.cpp | 20 ++++++++++----------
|
||||
1 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp
|
||||
index 894f663..c17f253 100644
|
||||
--- a/src/gui/kernel/qkeysequence.cpp
|
||||
+++ b/src/gui/kernel/qkeysequence.cpp
|
||||
@@ -991,10 +991,10 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence
|
||||
|
||||
QList<QModifKeyName> modifs;
|
||||
if (nativeText) {
|
||||
- modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl").toLower().append(QLatin1Char('+')))
|
||||
- << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift").toLower().append(QLatin1Char('+')))
|
||||
- << QModifKeyName(Qt::ALT, QShortcut::tr("Alt").toLower().append(QLatin1Char('+')))
|
||||
- << QModifKeyName(Qt::META, QShortcut::tr("Meta").toLower().append(QLatin1Char('+')));
|
||||
+ modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts").toLower().append(QLatin1Char('+')))
|
||||
+ << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift", "Shift key, used for shortcuts").toLower().append(QLatin1Char('+')))
|
||||
+ << QModifKeyName(Qt::ALT, QShortcut::tr("Alt", "Alt key, used for shortcuts").toLower().append(QLatin1Char('+')))
|
||||
+ << QModifKeyName(Qt::META, QShortcut::tr("Meta", "Meta key, used for shortcuts").toLower().append(QLatin1Char('+')));
|
||||
}
|
||||
modifs += *gmodifs; // Test non-translated ones last
|
||||
|
||||
@@ -1086,7 +1086,7 @@ QString QKeySequence::encodeString(int key)
|
||||
static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format)
|
||||
{
|
||||
if (!str.isEmpty())
|
||||
- str += (format == QKeySequence::NativeText) ? QShortcut::tr("+")
|
||||
+ str += (format == QKeySequence::NativeText) ? QShortcut::tr("+", "Symbol used to concatenate keys in shortcuts")
|
||||
: QString::fromLatin1("+");
|
||||
str += theKey;
|
||||
}
|
||||
@@ -1111,13 +1111,13 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
|
||||
{
|
||||
// On other systems the order is Meta, Control, Alt, Shift
|
||||
if ((key & Qt::META) == Qt::META)
|
||||
- s = nativeText ? QShortcut::tr("Meta") : QString::fromLatin1("Meta");
|
||||
+ s = nativeText ? QShortcut::tr("Meta", "Meta key, used for shortcuts") : QString::fromLatin1("Meta");
|
||||
if ((key & Qt::CTRL) == Qt::CTRL)
|
||||
- addKey(s, nativeText ? QShortcut::tr("Ctrl") : QString::fromLatin1("Ctrl"), format);
|
||||
+ addKey(s, nativeText ? QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts") : QString::fromLatin1("Ctrl"), format);
|
||||
if ((key & Qt::ALT) == Qt::ALT)
|
||||
- addKey(s, nativeText ? QShortcut::tr("Alt") : QString::fromLatin1("Alt"), format);
|
||||
+ addKey(s, nativeText ? QShortcut::tr("Alt", "Alt key, used for shortcuts") : QString::fromLatin1("Alt"), format);
|
||||
if ((key & Qt::SHIFT) == Qt::SHIFT)
|
||||
- addKey(s, nativeText ? QShortcut::tr("Shift") : QString::fromLatin1("Shift"), format);
|
||||
+ addKey(s, nativeText ? QShortcut::tr("Shift", "Shift key, used for shortcuts") : QString::fromLatin1("Shift"), format);
|
||||
}
|
||||
|
||||
|
||||
@@ -1132,7 +1132,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat
|
||||
p += QChar((key-0x10000)%400+0xdc00);
|
||||
}
|
||||
} else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) {
|
||||
- p = nativeText ? QShortcut::tr("F%1").arg(key - Qt::Key_F1 + 1)
|
||||
+ p = nativeText ? QShortcut::tr("F%1", "Fx key, used for shortcuts").arg(key - Qt::Key_F1 + 1)
|
||||
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
|
||||
} else if (key) {
|
||||
int i=0;
|
||||
--
|
||||
1.6.5.1
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
qt-bugs@ issue : 38642
|
||||
bugs.kde.org number : 71084
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Hello,
|
||||
|
||||
start Mozilla, go e.g. to http://kde.org, start KWrite (or basically any Qt
|
||||
app that accepts text drops), select 'Conquer your Desktop!', and try to
|
||||
drag&drop it onto KWrite. The only text pasted should be 'm'.
|
||||
|
||||
I don't know much the related mimetype and encoding stuff, so I'm unsure
|
||||
whose fault this actually is. The text drag is provided as a lot of
|
||||
text/something targets, to list some text/_moz_htmlinfo, text/x-moz-url,
|
||||
text/unicode and similar. The problem is, Kate uses QTextDrag::decode() with
|
||||
no subtype specified, probably with the intention that as Kate is a text
|
||||
editor, it can accept any text pasted. And since the first target provided by
|
||||
mozilla is text/x-moz-url, (which moreover seems to be encoded as 16bit
|
||||
unicode), the text dropped is completely wrong. You can easily see all
|
||||
targets provided by Mozilla with see_mime.patch applied.
|
||||
|
||||
Solution #1: Say that Kate (any pretty much everybody else expecting text)
|
||||
should say "plain" as the subtype. In such case, I suggest you drop the
|
||||
QTextDrag::decode() variant with no subtype specified, and stress more the
|
||||
fact that not specifying a subtype can result in a lot of rubbish. It's
|
||||
simply too tempting to leave the subtype empty and try to accept anything.
|
||||
|
||||
Solution #2: When trying to accept anything, try to get useful data. Which
|
||||
means either sorting the subtypes available somehow, checking only the ones
|
||||
Qt knows.
|
||||
|
||||
To me, #1 seems to be a better choice, or possibly at least something like
|
||||
the attached QTextDrag patch, which simply always tries first "plain" subtype
|
||||
if none is specified. With this patch, Mozilla even works (that's irony, of
|
||||
course, Mozilla still pastes the text/plain text as HTML, but at least now it
|
||||
pastes something where it's easy to point at the offender).
|
||||
|
||||
|
||||
--- src/kernel/qdragobject.cpp.sav 2004-01-06 19:24:35.000000000 +0100
|
||||
+++ src/kernel/qdragobject.cpp 2004-01-06 19:47:01.000000000 +0100
|
||||
@@ -844,6 +844,16 @@ bool QTextDrag::decode( const QMimeSourc
|
||||
{
|
||||
if(!e)
|
||||
return FALSE;
|
||||
+
|
||||
+ // when subtype is not specified, try text/plain first, otherwise this may read
|
||||
+ // things like text/x-moz-url even though better targets are available
|
||||
+ if( subtype.isNull()) {
|
||||
+ QCString subtmp = "plain";
|
||||
+ if( decode( e, str, subtmp )) {
|
||||
+ subtype = subtmp;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if ( e->cacheType == QMimeSource::Text ) {
|
||||
str = *e->cache.txt.str;
|
|
@ -1,25 +0,0 @@
|
|||
qt-bugs@ issue: N46882
|
||||
bugs.kde.org number: 77545
|
||||
applied: no
|
||||
author: Stephan Binner <binner@kde.org>
|
||||
|
||||
Fix wrong K menu width for the case of enabled side pixmap and a menu title
|
||||
(like "Recently Used Applications") being longer than every other entry.
|
||||
|
||||
Solution: Respect PanelKMenu::setMaximumSize() as up to Qt 3.2.3
|
||||
|
||||
Index: src/widgets/qpopupmenu.cpp
|
||||
===================================================================
|
||||
RCS file: /home/kde/qt-copy/src/widgets/qpopupmenu.cpp,v
|
||||
retrieving revision 1.60
|
||||
diff -u -3 -p -b -r1.60 qpopupmenu.cpp
|
||||
--- src/widgets/qpopupmenu.cpp 29 Apr 2004 22:31:28 -0000 1.60
|
||||
+++ src/widgets/qpopupmenu.cpp 30 Apr 2004 01:11:59 -0000
|
||||
@@ -2531,7 +2531,7 @@ QSize QPopupMenu::sizeHint() const
|
||||
|
||||
QPopupMenu* that = (QPopupMenu*) this;
|
||||
//We do not need a resize here, just the sizeHint..
|
||||
- return that->updateSize(FALSE, FALSE).expandedTo( QApplication::globalStrut() );
|
||||
+ return that->updateSize(FALSE).expandedTo( QApplication::globalStrut() );
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
qt-bugs@ issue : none, probably even won't be
|
||||
bugs.kde.org number : 80072
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
A crude hack for KDE #80072. No good idea how to fix it properly yet :(.
|
||||
|
||||
--- src/kernel/qclipboard_x11.cpp.sav 2004-04-30 12:00:06.000000000 +0200
|
||||
+++ src/kernel/qclipboard_x11.cpp 2004-05-09 21:18:10.269264304 +0200
|
||||
@@ -109,6 +109,7 @@ static int pending_timer_id = 0;
|
||||
static bool pending_clipboard_changed = FALSE;
|
||||
static bool pending_selection_changed = FALSE;
|
||||
|
||||
+Q_EXPORT bool qt_qclipboard_bailout_hack = false;
|
||||
|
||||
// event capture mechanism for qt_xclb_wait_for_event
|
||||
static bool waiting_for_data = FALSE;
|
||||
@@ -453,6 +454,15 @@ static int qt_xclb_event_filter(XEvent *
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static bool selection_request_pending = false;
|
||||
+
|
||||
+static Bool check_selection_request_pending( Display*, XEvent* e, XPointer )
|
||||
+ {
|
||||
+ if( e->type == SelectionRequest && e->xselectionrequest.owner == owner->winId())
|
||||
+ selection_request_pending = true;
|
||||
+ return False;
|
||||
+ }
|
||||
+
|
||||
bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
|
||||
int timeout )
|
||||
{
|
||||
@@ -504,6 +514,14 @@ bool qt_xclb_wait_for_event( Display *dp
|
||||
do {
|
||||
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
|
||||
return TRUE;
|
||||
+ if( qt_qclipboard_bailout_hack ) {
|
||||
+ XEvent dummy;
|
||||
+ selection_request_pending = false;
|
||||
+ if ( owner != NULL )
|
||||
+ XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
|
||||
+ if( selection_request_pending )
|
||||
+ return TRUE;
|
||||
+ }
|
||||
|
||||
now = QTime::currentTime();
|
||||
if ( started > now ) // crossed midnight
|
|
@ -1,21 +0,0 @@
|
|||
qt-bugs@ issue : 58251
|
||||
bugs.kde.org number : 84434
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Fixes keyboard input action in KHotKeys (see bug #84434).
|
||||
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2004-10-07 15:38:05.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2004-10-12 11:46:32.513137808 +0200
|
||||
@@ -5294,8 +5294,10 @@ static Bool qt_keypress_scanner(Display
|
||||
qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
|
||||
if (d->error ||
|
||||
event->xkey.window != d->window ||
|
||||
- event->xkey.keycode != d->keycode)
|
||||
+ event->xkey.keycode != d->keycode) {
|
||||
+ d->error = TRUE;
|
||||
return FALSE;
|
||||
+ }
|
||||
|
||||
if (event->type == XKeyPress) {
|
||||
d->error = (! d->release || event->xkey.time - d->timestamp > 10);
|
|
@ -1,113 +0,0 @@
|
|||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
Makes QPopupMenu aware of Xinerama (see e.g. https://bugzilla.novell.com/show_bug.cgi?id=216235).
|
||||
|
||||
|
||||
--- src/widgets/qpopupmenu.cpp
|
||||
+++ src/widgets/qpopupmenu.cpp
|
||||
@@ -454,6 +454,15 @@ void QPopupMenu::frameChanged()
|
||||
menuContentsChanged();
|
||||
}
|
||||
|
||||
+QRect QPopupMenu::screenRect( const QPoint& pos )
|
||||
+{
|
||||
+ int screen_num = QApplication::desktop()->screenNumber( pos );
|
||||
+#ifdef Q_WS_MAC
|
||||
+ return QApplication::desktop()->availableGeometry( screen_num );
|
||||
+#else
|
||||
+ return QApplication::desktop()->screenGeometry( screen_num );
|
||||
+#endif
|
||||
+}
|
||||
/*!
|
||||
Displays the popup menu so that the item number \a indexAtPoint
|
||||
will be at the specified \e global position \a pos. To translate a
|
||||
@@ -498,6 +507,15 @@ void QPopupMenu::popup( const QPoint &po
|
||||
// point.
|
||||
#endif
|
||||
|
||||
+ QRect screen = screenRect( geometry().center());
|
||||
+ QRect screen2 = screenRect( QApplication::reverseLayout()
|
||||
+ ? pos+QPoint(width(),0) : pos );
|
||||
+ // if the widget is not in the screen given by the position, move it
|
||||
+ // there, so that updateSize() uses the right size of the screen
|
||||
+ if( screen != screen2 ) {
|
||||
+ screen = screen2;
|
||||
+ move( screen.x(), screen.y());
|
||||
+ }
|
||||
if(d->scroll.scrollable) {
|
||||
d->scroll.scrollable = QPopupMenuPrivate::Scroll::ScrollNone;
|
||||
d->scroll.topScrollableIndex = d->scroll.scrollableSize = 0;
|
||||
@@ -517,18 +535,6 @@ void QPopupMenu::popup( const QPoint &po
|
||||
updateSize(TRUE);
|
||||
}
|
||||
|
||||
- int screen_num;
|
||||
- if (QApplication::desktop()->isVirtualDesktop())
|
||||
- screen_num =
|
||||
- QApplication::desktop()->screenNumber( QApplication::reverseLayout() ?
|
||||
- pos+QPoint(width(),0) : pos );
|
||||
- else
|
||||
- screen_num = QApplication::desktop()->screenNumber( this );
|
||||
-#ifdef Q_WS_MAC
|
||||
- QRect screen = QApplication::desktop()->availableGeometry( screen_num );
|
||||
-#else
|
||||
- QRect screen = QApplication::desktop()->screenGeometry( screen_num );
|
||||
-#endif
|
||||
int sw = screen.width(); // screen width
|
||||
int sh = screen.height(); // screen height
|
||||
int sx = screen.x(); // screen pos
|
||||
@@ -1056,7 +1062,7 @@ QSize QPopupMenu::updateSize(bool force_
|
||||
mi->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4 );
|
||||
}
|
||||
|
||||
- int dh = QApplication::desktop()->height();
|
||||
+ int dh = screenRect( geometry().center()).height();
|
||||
ncols = 1;
|
||||
|
||||
for ( QMenuItemListIt it2( *mitems ); it2.current(); ++it2 ) {
|
||||
@@ -2297,9 +2303,9 @@ void QPopupMenu::subMenuTimer() {
|
||||
bool right = FALSE;
|
||||
if ( ( parentMenu && parentMenu->isPopupMenu &&
|
||||
((QPopupMenu*)parentMenu)->geometry().x() < geometry().x() ) ||
|
||||
- p.x() < 0 )
|
||||
+ p.x() < screenRect( p ).left())
|
||||
right = TRUE;
|
||||
- if ( right && (ps.width() > QApplication::desktop()->width() - mapToGlobal( r.topRight() ).x() ) )
|
||||
+ if ( right && (ps.width() > screenRect( p ).right() - mapToGlobal( r.topRight() ).x() ) )
|
||||
right = FALSE;
|
||||
if ( right )
|
||||
p.setX( mapToGlobal( r.topRight() ).x() );
|
||||
@@ -2310,7 +2316,7 @@ void QPopupMenu::subMenuTimer() {
|
||||
bool left = FALSE;
|
||||
if ( ( parentMenu && parentMenu->isPopupMenu &&
|
||||
((QPopupMenu*)parentMenu)->geometry().x() > geometry().x() ) ||
|
||||
- p.x() + ps.width() > QApplication::desktop()->width() )
|
||||
+ p.x() + ps.width() > screenRect( p ).right() )
|
||||
left = TRUE;
|
||||
if ( left && (ps.width() > mapToGlobal( r.topLeft() ).x() ) )
|
||||
left = FALSE;
|
||||
@@ -2318,8 +2324,8 @@ void QPopupMenu::subMenuTimer() {
|
||||
p.setX( mapToGlobal( r.topLeft() ).x() - ps.width() );
|
||||
}
|
||||
QRect pr = popup->itemGeometry(popup->count() - 1);
|
||||
- if (p.y() + ps.height() > QApplication::desktop()->height() &&
|
||||
- p.y() - ps.height() + (QCOORD) pr.height() >= 0)
|
||||
+ if (p.y() + ps.height() > screenRect( p ).bottom() &&
|
||||
+ p.y() - ps.height() + (QCOORD) pr.height() >= screenRect( p ).top())
|
||||
p.setY( p.y() - ps.height() + (QCOORD) pr.height());
|
||||
|
||||
if ( style().styleHint(QStyle::SH_PopupMenu_SloppySubMenus, this )) {
|
||||
Index: src/widgets/qpopupmenu.h
|
||||
===================================================================
|
||||
--- src/widgets/qpopupmenu.h (revision 636368)
|
||||
+++ src/widgets/qpopupmenu.h (working copy)
|
||||
@@ -152,6 +152,7 @@ private:
|
||||
|
||||
QSize updateSize(bool force_recalc=FALSE, bool do_resize=TRUE);
|
||||
void updateRow( int row );
|
||||
+ QRect screenRect(const QPoint& pos);
|
||||
#ifndef QT_NO_ACCEL
|
||||
void updateAccel( QWidget * );
|
||||
void enableAccel( bool );
|
|
@ -1,19 +0,0 @@
|
|||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: from trolltech
|
||||
|
||||
Fixes a regression in QProgress::writeToStdin()
|
||||
|
||||
|
||||
--- src/kernel/qprocess.cpp
|
||||
+++ src/kernel/qprocess.cpp
|
||||
@@ -727,7 +727,7 @@ void QProcess::closeStdinLaunch()
|
||||
void QProcess::writeToStdin( const QString& buf )
|
||||
{
|
||||
QByteArray tmp = buf.local8Bit();
|
||||
- tmp.resize( tmp.size() - 1 ); // drop the implicit \0
|
||||
+ tmp.resize( qstrlen( tmp.data() ) );
|
||||
writeToStdin( tmp );
|
||||
}
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
qt-bugs@ issue : N154454
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Dirk Mueller <mueller@kde.org>
|
||||
|
||||
This patch makes the utf8 decoders in Qt reject overlong
|
||||
sequences, like required.
|
||||
|
||||
--- src/codecs/qutfcodec.cpp
|
||||
+++ src/codecs/qutfcodec.cpp
|
||||
@@ -154,6 +154,7 @@
|
||||
|
||||
class QUtf8Decoder : public QTextDecoder {
|
||||
uint uc;
|
||||
+ uint min_uc;
|
||||
int need;
|
||||
bool headerDone;
|
||||
public:
|
||||
@@ -167,8 +168,9 @@
|
||||
result.setLength( len ); // worst case
|
||||
QChar *qch = (QChar *)result.unicode();
|
||||
uchar ch;
|
||||
+ int error = -1;
|
||||
for (int i=0; i<len; i++) {
|
||||
- ch = *chars++;
|
||||
+ ch = chars[i];
|
||||
if (need) {
|
||||
if ( (ch&0xc0) == 0x80 ) {
|
||||
uc = (uc << 6) | (ch & 0x3f);
|
||||
@@ -182,6 +184,8 @@
|
||||
*qch++ = QChar(high);
|
||||
*qch++ = QChar(low);
|
||||
headerDone = TRUE;
|
||||
+ } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
|
||||
+ *qch++ = QChar::replacement;
|
||||
} else {
|
||||
if (headerDone || QChar(uc) != QChar::byteOrderMark)
|
||||
*qch++ = uc;
|
||||
@@ -190,6 +194,7 @@
|
||||
}
|
||||
} else {
|
||||
// error
|
||||
+ i = error;
|
||||
*qch++ = QChar::replacement;
|
||||
need = 0;
|
||||
}
|
||||
@@ -200,12 +205,21 @@
|
||||
} else if ((ch & 0xe0) == 0xc0) {
|
||||
uc = ch & 0x1f;
|
||||
need = 1;
|
||||
+ error = i;
|
||||
+ min_uc = 0x80;
|
||||
} else if ((ch & 0xf0) == 0xe0) {
|
||||
uc = ch & 0x0f;
|
||||
need = 2;
|
||||
+ error = i;
|
||||
+ min_uc = 0x800;
|
||||
} else if ((ch&0xf8) == 0xf0) {
|
||||
uc = ch & 0x07;
|
||||
need = 3;
|
||||
+ error = i;
|
||||
+ min_uc = 0x10000;
|
||||
+ } else {
|
||||
+ // error
|
||||
+ *qch++ = QChar::replacement;
|
||||
}
|
||||
}
|
||||
}
|
||||
--- src/tools/qstring.cpp
|
||||
+++ src/tools/qstring.cpp
|
||||
@@ -5805,6 +5805,7 @@
|
||||
result.setLength( len ); // worst case
|
||||
QChar *qch = (QChar *)result.unicode();
|
||||
uint uc = 0;
|
||||
+ uint min_uc = 0;
|
||||
int need = 0;
|
||||
int error = -1;
|
||||
uchar ch;
|
||||
@@ -5822,6 +5823,12 @@
|
||||
unsigned short low = uc%0x400 + 0xdc00;
|
||||
*qch++ = QChar(high);
|
||||
*qch++ = QChar(low);
|
||||
+ } else if (uc < min_uc || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
|
||||
+ // overlong seqence, UTF16 surrogate or BOM
|
||||
+ i = error;
|
||||
+ qch = addOne(qch, result);
|
||||
+ *qch++ = QChar(0xdbff);
|
||||
+ *qch++ = QChar(0xde00+((uchar)utf8[i]));
|
||||
} else {
|
||||
*qch++ = uc;
|
||||
}
|
||||
@@ -5844,14 +5851,17 @@
|
||||
uc = ch & 0x1f;
|
||||
need = 1;
|
||||
error = i;
|
||||
+ min_uc = 0x80;
|
||||
} else if ((ch & 0xf0) == 0xe0) {
|
||||
uc = ch & 0x0f;
|
||||
need = 2;
|
||||
error = i;
|
||||
+ min_uc = 0x800;
|
||||
} else if ((ch&0xf8) == 0xf0) {
|
||||
uc = ch & 0x07;
|
||||
need = 3;
|
||||
error = i;
|
||||
+ min_uc = 0x10000;
|
||||
} else {
|
||||
// Error
|
||||
qch = addOne(qch, result);
|
|
@ -1,424 +0,0 @@
|
|||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
This patch adds support for window types used for compositing (popup menu, dropdown menu,
|
||||
tooltip, combobox, dnd).
|
||||
|
||||
--- src/kernel/qdnd_x11.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qdnd_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -261,6 +261,7 @@ public:
|
||||
QWidget(QApplication::desktop()->screen( screen ),
|
||||
0, WStyle_Customize | WStyle_Tool | WStyle_NoBorder | WX11BypassWM ), oldpmser( 0 ), oldbmser( 0 )
|
||||
{
|
||||
+ x11SetWindowType( X11WindowTypeDND );
|
||||
}
|
||||
|
||||
void setPixmap(QPixmap pm, QPoint hot)
|
||||
@@ -1221,6 +1222,7 @@ void QDragManager::move( const QPoint &
|
||||
// recreate the pixmap on the new screen...
|
||||
delete qt_xdnd_deco;
|
||||
qt_xdnd_deco = new QShapedPixmapWidget( screen );
|
||||
+ qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
|
||||
if (!QWidget::mouseGrabber()) {
|
||||
updatePixmap();
|
||||
qt_xdnd_deco->grabMouse();
|
||||
@@ -1774,6 +1776,7 @@ bool QDragManager::drag( QDragObject * o
|
||||
|
||||
dragSource = (QWidget *)(object->parent());
|
||||
|
||||
+ qt_xdnd_deco->x11SetWindowTransient( dragSource->topLevelWidget());
|
||||
qApp->installEventFilter( this );
|
||||
qt_xdnd_source_current_time = qt_x_time;
|
||||
XSetSelectionOwner( QPaintDevice::x11AppDisplay(), qt_xdnd_selection,
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2007-05-29 16:24:58.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -268,6 +268,11 @@ Atom qt_net_wm_window_type_menu = 0;
|
||||
Atom qt_net_wm_window_type_utility = 0;
|
||||
Atom qt_net_wm_window_type_splash = 0;
|
||||
Atom qt_net_wm_window_type_override = 0; // KDE extension
|
||||
+Atom qt_net_wm_window_type_dropdown_menu = 0;
|
||||
+Atom qt_net_wm_window_type_popup_menu = 0;
|
||||
+Atom qt_net_wm_window_type_tooltip = 0;
|
||||
+Atom qt_net_wm_window_type_combo = 0;
|
||||
+Atom qt_net_wm_window_type_dnd = 0;
|
||||
Atom qt_net_wm_frame_strut = 0; // KDE extension
|
||||
Atom qt_net_wm_state_stays_on_top = 0; // KDE extension
|
||||
Atom qt_net_wm_pid = 0;
|
||||
@@ -1920,6 +1925,11 @@ void qt_init_internal( int *argcptr, cha
|
||||
qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_UTILITY", &qt_net_wm_window_type_utility );
|
||||
qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_SPLASH", &qt_net_wm_window_type_splash );
|
||||
qt_x11_intern_atom( "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE", &qt_net_wm_window_type_override );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU", &qt_net_wm_window_type_dropdown_menu );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_POPUP_MENU", &qt_net_wm_window_type_popup_menu );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_TOOLTIP", &qt_net_wm_window_type_tooltip );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_COMBO", &qt_net_wm_window_type_combo );
|
||||
+ qt_x11_intern_atom( "_NET_WM_WINDOW_TYPE_DND", &qt_net_wm_window_type_dnd );
|
||||
qt_x11_intern_atom( "_KDE_NET_WM_FRAME_STRUT", &qt_net_wm_frame_strut );
|
||||
qt_x11_intern_atom( "_NET_WM_STATE_STAYS_ON_TOP",
|
||||
&qt_net_wm_state_stays_on_top );
|
||||
--- src/kernel/qwidget_x11.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qwidget_x11.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -125,6 +125,11 @@ extern Atom qt_net_wm_window_type_menu;
|
||||
extern Atom qt_net_wm_window_type_utility;
|
||||
extern Atom qt_net_wm_window_type_splash;
|
||||
extern Atom qt_net_wm_window_type_override;
|
||||
+extern Atom qt_net_wm_window_type_dropdown_menu;
|
||||
+extern Atom qt_net_wm_window_type_popup_menu;
|
||||
+extern Atom qt_net_wm_window_type_combo;
|
||||
+extern Atom qt_net_wm_window_type_dnd;
|
||||
+extern Atom qt_net_wm_window_type_tooltip;
|
||||
extern Atom qt_net_wm_pid;
|
||||
extern Atom qt_net_wm_user_time;
|
||||
extern Atom qt_enlightenment_desktop;
|
||||
@@ -448,10 +453,6 @@ void QWidget::create( WId window, bool i
|
||||
x11Colormap() );
|
||||
#endif // QT_NO_XFTFREETYPE
|
||||
|
||||
- // NET window types
|
||||
- long net_wintypes[7] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
- int curr_wintype = 0;
|
||||
-
|
||||
// NET window states
|
||||
long net_winstates[6] = { 0, 0, 0, 0, 0, 0 };
|
||||
int curr_winstate = 0;
|
||||
@@ -473,7 +474,6 @@ void QWidget::create( WId window, bool i
|
||||
if ( testWFlags(WStyle_Splash) ) {
|
||||
if (qt_net_supports(qt_net_wm_window_type_splash)) {
|
||||
clearWFlags( WX11BypassWM );
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash;
|
||||
} else {
|
||||
setWFlags( WX11BypassWM | WStyle_Tool | WStyle_NoBorder );
|
||||
}
|
||||
@@ -482,27 +482,22 @@ void QWidget::create( WId window, bool i
|
||||
mwmhints.decorations = 0L;
|
||||
mwmhints.flags |= (1L << 1); // MWM_HINTS_DECORATIONS
|
||||
|
||||
- if ( testWFlags( WStyle_NoBorder ) ) {
|
||||
- // override netwm type - quick and easy for KDE noborder
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_override;
|
||||
- } else {
|
||||
- if ( testWFlags( WStyle_NormalBorder | WStyle_DialogBorder ) ) {
|
||||
- mwmhints.decorations |= (1L << 1); // MWM_DECOR_BORDER
|
||||
- mwmhints.decorations |= (1L << 2); // MWM_DECOR_RESIZEH
|
||||
- }
|
||||
+ if ( testWFlags( WStyle_NormalBorder | WStyle_DialogBorder ) ) {
|
||||
+ mwmhints.decorations |= (1L << 1); // MWM_DECOR_BORDER
|
||||
+ mwmhints.decorations |= (1L << 2); // MWM_DECOR_RESIZEH
|
||||
+ }
|
||||
|
||||
- if ( testWFlags( WStyle_Title ) )
|
||||
- mwmhints.decorations |= (1L << 3); // MWM_DECOR_TITLE
|
||||
+ if ( testWFlags( WStyle_Title ) )
|
||||
+ mwmhints.decorations |= (1L << 3); // MWM_DECOR_TITLE
|
||||
|
||||
- if ( testWFlags( WStyle_SysMenu ) )
|
||||
- mwmhints.decorations |= (1L << 4); // MWM_DECOR_MENU
|
||||
+ if ( testWFlags( WStyle_SysMenu ) )
|
||||
+ mwmhints.decorations |= (1L << 4); // MWM_DECOR_MENU
|
||||
|
||||
- if ( testWFlags( WStyle_Minimize ) )
|
||||
- mwmhints.decorations |= (1L << 5); // MWM_DECOR_MINIMIZE
|
||||
+ if ( testWFlags( WStyle_Minimize ) )
|
||||
+ mwmhints.decorations |= (1L << 5); // MWM_DECOR_MINIMIZE
|
||||
|
||||
- if ( testWFlags( WStyle_Maximize ) )
|
||||
- mwmhints.decorations |= (1L << 6); // MWM_DECOR_MAXIMIZE
|
||||
- }
|
||||
+ if ( testWFlags( WStyle_Maximize ) )
|
||||
+ mwmhints.decorations |= (1L << 6); // MWM_DECOR_MAXIMIZE
|
||||
|
||||
if (testWFlags(WStyle_Tool)) {
|
||||
wsa.save_under = True;
|
||||
@@ -522,23 +517,6 @@ void QWidget::create( WId window, bool i
|
||||
}
|
||||
}
|
||||
|
||||
- // ### need a better way to do this
|
||||
- if (inherits("QPopupMenu")) {
|
||||
- // menu netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu;
|
||||
- } else if (inherits("QToolBar")) {
|
||||
- // toolbar netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar;
|
||||
- } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) {
|
||||
- // utility netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility;
|
||||
- }
|
||||
-
|
||||
- if (dialog) // dialog netwm type
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog;
|
||||
- // normal netwm type - default
|
||||
- net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal;
|
||||
-
|
||||
// stays on top
|
||||
if (testWFlags(WStyle_StaysOnTop)) {
|
||||
net_winstates[curr_winstate++] = qt_net_wm_state_above;
|
||||
@@ -573,6 +551,7 @@ void QWidget::create( WId window, bool i
|
||||
wsa.save_under = True;
|
||||
XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder,
|
||||
&wsa );
|
||||
+ x11SetWindowType();
|
||||
} else if ( topLevel && !desktop ) { // top-level widget
|
||||
QWidget *p = parentWidget(); // real parent
|
||||
if (p)
|
||||
@@ -632,12 +611,7 @@ void QWidget::create( WId window, bool i
|
||||
else
|
||||
XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
|
||||
|
||||
- // set _NET_WM_WINDOW_TYPE
|
||||
- if (curr_wintype > 0)
|
||||
- XChangeProperty(dpy, id, qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace,
|
||||
- (unsigned char *) net_wintypes, curr_wintype);
|
||||
- else
|
||||
- XDeleteProperty(dpy, id, qt_net_wm_window_type);
|
||||
+ x11SetWindowType();
|
||||
|
||||
// set _NET_WM_WINDOW_STATE
|
||||
if (curr_winstate > 0)
|
||||
@@ -896,6 +870,64 @@ void QWidget::reparentSys( QWidget *pare
|
||||
setMouseTracking(mouse_tracking);
|
||||
}
|
||||
|
||||
+// Sets the EWMH (netwm) window type. Needed as a separate function
|
||||
+// because create() may be too soon in some cases.
|
||||
+void QWidget::x11SetWindowType( X11WindowType type )
|
||||
+{
|
||||
+ // NET window types
|
||||
+ long net_wintypes[7] = { 0, 0, 0, 0, 0, 0, 0 };
|
||||
+ int curr_wintype = 0;
|
||||
+ if( testWFlags(WType_Desktop))
|
||||
+ return;
|
||||
+ if( type == X11WindowTypeSelect ) {
|
||||
+ if ( testWFlags(WStyle_Splash)) {
|
||||
+ if (qt_net_supports(qt_net_wm_window_type_splash)) {
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_splash;
|
||||
+ }
|
||||
+ } else if (inherits("QToolBar")) {
|
||||
+ // toolbar netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_toolbar;
|
||||
+ } else if (testWFlags(WStyle_Customize) && testWFlags(WStyle_Tool)) {
|
||||
+ // utility netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_utility;
|
||||
+ } else if (testWFlags(WType_Dialog)) {
|
||||
+ // dialog netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dialog;
|
||||
+ }
|
||||
+ } else if( type == X11WindowTypeCombo ) {
|
||||
+ // combo netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_combo;
|
||||
+ } else if( type == X11WindowTypeDND ) {
|
||||
+ // dnd netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dnd;
|
||||
+ } else if( type == X11WindowTypeDropdown ) {
|
||||
+ // dropdown netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_dropdown_menu;
|
||||
+ } else if( type == X11WindowTypePopup ) {
|
||||
+ // popup netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_popup_menu;
|
||||
+ } else if( type == X11WindowTypeMenu ) {
|
||||
+ // menu netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_menu;
|
||||
+ } else if( type == X11WindowTypeTooltip ) {
|
||||
+ // tooltip netwm type
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_tooltip;
|
||||
+ }
|
||||
+
|
||||
+ // normal netwm type - default
|
||||
+ net_wintypes[curr_wintype++] = qt_net_wm_window_type_normal;
|
||||
+ // set _NET_WM_WINDOW_TYPE
|
||||
+ if (curr_wintype > 0)
|
||||
+ XChangeProperty(x11Display(), winId(), qt_net_wm_window_type, XA_ATOM, 32, PropModeReplace,
|
||||
+ (unsigned char *) net_wintypes, curr_wintype);
|
||||
+ else
|
||||
+ XDeleteProperty(x11Display(), winId(), qt_net_wm_window_type);
|
||||
+}
|
||||
+
|
||||
+void QWidget::x11SetWindowTransient( QWidget* parent )
|
||||
+{
|
||||
+ XSetTransientForHint( x11Display(), winId(), parent->winId());
|
||||
+}
|
||||
|
||||
/*!
|
||||
Translates the widget coordinate \a pos to global screen
|
||||
--- src/kernel/qwidget.h.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/kernel/qwidget.h 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -464,7 +464,19 @@ public:
|
||||
CGContextRef macCGContext(bool clipped=TRUE) const;
|
||||
#endif
|
||||
#endif
|
||||
-
|
||||
+#if defined(Q_WS_X11)
|
||||
+ enum X11WindowType {
|
||||
+ X11WindowTypeSelect,
|
||||
+ X11WindowTypeCombo,
|
||||
+ X11WindowTypeDND,
|
||||
+ X11WindowTypeTooltip,
|
||||
+ X11WindowTypeMenu, // torn-off
|
||||
+ X11WindowTypeDropdown,
|
||||
+ X11WindowTypePopup
|
||||
+ };
|
||||
+ void x11SetWindowType( X11WindowType type = X11WindowTypeSelect );
|
||||
+ void x11SetWindowTransient( QWidget* parent );
|
||||
+#endif
|
||||
void setWindowOpacity(double level);
|
||||
double windowOpacity() const;
|
||||
|
||||
--- src/dialogs/qdialog.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/dialogs/qdialog.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -668,10 +668,6 @@ bool QDialog::event( QEvent *e )
|
||||
Geometry management.
|
||||
*****************************************************************************/
|
||||
|
||||
-#if defined(Q_WS_X11)
|
||||
-extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); }
|
||||
-#endif // Q_WS_X11
|
||||
-
|
||||
/*!
|
||||
Shows the dialog as a \link #modeless modeless \endlink dialog.
|
||||
Control returns immediately to the calling code.
|
||||
@@ -705,7 +701,7 @@ void QDialog::show()
|
||||
&& qApp->mainWidget() && qApp->mainWidget()->isVisible()
|
||||
&& !qApp->mainWidget()->isMinimized()) {
|
||||
// make sure the transient for hint is set properly for modal dialogs
|
||||
- XSetTransientForHint( x11Display(), winId(), qApp->mainWidget()->winId() );
|
||||
+ x11SetWindowTransient( qApp->mainWidget());
|
||||
}
|
||||
#endif // Q_WS_X11
|
||||
|
||||
--- src/widgets/qtooltip.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qtooltip.cpp 2007-05-31 10:30:58.000000000 +0200
|
||||
@@ -72,6 +72,7 @@ public:
|
||||
polish();
|
||||
setText(text);
|
||||
adjustSize();
|
||||
+ x11SetWindowType( X11WindowTypeTooltip );
|
||||
}
|
||||
void setWidth( int w ) { resize( sizeForWidth( w ) ); }
|
||||
};
|
||||
@@ -528,6 +529,10 @@ void QTipManager::showTip()
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
+#ifdef Q_WS_X11
|
||||
+ label->x11SetWindowTransient( widget->topLevelWidget());
|
||||
+#endif
|
||||
+
|
||||
#ifdef Q_WS_MAC
|
||||
QRect screen = QApplication::desktop()->availableGeometry( scr );
|
||||
#else
|
||||
--- src/widgets/qcombobox.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qcombobox.cpp 2007-05-31 10:49:13.000000000 +0200
|
||||
@@ -389,12 +389,8 @@ public:
|
||||
inline QListBox * listBox() { return lBox; }
|
||||
inline QComboBoxPopup * popup() { return pop; }
|
||||
void updateLinedGeometry();
|
||||
-
|
||||
- void setListBox( QListBox *l ) { lBox = l ; usingLBox = TRUE;
|
||||
- l->setMouseTracking( TRUE );}
|
||||
-
|
||||
- void setPopupMenu( QComboBoxPopup * pm, bool isPopup=TRUE )
|
||||
- { pop = pm; if(isPopup) usingLBox = FALSE; }
|
||||
+ void setListBox( QListBox *l );
|
||||
+ void setPopupMenu( QComboBoxPopup * pm, bool isPopup=TRUE );
|
||||
|
||||
int current;
|
||||
int maxCount;
|
||||
@@ -440,6 +436,30 @@ void QComboBoxData::updateLinedGeometry(
|
||||
ed->setGeometry( r );
|
||||
}
|
||||
|
||||
+void QComboBoxData::setListBox( QListBox *l )
|
||||
+{
|
||||
+ lBox = l;
|
||||
+ usingLBox = TRUE;
|
||||
+ l->setMouseTracking( TRUE );
|
||||
+#ifdef Q_WS_X11
|
||||
+ l->x11SetWindowType( QWidget::X11WindowTypeCombo );
|
||||
+ l->x11SetWindowTransient( combo->topLevelWidget());
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void QComboBoxData::setPopupMenu( QComboBoxPopup * pm, bool isPopup )
|
||||
+{
|
||||
+ pop = pm;
|
||||
+ if(isPopup)
|
||||
+ usingLBox = FALSE;
|
||||
+#ifdef Q_WS_X11
|
||||
+ if( pm ) {
|
||||
+ pm->x11SetWindowType( QWidget::X11WindowTypeCombo );
|
||||
+ pm->x11SetWindowTransient( combo->topLevelWidget());
|
||||
+ }
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
static inline bool checkInsertIndex( const char *method, const char * name,
|
||||
int count, int *index)
|
||||
{
|
||||
--- src/widgets/qpopupmenu.cpp.sav 2007-05-25 18:56:23.000000000 +0200
|
||||
+++ src/widgets/qpopupmenu.cpp 2007-05-31 11:09:22.000000000 +0200
|
||||
@@ -298,6 +298,9 @@ QPopupMenu::QPopupMenu( QWidget *parent,
|
||||
connectModalRecursionSafety = 0;
|
||||
|
||||
setFocusPolicy( StrongFocus );
|
||||
+#ifdef Q_WS_X11
|
||||
+ x11SetWindowType( X11WindowTypePopup );
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -537,6 +540,29 @@ void QPopupMenu::popup( const QPoint &po
|
||||
emit aboutToShow();
|
||||
updateSize(TRUE);
|
||||
}
|
||||
+#ifdef Q_WS_X11
|
||||
+#ifndef QT_NO_MENUBAR
|
||||
+ QMenuData *top = this; // find top level
|
||||
+ while ( top->parentMenu )
|
||||
+ top = top->parentMenu;
|
||||
+ if( top->isMenuBar )
|
||||
+ x11SetWindowType( X11WindowTypeDropdown );
|
||||
+ if( parentMenu && parentMenu->isMenuBar )
|
||||
+ x11SetWindowTransient( static_cast< QMenuBar* >( parentMenu )->topLevelWidget());
|
||||
+#endif
|
||||
+ if( parentMenu && !parentMenu->isMenuBar )
|
||||
+ x11SetWindowTransient( static_cast< QPopupMenu* >( parentMenu ));
|
||||
+ if( !parentMenu ) {
|
||||
+ // hackish ... try to find the main window related to this popup
|
||||
+ QWidget* parent = parentWidget() ? parentWidget()->topLevelWidget() : NULL;
|
||||
+ if( parent == NULL )
|
||||
+ parent = QApplication::widgetAt( pos );
|
||||
+ if( parent == NULL )
|
||||
+ parent = qApp->activeWindow();
|
||||
+ if( parent != NULL )
|
||||
+ x11SetWindowTransient( parent );
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
int sw = screen.width(); // screen width
|
||||
int sh = screen.height(); // screen height
|
||||
@@ -1390,6 +1416,13 @@ void QPopupMenu::hide()
|
||||
#if defined(QT_ACCESSIBILITY_SUPPORT)
|
||||
QAccessible::updateAccessibility( this, 0, QAccessible::PopupMenuEnd );
|
||||
#endif
|
||||
+#ifndef QT_NO_MENUBAR
|
||||
+ QMenuData *top = this; // find top level
|
||||
+ while ( top->parentMenu )
|
||||
+ top = top->parentMenu;
|
||||
+ if( top->isMenuBar )
|
||||
+ x11SetWindowType( X11WindowTypePopup ); // reset
|
||||
+#endif
|
||||
parentMenu = 0;
|
||||
hidePopups();
|
||||
QWidget::hide();
|
||||
@@ -2713,6 +2746,9 @@ void QPopupMenu::toggleTearOff()
|
||||
geometry().topLeft(), FALSE );
|
||||
p->mitems->setAutoDelete( FALSE );
|
||||
p->tornOff = TRUE;
|
||||
+#ifdef Q_WS_X11
|
||||
+ p->x11SetWindowType( X11WindowTypeMenu );
|
||||
+#endif
|
||||
for ( QMenuItemListIt it( *mitems ); it.current(); ++it ) {
|
||||
if ( it.current()->id() != QMenuData::d->aInt && !it.current()->widget() )
|
||||
p->mitems->append( it.current() );
|
|
@ -1,311 +0,0 @@
|
|||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Support for _NET_WM_SYNC_REQUEST - allows the WM to find out when the app
|
||||
finished one redraw - less flicker during resize and with compositing
|
||||
also when opening a window.
|
||||
|
||||
--- src/kernel/qwidget.h.sav 2007-06-22 14:14:05.000000000 +0200
|
||||
+++ src/kernel/qwidget.h 2007-06-23 11:53:39.000000000 +0200
|
||||
@@ -586,6 +586,14 @@ private:
|
||||
void destroyInputContext();
|
||||
void focusInputContext();
|
||||
void checkChildrenDnd();
|
||||
+
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ void createSyncCounter();
|
||||
+ void destroySyncCounter();
|
||||
+ void incrementSyncCounter();
|
||||
+ void handleSyncRequest( void* ev );
|
||||
+#endif
|
||||
+
|
||||
#elif defined(Q_WS_MAC)
|
||||
uint own_id : 1, macDropEnabled : 1;
|
||||
EventHandlerRef window_event;
|
||||
@@ -962,8 +970,12 @@ struct Q_EXPORT QTLWExtra {
|
||||
uint uspos : 1; // User defined position
|
||||
uint ussize : 1; // User defined size
|
||||
#if defined(QT_NO_IM_EXTENSIONS)
|
||||
void *xic; // Input Context
|
||||
#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ ulong syncCounter;
|
||||
+ uint syncRequestValue[2];
|
||||
+#endif
|
||||
#endif
|
||||
#if defined(Q_WS_MAC)
|
||||
WindowGroupRef group;
|
||||
--- src/kernel/qt_x11_p.h.sav 2007-02-23 14:01:18.000000000 +0100
|
||||
+++ src/kernel/qt_x11_p.h 2007-06-23 11:53:39.000000000 +0200
|
||||
@@ -174,6 +174,11 @@ extern "C" {
|
||||
#endif // QT_NO_XRENDER
|
||||
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+# include <X11/extensions/sync.h>
|
||||
+#endif // QT_NO_XSYNC
|
||||
+
|
||||
+
|
||||
#ifndef QT_NO_XKB
|
||||
# include <X11/XKBlib.h>
|
||||
#endif // QT_NO_XKB
|
||||
--- src/kernel/qwidget_x11.cpp.sav 2007-04-16 13:47:26.000000000 +0200
|
||||
+++ src/kernel/qwidget_x11.cpp 2007-06-23 19:48:44.000000000 +0200
|
||||
@@ -87,6 +87,12 @@ static QWidget *keyboardGrb = 0;
|
||||
extern Time qt_x_time;
|
||||
extern Time qt_x_user_time;
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+extern Atom qt_net_wm_sync_request_counter;
|
||||
+extern Atom qt_net_wm_sync_request;
|
||||
+extern bool qt_use_xsync;
|
||||
+#endif
|
||||
+
|
||||
// defined in qfont_x11.cpp
|
||||
extern bool qt_has_xft;
|
||||
|
||||
@@ -595,11 +601,14 @@ void QWidget::create( WId window, bool i
|
||||
|
||||
XResizeWindow( dpy, id, crect.width(), crect.height() );
|
||||
XStoreName( dpy, id, qAppName() );
|
||||
- Atom protocols[4];
|
||||
+ Atom protocols[5];
|
||||
int n = 0;
|
||||
protocols[n++] = qt_wm_delete_window; // support del window protocol
|
||||
protocols[n++] = qt_wm_take_focus; // support take focus window protocol
|
||||
protocols[n++] = qt_net_wm_ping; // support _NET_WM_PING protocol
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ protocols[n++] = qt_net_wm_sync_request;// support the _NET_WM_SYNC_REQUEST protocol
|
||||
+#endif
|
||||
if ( testWFlags( WStyle_ContextHelp ) )
|
||||
protocols[n++] = qt_net_wm_context_help;
|
||||
XSetWMProtocols( dpy, id, protocols, n );
|
||||
@@ -625,6 +634,14 @@ void QWidget::create( WId window, bool i
|
||||
XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
|
||||
(unsigned char *) &curr_pid, 1);
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // set _NET_WM_SYNC_COUNTER
|
||||
+ createSyncCounter();
|
||||
+ long counterVal = topData()->syncCounter;
|
||||
+ XChangeProperty( dpy, id, qt_net_wm_sync_request_counter, XA_CARDINAL, 32, PropModeReplace,
|
||||
+ (unsigned char*) &counterVal, 1);
|
||||
+#endif
|
||||
+
|
||||
// when we create a toplevel widget, the frame strut should be dirty
|
||||
fstrut_dirty = 1;
|
||||
|
||||
@@ -720,6 +737,9 @@ void QWidget::destroy( bool destroyWindo
|
||||
if ( destroyWindow )
|
||||
qt_XDestroyWindow( this, x11Display(), winid );
|
||||
}
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ destroySyncCounter();
|
||||
+#endif
|
||||
setWinId( 0 );
|
||||
|
||||
extern void qPRCleanup( QWidget *widget ); // from qapplication_x11.cpp
|
||||
@@ -769,6 +789,10 @@ void QWidget::reparentSys( QWidget *pare
|
||||
destroyInputContext();
|
||||
}
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ destroySyncCounter();
|
||||
+#endif
|
||||
+
|
||||
if ( isTopLevel() || !parent ) // we are toplevel, or reparenting to toplevel
|
||||
topData()->parentWinId = 0;
|
||||
|
||||
@@ -2456,8 +2480,13 @@ void QWidget::createTLSysExtra()
|
||||
{
|
||||
#if defined(QT_NO_IM_EXTENSIONS)
|
||||
// created lazily
|
||||
extra->topextra->xic = 0;
|
||||
#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ extra->topextra->syncCounter = 0;
|
||||
+ extra->topextra->syncRequestValue[0] = 0;
|
||||
+ extra->topextra->syncRequestValue[1] = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void QWidget::deleteTLSysExtra()
|
||||
@@ -2501,6 +2530,51 @@ void QWidget::checkChildrenDnd()
|
||||
}
|
||||
}
|
||||
|
||||
+
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+// create a window's XSyncCounter
|
||||
+void QWidget::createSyncCounter()
|
||||
+{
|
||||
+ if( !qt_use_xsync || !isTopLevel() || topData()->syncCounter )
|
||||
+ return;
|
||||
+ XSyncValue zero;
|
||||
+ XSyncIntToValue( &zero, 0 );
|
||||
+ topData()->syncCounter = XSyncCreateCounter( x11Display(), zero );
|
||||
+}
|
||||
+
|
||||
+// destroy a window's XSyncCounter
|
||||
+void QWidget::destroySyncCounter()
|
||||
+{
|
||||
+ if( !qt_use_xsync || !extra || !extra->topextra
|
||||
+ || !extra->topextra->syncCounter )
|
||||
+ return;
|
||||
+ XSyncDestroyCounter( x11Display(), extra->topextra->syncCounter );
|
||||
+ extra->topextra->syncCounter = 0;
|
||||
+}
|
||||
+
|
||||
+// increment a window's XSyncCounter
|
||||
+void QWidget::incrementSyncCounter()
|
||||
+{
|
||||
+ if( qt_use_xsync && topData()->syncCounter &&
|
||||
+ !(topData()->syncRequestValue[0] == 0 &&
|
||||
+ topData()->syncRequestValue[1] == 0) ) {
|
||||
+ XSyncValue val;
|
||||
+ XSyncIntsToValue( &val, topData()->syncRequestValue[ 0 ], topData()->syncRequestValue[ 1 ] );
|
||||
+ XSyncSetCounter( x11Display(), topData()->syncCounter, val );
|
||||
+ topData()->syncRequestValue[0] = topData()->syncRequestValue[1] = 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// handle _NET_WM_SYNC_REQUEST
|
||||
+void QWidget::handleSyncRequest( void* ev )
|
||||
+{
|
||||
+ XEvent* xev = (XEvent*)ev;
|
||||
+ topData()->syncRequestValue[ 0 ] = xev->xclient.data.l[ 2 ];
|
||||
+ topData()->syncRequestValue[ 1 ] = xev->xclient.data.l[ 3 ];
|
||||
+}
|
||||
+#endif // QT_NO_XSYNC
|
||||
+
|
||||
+
|
||||
/*!
|
||||
\property QWidget::acceptDrops
|
||||
\brief whether drop events are enabled for this widget
|
||||
--- src/kernel/qapplication_x11.cpp.sav 2007-04-16 13:47:26.000000000 +0200
|
||||
+++ src/kernel/qapplication_x11.cpp 2007-06-23 19:49:15.000000000 +0200
|
||||
@@ -285,6 +285,11 @@ Atom *qt_net_supported_list = 0;
|
||||
Window *qt_net_virtual_root_list = 0;
|
||||
|
||||
|
||||
+// X11 SYNC support
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+Atom qt_net_wm_sync_request_counter = 0;
|
||||
+Atom qt_net_wm_sync_request = 0;
|
||||
+#endif
|
||||
|
||||
// client leader window
|
||||
Window qt_x11_wm_client_leader = 0;
|
||||
@@ -309,6 +314,13 @@ static int xrandr_eventbase;
|
||||
// Display
|
||||
Q_EXPORT bool qt_use_xrender = FALSE;
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+// True if SYNC extension exists on the connected display
|
||||
+bool qt_use_xsync = FALSE;
|
||||
+static int xsync_eventbase;
|
||||
+static int xsync_errorbase;
|
||||
+#endif
|
||||
+
|
||||
// modifier masks for alt/meta - detected when the application starts
|
||||
static long qt_alt_mask = 0;
|
||||
static long qt_meta_mask = 0;
|
||||
@@ -1938,6 +1950,11 @@ void qt_init_internal( int *argcptr, cha
|
||||
qt_x11_intern_atom( "UTF8_STRING", &qt_utf8_string );
|
||||
qt_x11_intern_atom( "_SGI_DESKS_MANAGER", &qt_sgi_desks_manager );
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST_COUNTER", &qt_net_wm_sync_request_counter );
|
||||
+ qt_x11_intern_atom( "_NET_WM_SYNC_REQUEST", &qt_net_wm_sync_request );
|
||||
+#endif
|
||||
+
|
||||
qt_xdnd_setup();
|
||||
qt_x11_motifdnd_init();
|
||||
|
||||
@@ -1974,6 +1991,15 @@ void qt_init_internal( int *argcptr, cha
|
||||
}
|
||||
#endif // QT_NO_XRENDER
|
||||
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // Try to initialize SYNC extension on the connected display
|
||||
+ int xsync_major, xsync_minor;
|
||||
+ if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) &&
|
||||
+ XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) {
|
||||
+ qt_use_xsync = TRUE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifndef QT_NO_XKB
|
||||
// If XKB is detected, set the GrabsUseXKBState option so input method
|
||||
// compositions continue to work (ie. deadkeys)
|
||||
@@ -3141,6 +3167,10 @@ int QApplication::x11ClientMessage(QWidg
|
||||
XSendEvent( event->xclient.display, event->xclient.window,
|
||||
False, SubstructureNotifyMask|SubstructureRedirectMask, event );
|
||||
}
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ } else if (a == qt_net_wm_sync_request ) {
|
||||
+ widget->handleSyncRequest( event );
|
||||
+#endif
|
||||
}
|
||||
} else if ( event->xclient.message_type == qt_qt_scrolldone ) {
|
||||
widget->translateScrollDoneEvent(event);
|
||||
@@ -5681,6 +5711,21 @@ bool QETWidget::translateScrollDoneEvent
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+#if defined(Q_C_CALLBACKS)
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+static Bool qt_net_wm_sync_request_scanner(Display*, XEvent* event, XPointer arg)
|
||||
+{
|
||||
+ return (event->type == ClientMessage && event->xclient.window == *(Window*)arg
|
||||
+ && event->xclient.message_type == qt_wm_protocols
|
||||
+ && event->xclient.data.l[ 0 ] == qt_net_wm_sync_request );
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#if defined(Q_C_CALLBACKS)
|
||||
+}
|
||||
+#endif
|
||||
|
||||
//
|
||||
// ConfigureNotify (window move and resize) event translation
|
||||
@@ -5712,6 +5757,7 @@ bool QETWidget::translateConfigEvent( co
|
||||
if (! extra || extra->compress_events) {
|
||||
// ConfigureNotify compression for faster opaque resizing
|
||||
XEvent otherEvent;
|
||||
+ int compressed_configs = 0;
|
||||
while ( XCheckTypedWindowEvent( x11Display(), winId(), ConfigureNotify,
|
||||
&otherEvent ) ) {
|
||||
if ( qt_x11EventFilter( &otherEvent ) )
|
||||
@@ -5732,7 +5778,18 @@ bool QETWidget::translateConfigEvent( co
|
||||
newCPos.ry() = otherEvent.xconfigure.y +
|
||||
otherEvent.xconfigure.border_width;
|
||||
}
|
||||
+ ++compressed_configs;
|
||||
+ }
|
||||
+#ifndef QT_NO_XSYNC
|
||||
+ // _NET_WM_SYNC_REQUEST compression
|
||||
+ Window wid = winId();
|
||||
+ while ( compressed_configs &&
|
||||
+ XCheckIfEvent( x11Display(), &otherEvent,
|
||||
+ qt_net_wm_sync_request_scanner, (XPointer)&wid ) ) {
|
||||
+ handleSyncRequest( (void*)&otherEvent );
|
||||
+ --compressed_configs;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
QRect cr ( geometry() );
|
||||
@@ -5786,6 +5843,8 @@ bool QETWidget::translateConfigEvent( co
|
||||
repaint( !testWFlags(WResizeNoErase) || transbg );
|
||||
}
|
||||
|
||||
+ incrementSyncCounter();
|
||||
+
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
qt-bugs@ issue : 153183
|
||||
bugs.kde.org number :
|
||||
applied: yes
|
||||
author: woebbeking@kde.org
|
||||
|
||||
In Qt 3.3.8 QDateTime::fromString() has an off by one regression:
|
||||
- Thu Mar 3 19:45:58 2005 -> invalid QDateTime
|
||||
- Thu Mar 13 19:45:58 2005 -> Mar 1 2005
|
||||
|
||||
--- src/tools/qdatetime.cpp
|
||||
+++ src/tools/qdatetime.cpp
|
||||
@@ -2485,7 +2485,7 @@
|
||||
return dt;
|
||||
}
|
||||
#endif
|
||||
- int day = s.mid( firstSpace + 4, 2 ).simplifyWhiteSpace().toInt();
|
||||
+ int day = s.mid( firstSpace + 5, 2 ).simplifyWhiteSpace().toInt();
|
||||
int year = s.right( 4 ).toInt();
|
||||
QDate date( year, month, day );
|
||||
QTime time;
|
|
@ -1,80 +0,0 @@
|
|||
qt-bugs@ issue : none
|
||||
bugs.kde.org number : none
|
||||
applied: no
|
||||
author: Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
This patch makes override-redirect windows (popup menu, dropdown menu,
|
||||
tooltip, combobox, etc.) also have more window properties like WM_CLASS,
|
||||
so they can be used when compositing.
|
||||
|
||||
--- src/kernel/qwidget_x11.cpp.sav 2007-06-25 10:36:42.000000000 +0200
|
||||
+++ src/kernel/qwidget_x11.cpp 2007-10-02 15:30:13.000000000 +0200
|
||||
@@ -557,7 +557,10 @@ void QWidget::create( WId window, bool i
|
||||
wsa.save_under = True;
|
||||
XChangeWindowAttributes( dpy, id, CWOverrideRedirect | CWSaveUnder,
|
||||
&wsa );
|
||||
- x11SetWindowType();
|
||||
+ XClassHint class_hint;
|
||||
+ class_hint.res_name = (char *) qAppName(); // application name
|
||||
+ class_hint.res_class = (char *) qAppClass(); // application class
|
||||
+ XSetClassHint( dpy, id, &class_hint );
|
||||
} else if ( topLevel && !desktop ) { // top-level widget
|
||||
QWidget *p = parentWidget(); // real parent
|
||||
if (p)
|
||||
@@ -620,8 +623,6 @@ void QWidget::create( WId window, bool i
|
||||
else
|
||||
XDeleteProperty(dpy, id, qt_xa_motif_wm_hints);
|
||||
|
||||
- x11SetWindowType();
|
||||
-
|
||||
// set _NET_WM_WINDOW_STATE
|
||||
if (curr_winstate > 0)
|
||||
XChangeProperty(dpy, id, qt_net_wm_state, XA_ATOM, 32, PropModeReplace,
|
||||
@@ -629,11 +630,6 @@ void QWidget::create( WId window, bool i
|
||||
else
|
||||
XDeleteProperty(dpy, id, qt_net_wm_state);
|
||||
|
||||
- // set _NET_WM_PID
|
||||
- long curr_pid = getpid();
|
||||
- XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
|
||||
- (unsigned char *) &curr_pid, 1);
|
||||
-
|
||||
#ifndef QT_NO_XSYNC
|
||||
// set _NET_WM_SYNC_COUNTER
|
||||
createSyncCounter();
|
||||
@@ -645,19 +641,31 @@ void QWidget::create( WId window, bool i
|
||||
// when we create a toplevel widget, the frame strut should be dirty
|
||||
fstrut_dirty = 1;
|
||||
|
||||
+ } else {
|
||||
+ // non-toplevel widgets don't have a frame, so no need to
|
||||
+ // update the strut
|
||||
+ fstrut_dirty = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows
|
||||
+ x11SetWindowType();
|
||||
+
|
||||
+ // set _NET_WM_PID
|
||||
+ long curr_pid = getpid();
|
||||
+ XChangeProperty(dpy, id, qt_net_wm_pid, XA_CARDINAL, 32, PropModeReplace,
|
||||
+ (unsigned char *) &curr_pid, 1);
|
||||
+
|
||||
// declare the widget's object name as window role
|
||||
XChangeProperty( dpy, id,
|
||||
qt_window_role, XA_STRING, 8, PropModeReplace,
|
||||
(unsigned char *)name(), qstrlen( name() ) );
|
||||
|
||||
// set client leader property
|
||||
+ if ( !qt_x11_wm_client_leader )
|
||||
+ qt_x11_create_wm_client_leader();
|
||||
XChangeProperty( dpy, id, qt_wm_client_leader,
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *)&qt_x11_wm_client_leader, 1 );
|
||||
- } else {
|
||||
- // non-toplevel widgets don't have a frame, so no need to
|
||||
- // update the strut
|
||||
- fstrut_dirty = 0;
|
||||
}
|
||||
|
||||
if ( initializeWindow ) {
|
|
@ -0,0 +1,44 @@
|
|||
From 0ebc9783d8ca0c4b27208bbc002c53c52c19ab4c Mon Sep 17 00:00:00 2001
|
||||
From: Bradley T. Hughes <bradley.hughes@nokia.com>
|
||||
Date: Tue, 4 May 2010 16:25:18 +0200
|
||||
Subject: [PATCH] Use qrand() instead of rand()
|
||||
|
||||
This only affects X11 code, and are the only 2 places in Qt where rand() is
|
||||
used instead of qrand().
|
||||
|
||||
Task-number: QTBUG-9793
|
||||
Reviewed-by: TrustMe
|
||||
---
|
||||
src/gui/kernel/qwidget_x11.cpp | 2 +-
|
||||
src/gui/painting/qpaintengine_x11.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
|
||||
index 37ac6bf..43f510c 100644
|
||||
--- a/src/gui/kernel/qwidget_x11.cpp
|
||||
+++ b/src/gui/kernel/qwidget_x11.cpp
|
||||
@@ -3000,7 +3000,7 @@ Picture QX11Data::getSolidFill(int screen, const QColor &c)
|
||||
return X11->solid_fills[i].picture;
|
||||
}
|
||||
// none found, replace one
|
||||
- int i = rand() % 16;
|
||||
+ int i = qrand() % 16;
|
||||
|
||||
if (X11->solid_fills[i].screen != screen && X11->solid_fills[i].picture) {
|
||||
XRenderFreePicture (X11->display, X11->solid_fills[i].picture);
|
||||
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
|
||||
index da48fcb..aef8b80 100644
|
||||
--- a/src/gui/painting/qpaintengine_x11.cpp
|
||||
+++ b/src/gui/painting/qpaintengine_x11.cpp
|
||||
@@ -315,7 +315,7 @@ static Picture getPatternFill(int screen, const QBrush &b)
|
||||
return X11->pattern_fills[i].picture;
|
||||
}
|
||||
// none found, replace one
|
||||
- int i = rand() % 16;
|
||||
+ int i = qrand() % 16;
|
||||
|
||||
if (X11->pattern_fills[i].screen != screen && X11->pattern_fills[i].picture) {
|
||||
XRenderFreePicture (X11->display, X11->pattern_fills[i].picture);
|
||||
--
|
||||
1.6.1
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From 55ef01d93f8257b5927660290fc1ead0b2b74ec9 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Hartmetz <ahartmetz@gmail.com>
|
||||
Date: Thu, 18 Mar 2010 02:41:14 +0100
|
||||
Subject: [PATCH] Add environment variable switch for graphicssystem so distros and
|
||||
non-developers can more easily pick a different default.
|
||||
|
||||
---
|
||||
src/gui/kernel/qapplication.cpp | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
|
||||
index 49713cf..af83047 100644
|
||||
--- a/src/gui/kernel/qapplication.cpp
|
||||
+++ b/src/gui/kernel/qapplication.cpp
|
||||
@@ -763,6 +763,10 @@ void QApplicationPrivate::construct(
|
||||
|
||||
qt_is_gui_used = (qt_appType != QApplication::Tty);
|
||||
process_cmdline();
|
||||
+ // the environment variable has the lowest precedence of runtime graphicssystem switches
|
||||
+ if (graphics_system_name.isEmpty()) {
|
||||
+ graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM"));
|
||||
+ }
|
||||
// Must be called before initialize()
|
||||
qt_init(this, qt_appType
|
||||
#ifdef Q_WS_X11
|
||||
--
|
||||
1.6.1
|
||||
|
6
Makefile
6
Makefile
|
@ -1,6 +0,0 @@
|
|||
# Makefile for source rpm: qt
|
||||
# $Id$
|
||||
NAME := qt
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
include ../common/Makefile.common
|
|
@ -0,0 +1,3 @@
|
|||
[Qt]
|
||||
font="Sans Serif,10,-1,5,50,0,0,0,0,0"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Qt4 Assistant
|
||||
Comment=Shows Qt4 documentation and examples
|
||||
Exec=assistant-qt4
|
||||
Icon=assistant
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=Qt;Development;Documentation;
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Qt3 Assistant
|
||||
Comment=Add translations to Qt3 applications
|
||||
Exec=assistant
|
||||
Icon=assistant3
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=Qt;Development;
|
|
@ -1,9 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Name=Qt3 Designer
|
||||
Name=Qt4 Designer
|
||||
GenericName=Interface Designer
|
||||
Comment=Design GUIs for Qt3 applications
|
||||
Exec=designer
|
||||
Icon=designer3
|
||||
Comment=Design GUIs for Qt4 applications
|
||||
Exec=designer-qt4
|
||||
Icon=designer
|
||||
MimeType=application/x-designer;
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
|
@ -0,0 +1,6 @@
|
|||
# quick-n-dirty method to fetch patches from -patched git branch
|
||||
# unfortunately, requires an already checked-out copy of the git repo
|
||||
|
||||
# when switching branches, use something like: git checkout --track remotes/origin/4.6-stable-patched
|
||||
git format-patch --output-directory kde-qt-patches v4.6.1..origin/4.6.1-patched
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=Qt4 Linguist
|
||||
Comment=Add translations to Qt4 applications
|
||||
Exec=linguist-qt4
|
||||
Icon=linguist
|
||||
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=Qt;Development;
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Qt3 Linguist
|
||||
Comment=Add translations to Qt3 applications
|
||||
Exec=linguist
|
||||
Icon=linguist3
|
||||
MimeType=application/x-linguist;
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=Qt;Development;
|
|
@ -0,0 +1,27 @@
|
|||
/* qconfig.h */
|
||||
/* This file is here to prevent a file conflict on multiarch systems. A
|
||||
* conflict will occur because qconfig.h has arch-specific definitions.
|
||||
*
|
||||
* DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */
|
||||
|
||||
#if defined(__x86_64__)
|
||||
# include <QtCore/qconfig-x86_64.h>
|
||||
#elif defined(__i386__)
|
||||
# include <QtCore/qconfig-i386.h>
|
||||
#elif defined(__powerpc64__)
|
||||
# include <QtCore/qconfig-ppc64.h>
|
||||
#elif defined(__powerpc__)
|
||||
# include <QtCore/qconfig-ppc.h>
|
||||
#elif defined(__s390x__)
|
||||
# include <QtCore/qconfig-s390x.h>
|
||||
#elif defined(__s390__)
|
||||
# include <QtCore/qconfig-s390.h>
|
||||
#elif defined(__sparc__) && defined (__arch64__)
|
||||
# include <QtCore/qconfig-sparc64.h>
|
||||
#elif defined(__sparc__)
|
||||
# include <QtCore/qconfig-sparc.h>
|
||||
#else
|
||||
/* Should never reach this point, if so see bugzilla.redhat.com/223663 */
|
||||
#error "This qt4-devel package does not work your architecture?"
|
||||
#endif
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- qt-x11-free-3.0.5/src/tools/qgpluginmanager.cpp.bero 2002-08-21 15:16:19.000000000 +0200
|
||||
+++ qt-x11-free-3.0.5/src/tools/qgpluginmanager.cpp 2002-08-21 15:16:41.000000000 +0200
|
||||
@@ -501,10 +501,10 @@
|
||||
(*f).latin1(),
|
||||
(const char*) QFile::encodeName( old->library() ) );
|
||||
} else {
|
||||
- qWarning("%s: Feature %s already defined in %s!",
|
||||
+/* qWarning("%s: Feature %s already defined in %s!",
|
||||
(const char*) QFile::encodeName( old->library() ),
|
||||
(*f).latin1(),
|
||||
- (const char*) QFile::encodeName( plugin->library() ) );
|
||||
+ (const char*) QFile::encodeName( plugin->library() ) ); */
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.1.0/Makefile.orig 2002-11-14 15:44:17.000000000 +0100
|
||||
+++ qt-x11-free-3.1.0/Makefile 2002-11-14 15:49:33.000000000 +0100
|
||||
@@ -11,7 +11,7 @@
|
||||
install: FORCE
|
||||
@$(MAKE) qt.install
|
||||
|
||||
-all: symlinks src-qmake src-moc sub-src sub-tools sub-tutorial sub-examples
|
||||
+all: symlinks src-qmake src-moc sub-src sub-tools
|
||||
@echo
|
||||
@echo "The Qt library is now built in ./lib"
|
||||
@echo "The Qt examples are built in the directories in ./examples"
|
|
@ -1,114 +0,0 @@
|
|||
--- qt-x11-free-3.3.3.orig/src/widgets/qmenubar.cpp 2004-08-05 16:42:21.000000000 +0200
|
||||
+++ qt-x11-free-3.3.3/src/widgets/qmenubar.cpp 2004-12-03 17:26:43.000000000 +0100
|
||||
@@ -228,6 +228,10 @@
|
||||
static const int motifItemHMargin = 5; // menu item hor text margin
|
||||
static const int motifItemVMargin = 4; // menu item ver text margin
|
||||
|
||||
+// The others are 0
|
||||
+static const int gtkItemHMargin = 8;
|
||||
+static const int gtkItemVMargin = 8;
|
||||
+
|
||||
/*
|
||||
|
||||
+-----------------------------
|
||||
@@ -292,7 +296,14 @@
|
||||
setFrameStyle( QFrame::MenuBarPanel | QFrame::Raised );
|
||||
|
||||
QFontMetrics fm = fontMetrics();
|
||||
- int h = 2*motifBarVMargin + fm.height() + motifItemVMargin + 2*frameWidth() + 2*motifItemFrame;
|
||||
+
|
||||
+ int h;
|
||||
+ int gs = style().styleHint(QStyle::SH_GUIStyle);
|
||||
+ if (gs == GtkStyle) {
|
||||
+ h = fm.height() + gtkItemVMargin;
|
||||
+ } else {
|
||||
+ h = 2*motifBarVMargin + fm.height() + motifItemVMargin + 2*frameWidth() + 2*motifItemFrame;
|
||||
+ }
|
||||
|
||||
setGeometry( 0, 0, width(), h );
|
||||
|
||||
@@ -944,12 +955,19 @@
|
||||
h = QMAX( mi->pixmap()->height() + 4, QApplication::globalStrut().height() );
|
||||
} else if ( !mi->text().isNull() ) { // text item
|
||||
QString s = mi->text();
|
||||
- w = fm.boundingRect( s ).width()
|
||||
- + 2*motifItemHMargin;
|
||||
+ if ( gs == GtkStyle ) {
|
||||
+ w = fm.boundingRect( s ).width() + 2*gtkItemHMargin;
|
||||
+ } else {
|
||||
+ w = fm.boundingRect( s ).width() + 2*motifItemHMargin;
|
||||
+ }
|
||||
w -= s.contains('&')*fm.width('&');
|
||||
w += s.contains("&&")*fm.width('&');
|
||||
w = QMAX( w, QApplication::globalStrut().width() );
|
||||
- h = QMAX( fm.height() + motifItemVMargin, QApplication::globalStrut().height() );
|
||||
+ if (gs == GtkStyle ) {
|
||||
+ h = QMAX( fm.height() + gtkItemVMargin, QApplication::globalStrut().height() );
|
||||
+ } else {
|
||||
+ h = QMAX( fm.height() + motifItemVMargin, QApplication::globalStrut().height() );
|
||||
+ }
|
||||
} else if ( mi->isSeparator() ) { // separator item
|
||||
if ( style().styleHint(QStyle::SH_GUIStyle) == MotifStyle )
|
||||
separator = i; //### only motif?
|
||||
--- qt-x11-free-3.3.3.orig/src/widgets/qpopupmenu.cpp 2004-08-05 16:42:21.000000000 +0200
|
||||
+++ qt-x11-free-3.3.3/src/widgets/qpopupmenu.cpp 2004-12-03 17:43:50.000000000 +0100
|
||||
@@ -65,6 +65,8 @@
|
||||
static const int motifArrowHMargin = 6; // arrow horizontal margin
|
||||
static const int motifArrowVMargin = 2; // arrow vertical margin
|
||||
|
||||
+static const int gtkArrowHMargin = 0; // arrow horizontal margin
|
||||
+static const int gtkArrowVMargin = 0; // arrow vertical margin
|
||||
|
||||
/*
|
||||
|
||||
@@ -2289,8 +2291,18 @@
|
||||
QRect r( itemGeometry( actItem ) );
|
||||
QPoint p;
|
||||
QSize ps = popup->sizeHint();
|
||||
+ // GUI Style
|
||||
+ int gs = style().styleHint(QStyle::SH_GUIStyle);
|
||||
+ int arrowHMargin, arrowVMargin;
|
||||
+ if (gs == GtkStyle) {
|
||||
+ arrowHMargin = gtkArrowHMargin;
|
||||
+ arrowVMargin = gtkArrowVMargin;
|
||||
+ } else {
|
||||
+ arrowHMargin = motifArrowHMargin;
|
||||
+ arrowVMargin = motifArrowVMargin;
|
||||
+ }
|
||||
if( QApplication::reverseLayout() ) {
|
||||
- p = QPoint( r.left() + motifArrowHMargin - ps.width(), r.top() + motifArrowVMargin );
|
||||
+ p = QPoint( r.left() + arrowHMargin - ps.width(), r.top() + arrowVMargin );
|
||||
p = mapToGlobal( p );
|
||||
|
||||
bool right = FALSE;
|
||||
@@ -2303,7 +2315,7 @@
|
||||
if ( right )
|
||||
p.setX( mapToGlobal( r.topRight() ).x() );
|
||||
} else {
|
||||
- p = QPoint( r.right() - motifArrowHMargin, r.top() + motifArrowVMargin );
|
||||
+ p = QPoint( r.right() - arrowHMargin, r.top() + arrowVMargin );
|
||||
p = mapToGlobal( p );
|
||||
|
||||
bool left = FALSE;
|
||||
--- qt-x11-free-3.3.3.orig/src/kernel/qnamespace.h 2004-08-05 16:42:10.000000000 +0200
|
||||
+++ qt-x11-free-3.3.3/src/kernel/qnamespace.h 2004-11-29 22:22:26.000000000 +0100
|
||||
@@ -294,7 +294,8 @@
|
||||
#ifdef QT_NO_COMPAT
|
||||
enum GUIStyle {
|
||||
WindowsStyle = 1, // ### Qt 4.0: either remove the obsolete enums or clean up compat vs.
|
||||
- MotifStyle = 4 // ### QT_NO_COMPAT by reordering or combination into one enum.
|
||||
+ MotifStyle = 4, // ### QT_NO_COMPAT by reordering or combination into one enum.
|
||||
+ GtkStyle = 6 // Gtk compability mode
|
||||
};
|
||||
#else
|
||||
enum GUIStyle {
|
||||
@@ -302,7 +303,8 @@
|
||||
WindowsStyle,
|
||||
Win3Style, // OBSOLETE
|
||||
PMStyle, // OBSOLETE
|
||||
- MotifStyle
|
||||
+ MotifStyle,
|
||||
+ GtkStyle = 6 // Gtk compability mode
|
||||
};
|
||||
#endif
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
--- qt-x11-free-3.3.4/src/kernel/qpsprinter.cpp.cjk 2005-01-21 18:16:11.000000000 +0100
|
||||
+++ qt-x11-free-3.3.4/src/kernel/qpsprinter.cpp 2005-01-26 15:09:20.911239907 +0100
|
||||
@@ -4748,10 +4748,11 @@
|
||||
|
||||
// GB18030 fonts on Turbolinux
|
||||
static const psfont SongGBK2K [] = {
|
||||
- { "MSung-Light-GBK2K-H", 0, 100. },
|
||||
- { "MSung-Italic-GBK2K-H", 0, 100. },
|
||||
- { "MSung-Bold-GBK2K-H", 0, 100. },
|
||||
- { "MSung-BoldItalic-GBK2K-H", 0, 100. },
|
||||
+ { "MSungGBK-Light-GBK2K-H", 0, 100. },
|
||||
+ { "MSungGBK-Light-GBK2K-H", 0, 100. },
|
||||
+ { "MSungGBK-Light-GBK2K-H", 0, 100. },
|
||||
+ { "MSungGBK-Light-GBK2K-H", 0, 100. },
|
||||
+
|
||||
};
|
||||
static const psfont KaiGBK2K [] = {
|
||||
{ "MKai-Medium-GBK2K-H", 0, 100. },
|
|
@ -1,11 +0,0 @@
|
|||
--- src/codecs/qutfcodec.cpp
|
||||
+++ src/codecs/qutfcodec.cpp
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
QString toUnicode(const char* chars, int len)
|
||||
{
|
||||
QString result;
|
||||
- result.setLength( len ); // worst case
|
||||
+ result.setLength( len + 1 ); // worst case
|
||||
QChar *qch = (QChar *)result.unicode();
|
||||
uchar ch;
|
||||
int error = -1;
|
|
@ -1,15 +0,0 @@
|
|||
diff -pruN qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp
|
||||
--- qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp 2006-12-04 18:47:11.000000000 +0530
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-12-05 12:05:10.000000000 +0530
|
||||
@@ -1412,7 +1412,10 @@ static bool indic_shape_syllable(QOpenTy
|
||||
toPos += 2;
|
||||
if (script == QFont::Devanagari || script == QFont::Gujarati || script == QFont::Bengali) {
|
||||
if (matra_position == Post || matra_position == Split) {
|
||||
- toPos = matra+1;
|
||||
+ if (matra_position == Post )
|
||||
+ toPos = matra;
|
||||
+ else
|
||||
+ toPos = matra+1;
|
||||
matra -= 2;
|
||||
}
|
||||
} else if (script == QFont::Kannada) {
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-18 17:55:23.308589840 +0800
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-18 17:57:45.284006296 +0800
|
||||
@@ -164,7 +164,7 @@
|
||||
Matra, Matra, Matra, Matra,
|
||||
Matra, Invalid, Invalid, Matra,
|
||||
Matra, Invalid, Invalid, Matra,
|
||||
- Matra, Halant, Unknown, Unknown,
|
||||
+ Matra, Halant, Consonant, Unknown,
|
||||
|
||||
Invalid, Invalid, Invalid, Invalid,
|
||||
Invalid, Invalid, Invalid, VowelMark,
|
|
@ -1,12 +0,0 @@
|
|||
diff -pruN qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp
|
||||
--- qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:35:30.000000000 +0530
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:37:58.000000000 +0530
|
||||
@@ -226,7 +226,7 @@ static const unsigned char indicForms[0x
|
||||
Invalid, VowelMark, VowelMark, VowelMark,
|
||||
Invalid, IndependentVowel, IndependentVowel, IndependentVowel,
|
||||
IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel,
|
||||
- Invalid, IndependentVowel, Invalid, IndependentVowel,
|
||||
+ IndependentVowel, IndependentVowel, Invalid, IndependentVowel,
|
||||
|
||||
IndependentVowel, IndependentVowel, Invalid, IndependentVowel,
|
||||
IndependentVowel, Consonant, Consonant, Consonant,
|
|
@ -1,12 +0,0 @@
|
|||
diff -pruN qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp
|
||||
--- qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:41:25.000000000 +0530
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:40:02.000000000 +0530
|
||||
@@ -253,7 +253,7 @@ static const unsigned char indicForms[0x
|
||||
Unknown, Unknown, Unknown, Unknown,
|
||||
Unknown, Unknown, Unknown, Unknown,
|
||||
|
||||
- Other, Other, Other, Other,
|
||||
+ Other, Other, VowelMark, VowelMark,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
|
@ -1,60 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-13 13:21:37.000000000 +0800
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-13 13:57:36.000000000 +0800
|
||||
@@ -868,7 +868,7 @@
|
||||
None, None, None, None,
|
||||
None, None, None, Post,
|
||||
|
||||
- Post, None, Below, None,
|
||||
+ None, None, None, None,
|
||||
None, Post, None, None,
|
||||
None, None, None, None,
|
||||
None, None, Post, Post,
|
||||
@@ -1271,6 +1271,16 @@
|
||||
int base = 0;
|
||||
int reph = -1;
|
||||
|
||||
+ //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
|
||||
+ bool is_special_conjuction_malayalam = false;
|
||||
+
|
||||
+ if ((len == 3) &&
|
||||
+ ((reordered[2] == 0x0d30) || (reordered[2] == 0x0d31)) &&
|
||||
+ (reordered[1] == 0x0d4d) &&
|
||||
+ ((reordered[0] >= 0x0d15) && (reordered[0] <= 0x0d39))) {
|
||||
+ is_special_conjuction_malayalam = true;
|
||||
+ }
|
||||
+
|
||||
#ifdef INDIC_DEBUG
|
||||
IDEBUG("original:");
|
||||
for (i = 0; i < len; i++) {
|
||||
@@ -1547,6 +1557,15 @@
|
||||
reph = i;
|
||||
}
|
||||
|
||||
+ //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
|
||||
+ if (is_special_conjuction_malayalam) {
|
||||
+ unsigned short temp;
|
||||
+
|
||||
+ temp = reordered[0];
|
||||
+ reordered[0] = reordered[2];
|
||||
+ reordered[2] = temp;
|
||||
+ }
|
||||
+
|
||||
if (item->font->stringToCMap((const QChar *)reordered.data(), len, item->glyphs, item->advances,
|
||||
&item->num_glyphs, item->flags & QTextEngine::RightToLeft) != QFontEngine::NoError)
|
||||
return FALSE;
|
||||
@@ -1658,6 +1677,15 @@
|
||||
|
||||
// halant always applies
|
||||
|
||||
+ //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
|
||||
+ if (is_special_conjuction_malayalam) {
|
||||
+ unsigned int temp;
|
||||
+
|
||||
+ temp = properties[0];
|
||||
+ properties[0] = ~PreSubstProperty;
|
||||
+ properties[2] = temp;
|
||||
+ }
|
||||
+
|
||||
#ifdef INDIC_DEBUG
|
||||
{
|
||||
IDEBUG("OT properties:");
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.orig 2006-11-29 17:17:26.000000000 +0100
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-11-29 17:22:34.000000000 +0100
|
||||
@@ -864,7 +864,7 @@
|
||||
None, None, None, Post,
|
||||
|
||||
None, None, None, None,
|
||||
- None, Post, None, None,
|
||||
+ None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, Post, Post,
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -pruN qt-x11-free-3.3.6.org/src/kernel/qfont_x11.cpp qt-x11-free-3.3.6/src/kernel/qfont_x11.cpp
|
||||
--- qt-x11-free-3.3.6.org/src/kernel/qfont_x11.cpp 2006-03-08 00:00:00.000000000 +0530
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qfont_x11.cpp 2006-12-04 18:49:09.000000000 +0530
|
||||
@@ -709,7 +709,7 @@ int QFontMetrics::charWidth( const QStri
|
||||
if ( script >= QFont::Arabic && script <= QFont::Khmer ) {
|
||||
// complex script shaping. Have to do some hard work
|
||||
int from = QMAX( 0, pos - 8 );
|
||||
- int to = QMIN( (int)str.length(), pos + 8 );
|
||||
+ int to = str.length();
|
||||
QConstString cstr( str.unicode()+from, to-from);
|
||||
QTextEngine layout( cstr.string(), d );
|
||||
layout.itemize( QTextEngine::WidthOnly );
|
|
@ -1,64 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-13 13:21:37.000000000 +0800
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-13 13:42:11.000000000 +0800
|
||||
@@ -280,7 +280,7 @@
|
||||
Consonant, Consonant, Consonant, Consonant,
|
||||
|
||||
Consonant, Invalid, Consonant, Consonant,
|
||||
- Invalid, Invalid, Consonant, Consonant,
|
||||
+ Invalid, Consonant, Consonant, Consonant,
|
||||
Consonant, Consonant, Unknown, Unknown,
|
||||
Nukta, Other, Matra, Matra,
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
|
||||
- Other, Other, Other, Other,
|
||||
+ Other, Consonant, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
@@ -695,18 +695,18 @@
|
||||
None, None, None, None,
|
||||
|
||||
None, None, None, None,
|
||||
- None, None, None, None,
|
||||
- None, None, None, None,
|
||||
- None, None, None, None,
|
||||
+ None, Below, Below, Below,
|
||||
+ Below, Below, Below, Below,
|
||||
+ Below, Below, None, Below,
|
||||
|
||||
- None, None, None, None,
|
||||
- Below, None, None, None,
|
||||
- Below, None, None, None,
|
||||
+ Below, Below, Below, Below,
|
||||
+ Below, Below, Below, Below,
|
||||
+ Below, None, Below, Below,
|
||||
Below, Below, Below, Post,
|
||||
|
||||
Below, None, Below, Below,
|
||||
- None, None, None, None,
|
||||
- None, None, None, None,
|
||||
+ None, Below, Below, Below,
|
||||
+ Below, Below, None, None,
|
||||
None, None, Post, Above,
|
||||
|
||||
Post, Below, Below, Below,
|
||||
@@ -717,14 +717,14 @@
|
||||
None, None, None, None,
|
||||
None, None, Above, Post,
|
||||
None, None, None, None,
|
||||
- None, None, None, None,
|
||||
+ None, None, None, Post,
|
||||
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
|
||||
- None, None, None, None,
|
||||
+ None, Below, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-18 17:55:23.000000000 +0800
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-19 11:22:13.226804056 +0800
|
||||
@@ -217,7 +217,7 @@
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
|
||||
- StressMark, StressMark, Other, Other,
|
||||
+ StressMark, StressMark, Consonant, Consonant,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
||||
Other, Other, Other, Other,
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-18 17:55:23.000000000 +0800
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-19 16:42:31.641160984 +0800
|
||||
@@ -786,7 +786,7 @@
|
||||
Below, None, Below, Below,
|
||||
Below, Below, Below, Below,
|
||||
|
||||
- Below, None, Below, Below,
|
||||
+ Below, Below, Below, Below,
|
||||
None, Below, Below, Below,
|
||||
Below, Below, None, None,
|
||||
None, None, Post, Above,
|
|
@ -1,23 +0,0 @@
|
|||
--- qt-x11-free-3.3.8/src/kernel/qscriptengine_x11.cpp.orig 2007-04-11 15:05:34.000000000 +0200
|
||||
+++ qt-x11-free-3.3.8/src/kernel/qscriptengine_x11.cpp 2007-04-11 15:22:19.000000000 +0200
|
||||
@@ -1240,7 +1240,7 @@
|
||||
int script = item->script;
|
||||
Q_ASSERT(script >= QFont::Devanagari && script <= QFont::Sinhala);
|
||||
const unsigned short script_base = 0x0900 + 0x80*(script-QFont::Devanagari);
|
||||
- const unsigned short ra = script_base + 0x30;
|
||||
+ unsigned short ra = script_base + 0x30; //it was const unsigned short ra before modification
|
||||
const unsigned short halant = script_base + 0x4d;
|
||||
const unsigned short nukta = script_base + 0x3c;
|
||||
|
||||
@@ -1278,6 +1278,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+ unsigned short *chkAssamese=reordered.data();
|
||||
+ if((script == QFont::Bengali) && (*chkAssamese==0x09F0)) //if it is assamese ra
|
||||
+ {
|
||||
+ ra = script_base + 0x70;
|
||||
+ }
|
||||
if (len != 1) {
|
||||
unsigned short *uc = reordered.data();
|
||||
bool beginsWithRa = FALSE;
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.8/src/kernel/qscriptengine_x11.cpp.orig 2007-04-11 15:05:34.000000000 +0200
|
||||
+++ qt-x11-free-3.3.8/src/kernel/qscriptengine_x11.cpp 2007-04-11 15:22:19.000000000 +0200
|
||||
@@ -601,7 +601,7 @@
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
|
||||
- None, None, None, None,
|
||||
+ Below, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
|
@ -0,0 +1,41 @@
|
|||
diff -ur qt-all-opensource-src-4.4.0-rc1/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-all-opensource-src-4.4.0-rc1-as_IN-437440/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
|
||||
--- qt-all-opensource-src-4.4.0-rc1/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2008-04-02 18:33:48.000000000 +0200
|
||||
+++ qt-all-opensource-src-4.4.0-rc1-as_IN-437440/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2008-04-08 04:37:45.000000000 +0200
|
||||
@@ -552,7 +552,7 @@
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
|
||||
- None, None, None, None,
|
||||
+ Below, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
None, None, None, None,
|
||||
@@ -1169,7 +1169,7 @@
|
||||
HB_Script script = item->item.script;
|
||||
assert(script >= HB_Script_Devanagari && script <= HB_Script_Sinhala);
|
||||
const unsigned short script_base = 0x0900 + 0x80*(script-HB_Script_Devanagari);
|
||||
- const unsigned short ra = script_base + 0x30;
|
||||
+ unsigned short ra = script_base + 0x30;
|
||||
const unsigned short halant = script_base + 0x4d;
|
||||
const unsigned short nukta = script_base + 0x3c;
|
||||
bool control = false;
|
||||
@@ -1212,6 +1212,19 @@
|
||||
HB_UChar16 *uc = reordered;
|
||||
bool beginsWithRa = false;
|
||||
|
||||
+ // Exception in Bengali Script
|
||||
+ //
|
||||
+ // Bengali script supports two languages bengali and assamese
|
||||
+ // Unfortunately for both languages there is different ra defined in same script chart
|
||||
+ // for Bengali it ra is 'Base+ 0x30' and for assamese 'Base+0x70'
|
||||
+ // Base is same 0x0980
|
||||
+ // To handle this exception we need to change ra to from const to normal variable
|
||||
+ // and aslo need to change ra to 'Base+0x70' whenever we will get assamese language
|
||||
+ //character in data
|
||||
+ if((script == HB_Script_Bengali) && (*uc==0x09F0)){
|
||||
+ ra = script_base + 0x70;
|
||||
+ }
|
||||
+
|
||||
// Rule 1: find base consonant
|
||||
//
|
||||
// The shaping engine finds the base consonant of the
|
|
@ -0,0 +1,21 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro
|
||||
--- qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500
|
||||
+++ qt-everywhere-opensource-src-4.6.0-beta1/tools/qdoc3/qdoc3.pro 2009-10-16 14:55:27.024789581 -0500
|
||||
@@ -105,3 +105,6 @@ SOURCES += apigenerator.cpp \
|
||||
webxmlgenerator.cpp \
|
||||
yyindent.cpp
|
||||
|
||||
+TARGET= qdoc3
|
||||
+target.path = $$[QT_INSTALL_BINS]
|
||||
+INSTALLS += target
|
||||
diff -up qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro
|
||||
--- qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro.qdoc3 2009-10-13 10:34:08.000000000 -0500
|
||||
+++ qt-everywhere-opensource-src-4.6.0-beta1/tools/tools.pro 2009-10-16 14:57:49.699789384 -0500
|
||||
@@ -14,6 +14,7 @@ no-png {
|
||||
SUBDIRS += designer
|
||||
}
|
||||
SUBDIRS += linguist
|
||||
+ SUBDIRS += qdoc3
|
||||
symbian: SUBDIRS = designer
|
||||
wince*: SUBDIRS = qtestlib designer
|
||||
unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig
|
|
@ -0,0 +1,60 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/audiooutput.cpp 2009-12-01 13:36:43.000000000 +0100
|
||||
@@ -148,7 +148,9 @@ bool AudioOutput::setOutputDevice(int ne
|
||||
// Save previous state
|
||||
GstState oldState = GST_STATE(m_audioSink);
|
||||
const QByteArray oldDeviceValue = GstHelper::property(m_audioSink, "device");
|
||||
- const QByteArray deviceId = deviceList.at(deviceIdx).gstId;
|
||||
+ const QByteArray deviceId = (deviceList.at(deviceIdx).gstId == "PulseAudio"
|
||||
+ ? "default"
|
||||
+ : deviceList.at(deviceIdx).gstId);
|
||||
m_device = newDevice;
|
||||
|
||||
// We test if the device can be opened by checking if it can go from NULL to READY state
|
||||
diff -up qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp.gst-pulsaudio 2009-11-27 02:27:50.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.0/src/3rdparty/phonon/gstreamer/devicemanager.cpp 2009-12-01 13:04:18.000000000 +0100
|
||||
@@ -50,6 +50,8 @@ AudioDevice::AudioDevice(DeviceManager *
|
||||
//get name from device
|
||||
if (gstId == "default") {
|
||||
description = "Default audio device";
|
||||
+ } else if (gstId == "PulseAudio") {
|
||||
+ description = QObject::tr("Pass all audio through the PulseAudio Sound Server.\n").toUtf8();
|
||||
} else {
|
||||
GstElement *aSink= manager->createAudioSink();
|
||||
|
||||
@@ -178,6 +180,18 @@ GstElement *DeviceManager::createAudioSi
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!sink) {
|
||||
+ sink = gst_element_factory_make ("pulsesink", NULL);
|
||||
+ if (canOpenDevice(sink)) {
|
||||
+ m_backend->logMessage("AudioOutput using pulse audio sink");
|
||||
+ m_audioSink = "pulsesink";
|
||||
+ }
|
||||
+ else if (sink) {
|
||||
+ gst_object_unref(sink);
|
||||
+ sink = 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
#ifdef USE_ALSASINK2
|
||||
if (!sink) {
|
||||
sink = gst_element_factory_make ("_k_alsasink", NULL);
|
||||
@@ -311,8 +325,12 @@ void DeviceManager::updateDeviceList()
|
||||
QList<QByteArray> list;
|
||||
|
||||
if (audioSink) {
|
||||
- list = GstHelper::extractProperties(audioSink, "device");
|
||||
- list.prepend("default");
|
||||
+ if (m_audioSink == "pulsesink") {
|
||||
+ list.append("PulseAudio");
|
||||
+ } else {
|
||||
+ list = GstHelper::extractProperties(audioSink, "device");
|
||||
+ list.prepend("default");
|
||||
+ }
|
||||
|
||||
for (int i = 0 ; i < list.size() ; ++i) {
|
||||
QByteArray gstId = list.at(i);
|
|
@ -0,0 +1,22 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp.orig 2010-02-11 16:55:22.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/gui/graphicsview/qgraphicsitem.cpp 2010-03-22 11:26:50.291692144 +0100
|
||||
@@ -1125,6 +1125,9 @@ void QGraphicsItemPrivate::setParentItem
|
||||
}
|
||||
}
|
||||
|
||||
+ // Resolve depth.
|
||||
+ invalidateDepthRecursively();
|
||||
+
|
||||
if ((parent = newParent)) {
|
||||
if (parent->d_func()->scene && parent->d_func()->scene != scene) {
|
||||
// Move this item to its new parent's scene
|
||||
@@ -1175,8 +1178,6 @@ void QGraphicsItemPrivate::setParentItem
|
||||
}
|
||||
}
|
||||
|
||||
- // Resolve depth.
|
||||
- invalidateDepthRecursively();
|
||||
dirtySceneTransform = 1;
|
||||
|
||||
// Restore the sub focus chain.
|
|
@ -0,0 +1,43 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h.than 2010-03-29 15:44:24.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/corelib/arch/qatomic_s390.h 2010-03-29 15:48:23.000000000 +0200
|
||||
@@ -366,11 +366,9 @@ template <typename T>
|
||||
Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
|
||||
{
|
||||
#ifndef __s390x__
|
||||
- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr",
|
||||
- "", "bcr 15,0\n");
|
||||
+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "");
|
||||
#else
|
||||
- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr",
|
||||
- "", "bcr 15,0\n");
|
||||
+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -378,9 +376,9 @@ template <typename T>
|
||||
Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
|
||||
{
|
||||
#ifndef __s390x__
|
||||
- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr", "", "");
|
||||
+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "bcr 15,0 \n");
|
||||
#else
|
||||
- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr", "", "");
|
||||
+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "bcr 15,0 \n");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -388,11 +386,9 @@ template <typename T>
|
||||
Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
|
||||
{
|
||||
#ifndef __s390x__
|
||||
- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr",
|
||||
- "bcr 15,0 \n", "");
|
||||
+ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "bcr 15,0 \n", "");
|
||||
#else
|
||||
- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr",
|
||||
- "bcr 15,0\n", "");
|
||||
+ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "bcr 15,0\n", "");
|
||||
#endif
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
--- a/src/gui/dialogs/qprintdialog_unix.cpp
|
||||
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
|
||||
@@ -154,6 +154,9 @@
|
||||
bool checkFields();
|
||||
void setupPrinter();
|
||||
void setOptionsPane(QPrintDialogPrivate *pane);
|
||||
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
|
||||
+ void setCupsProperties();
|
||||
+#endif
|
||||
|
||||
// slots
|
||||
void _q_printerChanged(int index);
|
||||
@@ -942,7 +945,7 @@
|
||||
|
||||
void QUnixPrintWidgetPrivate::_q_btnPropertiesClicked()
|
||||
{
|
||||
- if (propertiesDialog == 0) {
|
||||
+ if (!propertiesDialog) {
|
||||
propertiesDialog = new QPrintPropertiesDialog(q);
|
||||
propertiesDialog->setResult(QDialog::Rejected);
|
||||
}
|
||||
@@ -962,6 +965,35 @@
|
||||
propertiesDialog->exec();
|
||||
}
|
||||
|
||||
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
|
||||
+void QUnixPrintWidgetPrivate::setCupsProperties()
|
||||
+{
|
||||
+ if (cups && QCUPSSupport::isAvailable()) {
|
||||
+ QPrintEngine *engine = printer->printEngine();
|
||||
+ const ppd_option_t* pageSizes = cups->pageSizes();
|
||||
+ QByteArray cupsPageSize;
|
||||
+ for (int i = 0; i < pageSizes->num_choices; ++i) {
|
||||
+ if (static_cast<int>(pageSizes->choices[i].marked) == 1)
|
||||
+ cupsPageSize = pageSizes->choices[i].choice;
|
||||
+ }
|
||||
+ engine->setProperty(PPK_CupsStringPageSize, QString::fromLatin1(cupsPageSize));
|
||||
+ engine->setProperty(PPK_CupsOptions, cups->options());
|
||||
+
|
||||
+ QRect pageRect = cups->pageRect(cupsPageSize);
|
||||
+ engine->setProperty(PPK_CupsPageRect, pageRect);
|
||||
+
|
||||
+ QRect paperRect = cups->paperRect(cupsPageSize);
|
||||
+ engine->setProperty(PPK_CupsPaperRect, paperRect);
|
||||
+
|
||||
+ for (int ps = 0; ps < QPrinter::NPaperSize; ++ps) {
|
||||
+ QPdf::PaperSize size = QPdf::paperSize(QPrinter::PaperSize(ps));
|
||||
+ if (size.width == paperRect.width() && size.height == paperRect.height())
|
||||
+ printer->setPaperSize(static_cast<QPrinter::PaperSize>(ps));
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
void QUnixPrintWidgetPrivate::setupPrinter()
|
||||
{
|
||||
const int printerCount = widget.printers->count();
|
||||
@@ -986,6 +1018,10 @@
|
||||
|
||||
if (propertiesDialog && propertiesDialog->result() == QDialog::Accepted)
|
||||
propertiesDialog->setupPrinter();
|
||||
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
|
||||
+ if (!propertiesDialog)
|
||||
+ setCupsProperties();
|
||||
+#endif
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100
|
||||
@@ -569,6 +569,32 @@
|
||||
void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups)
|
||||
{
|
||||
options.duplex->setEnabled(cups && cups->ppdOption("Duplex"));
|
||||
+
|
||||
+ if (cups) {
|
||||
+ const ppd_option_t* duplex = cups->ppdOption("Duplex");
|
||||
+ if (duplex) {
|
||||
+ // copy default ppd duplex to qt dialog
|
||||
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
|
||||
+ options.duplexShort->setChecked(true);
|
||||
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
|
||||
+ options.duplexLong->setChecked(true);
|
||||
+ else
|
||||
+ options.noDuplex->setChecked(true);
|
||||
+ }
|
||||
+
|
||||
+ if (cups->currentPPD()) {
|
||||
+ // set default color
|
||||
+ if (cups->currentPPD()->color_device)
|
||||
+ options.color->setChecked(true);
|
||||
+ else
|
||||
+ options.grayscale->setChecked(true);
|
||||
+ }
|
||||
+
|
||||
+ // set collation
|
||||
+ const ppd_option_t *collate = cups->ppdOption("Collate");
|
||||
+ if (collate)
|
||||
+ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0);
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
|
||||
diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100
|
||||
@@ -627,6 +627,44 @@
|
||||
&& d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) {
|
||||
setOutputFormat(QPrinter::PdfFormat);
|
||||
}
|
||||
+
|
||||
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
|
||||
+ // fill in defaults from ppd file
|
||||
+ QCUPSSupport cups;
|
||||
+
|
||||
+ int printernum = -1;
|
||||
+ for (int i = 0; i < cups.availablePrintersCount(); i++) {
|
||||
+ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name)
|
||||
+ printernum = i;
|
||||
+ }
|
||||
+ if (printernum >= 0) {
|
||||
+ cups.setCurrentPrinter(printernum);
|
||||
+
|
||||
+ const ppd_option_t* duplex = cups.ppdOption("Duplex");
|
||||
+ if (duplex) {
|
||||
+ // copy default ppd duplex to qt dialog
|
||||
+ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0)
|
||||
+ setDuplex(DuplexShortSide);
|
||||
+ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0)
|
||||
+ setDuplex(DuplexLongSide);
|
||||
+ else
|
||||
+ setDuplex(DuplexNone);
|
||||
+ }
|
||||
+
|
||||
+ if (cups.currentPPD()) {
|
||||
+ // set default color
|
||||
+ if (cups.currentPPD()->color_device)
|
||||
+ setColorMode(Color);
|
||||
+ else
|
||||
+ setColorMode(GrayScale);
|
||||
+ }
|
||||
+
|
||||
+ // set collation
|
||||
+ const ppd_option_t *collate = cups.ppdOption("Collate");
|
||||
+ if (collate)
|
||||
+ setCollateCopies(qstrcmp(collate->defchoice, "True")==0);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*!
|
|
@ -0,0 +1,18 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp.cve-2010-0047-call-after-free 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp 2010-05-06 12:21:13.852469331 +0200
|
||||
@@ -1260,9 +1260,11 @@ bool FrameLoader::requestObject(RenderPa
|
||||
|
||||
ASSERT(renderer->node()->hasTagName(objectTag) || renderer->node()->hasTagName(embedTag));
|
||||
HTMLPlugInElement* element = static_cast<HTMLPlugInElement*>(renderer->node());
|
||||
-
|
||||
- // FIXME: OK to always make a new frame? When does the old frame get removed?
|
||||
- return loadSubframe(element, completedURL, frameName, m_outgoingReferrer);
|
||||
+
|
||||
+ // If the plug-in element already contains a subframe, requestFrame will re-use it. Otherwise,
|
||||
+ // it will create a new frame and set it as the RenderPart's widget, causing what was previously
|
||||
+ // in the widget to be torn down.
|
||||
+ return requestFrame(element, completedURL, frameName);
|
||||
}
|
||||
|
||||
bool FrameLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
|
|
@ -0,0 +1,267 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSGrammar.y 2010-02-25 17:07:29.114742034 +0100
|
||||
@@ -416,7 +416,9 @@ valid_rule:
|
||||
;
|
||||
|
||||
rule:
|
||||
- valid_rule
|
||||
+ valid_rule {
|
||||
+ static_cast<CSSParser*>(parser)->m_hadSyntacticallyValidCSSRule = true;
|
||||
+ }
|
||||
| invalid_rule
|
||||
| invalid_at
|
||||
| invalid_import
|
||||
@@ -1517,8 +1519,12 @@ invalid_rule:
|
||||
;
|
||||
|
||||
invalid_block:
|
||||
- '{' error invalid_block_list error closing_brace
|
||||
- | '{' error closing_brace
|
||||
+ '{' error invalid_block_list error closing_brace {
|
||||
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
|
||||
+ }
|
||||
+ | '{' error closing_brace {
|
||||
+ static_cast<CSSParser*>(parser)->invalidBlockHit();
|
||||
+ }
|
||||
;
|
||||
|
||||
invalid_block_list:
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-02-25 17:13:34.292803953 +0100
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "CachedCSSStyleSheet.h"
|
||||
#include "DocLoader.h"
|
||||
#include "Document.h"
|
||||
+#include "SecurityOrigin.h"
|
||||
#include "MediaList.h"
|
||||
#include "Settings.h"
|
||||
#include <wtf/StdLibExtras.h>
|
||||
@@ -60,11 +61,21 @@ void CSSImportRule::setCSSStyleSheet(con
|
||||
m_styleSheet->setParent(0);
|
||||
m_styleSheet = CSSStyleSheet::create(this, url, charset);
|
||||
|
||||
+ bool crossOriginCSS = false;
|
||||
+ bool validMIMEType = false;
|
||||
CSSStyleSheet* parent = parentStyleSheet();
|
||||
bool strict = !parent || parent->useStrictParsing();
|
||||
- String sheetText = sheet->sheetText(strict);
|
||||
+ bool enforceMIMEType = strict;
|
||||
+
|
||||
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
|
||||
m_styleSheet->parseString(sheetText, strict);
|
||||
|
||||
+ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
|
||||
+ crossOriginCSS = true;
|
||||
+
|
||||
+ if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
|
||||
+ m_styleSheet = CSSStyleSheet::create(this, url, charset);
|
||||
+
|
||||
if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
|
||||
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
|
||||
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-25 17:07:29.101741771 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.cpp 2010-02-25 17:07:29.117741744 +0100
|
||||
@@ -139,6 +139,7 @@ CSSParser::CSSParser(bool strictParsing)
|
||||
, m_currentShorthand(0)
|
||||
, m_implicitShorthand(false)
|
||||
, m_hasFontFaceOnlyValues(false)
|
||||
+ , m_hadSyntacticallyValidCSSRule(false)
|
||||
, m_defaultNamespace(starAtom)
|
||||
, m_data(0)
|
||||
, yy_start(1)
|
||||
@@ -5175,6 +5176,12 @@ WebKitCSSKeyframeRule* CSSParser::create
|
||||
return keyframePtr;
|
||||
}
|
||||
|
||||
+void CSSParser::invalidBlockHit()
|
||||
+{
|
||||
+ if (m_styleSheet && !m_hadSyntacticallyValidCSSRule)
|
||||
+ m_styleSheet->setHasSyntacticallyValidCSSHeader(false);
|
||||
+}
|
||||
+
|
||||
static int cssPropertyID(const UChar* propertyName, unsigned length)
|
||||
{
|
||||
if (!length)
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSParser.h 2010-02-25 17:07:29.117741744 +0100
|
||||
@@ -191,6 +191,7 @@ namespace WebCore {
|
||||
bool addVariableDeclarationBlock(const CSSParserString&);
|
||||
bool checkForVariables(CSSParserValueList*);
|
||||
void addUnresolvedProperty(int propId, bool important);
|
||||
+ void invalidBlockHit();
|
||||
|
||||
Vector<CSSSelector*>* reusableSelectorVector() { return &m_reusableSelectorVector; }
|
||||
|
||||
@@ -212,6 +213,7 @@ namespace WebCore {
|
||||
bool m_implicitShorthand;
|
||||
|
||||
bool m_hasFontFaceOnlyValues;
|
||||
+ bool m_hadSyntacticallyValidCSSRule;
|
||||
|
||||
Vector<String> m_variableNames;
|
||||
Vector<RefPtr<CSSValue> > m_variableValues;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-02-25 17:07:29.118741824 +0100
|
||||
@@ -41,6 +41,7 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe
|
||||
, m_loadCompleted(false)
|
||||
, m_strictParsing(!parentSheet || parentSheet->useStrictParsing())
|
||||
, m_isUserStyleSheet(parentSheet ? parentSheet->isUserStyleSheet() : false)
|
||||
+ , m_hasSyntacticallyValidCSSHeader(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -52,6 +53,7 @@ CSSStyleSheet::CSSStyleSheet(Node* paren
|
||||
, m_loadCompleted(false)
|
||||
, m_strictParsing(false)
|
||||
, m_isUserStyleSheet(false)
|
||||
+ , m_hasSyntacticallyValidCSSHeader(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -61,6 +63,7 @@ CSSStyleSheet::CSSStyleSheet(CSSRule* ow
|
||||
, m_charset(charset)
|
||||
, m_loadCompleted(false)
|
||||
, m_strictParsing(!ownerRule || ownerRule->useStrictParsing())
|
||||
+ , m_hasSyntacticallyValidCSSHeader(true)
|
||||
{
|
||||
CSSStyleSheet* parentSheet = ownerRule ? ownerRule->parentStyleSheet() : 0;
|
||||
m_doc = parentSheet ? parentSheet->doc() : 0;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-02-25 17:07:29.118741824 +0100
|
||||
@@ -95,6 +95,8 @@ public:
|
||||
|
||||
void setIsUserStyleSheet(bool b) { m_isUserStyleSheet = b; }
|
||||
bool isUserStyleSheet() const { return m_isUserStyleSheet; }
|
||||
+ void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; }
|
||||
+ bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
|
||||
|
||||
private:
|
||||
CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
|
||||
@@ -110,6 +112,7 @@ private:
|
||||
bool m_loadCompleted : 1;
|
||||
bool m_strictParsing : 1;
|
||||
bool m_isUserStyleSheet : 1;
|
||||
+ bool m_hasSyntacticallyValidCSSHeader : 1;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-02-25 17:07:29.118741824 +0100
|
||||
@@ -203,7 +203,10 @@ void ProcessingInstruction::setCSSStyleS
|
||||
#endif
|
||||
RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset);
|
||||
m_sheet = newSheet;
|
||||
- parseStyleSheet(sheet->sheetText());
|
||||
+ // We don't need the cross-origin security check here because we are
|
||||
+ // getting the sheet text in "strict" mode. This enforces a valid CSS MIME
|
||||
+ // type.
|
||||
+ parseStyleSheet(sheet->sheetText(true));
|
||||
newSheet->setTitle(m_title);
|
||||
newSheet->setMedia(MediaList::create(newSheet.get(), m_media));
|
||||
newSheet->setDisabled(m_alternate);
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-02-25 17:07:29.119741915 +0100
|
||||
@@ -260,14 +260,27 @@ void HTMLLinkElement::setCSSStyleSheet(c
|
||||
bool strictParsing = !document()->inCompatMode();
|
||||
bool enforceMIMEType = strictParsing;
|
||||
|
||||
+ bool crossOriginCSS = false;
|
||||
+ bool validMIMEType = false;
|
||||
// Check to see if we should enforce the MIME type of the CSS resource in strict mode.
|
||||
// Running in iWeb 2 is one example of where we don't want to - <rdar://problem/6099748>
|
||||
if (enforceMIMEType && document()->page() && !document()->page()->settings()->enforceCSSMIMETypeInStrictMode())
|
||||
enforceMIMEType = false;
|
||||
|
||||
- String sheetText = sheet->sheetText(enforceMIMEType);
|
||||
+ String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
|
||||
m_sheet->parseString(sheetText, strictParsing);
|
||||
|
||||
+ // If we're loading a stylesheet cross-origin, and the MIME type is not
|
||||
+ // standard, require the CSS to at least start with a syntactically
|
||||
+ // valid CSS rule.
|
||||
+ // This prevents an attacker playing games by injecting CSS strings into
|
||||
+ // HTML, XML, JSON, etc. etc.
|
||||
+ if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
|
||||
+ crossOriginCSS = true;
|
||||
+
|
||||
+ if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader())
|
||||
+ m_sheet = CSSStyleSheet::create(this, url, charset);
|
||||
+
|
||||
if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
|
||||
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
|
||||
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-02-25 17:07:29.119741915 +0100
|
||||
@@ -71,11 +71,11 @@ String CachedCSSStyleSheet::encoding() c
|
||||
return m_decoder->encoding().name();
|
||||
}
|
||||
|
||||
-const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType) const
|
||||
+const String CachedCSSStyleSheet::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const
|
||||
{
|
||||
ASSERT(!isPurgeable());
|
||||
|
||||
- if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType))
|
||||
+ if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType))
|
||||
return String();
|
||||
|
||||
if (!m_decodedSheetText.isNull())
|
||||
@@ -122,12 +122,12 @@ void CachedCSSStyleSheet::error()
|
||||
checkNotify();
|
||||
}
|
||||
|
||||
-bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType) const
|
||||
+bool CachedCSSStyleSheet::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const
|
||||
{
|
||||
if (errorOccurred())
|
||||
return false;
|
||||
|
||||
- if (!enforceMIMEType)
|
||||
+ if (!enforceMIMEType && !hasValidMIMEType)
|
||||
return true;
|
||||
|
||||
// This check exactly matches Firefox. Note that we grab the Content-Type
|
||||
@@ -138,7 +138,12 @@ bool CachedCSSStyleSheet::canUseSheet(bo
|
||||
// This code defaults to allowing the stylesheet for non-HTTP protocols so
|
||||
// folks can use standards mode for local HTML documents.
|
||||
String mimeType = extractMIMETypeFromMediaType(response().httpHeaderField("Content-Type"));
|
||||
- return mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
|
||||
+ bool typeOK = mimeType.isEmpty() || equalIgnoringCase(mimeType, "text/css") || equalIgnoringCase(mimeType, "application/x-unknown-content-type");
|
||||
+ if (hasValidMIMEType)
|
||||
+ *hasValidMIMEType = typeOK;
|
||||
+ if (!enforceMIMEType)
|
||||
+ return true;
|
||||
+ return typeOK;
|
||||
}
|
||||
|
||||
}
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h.cve-2010-0051-lax-css-parsing-cross-domain-theft 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.h 2010-02-25 17:07:29.120741848 +0100
|
||||
@@ -40,7 +40,7 @@ namespace WebCore {
|
||||
CachedCSSStyleSheet(const String& URL, const String& charset);
|
||||
virtual ~CachedCSSStyleSheet();
|
||||
|
||||
- const String sheetText(bool enforceMIMEType = true) const;
|
||||
+ const String sheetText(bool enforceMIMEType = true, bool* hasValidMIMEType = 0) const;
|
||||
|
||||
virtual void didAddClient(CachedResourceClient*);
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace WebCore {
|
||||
void checkNotify();
|
||||
|
||||
private:
|
||||
- bool canUseSheet(bool enforceMIMEType) const;
|
||||
+ bool canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const;
|
||||
|
||||
protected:
|
||||
RefPtr<TextResourceDecoder> m_decoder;
|
|
@ -0,0 +1,85 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLFormElement.cpp 2010-02-25 15:50:05.987741463 +0100
|
||||
@@ -515,11 +515,13 @@ bool HTMLFormElement::isURLAttribute(Att
|
||||
|
||||
void HTMLFormElement::registerImgElement(HTMLImageElement* e)
|
||||
{
|
||||
+ ASSERT(imgElements.find(e) == notFound);
|
||||
imgElements.append(e);
|
||||
}
|
||||
|
||||
void HTMLFormElement::removeImgElement(HTMLImageElement* e)
|
||||
{
|
||||
+ ASSERT(imgElements.find(e) == notFound);
|
||||
removeFromVector(imgElements, e);
|
||||
}
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.cpp 2010-02-25 15:43:45.016742027 +0100
|
||||
@@ -209,6 +209,40 @@ void HTMLImageElement::removedFromDocume
|
||||
HTMLElement::removedFromDocument();
|
||||
}
|
||||
|
||||
+void HTMLImageElement::insertedIntoTree(bool deep)
|
||||
+{
|
||||
+ if (m_form) {
|
||||
+ // m_form was set by constructor. In debug builds, check that it's an ancestor indeed.
|
||||
+#ifndef NDEBUG
|
||||
+ for (Node* ancestor = parentNode(); /* no end condition - there must be a form ancestor */; ancestor = ancestor->parentNode()) {
|
||||
+ ASSERT(ancestor);
|
||||
+ if (ancestor->hasTagName(formTag)) {
|
||||
+ ASSERT(m_form == static_cast<HTMLFormElement*>(ancestor));
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+ } else {
|
||||
+ for (Node* ancestor = parentNode(); ancestor; ancestor = ancestor->parentNode()) {
|
||||
+ if (ancestor->hasTagName(formTag)) {
|
||||
+ m_form = static_cast<HTMLFormElement*>(ancestor);
|
||||
+ m_form->registerImgElement(this);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ HTMLElement::insertedIntoTree(deep);
|
||||
+}
|
||||
+
|
||||
+void HTMLImageElement::removedFromTree(bool deep)
|
||||
+{
|
||||
+ if (m_form)
|
||||
+ m_form->removeImgElement(this);
|
||||
+ m_form = 0;
|
||||
+ HTMLElement::removedFromTree(deep);
|
||||
+}
|
||||
+
|
||||
int HTMLImageElement::width(bool ignorePendingStylesheets) const
|
||||
{
|
||||
if (!renderer()) {
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h.cve-2010-0054-image-element-pointer-name-getter 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLImageElement.h 2010-02-25 15:41:18.340929598 +0100
|
||||
@@ -45,8 +45,6 @@ public:
|
||||
|
||||
virtual void attach();
|
||||
virtual RenderObject* createRenderer(RenderArena*, RenderStyle*);
|
||||
- virtual void insertedIntoDocument();
|
||||
- virtual void removedFromDocument();
|
||||
|
||||
virtual bool canStartSelection() const { return false; }
|
||||
|
||||
@@ -105,6 +103,11 @@ public:
|
||||
virtual void addSubresourceAttributeURLs(ListHashSet<KURL>&) const;
|
||||
|
||||
private:
|
||||
+ virtual void insertedIntoDocument();
|
||||
+ virtual void removedFromDocument();
|
||||
+ virtual void insertedIntoTree(bool deep);
|
||||
+ virtual void removedFromTree(bool deep);
|
||||
+
|
||||
HTMLImageLoader m_imageLoader;
|
||||
String usemap;
|
||||
bool ismap;
|
|
@ -0,0 +1,782 @@
|
|||
diff -U0 qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/ChangeLog 2010-05-03 15:55:37.703101680 +0200
|
||||
@@ -0,0 +1,90 @@
|
||||
+2010-01-20 Adam Barth <abarth@webkit.org>
|
||||
+
|
||||
+ Reviewed by Darin Adler.
|
||||
+
|
||||
+ Stylesheet href property shows redirected URL unlike other browsers
|
||||
+ https://bugs.webkit.org/show_bug.cgi?id=33683
|
||||
+
|
||||
+ Teach StyleSheet the difference between original and final URLs in
|
||||
+ redirect chains. Unfortunately, StyleSheet needs to know both of these
|
||||
+ URLs. The original URL is needed for the href property and the final
|
||||
+ URL is needed as the baseURL.
|
||||
+
|
||||
+ This change required touching a lot of lines of code because we need to
|
||||
+ plumb this information to the StyleSheet object. I audited all
|
||||
+ existing clients of href() and setHref() to see whether they wanted the
|
||||
+ original or final URLs. I then updated the clients (except the JS
|
||||
+ bindings themselves) to use the correct accessor.
|
||||
+
|
||||
+ Test: http/tests/security/stylesheet-href-redirect.html
|
||||
+
|
||||
+ * css/CSSImportRule.cpp:
|
||||
+ (WebCore::CSSImportRule::setCSSStyleSheet):
|
||||
+ (WebCore::CSSImportRule::insertedIntoParent):
|
||||
+ * css/CSSImportRule.h:
|
||||
+ * css/CSSStyleSheet.cpp:
|
||||
+ (WebCore::CSSStyleSheet::CSSStyleSheet):
|
||||
+ * css/CSSStyleSheet.h:
|
||||
+ (WebCore::CSSStyleSheet::create):
|
||||
+ (WebCore::CSSStyleSheet::createInline): Added a new constructor to deal
|
||||
+ with "inline" style sheets that don't have a distinct original and
|
||||
+ final URL.
|
||||
+ * css/StyleBase.cpp:
|
||||
+ (WebCore::StyleBase::baseURL): This code wants to use the final URL,
|
||||
+ not the original URL. Updated it to grab the baseURL directly.
|
||||
+ * css/StyleSheet.cpp:
|
||||
+ (WebCore::StyleSheet::StyleSheet):
|
||||
+ * css/StyleSheet.h:
|
||||
+ (WebCore::StyleSheet::href):
|
||||
+ (WebCore::StyleSheet::setBaseURL): This function really just updates
|
||||
+ the base URL of the style sheet, so I made it more explicit.
|
||||
+ (WebCore::StyleSheet::putativeBaseURL): We need an accessor for the
|
||||
+ base URL, but baseURL is already taken.
|
||||
+ * dom/Document.cpp:
|
||||
+ (WebCore::Document::updateBaseURL):
|
||||
+ (WebCore::Document::pageUserSheet):
|
||||
+ (WebCore::Document::pageGroupUserSheets):
|
||||
+ (WebCore::Document::elementSheet):
|
||||
+ (WebCore::Document::mappedElementSheet):
|
||||
+ * dom/ProcessingInstruction.cpp:
|
||||
+ (WebCore::ProcessingInstruction::checkStyleSheet):
|
||||
+ (WebCore::ProcessingInstruction::setCSSStyleSheet):
|
||||
+ (WebCore::ProcessingInstruction::setXSLStyleSheet):
|
||||
+ * dom/ProcessingInstruction.h:
|
||||
+ * dom/StyleElement.cpp:
|
||||
+ (WebCore::StyleElement::createSheet):
|
||||
+ * html/HTMLLinkElement.cpp:
|
||||
+ (WebCore::HTMLLinkElement::setCSSStyleSheet):
|
||||
+ * html/HTMLLinkElement.h:
|
||||
+ * loader/CachedCSSStyleSheet.cpp:
|
||||
+ (WebCore::CachedCSSStyleSheet::didAddClient):
|
||||
+ (WebCore::CachedCSSStyleSheet::checkNotify): This code now passes both
|
||||
+ the original and final URL into setCSSStyleSheet so that the style
|
||||
+ sheet can have both.
|
||||
+ * loader/CachedResourceClient.h:
|
||||
+ (WebCore::CachedResourceClient::setCSSStyleSheet):
|
||||
+ (WebCore::CachedResourceClient::setXSLStyleSheet):
|
||||
+ * loader/CachedXSLStyleSheet.cpp:
|
||||
+ (WebCore::CachedXSLStyleSheet::didAddClient):
|
||||
+ (WebCore::CachedXSLStyleSheet::checkNotify): I don't have any direct
|
||||
+ evidence that we need to change the XSLStyleSheet behavior, which is
|
||||
+ why I wasn't able to add a test for the behavior. However, the objects
|
||||
+ are parallel enough that it seemed like the right thing to do.
|
||||
+ * xml/XSLImportRule.cpp:
|
||||
+ (WebCore::XSLImportRule::setXSLStyleSheet):
|
||||
+ (WebCore::XSLImportRule::loadSheet):
|
||||
+ * xml/XSLImportRule.h:
|
||||
+ * xml/XSLStyleSheet.h:
|
||||
+ (WebCore::XSLStyleSheet::create):
|
||||
+ (WebCore::XSLStyleSheet::createEmbedded):
|
||||
+ * xml/XSLStyleSheetLibxslt.cpp:
|
||||
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
|
||||
+ (WebCore::XSLStyleSheet::parseString):
|
||||
+ (WebCore::XSLStyleSheet::loadChildSheets):
|
||||
+ * xml/XSLStyleSheetQt.cpp:
|
||||
+ (WebCore::XSLStyleSheet::XSLStyleSheet):
|
||||
+ * xml/XSLTProcessorLibxslt.cpp:
|
||||
+ (WebCore::xsltStylesheetPointer):
|
||||
+ * xml/XSLTProcessorQt.cpp:
|
||||
+ (WebCore::XSLTProcessor::transformToString):
|
||||
+
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.652102626 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.cpp 2010-05-03 16:49:14.631038884 +0200
|
||||
@@ -55,11 +55,11 @@ CSSImportRule::~CSSImportRule()
|
||||
m_cachedSheet->removeClient(this);
|
||||
}
|
||||
|
||||
-void CSSImportRule::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
+void CSSImportRule::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
{
|
||||
if (m_styleSheet)
|
||||
m_styleSheet->setParent(0);
|
||||
- m_styleSheet = CSSStyleSheet::create(this, url, charset);
|
||||
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
|
||||
|
||||
bool crossOriginCSS = false;
|
||||
bool validMIMEType = false;
|
||||
@@ -70,17 +70,17 @@ void CSSImportRule::setCSSStyleSheet(con
|
||||
String sheetText = sheet->sheetText(enforceMIMEType, &validMIMEType);
|
||||
m_styleSheet->parseString(sheetText, strict);
|
||||
|
||||
- if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
|
||||
+ if (!parent || !parent->doc() || !parent->doc()->securityOrigin()->canRequest(baseURL))
|
||||
crossOriginCSS = true;
|
||||
|
||||
if (crossOriginCSS && !validMIMEType && !m_styleSheet->hasSyntacticallyValidCSSHeader())
|
||||
- m_styleSheet = CSSStyleSheet::create(this, url, charset);
|
||||
+ m_styleSheet = CSSStyleSheet::create(this, href, baseURL, charset);
|
||||
|
||||
if (strict && parent && parent->doc() && parent->doc()->settings() && parent->doc()->settings()->needsSiteSpecificQuirks()) {
|
||||
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
|
||||
DEFINE_STATIC_LOCAL(const String, slashKHTMLFixesDotCss, ("/KHTMLFixes.css"));
|
||||
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
|
||||
- if (url.endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
|
||||
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && sheetText == mediaWikiKHTMLFixesStyleSheet) {
|
||||
ASSERT(m_styleSheet->length() == 1);
|
||||
ExceptionCode ec;
|
||||
m_styleSheet->deleteRule(0, ec);
|
||||
@@ -109,15 +109,16 @@ void CSSImportRule::insertedIntoParent()
|
||||
return;
|
||||
|
||||
String absHref = m_strHref;
|
||||
- if (!parentSheet->href().isNull())
|
||||
+ if (!parentSheet->putativeBaseURL().isNull())
|
||||
// use parent styleheet's URL as the base URL
|
||||
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
|
||||
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
|
||||
|
||||
// Check for a cycle in our import chain. If we encounter a stylesheet
|
||||
// in our parent chain with the same URL, then just bail.
|
||||
StyleBase* root = this;
|
||||
for (StyleBase* curr = parent(); curr; curr = curr->parent()) {
|
||||
- if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->href())
|
||||
+ // FIXME: This is wrong if the putativeBaseURL was updated via document::updateBaseURL.
|
||||
+ if (curr->isCSSStyleSheet() && absHref == static_cast<CSSStyleSheet*>(curr)->putativeBaseURL().string())
|
||||
return;
|
||||
root = curr;
|
||||
}
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSImportRule.h 2010-05-03 15:55:37.740976769 +0200
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
virtual unsigned short type() const { return IMPORT_RULE; }
|
||||
|
||||
// from CachedResourceClient
|
||||
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
|
||||
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
|
||||
|
||||
String m_strHref;
|
||||
RefPtr<MediaList> m_lstMedia;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.cpp 2010-05-03 15:55:37.740976769 +0200
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
-CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset)
|
||||
- : StyleSheet(parentSheet, href)
|
||||
+CSSStyleSheet::CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset)
|
||||
+ : StyleSheet(parentSheet, href, baseURL)
|
||||
, m_doc(parentSheet ? parentSheet->doc() : 0)
|
||||
, m_namespaces(0)
|
||||
, m_charset(charset)
|
||||
@@ -45,8 +45,8 @@ CSSStyleSheet::CSSStyleSheet(CSSStyleShe
|
||||
{
|
||||
}
|
||||
|
||||
-CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const String& charset)
|
||||
- : StyleSheet(parentNode, href)
|
||||
+CSSStyleSheet::CSSStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, const String& charset)
|
||||
+ : StyleSheet(parentNode, href, baseURL)
|
||||
, m_doc(parentNode->document())
|
||||
, m_namespaces(0)
|
||||
, m_charset(charset)
|
||||
@@ -57,8 +57,8 @@ CSSStyleSheet::CSSStyleSheet(Node* paren
|
||||
{
|
||||
}
|
||||
|
||||
-CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset)
|
||||
- : StyleSheet(ownerRule, href)
|
||||
+CSSStyleSheet::CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
|
||||
+ : StyleSheet(ownerRule, href, baseURL)
|
||||
, m_namespaces(0)
|
||||
, m_charset(charset)
|
||||
, m_loadCompleted(false)
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.660977242 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/CSSStyleSheet.h 2010-05-03 15:55:37.745101706 +0200
|
||||
@@ -38,27 +38,31 @@ class CSSStyleSheet : public StyleSheet
|
||||
public:
|
||||
static PassRefPtr<CSSStyleSheet> create()
|
||||
{
|
||||
- return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), String()));
|
||||
+ return adoptRef(new CSSStyleSheet(static_cast<CSSStyleSheet*>(0), String(), KURL(), String()));
|
||||
}
|
||||
static PassRefPtr<CSSStyleSheet> create(Node* ownerNode)
|
||||
{
|
||||
- return adoptRef(new CSSStyleSheet(ownerNode, String(), String()));
|
||||
+ return adoptRef(new CSSStyleSheet(ownerNode, String(), KURL(), String()));
|
||||
}
|
||||
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href)
|
||||
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL)
|
||||
{
|
||||
- return adoptRef(new CSSStyleSheet(ownerNode, href, String()));
|
||||
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, String()));
|
||||
}
|
||||
- static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const String& charset)
|
||||
+ static PassRefPtr<CSSStyleSheet> create(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset)
|
||||
{
|
||||
- return adoptRef(new CSSStyleSheet(ownerNode, href, charset));
|
||||
+ return adoptRef(new CSSStyleSheet(ownerNode, href, baseURL, charset));
|
||||
}
|
||||
- static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const String& charset)
|
||||
+ static PassRefPtr<CSSStyleSheet> create(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset)
|
||||
{
|
||||
- return adoptRef(new CSSStyleSheet(ownerRule, href, charset));
|
||||
+ return adoptRef(new CSSStyleSheet(ownerRule, href, baseURL, charset));
|
||||
+ }
|
||||
+ static PassRefPtr<CSSStyleSheet> createInline(Node* ownerNode, const KURL& baseURL)
|
||||
+ {
|
||||
+ return adoptRef(new CSSStyleSheet(ownerNode, baseURL.string(), baseURL, String()));
|
||||
}
|
||||
|
||||
virtual ~CSSStyleSheet();
|
||||
-
|
||||
+
|
||||
CSSRule* ownerRule() const;
|
||||
PassRefPtr<CSSRuleList> cssRules(bool omitCharsetRules = false);
|
||||
unsigned insertRule(const String& rule, unsigned index, ExceptionCode&);
|
||||
@@ -72,7 +76,7 @@ public:
|
||||
|
||||
void addNamespace(CSSParser*, const AtomicString& prefix, const AtomicString& uri);
|
||||
const AtomicString& determineNamespace(const AtomicString& prefix);
|
||||
-
|
||||
+
|
||||
virtual void styleSheetChanged();
|
||||
|
||||
virtual bool parseString(const String&, bool strict = true);
|
||||
@@ -99,10 +103,10 @@ public:
|
||||
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
|
||||
|
||||
private:
|
||||
- CSSStyleSheet(Node* ownerNode, const String& href, const String& charset);
|
||||
- CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const String& charset);
|
||||
- CSSStyleSheet(CSSRule* ownerRule, const String& href, const String& charset);
|
||||
-
|
||||
+ CSSStyleSheet(Node* ownerNode, const String& href, const KURL& baseURL, const String& charset);
|
||||
+ CSSStyleSheet(CSSStyleSheet* parentSheet, const String& href, const KURL& baseURL, const String& charset);
|
||||
+ CSSStyleSheet(CSSRule* ownerRule, const String& href, const KURL& baseURL, const String& charset);
|
||||
+
|
||||
virtual bool isCSSStyleSheet() const { return true; }
|
||||
virtual String type() const { return "text/css"; }
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleBase.cpp 2010-05-03 15:55:37.757976382 +0200
|
||||
@@ -56,9 +56,9 @@ KURL StyleBase::baseURL() const
|
||||
StyleSheet* sheet = const_cast<StyleBase*>(this)->stylesheet();
|
||||
if (!sheet)
|
||||
return KURL();
|
||||
- if (!sheet->href().isNull())
|
||||
- return KURL(ParsedURLString, sheet->href());
|
||||
- if (sheet->parent())
|
||||
+ if (!sheet->putativeBaseURL().isNull())
|
||||
+ return sheet->putativeBaseURL();
|
||||
+ if (sheet->parent())
|
||||
return sheet->parent()->baseURL();
|
||||
if (!sheet->ownerNode())
|
||||
return KURL();
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.cpp 2010-05-03 15:55:37.758976847 +0200
|
||||
@@ -26,27 +26,30 @@
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
-StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href)
|
||||
+StyleSheet::StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL)
|
||||
: StyleList(parentSheet)
|
||||
, m_parentNode(0)
|
||||
- , m_strHref(href)
|
||||
+ , m_href(href)
|
||||
+ , m_baseURL(baseURL)
|
||||
, m_disabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
-StyleSheet::StyleSheet(Node* parentNode, const String& href)
|
||||
+StyleSheet::StyleSheet(Node* parentNode, const String& href, const KURL& baseURL)
|
||||
: StyleList(0)
|
||||
, m_parentNode(parentNode)
|
||||
- , m_strHref(href)
|
||||
+ , m_href(href)
|
||||
+ , m_baseURL(baseURL)
|
||||
, m_disabled(false)
|
||||
{
|
||||
}
|
||||
|
||||
-StyleSheet::StyleSheet(StyleBase* owner, const String& href)
|
||||
+StyleSheet::StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL)
|
||||
: StyleList(owner)
|
||||
, m_parentNode(0)
|
||||
- , m_strHref(href)
|
||||
+ , m_href(href)
|
||||
+ , m_baseURL(baseURL)
|
||||
, m_disabled(false)
|
||||
{
|
||||
}
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/css/StyleSheet.h 2010-05-03 15:55:37.758976847 +0200
|
||||
@@ -41,8 +41,18 @@ public:
|
||||
|
||||
Node* ownerNode() const { return m_parentNode; }
|
||||
StyleSheet *parentStyleSheet() const;
|
||||
- const String& href() const { return m_strHref; }
|
||||
- void setHref(const String& href) { m_strHref = href; }
|
||||
+
|
||||
+ // Note that href is the URL that started the redirect chain that led to
|
||||
+ // this style sheet. This property probably isn't useful for much except
|
||||
+ // the JavaScript binding (which needs to use this value for security).
|
||||
+ const String& href() const { return m_href; }
|
||||
+
|
||||
+ void setBaseURL(const KURL& baseURL) { m_baseURL = baseURL; }
|
||||
+
|
||||
+ // Notice that this object inherits a baseURL function from StyleBase that
|
||||
+ // crawls the parent() relation looking for a non-0 putativeBaseURL.
|
||||
+ const KURL& putativeBaseURL() const { return m_baseURL; }
|
||||
+
|
||||
const String& title() const { return m_strTitle; }
|
||||
void setTitle(const String& s) { m_strTitle = s; }
|
||||
MediaList* media() const { return m_media.get(); }
|
||||
@@ -58,15 +68,16 @@ public:
|
||||
virtual bool parseString(const String&, bool strict = true) = 0;
|
||||
|
||||
protected:
|
||||
- StyleSheet(Node* ownerNode, const String& href);
|
||||
- StyleSheet(StyleSheet* parentSheet, const String& href);
|
||||
- StyleSheet(StyleBase* owner, const String& href);
|
||||
+ StyleSheet(Node* ownerNode, const String& href, const KURL& baseURL);
|
||||
+ StyleSheet(StyleSheet* parentSheet, const String& href, const KURL& baseURL);
|
||||
+ StyleSheet(StyleBase* owner, const String& href, const KURL& baseURL);
|
||||
|
||||
private:
|
||||
virtual bool isStyleSheet() const { return true; }
|
||||
|
||||
Node* m_parentNode;
|
||||
- String m_strHref;
|
||||
+ String m_href;
|
||||
+ KURL m_baseURL;
|
||||
String m_strTitle;
|
||||
RefPtr<MediaList> m_media;
|
||||
bool m_disabled;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/Document.cpp 2010-05-03 15:55:37.760977901 +0200
|
||||
@@ -1920,9 +1920,9 @@ void Document::updateBaseURL()
|
||||
m_baseURL = KURL();
|
||||
|
||||
if (m_elemSheet)
|
||||
- m_elemSheet->setHref(m_baseURL.string());
|
||||
+ m_elemSheet->setBaseURL(m_baseURL);
|
||||
if (m_mappedElementSheet)
|
||||
- m_mappedElementSheet->setHref(m_baseURL.string());
|
||||
+ m_mappedElementSheet->setBaseURL(m_baseURL);
|
||||
}
|
||||
|
||||
String Document::userAgent(const KURL& url) const
|
||||
@@ -1944,7 +1944,7 @@ CSSStyleSheet* Document::pageUserSheet()
|
||||
return 0;
|
||||
|
||||
// Parse the sheet and cache it.
|
||||
- m_pageUserSheet = CSSStyleSheet::create(this, settings()->userStyleSheetLocation());
|
||||
+ m_pageUserSheet = CSSStyleSheet::createInline(this, settings()->userStyleSheetLocation());
|
||||
m_pageUserSheet->setIsUserStyleSheet(true);
|
||||
m_pageUserSheet->parseString(userSheetText, !inCompatMode());
|
||||
return m_pageUserSheet.get();
|
||||
@@ -1979,7 +1979,7 @@ const Vector<RefPtr<CSSStyleSheet> >* Do
|
||||
const UserStyleSheet* sheet = sheets->at(i).get();
|
||||
if (!UserContentURLPattern::matchesPatterns(url(), sheet->whitelist(), sheet->blacklist()))
|
||||
continue;
|
||||
- RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this), sheet->url());
|
||||
+ RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::createInline(const_cast<Document*>(this), sheet->url());
|
||||
parsedSheet->setIsUserStyleSheet(true);
|
||||
parsedSheet->parseString(sheet->source(), !inCompatMode());
|
||||
if (!m_pageGroupUserSheets)
|
||||
@@ -2001,14 +2001,14 @@ void Document::clearPageGroupUserSheets(
|
||||
CSSStyleSheet* Document::elementSheet()
|
||||
{
|
||||
if (!m_elemSheet)
|
||||
- m_elemSheet = CSSStyleSheet::create(this, m_baseURL.string());
|
||||
+ m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL);
|
||||
return m_elemSheet.get();
|
||||
}
|
||||
|
||||
CSSStyleSheet* Document::mappedElementSheet()
|
||||
{
|
||||
if (!m_mappedElementSheet)
|
||||
- m_mappedElementSheet = CSSStyleSheet::create(this, m_baseURL.string());
|
||||
+ m_mappedElementSheet = CSSStyleSheet::createInline(this, m_baseURL);
|
||||
return m_mappedElementSheet.get();
|
||||
}
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.cpp 2010-05-03 15:55:37.761977599 +0200
|
||||
@@ -138,7 +138,8 @@ void ProcessingInstruction::checkStyleSh
|
||||
// We need to make a synthetic XSLStyleSheet that is embedded. It needs to be able
|
||||
// to kick off import/include loads that can hang off some parent sheet.
|
||||
if (m_isXSL) {
|
||||
- m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref);
|
||||
+ KURL baseURL = KURL(ParsedURLString, m_localHref);
|
||||
+ m_sheet = XSLStyleSheet::createEmbedded(this, m_localHref, baseURL);
|
||||
m_loading = false;
|
||||
}
|
||||
#endif
|
||||
@@ -196,12 +197,12 @@ bool ProcessingInstruction::sheetLoaded(
|
||||
return false;
|
||||
}
|
||||
|
||||
-void ProcessingInstruction::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
+void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
{
|
||||
#if ENABLE(XSLT)
|
||||
ASSERT(!m_isXSL);
|
||||
#endif
|
||||
- RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, url, charset);
|
||||
+ RefPtr<CSSStyleSheet> newSheet = CSSStyleSheet::create(this, href, baseURL, charset);
|
||||
m_sheet = newSheet;
|
||||
// We don't need the cross-origin security check here because we are
|
||||
// getting the sheet text in "strict" mode. This enforces a valid CSS MIME
|
||||
@@ -213,10 +214,10 @@ void ProcessingInstruction::setCSSStyleS
|
||||
}
|
||||
|
||||
#if ENABLE(XSLT)
|
||||
-void ProcessingInstruction::setXSLStyleSheet(const String& url, const String& sheet)
|
||||
+void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
|
||||
{
|
||||
ASSERT(m_isXSL);
|
||||
- m_sheet = XSLStyleSheet::create(this, url);
|
||||
+ m_sheet = XSLStyleSheet::create(this, href, baseURL);
|
||||
parseStyleSheet(sheet);
|
||||
}
|
||||
#endif
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/ProcessingInstruction.h 2010-05-03 15:55:37.761977599 +0200
|
||||
@@ -68,9 +68,9 @@ private:
|
||||
virtual void removedFromDocument();
|
||||
|
||||
void checkStyleSheet();
|
||||
- virtual void setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet*);
|
||||
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet*);
|
||||
#if ENABLE(XSLT)
|
||||
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
|
||||
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
|
||||
#endif
|
||||
|
||||
bool isLoading() const;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/dom/StyleElement.cpp 2010-05-03 15:55:37.762976937 +0200
|
||||
@@ -103,7 +103,7 @@ void StyleElement::createSheet(Element*
|
||||
if (screenEval.eval(mediaList.get()) || printEval.eval(mediaList.get())) {
|
||||
document->addPendingSheet();
|
||||
setLoading(true);
|
||||
- m_sheet = CSSStyleSheet::create(e, String(), document->inputEncoding());
|
||||
+ m_sheet = CSSStyleSheet::create(e, String(), KURL(), document->inputEncoding());
|
||||
m_sheet->parseString(text, !document->inCompatMode());
|
||||
m_sheet->setMedia(mediaList.get());
|
||||
m_sheet->setTitle(e->title());
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.cpp 2010-05-03 17:02:45.528101154 +0200
|
||||
@@ -253,9 +253,9 @@ void HTMLLinkElement::finishParsingChild
|
||||
HTMLElement::finishParsingChildren();
|
||||
}
|
||||
|
||||
-void HTMLLinkElement::setCSSStyleSheet(const String& url, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
+void HTMLLinkElement::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet)
|
||||
{
|
||||
- m_sheet = CSSStyleSheet::create(this, url, charset);
|
||||
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
|
||||
|
||||
bool strictParsing = !document()->inCompatMode();
|
||||
bool enforceMIMEType = strictParsing;
|
||||
@@ -275,11 +275,11 @@ void HTMLLinkElement::setCSSStyleSheet(c
|
||||
// valid CSS rule.
|
||||
// This prevents an attacker playing games by injecting CSS strings into
|
||||
// HTML, XML, JSON, etc. etc.
|
||||
- if (!document()->securityOrigin()->canRequest(KURL(ParsedURLString, url)))
|
||||
+ if (!document()->securityOrigin()->canRequest(baseURL))
|
||||
crossOriginCSS = true;
|
||||
|
||||
if (crossOriginCSS && !validMIMEType && !m_sheet->hasSyntacticallyValidCSSHeader())
|
||||
- m_sheet = CSSStyleSheet::create(this, url, charset);
|
||||
+ m_sheet = CSSStyleSheet::create(this, href, baseURL, charset);
|
||||
|
||||
if (strictParsing && document()->settings() && document()->settings()->needsSiteSpecificQuirks()) {
|
||||
// Work around <https://bugs.webkit.org/show_bug.cgi?id=28350>.
|
||||
@@ -287,7 +287,7 @@ void HTMLLinkElement::setCSSStyleSheet(c
|
||||
DEFINE_STATIC_LOCAL(const String, mediaWikiKHTMLFixesStyleSheet, ("/* KHTML fix stylesheet */\n/* work around the horizontal scrollbars */\n#column-content { margin-left: 0; }\n\n"));
|
||||
// There are two variants of KHTMLFixes.css. One is equal to mediaWikiKHTMLFixesStyleSheet,
|
||||
// while the other lacks the second trailing newline.
|
||||
- if (url.endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
|
||||
+ if (baseURL.string().endsWith(slashKHTMLFixesDotCss) && !sheetText.isNull() && mediaWikiKHTMLFixesStyleSheet.startsWith(sheetText)
|
||||
&& sheetText.length() >= mediaWikiKHTMLFixesStyleSheet.length() - 1) {
|
||||
ASSERT(m_sheet->length() == 1);
|
||||
ExceptionCode ec;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/html/HTMLLinkElement.h 2010-05-03 15:55:37.773083096 +0200
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
virtual void removedFromDocument();
|
||||
|
||||
// from CachedResourceClient
|
||||
- virtual void setCSSStyleSheet(const String &url, const String& charset, const CachedCSSStyleSheet* sheet);
|
||||
+ virtual void setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CachedCSSStyleSheet* sheet);
|
||||
bool isLoading() const;
|
||||
virtual bool sheetLoaded();
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-05-03 15:55:37.661976647 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedCSSStyleSheet.cpp 2010-05-03 15:55:37.774976529 +0200
|
||||
@@ -52,9 +52,9 @@ CachedCSSStyleSheet::~CachedCSSStyleShee
|
||||
void CachedCSSStyleSheet::didAddClient(CachedResourceClient *c)
|
||||
{
|
||||
if (!m_loading)
|
||||
- c->setCSSStyleSheet(m_url, m_decoder->encoding().name(), this);
|
||||
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
|
||||
}
|
||||
-
|
||||
+
|
||||
void CachedCSSStyleSheet::allClientsRemoved()
|
||||
{
|
||||
if (isSafeToMakePurgeable())
|
||||
@@ -112,7 +112,7 @@ void CachedCSSStyleSheet::checkNotify()
|
||||
|
||||
CachedResourceClientWalker w(m_clients);
|
||||
while (CachedResourceClient *c = w.next())
|
||||
- c->setCSSStyleSheet(m_response.url().string(), m_decoder->encoding().name(), this);
|
||||
+ c->setCSSStyleSheet(m_url, m_response.url(), m_decoder->encoding().name(), this);
|
||||
}
|
||||
|
||||
void CachedCSSStyleSheet::error()
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedResourceClient.h 2010-05-03 15:55:37.775976911 +0200
|
||||
@@ -42,6 +42,7 @@ namespace WebCore {
|
||||
class String;
|
||||
class Image;
|
||||
class IntRect;
|
||||
+ class KURL;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -65,8 +66,8 @@ namespace WebCore {
|
||||
// e.g., in the b/f cache or in a background tab).
|
||||
virtual bool willRenderImage(CachedImage*) { return false; }
|
||||
|
||||
- virtual void setCSSStyleSheet(const String& /*URL*/, const String& /*charset*/, const CachedCSSStyleSheet*) { }
|
||||
- virtual void setXSLStyleSheet(const String& /*URL*/, const String& /*sheet*/) { }
|
||||
+ virtual void setCSSStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* charset */, const CachedCSSStyleSheet*) { }
|
||||
+ virtual void setXSLStyleSheet(const String& /* href */, const KURL& /* baseURL */, const String& /* sheet */) { }
|
||||
|
||||
virtual void fontLoaded(CachedFont*) {};
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:19.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/loader/CachedXSLStyleSheet.cpp 2010-05-03 15:55:37.789038977 +0200
|
||||
@@ -48,7 +48,7 @@ CachedXSLStyleSheet::CachedXSLStyleSheet
|
||||
void CachedXSLStyleSheet::didAddClient(CachedResourceClient* c)
|
||||
{
|
||||
if (!m_loading)
|
||||
- c->setXSLStyleSheet(m_url, m_sheet);
|
||||
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
|
||||
}
|
||||
|
||||
void CachedXSLStyleSheet::setEncoding(const String& chs)
|
||||
@@ -83,10 +83,9 @@ void CachedXSLStyleSheet::checkNotify()
|
||||
|
||||
CachedResourceClientWalker w(m_clients);
|
||||
while (CachedResourceClient *c = w.next())
|
||||
- c->setXSLStyleSheet(m_url, m_sheet);
|
||||
+ c->setXSLStyleSheet(m_url, m_response.url(), m_sheet);
|
||||
}
|
||||
|
||||
-
|
||||
void CachedXSLStyleSheet::error()
|
||||
{
|
||||
m_loading = false;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.cpp 2010-05-03 15:55:37.789038977 +0200
|
||||
@@ -52,13 +52,13 @@ XSLStyleSheet* XSLImportRule::parentStyl
|
||||
return (parent() && parent()->isXSLStyleSheet()) ? static_cast<XSLStyleSheet*>(parent()) : 0;
|
||||
}
|
||||
|
||||
-void XSLImportRule::setXSLStyleSheet(const String& url, const String& sheet)
|
||||
+void XSLImportRule::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
|
||||
{
|
||||
if (m_styleSheet)
|
||||
m_styleSheet->setParent(0);
|
||||
-
|
||||
- m_styleSheet = XSLStyleSheet::create(this, url);
|
||||
-
|
||||
+
|
||||
+ m_styleSheet = XSLStyleSheet::create(this, href, baseURL);
|
||||
+
|
||||
XSLStyleSheet* parent = parentStyleSheet();
|
||||
if (parent)
|
||||
m_styleSheet->setParentStyleSheet(parent);
|
||||
@@ -87,14 +87,14 @@ void XSLImportRule::loadSheet()
|
||||
|
||||
String absHref = m_strHref;
|
||||
XSLStyleSheet* parentSheet = parentStyleSheet();
|
||||
- if (!parentSheet->href().isNull())
|
||||
+ if (!parentSheet->putativeBaseURL().isNull())
|
||||
// use parent styleheet's URL as the base URL
|
||||
- absHref = KURL(KURL(ParsedURLString, parentSheet->href()), m_strHref).string();
|
||||
+ absHref = KURL(parentSheet->putativeBaseURL(), m_strHref).string();
|
||||
|
||||
// Check for a cycle in our import chain. If we encounter a stylesheet
|
||||
// in our parent chain with the same URL, then just bail.
|
||||
for (parent = this->parent(); parent; parent = parent->parent()) {
|
||||
- if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->href())
|
||||
+ if (parent->isXSLStyleSheet() && absHref == static_cast<XSLStyleSheet*>(parent)->putativeBaseURL().string())
|
||||
return;
|
||||
}
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLImportRule.h 2010-05-03 15:55:37.789981560 +0200
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
virtual bool isImportRule() { return true; }
|
||||
|
||||
// from CachedResourceClient
|
||||
- virtual void setXSLStyleSheet(const String& url, const String& sheet);
|
||||
+ virtual void setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet);
|
||||
|
||||
String m_strHref;
|
||||
RefPtr<XSLStyleSheet> m_styleSheet;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheet.h 2010-05-03 15:55:37.827976887 +0200
|
||||
@@ -43,18 +43,18 @@ class XSLImportRule;
|
||||
class XSLStyleSheet : public StyleSheet {
|
||||
public:
|
||||
#if !USE(QXMLQUERY)
|
||||
- static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href)
|
||||
+ static PassRefPtr<XSLStyleSheet> create(XSLImportRule* parentImport, const String& href, const KURL& baseURL)
|
||||
{
|
||||
- return adoptRef(new XSLStyleSheet(parentImport, href));
|
||||
+ return adoptRef(new XSLStyleSheet(parentImport, href, baseURL));
|
||||
}
|
||||
#endif
|
||||
- static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href)
|
||||
+ static PassRefPtr<XSLStyleSheet> create(Node* parentNode, const String& href, const KURL& baseURL)
|
||||
{
|
||||
- return adoptRef(new XSLStyleSheet(parentNode, href, false));
|
||||
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, false));
|
||||
}
|
||||
- static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href)
|
||||
+ static PassRefPtr<XSLStyleSheet> createEmbedded(Node* parentNode, const String& href, const KURL& baseURL)
|
||||
{
|
||||
- return adoptRef(new XSLStyleSheet(parentNode, href, true));
|
||||
+ return adoptRef(new XSLStyleSheet(parentNode, href, baseURL, true));
|
||||
}
|
||||
|
||||
virtual ~XSLStyleSheet();
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
bool processed() const { return m_processed; }
|
||||
|
||||
private:
|
||||
- XSLStyleSheet(Node* parentNode, const String& href, bool embedded);
|
||||
+ XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded);
|
||||
#if !USE(QXMLQUERY)
|
||||
- XSLStyleSheet(XSLImportRule* parentImport, const String& href);
|
||||
+ XSLStyleSheet(XSLImportRule* parentImport, const String& href, const KURL& baseURL);
|
||||
#endif
|
||||
|
||||
Document* m_ownerDocument;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetLibxslt.cpp 2010-05-03 15:55:37.837079694 +0200
|
||||
@@ -55,8 +55,8 @@ SOFT_LINK(libxslt, xsltLoadStylesheetPI,
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
-XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href)
|
||||
- : StyleSheet(parentRule, href)
|
||||
+XSLStyleSheet::XSLStyleSheet(XSLImportRule* parentRule, const String& href, const KURL& baseURL)
|
||||
+ : StyleSheet(parentRule, href, baseURL)
|
||||
, m_ownerDocument(0)
|
||||
, m_embedded(false)
|
||||
, m_processed(false) // Child sheets get marked as processed when the libxslt engine has finally seen them.
|
||||
@@ -66,8 +66,8 @@ XSLStyleSheet::XSLStyleSheet(XSLImportRu
|
||||
{
|
||||
}
|
||||
|
||||
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
|
||||
- : StyleSheet(parentNode, href)
|
||||
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
|
||||
+ : StyleSheet(parentNode, href, baseURL)
|
||||
, m_ownerDocument(parentNode->document())
|
||||
, m_embedded(embedded)
|
||||
, m_processed(true) // The root sheet starts off processed.
|
||||
@@ -168,7 +168,7 @@ bool XSLStyleSheet::parseString(const St
|
||||
}
|
||||
|
||||
m_stylesheetDoc = xmlCtxtReadMemory(ctxt, buffer, size,
|
||||
- href().utf8().data(),
|
||||
+ putativeBaseURL().string().utf8().data(),
|
||||
BOMHighByte == 0xFF ? "UTF-16LE" : "UTF-16BE",
|
||||
XML_PARSE_NOENT | XML_PARSE_DTDATTR | XML_PARSE_NOWARNING | XML_PARSE_NOCDATA);
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
@@ -192,7 +192,7 @@ void XSLStyleSheet::loadChildSheets()
|
||||
if (m_embedded) {
|
||||
// We have to locate (by ID) the appropriate embedded stylesheet element, so that we can walk the
|
||||
// import/include list.
|
||||
- xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(href().utf8().data()));
|
||||
+ xmlAttrPtr idNode = xmlGetID(document(), (const xmlChar*)(putativeBaseURL().string().utf8().data()));
|
||||
if (!idNode)
|
||||
return;
|
||||
stylesheetRoot = idNode->parent;
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLStyleSheetQt.cpp 2010-05-03 15:55:37.837977083 +0200
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
-XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, bool embedded)
|
||||
- : StyleSheet(parentNode, href)
|
||||
+XSLStyleSheet::XSLStyleSheet(Node* parentNode, const String& href, const KURL& baseURL, bool embedded)
|
||||
+ : StyleSheet(parentNode, href, baseURL)
|
||||
, m_ownerDocument(parentNode->document())
|
||||
, m_embedded(embedded)
|
||||
{
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorLibxslt.cpp 2010-05-03 15:55:37.837977083 +0200
|
||||
@@ -226,7 +226,8 @@ static xsltStylesheetPtr xsltStylesheetP
|
||||
{
|
||||
if (!cachedStylesheet && stylesheetRootNode) {
|
||||
cachedStylesheet = XSLStyleSheet::create(stylesheetRootNode->parent() ? stylesheetRootNode->parent() : stylesheetRootNode,
|
||||
- stylesheetRootNode->document()->url().string());
|
||||
+ stylesheetRootNode->document()->url().string(),
|
||||
+ stylesheetRootNode->document()->url()); // FIXME: Should we use baseURL here?
|
||||
cachedStylesheet->parseString(createMarkup(stylesheetRootNode));
|
||||
}
|
||||
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp.cve-2010-0648-stylesheet-redir-leak 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp 2010-05-03 15:55:37.915979873 +0200
|
||||
@@ -120,7 +120,9 @@ bool XSLTProcessor::transformToString(No
|
||||
RefPtr<XSLStyleSheet> stylesheet = m_stylesheet;
|
||||
if (!stylesheet && m_stylesheetRootNode) {
|
||||
Node* node = m_stylesheetRootNode.get();
|
||||
- stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node, node->document()->url().string());
|
||||
+ stylesheet = XSLStyleSheet::create(node->parent() ? node->parent() : node,
|
||||
+ node->document()->url().string(),
|
||||
+ node->document()->url()); // FIXME: Should we use baseURL here?
|
||||
stylesheet->parseString(createMarkup(node));
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp.me 2010-05-06 11:29:24.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/WebCore/page/SecurityOrigin.cpp 2010-05-06 11:43:29.000000000 +0200
|
||||
@@ -112,7 +112,11 @@ SecurityOrigin::SecurityOrigin(const KUR
|
||||
|
||||
// By default, only local SecurityOrigins can load local resources.
|
||||
m_canLoadLocalResources = isLocal();
|
||||
-
|
||||
+ if (m_canLoadLocalResources) {
|
||||
+ // Directories should never be readable.
|
||||
+ if (!url.hasPath() || url.path().endsWith("/"))
|
||||
+ m_noAccess = true;
|
||||
+ }
|
||||
if (isDefaultPortForProtocol(m_port, m_protocol))
|
||||
m_port = 0;
|
||||
}
|
||||
@@ -207,6 +211,8 @@ bool SecurityOrigin::canRequest(const KU
|
||||
return false;
|
||||
|
||||
RefPtr<SecurityOrigin> targetOrigin = SecurityOrigin::create(url);
|
||||
+ if (targetOrigin->m_noAccess)
|
||||
+ return false;
|
||||
|
||||
// We call isSameSchemeHostPort here instead of canAccess because we want
|
||||
// to ignore document.domain effects.
|
|
@ -0,0 +1,48 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.than 2010-02-11 16:55:20.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2010-03-23 14:29:41.000000000 +0100
|
||||
@@ -345,6 +345,11 @@
|
||||
#define WTF_PLATFORM_BIG_ENDIAN 1
|
||||
#endif
|
||||
|
||||
+/* PLATFORM(S390X) */
|
||||
+#if defined(__s390x__) || defined(__s390x)
|
||||
+#define WTF_PLATFORM_S390X 1
|
||||
+#endif
|
||||
+
|
||||
/* PLATFORM(IA64) */
|
||||
/* a.k.a. Itanium Processor Family, IPF */
|
||||
#if defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
|
||||
@@ -730,6 +735,8 @@
|
||||
/* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg
|
||||
on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
|
||||
#define WTF_USE_JSVALUE32 1
|
||||
+#elif PLATFORM(S390X)
|
||||
+#define WTF_USE_JSVALUE64 1
|
||||
#else
|
||||
#define WTF_USE_JSVALUE32_64 1
|
||||
#endif
|
||||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.than qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.than 2010-02-11 16:55:17.000000000 +0100
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 14:19:00.000000000 +0100
|
||||
@@ -362,6 +362,11 @@
|
||||
#define WTF_PLATFORM_IA64 1
|
||||
#endif
|
||||
|
||||
+/* PLATFORM(S390X) */
|
||||
+#if defined(__s390x__) || defined(__s390x)
|
||||
+#define WTF_PLATFORM_S390X 1
|
||||
+#endif
|
||||
+
|
||||
/* PLATFORM(ALPHA) */
|
||||
#if defined(__alpha__)
|
||||
#define WTF_PLATFORM_ALPHA 1
|
||||
@@ -729,7 +734,7 @@
|
||||
#endif
|
||||
|
||||
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
|
||||
-#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA)
|
||||
+#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA) || PLATFORM(S390X)
|
||||
#define WTF_USE_JSVALUE64 1
|
||||
#elif PLATFORM(ARM) || PLATFORM(PPC64)
|
||||
#define WTF_USE_JSVALUE32 1
|
|
@ -0,0 +1,16 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h
|
||||
--- qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.sparc 2010-03-23 10:45:57.076490991 -0400
|
||||
+++ qt-everywhere-opensource-src-4.6.2/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-03-23 10:47:37.044618125 -0400
|
||||
@@ -734,7 +734,11 @@
|
||||
#endif
|
||||
|
||||
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
|
||||
-#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) || PLATFORM(IA64) || PLATFORM(ALPHA) || PLATFORM(S390X)
|
||||
+#if (PLATFORM(X86_64) && (PLATFORM(UNIX) || PLATFORM(WIN_OS))) \
|
||||
+ || PLATFORM(IA64) \
|
||||
+ || PLATFORM(ALPHA) \
|
||||
+ || PLATFORM(SPARC64) \
|
||||
+ || PLATFORM(S390X)
|
||||
#define WTF_USE_JSVALUE64 1
|
||||
#elif PLATFORM(ARM) || PLATFORM(PPC64)
|
||||
#define WTF_USE_JSVALUE32 1
|
|
@ -0,0 +1,15 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp.CVE-2010-1119 2010-06-02 04:03:12.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Node.cpp 2010-06-15 13:11:55.974470742 +0200
|
||||
@@ -910,7 +910,10 @@ void Node::notifyLocalNodeListsAttribute
|
||||
if (!data->nodeLists())
|
||||
return;
|
||||
|
||||
- data->nodeLists()->invalidateCachesThatDependOnAttributes();
|
||||
+ if (!isAttributeNode())
|
||||
+ data->nodeLists()->invalidateCachesThatDependOnAttributes();
|
||||
+ else
|
||||
+ data->nodeLists()->invalidateCaches();
|
||||
|
||||
if (data->nodeLists()->isEmpty()) {
|
||||
data->clearNodeLists();
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1392/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp 2010-06-10 20:24:02.864193022 +0200
|
||||
@@ -4484,7 +4484,7 @@
|
||||
|
||||
// Drill into inlines looking for our first text child.
|
||||
RenderObject* currChild = firstLetterBlock->firstChild();
|
||||
- while (currChild && currChild->needsLayout() && (!currChild->isReplaced() || currChild->isFloatingOrPositioned()) && !currChild->isText()) {
|
||||
+ while (currChild && currChild->needsLayout() && ((!currChild->isReplaced() && !currChild->isRenderButton() && !currChild->isMenuList()) || currChild->isFloatingOrPositioned()) && !currChild->isText()) {
|
||||
if (currChild->isFloatingOrPositioned()) {
|
||||
if (currChild->style()->styleType() == FIRST_LETTER)
|
||||
break;
|
|
@ -0,0 +1,56 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-02 04:03:12.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1396/src/3rdparty/webkit/WebCore/dom/ContainerNode.cpp 2010-06-10 20:34:00.316318866 +0200
|
||||
@@ -395,33 +395,43 @@
|
||||
document()->removeFocusedNodeOfSubtree(this, true);
|
||||
|
||||
forbidEventDispatch();
|
||||
- int childCountDelta = 0;
|
||||
+ Vector<RefPtr<Node> > removedChildren;
|
||||
while (RefPtr<Node> n = m_firstChild) {
|
||||
- childCountDelta--;
|
||||
-
|
||||
Node* next = n->nextSibling();
|
||||
|
||||
- // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744)
|
||||
+ // Remove the node from the tree before calling detach or removedFromDocument (4427024, 4129744).
|
||||
+ // removeChild() does this after calling detach(). There is no explanation for
|
||||
+ // this discrepancy between removeChild() and its optimized version removeChildren().
|
||||
n->setPreviousSibling(0);
|
||||
n->setNextSibling(0);
|
||||
n->setParent(0);
|
||||
-
|
||||
+
|
||||
m_firstChild = next;
|
||||
if (n == m_lastChild)
|
||||
m_lastChild = 0;
|
||||
|
||||
if (n->attached())
|
||||
n->detach();
|
||||
-
|
||||
- if (n->inDocument())
|
||||
- n->removedFromDocument();
|
||||
+
|
||||
+ removedChildren.append(n.release());
|
||||
}
|
||||
allowEventDispatch();
|
||||
|
||||
+ size_t removedChildrenCount = removedChildren.size();
|
||||
+
|
||||
// Dispatch a single post-removal mutation event denoting a modified subtree.
|
||||
- childrenChanged(false, 0, 0, childCountDelta);
|
||||
+ childrenChanged(false, 0, 0, -static_cast<int>(removedChildrenCount));
|
||||
dispatchSubtreeModifiedEvent();
|
||||
|
||||
+ for (size_t i = 0; i < removedChildrenCount; ++i) {
|
||||
+ Node* removedChild = removedChildren[i].get();
|
||||
+ if (removedChild->inDocument())
|
||||
+ removedChild->removedFromDocument();
|
||||
+ // removeChild() calls removedFromTree(true) if the child was not in the
|
||||
+ // document. There is no explanation for this discrepancy between removeChild()
|
||||
+ // and its optimized version removeChildren().
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.cpp 2010-06-10 20:41:45.295318418 +0200
|
||||
@@ -552,12 +552,6 @@
|
||||
toRenderTextControl(renderer)->selectionChanged(userTriggered);
|
||||
}
|
||||
|
||||
-void Frame::invalidateSelection()
|
||||
-{
|
||||
- selection()->setNeedsLayout();
|
||||
- selectionLayoutChanged();
|
||||
-}
|
||||
-
|
||||
void Frame::setCaretVisible(bool flag)
|
||||
{
|
||||
if (m_caretVisible == flag)
|
||||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/Frame.h 2010-06-10 20:41:45.291318453 +0200
|
||||
@@ -259,8 +259,6 @@
|
||||
void selectionLayoutChanged();
|
||||
void notifyRendererOfSelectionChange(bool userTriggered);
|
||||
|
||||
- void invalidateSelection();
|
||||
-
|
||||
void setCaretVisible(bool = true);
|
||||
void paintCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
|
||||
void paintDragCaret(GraphicsContext*, int tx, int ty, const IntRect& clipRect) const;
|
||||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-10 20:41:45.293318191 +0200
|
||||
@@ -642,7 +642,8 @@
|
||||
root->view()->popLayoutState();
|
||||
m_layoutRoot = 0;
|
||||
|
||||
- m_frame->invalidateSelection();
|
||||
+ m_frame->selection()->setNeedsLayout();
|
||||
+ m_frame->selectionLayoutChanged();
|
||||
|
||||
m_layoutSchedulingEnabled = true;
|
||||
|
||||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1397/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-10 20:41:45.297318506 +0200
|
||||
@@ -1170,7 +1170,7 @@
|
||||
// The caret rect needs to be invalidated after scrolling
|
||||
Frame* frame = renderer()->document()->frame();
|
||||
if (frame)
|
||||
- frame->invalidateSelection();
|
||||
+ frame->selection()->setNeedsLayout();
|
||||
|
||||
// Just schedule a full repaint of our object.
|
||||
if (repaint)
|
|
@ -0,0 +1,244 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.cpp 2010-06-11 16:12:55.750525354 +0200
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "ClientRect.h"
|
||||
#include "ClientRectList.h"
|
||||
#include "Document.h"
|
||||
+#include "DocumentFragment.h"
|
||||
#include "ElementRareData.h"
|
||||
#include "ExceptionCode.h"
|
||||
#include "FocusController.h"
|
||||
@@ -42,6 +43,7 @@
|
||||
#include "FrameView.h"
|
||||
#include "HTMLElement.h"
|
||||
#include "HTMLNames.h"
|
||||
+#include "HTMLTokenizer.h"
|
||||
#include "NamedNodeMap.h"
|
||||
#include "NodeList.h"
|
||||
#include "NodeRenderStyle.h"
|
||||
@@ -49,6 +51,7 @@
|
||||
#include "RenderView.h"
|
||||
#include "TextIterator.h"
|
||||
#include "XMLNames.h"
|
||||
+#include "XMLTokenizer.h"
|
||||
|
||||
#if ENABLE(SVG)
|
||||
#include "SVGNames.h"
|
||||
@@ -91,6 +94,51 @@ NodeRareData* Element::createRareData()
|
||||
{
|
||||
return new ElementRareData;
|
||||
}
|
||||
+
|
||||
+PassRefPtr<DocumentFragment> Element::createContextualFragment(const String& markup)
|
||||
+{
|
||||
+ RefPtr<DocumentFragment> fragment = DocumentFragment::create(document());
|
||||
+
|
||||
+ if (document()->isHTMLDocument())
|
||||
+ parseHTMLDocumentFragment(markup, fragment.get());
|
||||
+ else {
|
||||
+ if (!parseXMLDocumentFragment(markup, fragment.get(), this))
|
||||
+ // FIXME: We should propagate a syntax error exception out here.
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ // Exceptions are ignored because none ought to happen here.
|
||||
+ ExceptionCode ignoredExceptionCode;
|
||||
+
|
||||
+ // We need to pop <html> and <body> elements and remove <head> to
|
||||
+ // accommodate folks passing complete HTML documents to make the
|
||||
+ // child of an element.
|
||||
+
|
||||
+ RefPtr<Node> nextNode;
|
||||
+ for (RefPtr<Node> node = fragment->firstChild(); node; node = nextNode) {
|
||||
+ nextNode = node->nextSibling();
|
||||
+ if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) {
|
||||
+ Node* firstChild = node->firstChild();
|
||||
+ if (firstChild)
|
||||
+ nextNode = firstChild;
|
||||
+ RefPtr<Node> nextChild;
|
||||
+ for (RefPtr<Node> child = firstChild; child; child = nextChild) {
|
||||
+ nextChild = child->nextSibling();
|
||||
+ node->removeChild(child.get(), ignoredExceptionCode);
|
||||
+ ASSERT(!ignoredExceptionCode);
|
||||
+ fragment->insertBefore(child, node.get(), ignoredExceptionCode);
|
||||
+ ASSERT(!ignoredExceptionCode);
|
||||
+ }
|
||||
+ fragment->removeChild(node.get(), ignoredExceptionCode);
|
||||
+ ASSERT(!ignoredExceptionCode);
|
||||
+ } else if (node->hasTagName(headTag)) {
|
||||
+ fragment->removeChild(node.get(), ignoredExceptionCode);
|
||||
+ ASSERT(!ignoredExceptionCode);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return fragment.release();
|
||||
+}
|
||||
|
||||
PassRefPtr<Node> Element::cloneNode(bool deep)
|
||||
{
|
||||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h.CVE-2010-1398 2010-06-02 04:03:12.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/dom/Element.h 2010-06-14 16:54:57.639394749 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "ContainerNode.h"
|
||||
#include "QualifiedName.h"
|
||||
#include "ScrollTypes.h"
|
||||
+#include "DocumentFragment.h"
|
||||
|
||||
namespace WebCore {
|
||||
|
||||
@@ -89,6 +90,8 @@ public:
|
||||
DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
|
||||
DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart);
|
||||
|
||||
+ virtual PassRefPtr<DocumentFragment> createContextualFragment(const String&);
|
||||
+
|
||||
const AtomicString& getIDAttribute() const;
|
||||
bool hasAttribute(const QualifiedName&) const;
|
||||
const AtomicString& getAttribute(const QualifiedName&) const;
|
||||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/editing/markup.cpp 2010-06-11 16:12:55.752525451 +0200
|
||||
@@ -1054,11 +1054,7 @@ String createMarkup(const Range* range,
|
||||
|
||||
PassRefPtr<DocumentFragment> createFragmentFromMarkup(Document* document, const String& markup, const String& baseURL)
|
||||
{
|
||||
- ASSERT(document->documentElement()->isHTMLElement());
|
||||
- // FIXME: What if the document element is not an HTML element?
|
||||
- HTMLElement *element = static_cast<HTMLElement*>(document->documentElement());
|
||||
-
|
||||
- RefPtr<DocumentFragment> fragment = element->createContextualFragment(markup);
|
||||
+ RefPtr<DocumentFragment> fragment = document->documentElement()->createContextualFragment(markup);
|
||||
|
||||
if (fragment && !baseURL.isEmpty() && baseURL != blankURL() && baseURL != document->baseURL())
|
||||
completeURLs(fragment.get(), baseURL);
|
||||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp.CVE-2010-1398 2010-06-02 04:03:10.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/html/HTMLElement.cpp 2010-06-11 16:12:55.753537613 +0200
|
||||
@@ -235,9 +235,9 @@ String HTMLElement::outerHTML() const
|
||||
return createMarkup(this);
|
||||
}
|
||||
|
||||
-PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &html)
|
||||
+PassRefPtr<DocumentFragment> HTMLElement::createContextualFragment(const String &markup)
|
||||
{
|
||||
- // the following is in accordance with the definition as used by IE
|
||||
+ // The following is in accordance with the definition as used by IE.
|
||||
if (endTagRequirement() == TagStatusForbidden)
|
||||
return 0;
|
||||
|
||||
@@ -245,47 +245,7 @@ PassRefPtr<DocumentFragment> HTMLElement
|
||||
hasLocalName(headTag) || hasLocalName(styleTag) || hasLocalName(titleTag))
|
||||
return 0;
|
||||
|
||||
- RefPtr<DocumentFragment> fragment = DocumentFragment::create(document());
|
||||
-
|
||||
- if (document()->isHTMLDocument())
|
||||
- parseHTMLDocumentFragment(html, fragment.get());
|
||||
- else {
|
||||
- if (!parseXMLDocumentFragment(html, fragment.get(), this))
|
||||
- // FIXME: We should propagate a syntax error exception out here.
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- // Exceptions are ignored because none ought to happen here.
|
||||
- int ignoredExceptionCode;
|
||||
-
|
||||
- // we need to pop <html> and <body> elements and remove <head> to
|
||||
- // accommodate folks passing complete HTML documents to make the
|
||||
- // child of an element.
|
||||
-
|
||||
- RefPtr<Node> nextNode;
|
||||
- for (RefPtr<Node> node = fragment->firstChild(); node; node = nextNode) {
|
||||
- nextNode = node->nextSibling();
|
||||
- if (node->hasTagName(htmlTag) || node->hasTagName(bodyTag)) {
|
||||
- Node *firstChild = node->firstChild();
|
||||
- if (firstChild)
|
||||
- nextNode = firstChild;
|
||||
- RefPtr<Node> nextChild;
|
||||
- for (RefPtr<Node> child = firstChild; child; child = nextChild) {
|
||||
- nextChild = child->nextSibling();
|
||||
- node->removeChild(child.get(), ignoredExceptionCode);
|
||||
- ASSERT(!ignoredExceptionCode);
|
||||
- fragment->insertBefore(child, node.get(), ignoredExceptionCode);
|
||||
- ASSERT(!ignoredExceptionCode);
|
||||
- }
|
||||
- fragment->removeChild(node.get(), ignoredExceptionCode);
|
||||
- ASSERT(!ignoredExceptionCode);
|
||||
- } else if (node->hasTagName(headTag)) {
|
||||
- fragment->removeChild(node.get(), ignoredExceptionCode);
|
||||
- ASSERT(!ignoredExceptionCode);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return fragment.release();
|
||||
+ return Element::createContextualFragment(markup);
|
||||
}
|
||||
|
||||
static inline bool hasOneChild(ContainerNode* node)
|
||||
@@ -371,7 +331,7 @@ void HTMLElement::setOuterHTML(const Str
|
||||
|
||||
void HTMLElement::setInnerText(const String& text, ExceptionCode& ec)
|
||||
{
|
||||
- // follow the IE specs about when this is allowed
|
||||
+ // Follow the IE specs about when this is allowed.
|
||||
if (endTagRequirement() == TagStatusForbidden) {
|
||||
ec = NO_MODIFICATION_ALLOWED_ERR;
|
||||
return;
|
||||
@@ -441,7 +401,7 @@ void HTMLElement::setInnerText(const Str
|
||||
|
||||
void HTMLElement::setOuterText(const String &text, ExceptionCode& ec)
|
||||
{
|
||||
- // follow the IE specs about when this is allowed
|
||||
+ // Follow the IE specs about when this is allowed.
|
||||
if (endTagRequirement() == TagStatusForbidden) {
|
||||
ec = NO_MODIFICATION_ALLOWED_ERR;
|
||||
return;
|
||||
@@ -469,7 +429,7 @@ void HTMLElement::setOuterText(const Str
|
||||
if (ec)
|
||||
return;
|
||||
|
||||
- // is previous node a text node? if so, merge into it
|
||||
+ // Is previous node a text node? If so, merge into it.
|
||||
Node* prev = t->previousSibling();
|
||||
if (prev && prev->isTextNode()) {
|
||||
Text* textPrev = static_cast<Text*>(prev);
|
||||
@@ -482,7 +442,7 @@ void HTMLElement::setOuterText(const Str
|
||||
t = textPrev;
|
||||
}
|
||||
|
||||
- // is next node a text node? if so, merge it in
|
||||
+ // Is next node a text node? If so, merge it in.
|
||||
Node* next = t->nextSibling();
|
||||
if (next && next->isTextNode()) {
|
||||
Text* textNext = static_cast<Text*>(next);
|
||||
@@ -522,7 +482,7 @@ Node* HTMLElement::insertAdjacent(const
|
||||
return 0;
|
||||
}
|
||||
|
||||
- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative
|
||||
+ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
|
||||
ec = NOT_SUPPORTED_ERR;
|
||||
return 0;
|
||||
}
|
||||
@@ -530,7 +490,7 @@ Node* HTMLElement::insertAdjacent(const
|
||||
Element* HTMLElement::insertAdjacentElement(const String& where, Element* newChild, ExceptionCode& ec)
|
||||
{
|
||||
if (!newChild) {
|
||||
- // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative
|
||||
+ // IE throws COM Exception E_INVALIDARG; this is the best DOM exception alternative.
|
||||
ec = TYPE_MISMATCH_ERR;
|
||||
return 0;
|
||||
}
|
||||
@@ -567,8 +527,8 @@ void HTMLElement::addHTMLAlignment(Mappe
|
||||
|
||||
void HTMLElement::addHTMLAlignmentToStyledElement(StyledElement* element, MappedAttribute* attr)
|
||||
{
|
||||
- // vertical alignment with respect to the current baseline of the text
|
||||
- // right or left means floating images
|
||||
+ // Vertical alignment with respect to the current baseline of the text
|
||||
+ // right or left means floating images.
|
||||
int floatValue = CSSValueInvalid;
|
||||
int verticalAlignValue = CSSValueInvalid;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp.CVE-2010-1400 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderObject.cpp 2010-06-15 13:55:36.853463455 +0200
|
||||
@@ -1611,7 +1611,7 @@ void RenderObject::styleWillChange(Style
|
||||
}
|
||||
}
|
||||
|
||||
-void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle*)
|
||||
+void RenderObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
|
||||
{
|
||||
if (s_affectsParentBlock)
|
||||
handleDynamicFloatPositionChange();
|
||||
@@ -1619,9 +1619,17 @@ void RenderObject::styleDidChange(StyleD
|
||||
if (!m_parent)
|
||||
return;
|
||||
|
||||
- if (diff == StyleDifferenceLayout)
|
||||
+ if (diff == StyleDifferenceLayout) {
|
||||
+ // If the object already needs layout, then setNeedsLayout won't do
|
||||
+ // any work. But if the containing block has changed, then we may need
|
||||
+ // to make the new containing blocks for layout. The change that can
|
||||
+ // directly affect the containing block of this object is a change to
|
||||
+ // the position style.
|
||||
+ if (m_needsLayout && oldStyle->position() != m_style->position())
|
||||
+ markContainingBlocksForLayout();
|
||||
+
|
||||
setNeedsLayoutAndPrefWidthsRecalc();
|
||||
- else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
|
||||
+ } else if (diff == StyleDifferenceLayoutPositionedMovementOnly)
|
||||
setNeedsPositionedMovementLayout();
|
||||
|
||||
// Don't check for repaint here; we need to wait until the layer has been
|
|
@ -0,0 +1,45 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-2010-1412/src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp 2010-06-11 00:09:43.741191104 +0200
|
||||
@@ -3039,22 +3039,33 @@
|
||||
// Locate the common ancestor render object for the two renderers.
|
||||
RenderObject* ancestor = commonAncestor(oldHoverObj, newHoverObj);
|
||||
|
||||
+ Vector<Node*, 32> nodesToRemoveFromChain;
|
||||
+ Vector<Node*, 32> nodesToAddToChain;
|
||||
+
|
||||
if (oldHoverObj != newHoverObj) {
|
||||
// The old hover path only needs to be cleared up to (and not including) the common ancestor;
|
||||
for (RenderObject* curr = oldHoverObj; curr && curr != ancestor; curr = curr->hoverAncestor()) {
|
||||
- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) {
|
||||
- curr->node()->setActive(false);
|
||||
- curr->node()->setHovered(false);
|
||||
- }
|
||||
+ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
|
||||
+ nodesToRemoveFromChain.append(curr->node());
|
||||
}
|
||||
}
|
||||
|
||||
// Now set the hover state for our new object up to the root.
|
||||
for (RenderObject* curr = newHoverObj; curr; curr = curr->hoverAncestor()) {
|
||||
- if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain())) {
|
||||
- curr->node()->setActive(request.active());
|
||||
- curr->node()->setHovered(true);
|
||||
- }
|
||||
+ if (curr->node() && !curr->isText() && (!mustBeInActiveChain || curr->node()->inActiveChain()))
|
||||
+ nodesToAddToChain.append(curr->node());
|
||||
+ }
|
||||
+
|
||||
+ size_t removeCount = nodesToRemoveFromChain.size();
|
||||
+ for (size_t i = 0; i < removeCount; ++i) {
|
||||
+ nodesToRemoveFromChain[i]->setActive(false);
|
||||
+ nodesToRemoveFromChain[i]->setHovered(false);
|
||||
+ }
|
||||
+
|
||||
+ size_t addCount = nodesToAddToChain.size();
|
||||
+ for (size_t i = 0; i < addCount; ++i) {
|
||||
+ nodesToAddToChain[i]->setActive(request.active());
|
||||
+ nodesToAddToChain[i]->setHovered(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderText.cpp 2010-06-11 13:42:31.190174662 +0200
|
||||
@@ -207,7 +207,7 @@
|
||||
PassRefPtr<StringImpl> RenderText::originalText() const
|
||||
{
|
||||
Node* e = node();
|
||||
- return e ? static_cast<Text*>(e)->dataImpl() : 0;
|
||||
+ return (e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : 0;
|
||||
}
|
||||
|
||||
void RenderText::absoluteRects(Vector<IntRect>& rects, int tx, int ty)
|
||||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-1770/src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp 2010-06-11 13:42:31.197153658 +0200
|
||||
@@ -47,7 +47,7 @@
|
||||
PassRefPtr<StringImpl> RenderTextFragment::originalText() const
|
||||
{
|
||||
Node* e = node();
|
||||
- RefPtr<StringImpl> result = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
|
||||
+ RefPtr<StringImpl> result = ((e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : contentString());
|
||||
if (result && (start() > 0 || start() < result->length()))
|
||||
result = result->substring(start(), end());
|
||||
return result.release();
|
||||
@@ -76,7 +76,7 @@
|
||||
{
|
||||
if (start()) {
|
||||
Node* e = node();
|
||||
- StringImpl* original = (e ? static_cast<Text*>(e)->dataImpl() : contentString());
|
||||
+ StringImpl* original = ((e && e->isTextNode()) ? static_cast<Text*>(e)->dataImpl() : contentString());
|
||||
if (original)
|
||||
return (*original)[start() - 1];
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-2010-1773/src/3rdparty/webkit/WebCore/rendering/RenderListMarker.cpp 2010-06-10 17:33:06.092192665 +0200
|
||||
@@ -88,8 +88,10 @@
|
||||
--number;
|
||||
letters[lettersSize - 1] = alphabet[number % alphabetSize];
|
||||
int length = 1;
|
||||
- while ((number /= alphabetSize) > 0)
|
||||
- letters[lettersSize - ++length] = alphabet[number % alphabetSize - 1];
|
||||
+ while ((number /= alphabetSize) > 0) {
|
||||
+ --number;
|
||||
+ letters[lettersSize - ++length] = alphabet[number % alphabetSize];
|
||||
+ }
|
||||
|
||||
ASSERT(length <= lettersSize);
|
||||
return String(&letters[lettersSize - length], length);
|
|
@ -0,0 +1,13 @@
|
|||
diff -ur qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-02 04:03:11.000000000 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3-CVE-1774/src/3rdparty/webkit/WebCore/rendering/FixedTableLayout.cpp 2010-06-11 14:45:02.625278334 +0200
|
||||
@@ -168,8 +168,7 @@
|
||||
|
||||
int usedSpan = 0;
|
||||
int i = 0;
|
||||
- while (usedSpan < span) {
|
||||
- ASSERT(cCol + i < nEffCols);
|
||||
+ while (usedSpan < span && cCol + i < nEffCols) {
|
||||
int eSpan = m_table->spanOfEffCol(cCol + i);
|
||||
// Only set if no col element has already set it.
|
||||
if (m_width[cCol + i].isAuto() && w.type() != Auto) {
|
|
@ -0,0 +1,29 @@
|
|||
diff -up qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp
|
||||
--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp.CVE-2010-1778 2010-06-11 16:12:55.786338275 +0200
|
||||
+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/webkit/WebCore/page/FrameView.cpp 2010-06-15 13:23:21.114401487 +0200
|
||||
@@ -1189,14 +1189,13 @@ void FrameView::scheduleRelayoutOfSubtre
|
||||
{
|
||||
ASSERT(m_frame->view() == this);
|
||||
|
||||
- if (!m_layoutSchedulingEnabled || (m_frame->contentRenderer()
|
||||
- && m_frame->contentRenderer()->needsLayout())) {
|
||||
+ if (m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout()) {
|
||||
if (relayoutRoot)
|
||||
relayoutRoot->markContainingBlocksForLayout(false);
|
||||
return;
|
||||
}
|
||||
|
||||
- if (layoutPending()) {
|
||||
+ if (layoutPending() || !m_layoutSchedulingEnabled) {
|
||||
if (m_layoutRoot != relayoutRoot) {
|
||||
if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) {
|
||||
// Keep the current root
|
||||
@@ -1213,7 +1212,7 @@ void FrameView::scheduleRelayoutOfSubtre
|
||||
relayoutRoot->markContainingBlocksForLayout(false);
|
||||
}
|
||||
}
|
||||
- } else {
|
||||
+ } else if (m_layoutSchedulingEnabled) {
|
||||
int delay = m_frame->document()->minimumLayoutDelay();
|
||||
m_layoutRoot = relayoutRoot;
|
||||
m_delayedLayout = delay != 0;
|
|
@ -1,77 +0,0 @@
|
|||
--- src/kernel/qfontdatabase_x11.cpp
|
||||
+++ src/kernel/qfontdatabase_x11.cpp
|
||||
@@ -1589,15 +1589,6 @@ QFontEngine *loadEngine( QFont::Script s
|
||||
if (script == QFont::Latin)
|
||||
// add Euro character
|
||||
FcCharSetAddChar(cs, 0x20ac);
|
||||
- if (script == QFont::Han_SimplifiedChinese)
|
||||
- FcCharSetAddChar(cs, 0x3400);
|
||||
- if (script == QFont::Han_TraditionalChinese){
|
||||
- FcCharSetAddChar(cs, 0x3435);
|
||||
- FcCharSetAddChar(cs, 0xE000);
|
||||
- FcCharSetAddChar(cs, 0xF6B1);
|
||||
- }
|
||||
- if (script == QFont::MiscellaneousSymbols)
|
||||
- FcCharSetAddChar(cs, 0x2714);
|
||||
FcPatternAddCharSet(pattern, FC_CHARSET, cs);
|
||||
FcCharSetDestroy(cs);
|
||||
}
|
||||
@@ -1813,7 +1804,11 @@ static QFontEngine *loadFontConfigFont(c
|
||||
FcPatternPrint(pattern);
|
||||
#endif
|
||||
|
||||
+ // XftFontMatch calls the right ConfigSubstitute variants, but as we use
|
||||
+ // FcFontMatch/Sort here we have to do it manually.
|
||||
FcConfigSubstitute(0, pattern, FcMatchPattern);
|
||||
+ XftDefaultSubstitute(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppScreen(), pattern);
|
||||
+
|
||||
// qDebug("1: pattern contains:");
|
||||
// FcPatternPrint(pattern);
|
||||
|
||||
@@ -1847,10 +1842,6 @@ static QFontEngine *loadFontConfigFont(c
|
||||
value.u.s = (const FcChar8 *)cs.data();
|
||||
FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue);
|
||||
}
|
||||
-#ifdef FONT_MATCH_DEBUG
|
||||
- printf("final pattern contains:\n");
|
||||
- FcPatternPrint(pattern);
|
||||
-#endif
|
||||
}
|
||||
|
||||
if (script != QFont::Unicode) {
|
||||
@@ -1860,19 +1851,15 @@ static QFontEngine *loadFontConfigFont(c
|
||||
if (script == QFont::Latin)
|
||||
// add Euro character
|
||||
FcCharSetAddChar(cs, 0x20ac);
|
||||
- if (script == QFont::Han_SimplifiedChinese)
|
||||
- FcCharSetAddChar(cs, 0x3400);
|
||||
- if (script == QFont::Han_TraditionalChinese) {
|
||||
- FcCharSetAddChar(cs, 0x3435);
|
||||
- FcCharSetAddChar(cs, 0xE000);
|
||||
- FcCharSetAddChar(cs, 0xF6B1);
|
||||
- }
|
||||
- if (script == QFont::MiscellaneousSymbols)
|
||||
- FcCharSetAddChar(cs, 0x2714);
|
||||
FcPatternAddCharSet(pattern, FC_CHARSET, cs);
|
||||
FcCharSetDestroy(cs);
|
||||
}
|
||||
|
||||
+#ifdef FONT_MATCH_DEBUG
|
||||
+ printf("final pattern contains:\n");
|
||||
+ FcPatternPrint(pattern);
|
||||
+#endif
|
||||
+
|
||||
QFontEngine *fe = 0;
|
||||
|
||||
for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) {
|
||||
--- src/kernel/qfontdatabase.cpp
|
||||
+++ src/kernel/qfontdatabase.cpp
|
||||
@@ -554,7 +554,7 @@ static const unsigned short sample_chars
|
||||
// GeometricSymbols,
|
||||
{ 0x2500, 0x0 },
|
||||
// MiscellaneousSymbols,
|
||||
- { 0x2640, 0x0 },
|
||||
+ { 0x2640, 0x2714, 0x0 },
|
||||
// EnclosedAndSquare,
|
||||
{ 0x2460, 0x0 },
|
||||
// Braille,
|
|
@ -1,12 +0,0 @@
|
|||
--- qt-x11-free-3.3.2/tools/designer/uic/main.cpp.sopwith 2004-06-16 17:14:17.000000000 -0400
|
||||
+++ qt-x11-free-3.3.2/tools/designer/uic/main.cpp 2004-06-16 17:21:43.000000000 -0400
|
||||
@@ -149,6 +149,9 @@
|
||||
} else {
|
||||
trmacro = &opt[1];
|
||||
}
|
||||
+ } else if ( opt == "nostdlib") {
|
||||
+ QStringList x;
|
||||
+ QApplication::setLibraryPaths(x);
|
||||
} else if ( opt == "L" ) {
|
||||
if ( !(n < argc-1) ) {
|
||||
error = "Missing plugin path.";
|
|
@ -1,14 +0,0 @@
|
|||
--- qt-x11-free-3.3.2/src/kernel/qpixmap_x11.cpp.orig 2004-05-10 13:54:03.592289052 +0200
|
||||
+++ qt-x11-free-3.3.2/src/kernel/qpixmap_x11.cpp 2004-05-10 13:56:10.165560473 +0200
|
||||
@@ -288,8 +288,9 @@
|
||||
{
|
||||
#if defined(QT_CHECK_STATE)
|
||||
if ( qApp->type() == QApplication::Tty ) {
|
||||
- qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
|
||||
- "is being used" );
|
||||
+// qWarning( "QPixmap: Cannot create a QPixmap when no GUI "
|
||||
+// "is being used" );
|
||||
+ ;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
--- qt-x11-free-3.3.3/src/opengl/qgl_x11.cpp.orig 2004-08-18 14:55:20.629068213 +0200
|
||||
+++ qt-x11-free-3.3.3/src/opengl/qgl_x11.cpp 2004-08-18 15:00:43.090260739 +0200
|
||||
@@ -125,7 +125,7 @@
|
||||
if (gl_syms_resolved)
|
||||
return TRUE;
|
||||
|
||||
- QLibrary gl("GL");
|
||||
+ QLibrary gl("GL.so.1");
|
||||
gl.setAutoUnload(FALSE);
|
||||
|
||||
qt_glCallLists = (_glCallLists) gl.resolve("glCallLists");
|
||||
@@ -283,7 +283,7 @@
|
||||
typedef Status (*_XmuLookupStandardColormap)( Display *dpy, int screen, VisualID visualid, unsigned int depth,
|
||||
Atom property, Bool replace, Bool retain );
|
||||
_XmuLookupStandardColormap qt_XmuLookupStandardColormap;
|
||||
- qt_XmuLookupStandardColormap = (_XmuLookupStandardColormap) QLibrary::resolve("Xmu", "XmuLookupStandardColormap");
|
||||
+ qt_XmuLookupStandardColormap = (_XmuLookupStandardColormap) QLibrary::resolve("Xmu.so.6", "XmuLookupStandardColormap");
|
||||
if (!qt_XmuLookupStandardColormap)
|
||||
qFatal("Unable to resolve Xmu symbols - please check your Xmu library installation.");
|
||||
#define XmuLookupStandardColormap qt_XmuLookupStandardColormap
|
||||
--- qt-x11-free-3.3.3/src/tools/qlibrary.cpp.orig 2004-08-18 14:56:00.322185890 +0200
|
||||
+++ qt-x11-free-3.3.3/src/tools/qlibrary.cpp 2004-08-18 14:57:51.939637946 +0200
|
||||
@@ -425,6 +425,7 @@
|
||||
} else {
|
||||
tmpfilename = QString( "lib%1" ).arg( filename );
|
||||
}
|
||||
+ if ( !filename.contains(".so") )
|
||||
tmpfilename += filter;
|
||||
if(QFile::exists(tmpfilename) || it == filters.end()) {
|
||||
filename = tmpfilename;
|
|
@ -1,20 +0,0 @@
|
|||
--- qt-x11-free-3.3.3/tools/tools.pro.qembed 2004-06-08 10:05:03.000000000 +0200
|
||||
+++ qt-x11-free-3.3.3/tools/tools.pro 2004-08-11 15:47:35.393118498 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
SUBDIRS = assistant/lib \
|
||||
designer \
|
||||
assistant \
|
||||
+ qembed \
|
||||
linguist
|
||||
unix:SUBDIRS += qtconfig
|
||||
}
|
||||
--- qt-x11-free-3.3.3/tools/qembed/qembed.pro.qembed 2004-06-08 10:08:40.000000000 +0200
|
||||
+++ qt-x11-free-3.3.3/tools/qembed/qembed.pro 2004-08-11 15:51:12.008859486 +0200
|
||||
@@ -2,3 +2,7 @@
|
||||
SOURCES = qembed.cpp
|
||||
TARGET = qembed
|
||||
REQUIRES=full-config nocrosscompiler
|
||||
+DESTDIR = ../../bin
|
||||
+target.path=$$bins.path
|
||||
+INSTALLS += target
|
||||
+
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.3/src/kernel/qapplication_x11.cpp.orig 2004-11-09 18:57:15.012843629 +0100
|
||||
+++ qt-x11-free-3.3.3/src/kernel/qapplication_x11.cpp 2004-11-09 19:02:31.351637807 +0100
|
||||
@@ -1412,7 +1412,7 @@
|
||||
False, XA_ATOM, &type, &format, &nitems, &after, &data);
|
||||
|
||||
if (type == XA_ATOM && format == 32) {
|
||||
- ts.writeBlock((const char *) data, nitems * 4);
|
||||
+ ts.writeBlock((const char *) data, nitems * sizeof(long));
|
||||
offset += nitems;
|
||||
} else
|
||||
after = 0;
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.5/configure.gcc4-buildkey 2005-09-11 18:15:27.000000000 +0200
|
||||
+++ qt-x11-free-3.3.5/configure 2005-09-11 18:18:53.000000000 +0200
|
||||
@@ -3093,7 +3093,7 @@
|
||||
COMPILER_VERSION="3.*"
|
||||
;;
|
||||
*4.*)
|
||||
- COMPILER_VERSION="4"
|
||||
+ COMPILER_VERSION="4.*"
|
||||
;;
|
||||
*)
|
||||
;;
|
|
@ -1,18 +0,0 @@
|
|||
Index: tools/designer/uic/form.cpp
|
||||
===================================================================
|
||||
--- qt/tools/designer/uic/form.cpp (revision 460038)
|
||||
+++ qt/tools/designer/uic/form.cpp (working copy)
|
||||
@@ -731,6 +731,13 @@
|
||||
while ( !n2.isNull() ) {
|
||||
if ( n2.tagName() == "includehint" ) {
|
||||
QString file = n2.firstChild().toText().data();
|
||||
+ int colons = file.find("::");
|
||||
+
|
||||
+ if (colons != -1)
|
||||
+ {
|
||||
+ file = file.right(file.length() - colons - 2);
|
||||
+ }
|
||||
+
|
||||
localIncludes += file;
|
||||
}
|
||||
n2 = n2.nextSibling().toElement();
|
|
@ -1,55 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qapplication_x11.cpp.orig 2006-06-20 15:45:44.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qapplication_x11.cpp 2006-06-20 15:51:13.000000000 +0200
|
||||
@@ -3294,11 +3294,7 @@
|
||||
// filtering opportunity first to ensure all input methods work
|
||||
// properly regardless of application design.
|
||||
|
||||
-#ifndef QT_NO_IM_EXTENSIONS
|
||||
if( keywidget && keywidget->isEnabled() && keywidget->isInputMethodEnabled() ) {
|
||||
-#else
|
||||
- if( keywidget && keywidget->isEnabled() ) {
|
||||
-#endif
|
||||
if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
|
||||
sm_blockUserInput ) // block user interaction during session management
|
||||
return TRUE;
|
||||
@@ -5220,11 +5216,12 @@
|
||||
} else {
|
||||
key = (int)(long)keyDict->find( keycode );
|
||||
if ( key )
|
||||
- if( !willRepeat ) // Take out key of dictionary only if this call.
|
||||
+ if( !willRepeat && statefulTranslation ) // Take out key of dictionary only if this call.
|
||||
keyDict->take( keycode );
|
||||
long s = (long)textDict->find( keycode );
|
||||
if ( s ) {
|
||||
- textDict->take( keycode );
|
||||
+ if( statefulTranslation )
|
||||
+ textDict->take( keycode );
|
||||
ascii = (char)(s-256);
|
||||
}
|
||||
}
|
||||
--- qt-x11-free-3.3.6/src/kernel/qwidget_x11.cpp.orig 2006-06-20 15:46:49.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qwidget_x11.cpp 2006-06-20 15:48:14.000000000 +0200
|
||||
@@ -2699,11 +2699,10 @@
|
||||
{
|
||||
QInputContext *qic = 0;
|
||||
|
||||
-#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
if ( isInputMethodEnabled() ) {
|
||||
+#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
qic = icHolderWidget()->ic;
|
||||
#else
|
||||
- {
|
||||
// icHolderWidget is always topLevelWidget
|
||||
QTLWExtra *topdata = icHolderWidget()->topData();
|
||||
qic = (QInputContext *)topdata->xic;
|
||||
@@ -2754,10 +2753,8 @@
|
||||
*/
|
||||
void QWidget::createInputContext()
|
||||
{
|
||||
-#if !defined(QT_NO_IM_EXTENSIONS)
|
||||
if( !isInputMethodEnabled() || QApplication::closingDown() )
|
||||
return;
|
||||
-#endif
|
||||
|
||||
QWidget *icWidget = icHolderWidget();
|
||||
#ifndef QT_NO_IM
|
|
@ -1,11 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/kernel/qfontdatabase_x11.cpp.fonts 2004-08-05 16:42:06.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/src/kernel/qfontdatabase_x11.cpp 2004-09-28 16:11:54.955374161 +0200
|
||||
@@ -975,7 +981,7 @@
|
||||
};
|
||||
const XftDefaultFont defaults[] = {
|
||||
{ "Serif", "serif", FALSE },
|
||||
- { "Sans Serif", "sans-serif", FALSE },
|
||||
+ { "Sans", "sans-serif", FALSE },
|
||||
{ "Monospace", "monospace", TRUE },
|
||||
{ 0, 0, FALSE }
|
||||
};
|
|
@ -1,92 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/src/widgets/qtextedit.cpp.preedit 2006-06-28 17:18:08.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/src/widgets/qtextedit.cpp 2006-06-28 17:20:09.000000000 +0200
|
||||
@@ -1906,9 +1906,6 @@
|
||||
|
||||
void QTextEdit::removeSelectedText( int selNum )
|
||||
{
|
||||
- if(selNum != 0)
|
||||
- resetInputContext();
|
||||
-
|
||||
QTextCursor c1 = doc->selectionStartCursor( selNum );
|
||||
c1.restoreState();
|
||||
QTextCursor c2 = doc->selectionEndCursor( selNum );
|
||||
@@ -3171,7 +3168,6 @@
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
- resetInputContext();
|
||||
QTextParagraph *p = doc->paragAt( para );
|
||||
if ( !p )
|
||||
return;
|
||||
@@ -3198,7 +3194,6 @@
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
- resetInputContext();
|
||||
for ( int i = 0; i < (int)doc->numSelections(); ++i )
|
||||
doc->removeSelection( i );
|
||||
|
||||
@@ -3240,7 +3235,6 @@
|
||||
if ( d->optimMode )
|
||||
return;
|
||||
#endif
|
||||
- resetInputContext();
|
||||
QTextParagraph *p = doc->paragAt( para );
|
||||
if ( !p )
|
||||
return;
|
||||
@@ -3285,7 +3279,6 @@
|
||||
if ( isReadOnly() || !doc->commands()->isUndoAvailable() || !undoEnabled )
|
||||
return;
|
||||
|
||||
- resetInputContext();
|
||||
for ( int i = 0; i < (int)doc->numSelections(); ++i )
|
||||
doc->removeSelection( i );
|
||||
|
||||
@@ -3336,7 +3329,6 @@
|
||||
if ( isReadOnly() || !doc->commands()->isRedoAvailable() || !undoEnabled )
|
||||
return;
|
||||
|
||||
- resetInputContext();
|
||||
for ( int i = 0; i < (int)doc->numSelections(); ++i )
|
||||
doc->removeSelection( i );
|
||||
|
||||
@@ -3450,7 +3442,6 @@
|
||||
{
|
||||
if ( isReadOnly() )
|
||||
return;
|
||||
- resetInputContext();
|
||||
normalCopy();
|
||||
removeSelectedText();
|
||||
updateMicroFocusHint();
|
||||
@@ -3938,7 +3929,6 @@
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
- resetInputContext();
|
||||
if ( !isModified() && isReadOnly() &&
|
||||
this->context() == context && this->text() == text )
|
||||
return;
|
||||
@@ -4112,7 +4102,6 @@
|
||||
if ( !p )
|
||||
return;
|
||||
|
||||
- resetInputContext();
|
||||
if ( index > p->length() - 1 )
|
||||
index = p->length() - 1;
|
||||
|
||||
@@ -4169,7 +4158,6 @@
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
- resetInputContext();
|
||||
if ( doc->hasSelection( selNum ) ) {
|
||||
doc->removeSelection( selNum );
|
||||
repaintChanged();
|
||||
@@ -5072,7 +5060,6 @@
|
||||
{
|
||||
if ( dc == doc )
|
||||
return;
|
||||
- resetInputContext();
|
||||
doc = dc;
|
||||
delete cursor;
|
||||
cursor = new QTextCursor( doc );
|
|
@ -1,36 +0,0 @@
|
|||
--- qt-x11-free-3.3.6/mkspecs/linux-g++/qmake.conf.orig 2006-06-21 15:37:53.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/mkspecs/linux-g++/qmake.conf 2006-06-21 15:38:02.000000000 +0200
|
||||
@@ -84,7 +84,7 @@
|
||||
QMAKE_MOVE = mv -f
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
QMAKE_DEL_DIR = rmdir
|
||||
-QMAKE_STRIP = strip
|
||||
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
|
||||
+QMAKE_STRIP =
|
||||
+QMAKE_STRIPFLAGS_LIB +=
|
||||
QMAKE_CHK_DIR_EXISTS = test -d
|
||||
QMAKE_MKDIR = mkdir -p
|
||||
--- qt-x11-free-3.3.6/mkspecs/linux-g++-32/qmake.conf.orig 2006-06-21 15:37:09.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/mkspecs/linux-g++-32/qmake.conf 2006-06-21 15:37:19.000000000 +0200
|
||||
@@ -84,7 +84,7 @@
|
||||
QMAKE_MOVE = mv -f
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
QMAKE_DEL_DIR = rmdir
|
||||
-QMAKE_STRIP = strip
|
||||
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
|
||||
+QMAKE_STRIP =
|
||||
+QMAKE_STRIPFLAGS_LIB +=
|
||||
QMAKE_CHK_DIR_EXISTS = test -d
|
||||
QMAKE_MKDIR = mkdir -p
|
||||
--- qt-x11-free-3.3.6/mkspecs/linux-g++-64/qmake.conf.orig 2006-06-21 15:36:23.000000000 +0200
|
||||
+++ qt-x11-free-3.3.6/mkspecs/linux-g++-64/qmake.conf 2006-06-21 15:36:56.000000000 +0200
|
||||
@@ -87,7 +87,7 @@
|
||||
QMAKE_MOVE = mv -f
|
||||
QMAKE_DEL_FILE = rm -f
|
||||
QMAKE_DEL_DIR = rmdir
|
||||
-QMAKE_STRIP = strip
|
||||
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
|
||||
+QMAKE_STRIP =
|
||||
+QMAKE_STRIPFLAGS_LIB +=
|
||||
QMAKE_CHK_DIR_EXISTS = test -d
|
||||
QMAKE_MKDIR = mkdir -p
|
|
@ -1,14 +0,0 @@
|
|||
--- qt-x11-free-3.3.7/src/tools/qsettings.cpp.tn 2006-11-09 20:53:25.000000000 +0100
|
||||
+++ qt-x11-free-3.3.7/src/tools/qsettings.cpp 2006-11-09 20:59:53.000000000 +0100
|
||||
@@ -994,7 +994,10 @@
|
||||
#endif
|
||||
|
||||
QFile file( filename + ".tmp" );
|
||||
- if (! file.open(IO_WriteOnly)) {
|
||||
+ mode_t old_umask = umask(0022);
|
||||
+ bool f = file.open(IO_WriteOnly);
|
||||
+ umask(old_umask);
|
||||
+ if (! f) {
|
||||
|
||||
#ifdef QT_CHECK_STATE
|
||||
qWarning("QSettings::sync: failed to open '%s' for writing",
|
|
@ -1,70 +0,0 @@
|
|||
diff -Nur qt-x11-free-3.3.8/src/sql/drivers/mysql/qsql_mysql.cpp qt-x11-free-3.3.8-me/src/sql/drivers/mysql/qsql_mysql.cpp
|
||||
--- qt-x11-free-3.3.8/src/sql/drivers/mysql/qsql_mysql.cpp 2007-01-11 14:38:34.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8-snapshot-me/src/sql/drivers/mysql/qsql_mysql.cpp 2007-05-22 17:15:26.000000000 +0200
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "qsql_mysql.h"
|
||||
#include <private/qsqlextension_p.h>
|
||||
|
||||
-#include <qapplication.h>
|
||||
#include <qdatetime.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qsqlrecord.h>
|
||||
@@ -52,6 +51,9 @@
|
||||
|
||||
QPtrDict<QSqlOpenExtension> *qSqlOpenExtDict();
|
||||
|
||||
+static int qMySqlConnectionCount = 0;
|
||||
+static bool qMySqlInitHandledByUser = FALSE;
|
||||
+
|
||||
class QMYSQLOpenExtension : public QSqlOpenExtension
|
||||
{
|
||||
public:
|
||||
@@ -354,9 +356,8 @@
|
||||
{
|
||||
#ifndef Q_NO_MYSQL_EMBEDDED
|
||||
# if MYSQL_VERSION_ID >= 40000
|
||||
- static bool init = FALSE;
|
||||
- if ( init )
|
||||
- return;
|
||||
+ if ( qMySqlInitHandledByUser || qMySqlConnectionCount > 1 )
|
||||
+ return;
|
||||
|
||||
// this should only be called once
|
||||
// has no effect on client/server library
|
||||
@@ -366,8 +367,6 @@
|
||||
qWarning( "QMYSQLDriver::qServerInit: unable to start server." );
|
||||
# endif
|
||||
}
|
||||
- qAddPostRoutine(qServerEnd);
|
||||
- init = TRUE;
|
||||
|
||||
# endif // MYSQL_VERSION_ID
|
||||
#endif // Q_NO_MYSQL_EMBEDDED
|
||||
@@ -392,8 +391,10 @@
|
||||
d->mysql = (MYSQL *) con;
|
||||
setOpen( TRUE );
|
||||
setOpenError( FALSE );
|
||||
+ if (qMySqlConnectionCount == 1)
|
||||
+ qMySqlInitHandledByUser = TRUE;
|
||||
} else {
|
||||
- qServerInit();
|
||||
+ qServerInit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,10 +403,15 @@
|
||||
qSqlOpenExtDict()->insert( this, new QMYSQLOpenExtension(this) );
|
||||
d = new QMYSQLDriverPrivate();
|
||||
d->mysql = 0;
|
||||
+ qMySqlConnectionCount++;
|
||||
}
|
||||
|
||||
QMYSQLDriver::~QMYSQLDriver()
|
||||
{
|
||||
+ qMySqlConnectionCount--;
|
||||
+ if (qMySqlConnectionCount == 0 && !qMySqlInitHandledByUser)
|
||||
+ qServerEnd();
|
||||
+
|
||||
delete d;
|
||||
if ( !qSqlOpenExtDict()->isEmpty() ) {
|
||||
QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
|
|
@ -1,40 +0,0 @@
|
|||
--- qt-x11-free-3.3.8/src/widgets/qtextedit.cpp.im 2007-03-19 10:19:10.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8/src/widgets/qtextedit.cpp 2007-03-19 10:19:47.000000000 +0100
|
||||
@@ -5059,6 +5059,10 @@
|
||||
|
||||
void QTextEdit::setDocument( QTextDocument *dc )
|
||||
{
|
||||
+ if ( dc == 0 ) {
|
||||
+ qWarning( "Q3TextEdit::setDocument() called with null Q3TextDocument pointer" );
|
||||
+ return;
|
||||
+ }
|
||||
if ( dc == doc )
|
||||
return;
|
||||
resetInputContext();
|
||||
--- qt-x11-free-3.3.8/src/widgets/qlineedit.cpp.im 2007-03-19 10:20:03.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8/src/widgets/qlineedit.cpp 2007-03-19 10:22:11.000000000 +0100
|
||||
@@ -457,10 +457,10 @@
|
||||
\property QLineEdit::text
|
||||
\brief the line edit's text
|
||||
|
||||
- Setting this property clears the selection, clears the undo/redo
|
||||
- history, moves the cursor to the end of the line and resets the
|
||||
- \c modified property to FALSE. The text is not validated when
|
||||
- inserted with setText().
|
||||
+ Note that setting this property clears the selection, clears the
|
||||
+ undo/redo history, moves the cursor to the end of the line and
|
||||
+ resets the \c modified property to FALSE. The text is not
|
||||
+ validated when inserted with setText().
|
||||
|
||||
The text is truncated to maxLength() length.
|
||||
|
||||
@@ -1014,6 +1014,9 @@
|
||||
/*!
|
||||
Selects text from position \a start and for \a length characters.
|
||||
|
||||
+ Note that this function sets the cursor's position to the end of
|
||||
+ the selection regardless of its current position.
|
||||
+
|
||||
\sa deselect() selectAll() getSelection() cursorForward() cursorBackward()
|
||||
*/
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
--- qt-x11-free-3.3.8/src/kernel/qwidget_x11.cpp 2007-02-02 15:01:13.000000000 +0100
|
||||
+++ qt-x11-free-3.3.7/src/kernel/qwidget_x11.cpp 2006-10-19 16:25:16.000000000 +0200
|
||||
@@ -1442,7 +1442,16 @@
|
||||
QWidget *tlw = topLevelWidget();
|
||||
if ( tlw->isVisible() && !tlw->topData()->embedded && !qt_deferred_map_contains(tlw) ) {
|
||||
XSetInputFocus( x11Display(), tlw->winId(), RevertToNone, qt_x_time);
|
||||
- focusInputContext();
|
||||
+
|
||||
+#ifndef QT_NO_XIM
|
||||
+ // trigger input context creation if it hasn't happened already
|
||||
+ createInputContext();
|
||||
+
|
||||
+ if (tlw->topData()->xic) {
|
||||
+ QInputContext *qic = (QInputContext *) tlw->topData()->xic;
|
||||
+ qic->setFocus();
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2717,16 +2726,14 @@
|
||||
{
|
||||
#ifndef QT_NO_XIM
|
||||
QWidget *tlw = topLevelWidget();
|
||||
- if (!tlw->isPopup() || isInputMethodEnabled()) {
|
||||
- QTLWExtra *topdata = tlw->topData();
|
||||
+ QTLWExtra *topdata = tlw->topData();
|
||||
|
||||
- // trigger input context creation if it hasn't happened already
|
||||
- createInputContext();
|
||||
+ // trigger input context creation if it hasn't happened already
|
||||
+ createInputContext();
|
||||
|
||||
- if (topdata->xic) {
|
||||
- QInputContext *qic = (QInputContext *) topdata->xic;
|
||||
- qic->setFocus();
|
||||
- }
|
||||
+ if (topdata->xic) {
|
||||
+ QInputContext *qic = (QInputContext *) topdata->xic;
|
||||
+ qic->setFocus();
|
||||
}
|
||||
#endif // QT_NO_XIM
|
||||
}
|
||||
--- qt-x11-free-3.3.8/src/widgets/qtextedit.cpp 2007-02-02 15:01:23.000000000 +0100
|
||||
+++ qt-x11-free-3.3.7/src/widgets/qtextedit.cpp 2006-10-19 16:25:34.000000000 +0200
|
||||
@@ -4972,10 +4972,6 @@
|
||||
|
||||
void QTextEdit::setDocument( QTextDocument *dc )
|
||||
{
|
||||
- if ( dc == 0 ) {
|
||||
- qWarning( "Q3TextEdit::setDocument() called with null Q3TextDocument pointer" );
|
||||
- return;
|
||||
- }
|
||||
if ( dc == doc )
|
||||
return;
|
||||
resetInputContext();
|
||||
--- qt-x11-free-3.3.8/src/widgets/qlineedit.cpp 2007-02-02 15:01:24.000000000 +0100
|
||||
+++ qt-x11-free-3.3.7/src/widgets/qlineedit.cpp 2006-10-19 16:25:36.000000000 +0200
|
||||
@@ -446,10 +446,10 @@
|
||||
\property QLineEdit::text
|
||||
\brief the line edit's text
|
||||
|
||||
- Note that setting this property clears the selection, clears the
|
||||
- undo/redo history, moves the cursor to the end of the line and
|
||||
- resets the \c modified property to FALSE. The text is not
|
||||
- validated when inserted with setText().
|
||||
+ Setting this property clears the selection, clears the undo/redo
|
||||
+ history, moves the cursor to the end of the line and resets the
|
||||
+ \c modified property to FALSE. The text is not validated when
|
||||
+ inserted with setText().
|
||||
|
||||
The text is truncated to maxLength() length.
|
||||
|
||||
@@ -1002,9 +1002,6 @@
|
||||
/*!
|
||||
Selects text from position \a start and for \a length characters.
|
||||
|
||||
- Note that this function sets the cursor's position to the end of
|
||||
- the selection regardless of its current position.
|
||||
-
|
||||
\sa deselect() selectAll() getSelection() cursorForward() cursorBackward()
|
||||
*/
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
--- qt-x11-free-3.3.8/tools/designer/uic/main.cpp.uic-multilib 2007-03-18 23:47:32.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8/tools/designer/uic/main.cpp 2007-03-18 23:50:34.000000000 +0100
|
||||
@@ -316,8 +316,7 @@
|
||||
out << "/****************************************************************************" << endl;
|
||||
out << "** Form "<< (impl? "implementation" : "interface") << " generated from reading ui file '" << fileName << "'" << endl;
|
||||
out << "**" << endl;
|
||||
- out << "** Created: " << QDateTime::currentDateTime().toString() << endl;
|
||||
- out << "** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.8 edited Jan 11 14:47 $)" << endl;
|
||||
+ out << "** Created by: The User Interface Compiler ($Id: qt/main.cpp 3.3.8 edited Jan 11 14:47 $)" << endl;
|
||||
out << "**" << endl;
|
||||
out << "** WARNING! All changes made in this file will be lost!" << endl;
|
||||
out << "****************************************************************************/" << endl << endl;
|
||||
--- qt-x11-free-3.3.8/tools/designer/uic/embed.cpp.uic-multilib 2007-02-02 15:01:39.000000000 +0100
|
||||
+++ qt-x11-free-3.3.8/tools/designer/uic/embed.cpp 2007-03-18 23:51:36.000000000 +0100
|
||||
@@ -130,8 +130,7 @@
|
||||
for ( it = images.begin(); it != images.end(); ++it )
|
||||
out << "** " << *it << "\n";
|
||||
out << "**\n";
|
||||
- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n";
|
||||
- out << "** by: The User Interface Compiler ($Id: qt/embed.cpp 3.3.8 edited Jan 11 14:47 $)\n";
|
||||
+ out << "** Created by: The User Interface Compiler ($Id: qt/embed.cpp 3.3.8 edited Jan 11 14:47 $)\n";
|
||||
out << "**\n";
|
||||
out << "** WARNING! All changes made in this file will be lost!\n";
|
||||
out << "****************************************************************************/\n";
|
|
@ -1,134 +0,0 @@
|
|||
diff -Nur qt-x11-free-3.3.5.orig/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp qt-x11-free-3.3.5/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
|
||||
--- qt-x11-free-3.3.5.orig/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp 2005-10-13 16:09:36.000000000 +0200
|
||||
+++ qt-x11-free-3.3.5/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp 2005-10-13 16:09:31.000000000 +0200
|
||||
@@ -306,8 +306,8 @@
|
||||
|
||||
currentIMKey = key;
|
||||
|
||||
- qDebug( "QMultiInputContext::changeInputMethod(): index=%d, slave=%s",
|
||||
- imIndex, (const char *)_slave->identifierName() );
|
||||
+ /* qDebug( "QMultiInputContext::changeInputMethod(): index=%d, slave=%s",
|
||||
+ imIndex, (const char *)_slave->identifierName() ); */
|
||||
}
|
||||
}
|
||||
|
||||
diff -Nur qt-x11-free-3.3.5.orig/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp qt-x11-free-3.3.5/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp
|
||||
--- qt-x11-free-3.3.5.orig/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp 2005-10-13 16:09:36.000000000 +0200
|
||||
+++ qt-x11-free-3.3.5/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp 2005-10-13 16:09:31.000000000 +0200
|
||||
@@ -140,7 +140,7 @@
|
||||
// only one character. See description of
|
||||
// QInputContext::filterEvent() about key compression.
|
||||
val = text[0].unicode();
|
||||
- qDebug( "str = %s", (const char*)keyevent->text().local8Bit() );
|
||||
+ // qDebug( "str = %s", (const char*)keyevent->text().local8Bit() );
|
||||
}
|
||||
|
||||
// Store value
|
||||
@@ -164,14 +164,14 @@
|
||||
|
||||
void QSimpleInputContext::setFocus()
|
||||
{
|
||||
- qDebug( "QSimpleInputContext: %p->setFocus(), focusWidget()=%p",
|
||||
- this, focusWidget() );
|
||||
+ /* qDebug( "QSimpleInputContext: %p->setFocus(), focusWidget()=%p",
|
||||
+ this, focusWidget() ); */
|
||||
}
|
||||
|
||||
void QSimpleInputContext::unsetFocus()
|
||||
{
|
||||
- qDebug( "QSimpleInputContext: %p->unsetFocus(), focusWidget()=%p",
|
||||
- this, focusWidget() );
|
||||
+ /* qDebug( "QSimpleInputContext: %p->unsetFocus(), focusWidget()=%p",
|
||||
+ this, focusWidget() ); */
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -188,8 +188,8 @@
|
||||
case QEvent::MouseButtonRelease:
|
||||
case QEvent::MouseButtonDblClick:
|
||||
case QEvent::MouseMove:
|
||||
- qDebug( "QSimpleInputContext::mouseHandler: "
|
||||
- "x=%d, type=%d, button=%d, state=%d", x, type, button, state );
|
||||
+ /* qDebug( "QSimpleInputContext::mouseHandler: "
|
||||
+ "x=%d, type=%d, button=%d, state=%d", x, type, button, state ); */
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -240,7 +240,7 @@
|
||||
|
||||
// no entries were found
|
||||
if ( p == composeTable->data + composeTable->size ) {
|
||||
- qDebug( "no match" );
|
||||
+ // qDebug( "no match" );
|
||||
clearComposeBuffer();
|
||||
return FALSE;
|
||||
}
|
||||
@@ -250,18 +250,18 @@
|
||||
|
||||
// check if partial match
|
||||
if ( composeBuffer[i] == 0 && p->keys[i] ) {
|
||||
- qDebug("partial match");
|
||||
+ // qDebug("partial match");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ( composeBuffer[i] != p->keys[i] ) {
|
||||
- qDebug("different entry");
|
||||
+ // qDebug("different entry");
|
||||
clearComposeBuffer();
|
||||
return i!=0;
|
||||
}
|
||||
}
|
||||
|
||||
- qDebug("match exactly");
|
||||
+ // qDebug("match exactly");
|
||||
|
||||
// match exactly
|
||||
commitChar( p->value );
|
||||
diff -Nur qt-x11-free-3.3.5.orig/src/kernel/qinputcontext.cpp qt-x11-free-3.3.5/src/kernel/qinputcontext.cpp
|
||||
--- qt-x11-free-3.3.5.orig/src/kernel/qinputcontext.cpp 2005-10-13 16:09:37.000000000 +0200
|
||||
+++ qt-x11-free-3.3.5/src/kernel/qinputcontext.cpp 2005-10-13 16:09:31.000000000 +0200
|
||||
@@ -526,17 +526,17 @@
|
||||
return;
|
||||
|
||||
if ( type == QEvent::IMStart ) {
|
||||
- qDebug( "sending IMStart with %d chars to %p",
|
||||
- text.length(), receiver );
|
||||
+ /* qDebug( "sending IMStart with %d chars to %p",
|
||||
+ text.length(), receiver ); */
|
||||
event = new QIMEvent( type, text, cursorPosition );
|
||||
} else if ( type == QEvent::IMEnd ) {
|
||||
- qDebug( "sending IMEnd with %d chars to %p, text=%s",
|
||||
- text.length(), receiver, (const char*)text.local8Bit() );
|
||||
+ /* qDebug( "sending IMEnd with %d chars to %p, text=%s",
|
||||
+ text.length(), receiver, (const char*)text.local8Bit() ); */
|
||||
event = new QIMEvent( type, text, cursorPosition );
|
||||
} else if ( type == QEvent::IMCompose ) {
|
||||
- qDebug( "sending IMCompose to %p with %d chars, cpos=%d, sellen=%d, text=%s",
|
||||
+ /* qDebug( "sending IMCompose to %p with %d chars, cpos=%d, sellen=%d, text=%s",
|
||||
receiver, text.length(), cursorPosition, selLength,
|
||||
- (const char*)text.local8Bit() );
|
||||
+ (const char*)text.local8Bit() ); */
|
||||
event = new QIMComposeEvent( type, text, cursorPosition, selLength );
|
||||
}
|
||||
|
||||
--- qt-x11-free-3.3.5/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp.quiet 2005-10-13 19:00:56.000000000 +0200
|
||||
+++ qt-x11-free-3.3.5/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp 2005-10-25 15:36:43.000000000 +0200
|
||||
@@ -356,7 +356,7 @@
|
||||
#if !defined(QT_NO_XIM)
|
||||
fontsetRefCount++;
|
||||
if (! qt_xim) {
|
||||
- qWarning("QInputContext: no input method context available");
|
||||
+ // qWarning("QInputContext: no input method context available");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@
|
||||
|
||||
void QXIMInputContext::close( const QString &errMsg )
|
||||
{
|
||||
- qDebug( errMsg );
|
||||
+ // qDebug( errMsg );
|
||||
emit deletionRequested();
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
--- qt-x11-opensource-src-4.2.2/qmake/project.cpp.QMAKEPATH 2006-11-27 11:26:03.000000000 -0600
|
||||
+++ qt-x11-opensource-src-4.2.2/qmake/project.cpp 2007-02-26 13:45:39.000000000 -0600
|
||||
@@ -498,6 +498,7 @@
|
||||
ret << ((*it) + concat);
|
||||
}
|
||||
ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat;
|
||||
+ ret << QLibraryInfo::location(QLibraryInfo::PrefixPath) + concat;
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
|
||||
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf 2007-02-26 15:01:02.000000000 -0600
|
||||
@@ -14,6 +14,8 @@
|
||||
QMAKE_CFLAGS = -m64
|
||||
QMAKE_LFLAGS = -m64
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
include(../common/g++.conf)
|
||||
include(../common/linux.conf)
|
||||
|
||||
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
|
||||
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf 2007-02-26 15:01:34.000000000 -0600
|
||||
@@ -11,6 +11,8 @@
|
||||
QMAKE_CFLAGS = -m32
|
||||
QMAKE_LFLAGS = -m32
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
include(../common/g++.conf)
|
||||
include(../common/linux.conf)
|
||||
load(qt_config)
|
||||
--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600
|
||||
+++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf 2007-02-26 15:01:26.000000000 -0600
|
||||
@@ -8,6 +8,8 @@
|
||||
QT += core gui
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
include(../common/g++.conf)
|
||||
include(../common/linux.conf)
|
||||
load(qt_config)
|
|
@ -0,0 +1,50 @@
|
|||
diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h
|
||||
--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h 2009-02-25 22:09:21.000000000 +0100
|
||||
+++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h 2009-04-01 17:54:21.000000000 +0200
|
||||
@@ -115,8 +115,8 @@
|
||||
asm volatile("lock\n"
|
||||
"incl %0\n"
|
||||
"setne %1"
|
||||
- : "=m" (_q_value), "=qm" (ret)
|
||||
- : "m" (_q_value)
|
||||
+ : "+m" (_q_value), "=qm" (ret)
|
||||
+ :
|
||||
: "memory");
|
||||
return ret != 0;
|
||||
}
|
||||
@@ -127,8 +127,8 @@
|
||||
asm volatile("lock\n"
|
||||
"decl %0\n"
|
||||
"setne %1"
|
||||
- : "=m" (_q_value), "=qm" (ret)
|
||||
- : "m" (_q_value)
|
||||
+ : "+m" (_q_value), "=qm" (ret)
|
||||
+ :
|
||||
: "memory");
|
||||
return ret != 0;
|
||||
}
|
||||
diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h
|
||||
--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h 2009-02-25 22:09:21.000000000 +0100
|
||||
+++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h 2009-04-01 17:54:32.000000000 +0200
|
||||
@@ -116,8 +116,8 @@
|
||||
asm volatile("lock\n"
|
||||
"incl %0\n"
|
||||
"setne %1"
|
||||
- : "=m" (_q_value), "=qm" (ret)
|
||||
- : "m" (_q_value)
|
||||
+ : "+m" (_q_value), "=qm" (ret)
|
||||
+ :
|
||||
: "memory");
|
||||
return ret != 0;
|
||||
}
|
||||
@@ -128,8 +128,8 @@
|
||||
asm volatile("lock\n"
|
||||
"decl %0\n"
|
||||
"setne %1"
|
||||
- : "=m" (_q_value), "=qm" (ret)
|
||||
- : "m" (_q_value)
|
||||
+ : "+m" (_q_value), "=qm" (ret)
|
||||
+ :
|
||||
: "memory");
|
||||
return ret != 0;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
diff -up qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp
|
||||
--- qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp.gcc_hack 2009-02-25 15:09:22.000000000 -0600
|
||||
+++ qt-x11-opensource-src-4.5.0/src/corelib/tools/qstring.cpp 2009-03-27 11:56:51.000000000 -0500
|
||||
@@ -102,8 +102,8 @@ static QHash<void *, QByteArray> *asciiC
|
||||
// internal
|
||||
int qFindString(const QChar *haystack, int haystackLen, int from,
|
||||
const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
|
||||
-int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
|
||||
- const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
|
||||
+//int qFindStringBoyerMoore(const QChar *haystack, int haystackLen, int from,
|
||||
+// const QChar *needle, int needleLen, Qt::CaseSensitivity cs);
|
||||
|
||||
|
||||
// Unicode case-insensitive comparison
|
|
@ -0,0 +1,12 @@
|
|||
diff -up qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp.enable_ft_lcdfilter qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp
|
||||
--- qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp.enable_ft_lcdfilter 2009-04-21 18:57:41.000000000 -0500
|
||||
+++ qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp 2009-04-24 11:17:49.562695405 -0500
|
||||
@@ -72,7 +72,7 @@
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
#endif
|
||||
|
||||
-#if defined(FT_LCD_FILTER_H) && defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING)
|
||||
+#if defined(FT_LCD_FILTER_H)
|
||||
#define QT_USE_FREETYPE_LCDFILTER
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue