diff options
Diffstat (limited to 'src')
437 files changed, 8226 insertions, 5785 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp index 3008fca..3c9df93 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp @@ -1551,6 +1551,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv | PreSubstProperty | BelowSubstProperty | AboveSubstProperty + | PostSubstProperty | HalantProperty | PositioningProperties); @@ -1608,14 +1609,7 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv // pres always applies // blws always applies // abvs always applies - - // psts - // ### this looks slightly different from before, but I believe it's correct - if (reordered[len-1] != halant || base != len-2) - properties[base] &= ~PostSubstProperty; - for (i = base+1; i < len; ++i) - properties[i] &= ~PostSubstProperty; - + // psts always applies // halant always applies #ifdef INDIC_DEBUG diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp index 12fa7c4..827ac30 100644 --- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp +++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp @@ -686,7 +686,7 @@ void tst_QScriptEngine::bengali() void tst_QScriptEngine::gurmukhi() { { - FT_Face face = loadFace("lohit.punjabi.1.1.ttf"); + FT_Face face = loadFace("lohit_pa.ttf"); if (face) { const ShapeTable shape_table [] = { { { 0xA15, 0xA4D, 0xa39, 0x0 }, @@ -998,6 +998,36 @@ void tst_QScriptEngine::malayalam() QSKIP("couln't find AkrutiMal2Normal.ttf", SkipAll); } } + + { + FT_Face face = loadFace("Rachana.ttf"); + if (face) { + const ShapeTable shape_table [] = { + { { 0xd37, 0xd4d, 0xd1f, 0xd4d, 0xd30, 0xd40, 0x0 }, + { 0x385, 0xa3, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + { { 0xd33, 0xd4d, 0xd33, 0x0 }, + { 0x3f8, 0x0 } }, + { { 0xd2f, 0xd4d, 0xd15, 0xd4d, 0xd15, 0xd41, 0x0 }, + { 0x2ff, 0x0 } }, + + { {0}, {0} } + }; + + + const ShapeTable *s = shape_table; + while (s->unicode[0]) { + QVERIFY( shaping(face, s, HB_Script_Malayalam) ); + ++s; + } + + FT_Done_Face(face); + } else { + QSKIP("couln't find Rachana.ttf", SkipAll); + } + } + } void tst_QScriptEngine::sinhala() @@ -1113,7 +1143,7 @@ void tst_QScriptEngine::nko() void tst_QScriptEngine::linearB() { { - FT_Face face = loadFace("PENUTURE.TTF"); + FT_Face face = loadFace("penuture.ttf"); if (face) { const ShapeTable shape_table [] = { { { 0xd800, 0xdc01, 0xd800, 0xdc02, 0xd800, 0xdc03, 0 }, diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri index ea6e5ab..28328e7 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri @@ -52,7 +52,7 @@ win32-* { # Rules when JIT enabled (not disabled) !contains(DEFINES, ENABLE_JIT=0) { - linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { + linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { QMAKE_CXXFLAGS += -fno-stack-protector QMAKE_CFLAGS += -fno-stack-protector } diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro deleted file mode 100644 index 0cd2e1a..0000000 --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pro +++ /dev/null @@ -1,69 +0,0 @@ -# JavaScriptCore - qmake build info -CONFIG += building-libs -include($$PWD/../WebKit.pri) - -TEMPLATE = lib -CONFIG += staticlib -TARGET = JavaScriptCore - -CONFIG += depend_includepath - -contains(QT_CONFIG, embedded):CONFIG += embedded - -CONFIG(QTDIR_build) { - GENERATED_SOURCES_DIR = $$PWD/generated - OLDDESTDIR = $$DESTDIR - include($$QT_SOURCE_TREE/src/qbase.pri) - INSTALLS = - DESTDIR = $$OLDDESTDIR - PRECOMPILED_HEADER = $$PWD/../WebKit/qt/WebKit_pch.h - DEFINES *= NDEBUG -} - -isEmpty(GENERATED_SOURCES_DIR):GENERATED_SOURCES_DIR = tmp -GENERATED_SOURCES_DIR_SLASH = $${GENERATED_SOURCES_DIR}$${QMAKE_DIR_SEP} - -INCLUDEPATH += $$GENERATED_SOURCES_DIR - -!CONFIG(QTDIR_build) { - CONFIG(debug, debug|release) { - OBJECTS_DIR = obj/debug - } else { # Release - OBJECTS_DIR = obj/release - } -} - -CONFIG(release):!CONFIG(QTDIR_build) { - contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols - unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions -} - -linux-*: DEFINES += HAVE_STDINT_H -freebsd-*: DEFINES += HAVE_PTHREAD_NP_H - -DEFINES += BUILD_WEBKIT - -win32-*: DEFINES += _HAS_TR1=0 - -# Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { - TMPPATH = $$quote($$(INCLUDE)) - QMAKE_INCDIR_POST += $$split(TMPPATH,";") - TMPPATH = $$quote($$(LIB)) - QMAKE_LIBDIR_POST += $$split(TMPPATH,";") -} - -DEFINES += WTF_USE_JAVASCRIPTCORE_BINDINGS=1 - -DEFINES += WTF_CHANGES=1 - -include(JavaScriptCore.pri) - -QMAKE_EXTRA_TARGETS += generated_files - -lessThan(QT_MINOR_VERSION, 4) { - DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE="" -} - -*-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 -*-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp index 073b35a..b098728 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp @@ -561,6 +561,7 @@ SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiTrampoline) "\n" +HIDE_SYMBOL(ctiTrampoline) "\n" SYMBOL_STRING(ctiTrampoline) ":" "\n" "stmdb sp!, {r1-r3}" "\n" "stmdb sp!, {r4-r8, lr}" "\n" @@ -584,6 +585,7 @@ SYMBOL_STRING(ctiTrampoline) ":" "\n" asm volatile ( ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" +HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" "mov r0, sp" "\n" "mov lr, r6" "\n" @@ -593,6 +595,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" // Both has the same return sequence ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" +HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" "add sp, sp, #32" "\n" "ldmia sp!, {r4-r8, lr}" "\n" diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h index 43975ff..c2b8c02 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.h @@ -246,6 +246,10 @@ namespace JSC { MacroAssemblerCodePtr m_ctiNativeCallThunk; }; +#if COMPILER(GCC) +#pragma GCC visibility push(hidden) +#endif + extern "C" { EncodedJSValue JIT_STUB cti_op_add(STUB_ARGS_DECLARATION); EncodedJSValue JIT_STUB cti_op_bitand(STUB_ARGS_DECLARATION); @@ -363,6 +367,10 @@ extern "C" { void* JIT_STUB cti_vm_lazyLinkCall(STUB_ARGS_DECLARATION); } // extern "C" +#if COMPILER(GCC) +#pragma GCC visibility pop +#endif + } // namespace JSC #endif // ENABLE(JIT) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h index 2a407d4..be74e2a 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h @@ -98,6 +98,10 @@ /* regardless of operating environment */ #if defined(_AIX) #define WTF_PLATFORM_AIX 1 +/* 64-bit mode on AIX */ +#ifdef __64BIT__ +#define WTF_PLATFORM_AIX64 1 +#endif #endif /* PLATFORM(HPUX) */ @@ -324,6 +328,16 @@ #define WTF_PLATFORM_BIG_ENDIAN 1 #endif +/* PLATFORM(SPARC32) */ +#if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8) +#define WTF_PLATFORM_SPARC32 1 +#define WTF_PLATFORM_BIG_ENDIAN 1 +#endif + +#if PLATFORM(SPARC32) || PLATFORM(SPARC64) +#define WTF_PLATFORM_SPARC +#endif + /* PLATFORM(HPPA) */ /* a.k.a. PA-RISC */ #if defined(__hppa) || defined(__hppa__) @@ -708,6 +722,8 @@ #define WTF_USE_JSVALUE64 1 #elif (PLATFORM(IA64) && !PLATFORM(IA64_32)) || PLATFORM(SPARC64) #define WTF_USE_JSVALUE64 1 +#elif PLATFORM(AIX64) +#define WTF_USE_JSVALUE64 1 #elif PLATFORM(ARM) || PLATFORM(PPC64) #define WTF_USE_JSVALUE32 1 #elif PLATFORM(WIN_OS) && COMPILER(MINGW) diff --git a/src/3rdparty/phonon/ds9/backend.cpp b/src/3rdparty/phonon/ds9/backend.cpp index 6ed0145..fbc4bdc 100644 --- a/src/3rdparty/phonon/ds9/backend.cpp +++ b/src/3rdparty/phonon/ds9/backend.cpp @@ -41,6 +41,8 @@ namespace Phonon { namespace DS9 { + QMutex *Backend::directShowMutex = 0; + bool Backend::AudioMoniker::operator==(const AudioMoniker &other) { return other->IsEqual(*this) == S_OK; @@ -50,6 +52,8 @@ namespace Phonon Backend::Backend(QObject *parent, const QVariantList &) : QObject(parent) { + directShowMutex = &m_directShowMutex; + ::CoInitialize(0); //registering meta types @@ -62,11 +66,8 @@ namespace Phonon m_audioOutputs.clear(); m_audioEffects.clear(); ::CoUninitialize(); - } - QMutex *Backend::directShowMutex() - { - return &qobject_cast<Backend*>(qt_plugin_instance())->m_directShowMutex; + directShowMutex = 0; } QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList<QVariant> &args) diff --git a/src/3rdparty/phonon/ds9/backend.h b/src/3rdparty/phonon/ds9/backend.h index 8b020c2..7c3c109 100644 --- a/src/3rdparty/phonon/ds9/backend.h +++ b/src/3rdparty/phonon/ds9/backend.h @@ -64,7 +64,7 @@ namespace Phonon Filter getAudioOutputFilter(int index) const; - static QMutex *directShowMutex(); + static QMutex *directShowMutex; Q_SIGNALS: void objectDescriptionChanged(ObjectDescriptionType); diff --git a/src/3rdparty/phonon/ds9/backendnode.cpp b/src/3rdparty/phonon/ds9/backendnode.cpp index 855357a..3afcafa 100644 --- a/src/3rdparty/phonon/ds9/backendnode.cpp +++ b/src/3rdparty/phonon/ds9/backendnode.cpp @@ -58,7 +58,24 @@ namespace Phonon BackendNode::~BackendNode() { //this will remove the filter from the graph - mediaObjectDestroyed(); + FILTER_INFO info; + for(int i = 0; i < FILTER_COUNT; ++i) { + const Filter &filter = m_filters[i]; + if (!filter) + continue; + filter->QueryFilterInfo(&info); + if (info.pGraph) { + HRESULT hr = info.pGraph->RemoveFilter(filter); + + if (hr == VFW_E_NOT_STOPPED && m_mediaObject) { + m_mediaObject->ensureStopped(); + + hr = info.pGraph->RemoveFilter(filter); + } + Q_ASSERT(SUCCEEDED(hr)); + info.pGraph->Release(); + } + } } void BackendNode::setMediaObject(MediaObject *mo) diff --git a/src/3rdparty/phonon/ds9/mediaobject.cpp b/src/3rdparty/phonon/ds9/mediaobject.cpp index 250b94a..34f92c2 100644 --- a/src/3rdparty/phonon/ds9/mediaobject.cpp +++ b/src/3rdparty/phonon/ds9/mediaobject.cpp @@ -177,7 +177,7 @@ namespace Phonon void WorkerThread::handleTask() { - QMutexLocker locker(Backend::directShowMutex()); + QMutexLocker locker(Backend::directShowMutex); { QMutexLocker locker(&m_mutex); if (m_finished || m_queue.isEmpty()) { @@ -361,17 +361,17 @@ namespace Phonon m_graphs[i] = new MediaGraph(this, i); } - connect(&m_thread, SIGNAL(stateReady(Graph, Phonon::State)), - SLOT(slotStateReady(Graph, Phonon::State))); + connect(&m_thread, SIGNAL(stateReady(Graph,Phonon::State)), + SLOT(slotStateReady(Graph,Phonon::State))); - connect(&m_thread, SIGNAL(eventReady(Graph, long, long)), - SLOT(handleEvents(Graph, long, long))); + connect(&m_thread, SIGNAL(eventReady(Graph,long,long)), + SLOT(handleEvents(Graph,long,long))); - connect(&m_thread, SIGNAL(asyncRenderFinished(quint16, HRESULT, Graph)), - SLOT(finishLoading(quint16, HRESULT, Graph))); + connect(&m_thread, SIGNAL(asyncRenderFinished(quint16,HRESULT,Graph)), + SLOT(finishLoading(quint16,HRESULT,Graph))); - connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16, qint64)), - SLOT(finishSeeking(quint16, qint64))); + connect(&m_thread, SIGNAL(asyncSeekingFinished(quint16,qint64)), + SLOT(finishSeeking(quint16,qint64))); //really special case m_mediaObject = this; m_thread.start(); diff --git a/src/3rdparty/phonon/gstreamer/mediaobject.cpp b/src/3rdparty/phonon/gstreamer/mediaobject.cpp index eafaeec..b6d23ec 100644 --- a/src/3rdparty/phonon/gstreamer/mediaobject.cpp +++ b/src/3rdparty/phonon/gstreamer/mediaobject.cpp @@ -95,8 +95,8 @@ MediaObject::MediaObject(Backend *backend, QObject *parent) m_backend->addBusWatcher(this); connect(m_tickTimer, SIGNAL(timeout()), SLOT(emitTick())); } - connect(this, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(notifyStateChange(Phonon::State, Phonon::State))); + connect(this, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(notifyStateChange(Phonon::State,Phonon::State))); } diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp index a793390..a559249 100644 --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.cpp @@ -29,6 +29,10 @@ using namespace Phonon::MMF; \internal */ +/*! \namespace Phonon::MMF + \internal +*/ + AbstractAudioEffect::AbstractAudioEffect(QObject *parent, const QList<EffectParameter> ¶ms) : MediaNode::MediaNode(parent) , m_params(params) diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp index f2efaa0..99e96cd 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp @@ -109,12 +109,12 @@ void MMF::AbstractMediaPlayer::pause() case GroundState: case LoadingState: case PausedState: - case ErrorState: // Do nothing break; case StoppedState: case PlayingState: + case ErrorState: case BufferingState: doPause(); stopTickTimer(); @@ -289,10 +289,6 @@ void MMF::AbstractMediaPlayer::setNextSource(const MediaSource &source) } -//----------------------------------------------------------------------------- -// VolumeObserver -//----------------------------------------------------------------------------- - void MMF::AbstractMediaPlayer::volumeChanged(qreal volume) { TRACE_CONTEXT(AbstractMediaPlayer::volumeChanged, EAudioInternal); diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h index cff7bab..cb6e437 100644 --- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h +++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h @@ -56,8 +56,6 @@ public: virtual MediaSource source() const; virtual void setFileSource(const Phonon::MediaSource&, RFile&); virtual void setNextSource(const MediaSource &source); - - // VolumeObserver virtual void volumeChanged(qreal volume); protected: diff --git a/src/3rdparty/phonon/mmf/abstractplayer.cpp b/src/3rdparty/phonon/mmf/abstractplayer.cpp index de2722d..caf4092 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.cpp +++ b/src/3rdparty/phonon/mmf/abstractplayer.cpp @@ -92,11 +92,6 @@ void MMF::AbstractPlayer::setTransitionTime(qint32 time) m_transitionTime = time; } - -//----------------------------------------------------------------------------- -// VolumeObserver -//----------------------------------------------------------------------------- - void MMF::AbstractPlayer::volumeChanged(qreal volume) { m_volume = volume; @@ -134,7 +129,7 @@ void MMF::AbstractPlayer::setError(Phonon::ErrorType error, Phonon::ErrorType MMF::AbstractPlayer::errorType() const { const Phonon::ErrorType result = (ErrorState == m_state) - ? errorType() : NoError; + ? m_error : NoError; return result; } diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h index 66496cc..2e9cfa0 100644 --- a/src/3rdparty/phonon/mmf/abstractplayer.h +++ b/src/3rdparty/phonon/mmf/abstractplayer.h @@ -24,8 +24,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QObject> -#include "volumeobserver.h" - #include "videooutput.h" class RFile; @@ -49,7 +47,6 @@ class VideoOutput; * - Video, in which case the implementation is VideoPlayer */ class AbstractPlayer : public QObject - , public VolumeObserver { // Required although this class has no signals or slots // Without this, qobject_cast will fail @@ -85,7 +82,6 @@ public: virtual void setFileSource(const Phonon::MediaSource&, RFile&) = 0; virtual void setNextSource(const Phonon::MediaSource &) = 0; - // VolumeObserver virtual void volumeChanged(qreal volume); void setVideoOutput(VideoOutput* videoOutput); diff --git a/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp b/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp index 0447d57..18ced94 100644 --- a/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp +++ b/src/3rdparty/phonon/mmf/ancestormovemonitor.cpp @@ -26,7 +26,7 @@ QT_BEGIN_NAMESPACE using namespace Phonon::MMF; -/*! \class MMF::AncestorMoveMonitor +/*! \class Phonon::MMF::AncestorMoveMonitor \internal \brief Class which installs a global event filter, and listens for move events which may affect the absolute position of widgets registered with @@ -34,6 +34,11 @@ using namespace Phonon::MMF; See QTBUG-4956 */ + +/*! \class Phonon::MMF::VideoOutputObserver + \internal +*/ + //----------------------------------------------------------------------------- // Constructor / destructor //----------------------------------------------------------------------------- diff --git a/src/3rdparty/phonon/mmf/audiooutput.cpp b/src/3rdparty/phonon/mmf/audiooutput.cpp index 82af9f1..d6e0c13 100644 --- a/src/3rdparty/phonon/mmf/audiooutput.cpp +++ b/src/3rdparty/phonon/mmf/audiooutput.cpp @@ -24,7 +24,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "defs.h" #include "mediaobject.h" #include "utils.h" -#include "volumeobserver.h" QT_BEGIN_NAMESPACE @@ -41,7 +40,6 @@ using namespace Phonon::MMF; MMF::AudioOutput::AudioOutput(Backend *, QObject *parent) : MediaNode(parent) , m_volume(InitialVolume) - , m_observer(0) { } @@ -59,12 +57,9 @@ qreal MMF::AudioOutput::volume() const void MMF::AudioOutput::setVolume(qreal volume) { TRACE_CONTEXT(AudioOutput::setVolume, EAudioApi); - TRACE_ENTRY("observer 0x%08x volume %f", m_observer, volume); + TRACE_ENTRY("volume %f", volume); if (volume != m_volume) { - if (m_observer) { - m_observer->volumeChanged(volume); - } m_volume = volume; TRACE("emit volumeChanged(%f)", volume) @@ -86,17 +81,12 @@ bool MMF::AudioOutput::setOutputDevice(int index) return true; } -void MMF::AudioOutput::setVolumeObserver(VolumeObserver* observer) -{ - m_observer = observer; - if (m_observer) { - m_observer->volumeChanged(m_volume); - } -} - bool MMF::AudioOutput::activateOnMediaObject(MediaObject *mo) { - setVolumeObserver(mo); + // Ensure that the MediaObject has the correct initial volume + mo->volumeChanged(m_volume); + // Connect MediaObject to receive future volume changes + connect(this, SIGNAL(volumeChanged(qreal)), mo, SLOT(volumeChanged(qreal))); return true; } diff --git a/src/3rdparty/phonon/mmf/audiooutput.h b/src/3rdparty/phonon/mmf/audiooutput.h index d0ba086..1e1e134 100644 --- a/src/3rdparty/phonon/mmf/audiooutput.h +++ b/src/3rdparty/phonon/mmf/audiooutput.h @@ -31,12 +31,11 @@ namespace Phonon namespace MMF { class Backend; -class VolumeObserver; /** * @short AudioOutputInterface implementation for MMF. * - * Forwards volume commands to the VolumeObserver instance, + * Forwards volume commands to the MediaObject instance, * which is provided by the backend when MediaNode objects are * connected. * @@ -82,13 +81,8 @@ Q_SIGNALS: void audioDeviceFailed(); private: - - void setVolumeObserver(VolumeObserver* observer); - qreal m_volume; - // Not owned - VolumeObserver* m_observer; }; } } diff --git a/src/3rdparty/phonon/mmf/backend.cpp b/src/3rdparty/phonon/mmf/backend.cpp index cac27e3..7e3a67f 100644 --- a/src/3rdparty/phonon/mmf/backend.cpp +++ b/src/3rdparty/phonon/mmf/backend.cpp @@ -38,10 +38,6 @@ QT_BEGIN_NAMESPACE using namespace Phonon; using namespace Phonon::MMF; -/*! \class MMF::VolumeObserver - \internal -*/ - /*! \class MMF::Backend \internal */ diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp index f004fd7..21dcfe1 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.cpp +++ b/src/3rdparty/phonon/mmf/mediaobject.cpp @@ -319,10 +319,10 @@ void MMF::MediaObject::createPlayer(const MediaSource &source) } connect(m_player.data(), SIGNAL(totalTimeChanged(qint64)), SIGNAL(totalTimeChanged(qint64))); - connect(m_player.data(), SIGNAL(stateChanged(Phonon::State, Phonon::State)), SIGNAL(stateChanged(Phonon::State, Phonon::State))); + connect(m_player.data(), SIGNAL(stateChanged(Phonon::State,Phonon::State)), SIGNAL(stateChanged(Phonon::State,Phonon::State))); connect(m_player.data(), SIGNAL(finished()), SIGNAL(finished())); connect(m_player.data(), SIGNAL(tick(qint64)), SIGNAL(tick(qint64))); - connect(m_player.data(), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&)), SIGNAL(metaDataChanged(const QMultiMap<QString, QString>&))); + connect(m_player.data(), SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), SIGNAL(metaDataChanged(QMultiMap<QString,QString>))); // We need to call setError() after doing the connects, otherwise the // error won't be received. @@ -359,11 +359,6 @@ void MMF::MediaObject::setTransitionTime(qint32 time) m_player->setTransitionTime(time); } - -//----------------------------------------------------------------------------- -// VolumeObserver -//----------------------------------------------------------------------------- - void MMF::MediaObject::volumeChanged(qreal volume) { m_player->volumeChanged(volume); diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h index 409918d..ee94ea2 100644 --- a/src/3rdparty/phonon/mmf/mediaobject.h +++ b/src/3rdparty/phonon/mmf/mediaobject.h @@ -30,7 +30,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "abstractplayer.h" #include "mmf_medianode.h" #include "defs.h" -#include "volumeobserver.h" QT_BEGIN_NAMESPACE @@ -46,7 +45,6 @@ class VideoOutput; */ class MediaObject : public MediaNode , public MediaObjectInterface - , public VolumeObserver { Q_OBJECT Q_INTERFACES(Phonon::MediaObjectInterface) @@ -77,9 +75,6 @@ public: virtual qint32 transitionTime() const; virtual void setTransitionTime(qint32); - // VolumeObserver - void volumeChanged(qreal volume); - /** * This class owns the AbstractPlayer, and will delete it upon * destruction. @@ -90,6 +85,9 @@ public: virtual bool activateOnMediaObject(MediaObject *); +public Q_SLOTS: + void volumeChanged(qreal volume); + Q_SIGNALS: void totalTimeChanged(qint64 length); void hasVideoChanged(bool hasVideo); diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp index ba7d005..2059fbe 100644 --- a/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp +++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.cpp @@ -49,7 +49,7 @@ MMF::VideoPlayer::VideoPlayer() , m_screenDevice(*CCoeEnv::Static()->ScreenDevice()) , m_window(0) , m_totalTime(0) - , m_mmfOutputChangePending(false) + , m_pendingChanges(false) { construct(); } @@ -60,7 +60,7 @@ MMF::VideoPlayer::VideoPlayer(const AbstractPlayer& player) , m_screenDevice(*CCoeEnv::Static()->ScreenDevice()) , m_window(0) , m_totalTime(0) - , m_mmfOutputChangePending(false) + , m_pendingChanges(false) { construct(); } @@ -70,24 +70,11 @@ void MMF::VideoPlayer::construct() TRACE_CONTEXT(VideoPlayer::VideoPlayer, EVideoApi); TRACE_ENTRY_0(); - if (m_videoOutput) - m_videoOutput->setObserver(this); + getVideoWindow(); const TInt priority = 0; const TMdaPriorityPreference preference = EMdaPriorityPreferenceNone; - // Ignore return value - first call must always return true - getNativeWindowSystemHandles(); - - // TODO: is this the correct way to handle errors which occur when - // creating a Symbian object in the constructor of a Qt object? - - // TODO: check whether videoOutput is visible? If not, then the - // corresponding window will not be active, meaning that the - // clipping region will be set to empty and the video will not be - // visible. If this is the case, we should set m_mmfOutputChangePending - // and respond to future showEvents from the videoOutput widget. - TRAPD(err, m_player.reset(CVideoPlayerUtility::NewL ( @@ -95,7 +82,7 @@ void MMF::VideoPlayer::construct() priority, preference, m_wsSession, m_screenDevice, *m_window, - m_rect, m_rect + m_videoRect, m_videoRect )) ); @@ -110,8 +97,8 @@ MMF::VideoPlayer::~VideoPlayer() TRACE_CONTEXT(VideoPlayer::~VideoPlayer, EVideoApi); TRACE_ENTRY_0(); - if (m_videoOutput) - m_videoOutput->setObserver(0); + // QObject destructor removes all signal-slot connections involving this + // object, so we do not need to disconnect from m_videoOutput here. TRACE_EXIT_0(); } @@ -124,11 +111,7 @@ void MMF::VideoPlayer::doPlay() { TRACE_CONTEXT(VideoPlayer::doPlay, EVideoApi); - // See comment in updateMmfOutput - if (m_mmfOutputChangePending) { - TRACE_0("MMF output change pending - pushing now"); - updateMmfOutput(); - } + applyPendingChanges(); m_player->Play(); } @@ -255,13 +238,10 @@ void MMF::VideoPlayer::MvpuoPrepareComplete(TInt aError) maxVolumeChanged(m_player->MaxVolume()); if (m_videoOutput) - m_videoOutput->setFrameSize(m_frameSize); + m_videoOutput->setVideoSize(m_videoFrameSize); - // See comment in updateMmfOutput - if (m_mmfOutputChangePending) { - TRACE_0("MMF output change pending - pushing now"); - updateMmfOutput(); - } + updateVideoRect(); + applyPendingChanges(); emit totalTimeChanged(totalTime()); changeState(StoppedState); @@ -279,7 +259,7 @@ void MMF::VideoPlayer::doPrepareCompleteL(TInt aError) // Get frame size TSize size; m_player->VideoFrameSizeL(size); - m_frameSize = QSize(size.iWidth, size.iHeight); + m_videoFrameSize = QSize(size.iWidth, size.iHeight); // Get duration m_totalTime = toMilliSeconds(m_player->DurationL()); @@ -322,27 +302,178 @@ void MMF::VideoPlayer::MvpuoEvent(const TMMFEvent &aEvent) //----------------------------------------------------------------------------- -// VideoOutputObserver +// Video window updates //----------------------------------------------------------------------------- -void MMF::VideoPlayer::videoOutputRegionChanged() +void MMF::VideoPlayer::getVideoWindow() +{ + TRACE_CONTEXT(VideoPlayer::getVideoWindow, EVideoInternal); + TRACE_ENTRY_0(); + + if(m_videoOutput) { + // Dump information to log, only in debug builds + m_videoOutput->dump(); + + initVideoOutput(); + m_window = m_videoOutput->videoWindow(); + updateVideoRect(); + } else + // Top-level window + m_window = QApplication::activeWindow()->effectiveWinId()->DrawableWindow(); + + TRACE_EXIT_0(); +} + +void MMF::VideoPlayer::videoOutputChanged() +{ + TRACE_CONTEXT(VideoPlayer::videoOutputChanged, EVideoInternal); + TRACE_ENTRY_0(); + + if (m_videoOutput) { + initVideoOutput(); + videoWindowChanged(); + } + + TRACE_EXIT_0(); +} + +void MMF::VideoPlayer::initVideoOutput() +{ + m_videoOutput->winId(); + m_videoOutput->setVideoSize(m_videoFrameSize); + + bool connected = connect( + m_videoOutput, SIGNAL(videoWindowChanged()), + this, SLOT(videoWindowChanged()) + ); + Q_ASSERT(connected); + + connected = connect( + m_videoOutput, SIGNAL(aspectRatioChanged()), + this, SLOT(aspectRatioChanged()) + ); + Q_ASSERT(connected); + + connected = connect( + m_videoOutput, SIGNAL(scaleModeChanged()), + this, SLOT(scaleModeChanged()) + ); + Q_ASSERT(connected); + + // Suppress warnings in release builds + Q_UNUSED(connected); +} + +void MMF::VideoPlayer::videoWindowChanged() { TRACE_CONTEXT(VideoPlayer::videoOutputRegionChanged, EVideoInternal); TRACE_ENTRY("state %d", state()); - const bool changed = getNativeWindowSystemHandles(); + m_window = m_videoOutput->videoWindow(); - // See comment in updateMmfOutput - if (changed) { - if (state() == LoadingState) - m_mmfOutputChangePending = true; - else - updateMmfOutput(); + updateVideoRect(); + + TRACE_EXIT_0(); +} + +// Helper function for aspect ratio / scale mode handling +QSize scaleToAspect(const QSize& srcRect, int aspectWidth, int aspectHeight) +{ + const qreal aspectRatio = qreal(aspectWidth) / aspectHeight; + + int width = srcRect.width(); + int height = srcRect.width() / aspectRatio; + if (height > srcRect.height()){ + height = srcRect.height(); + width = srcRect.height() * aspectRatio; } + return QSize(width, height); +} + +void MMF::VideoPlayer::updateVideoRect() +{ + QRect videoRect; + const QRect windowRect = m_videoOutput->videoWindowRect(); + const QSize windowSize = windowRect.size(); + + // Calculate size of smallest rect which contains video frame size + // and conforms to aspect ratio + switch (m_videoOutput->aspectRatio()) { + case Phonon::VideoWidget::AspectRatioAuto: + videoRect.setSize(m_videoFrameSize); + break; + + case Phonon::VideoWidget::AspectRatioWidget: + videoRect.setSize(windowSize); + break; + + case Phonon::VideoWidget::AspectRatio4_3: + videoRect.setSize(scaleToAspect(m_videoFrameSize, 4, 3)); + break; + + case Phonon::VideoWidget::AspectRatio16_9: + videoRect.setSize(scaleToAspect(m_videoFrameSize, 16, 9)); + break; + } + + // Scale to fill the window width + const int windowWidth = windowSize.width(); + const int windowHeight = windowSize.height(); + const qreal windowScaleFactor = qreal(windowWidth) / videoRect.width(); + int videoWidth = windowWidth; + int videoHeight = videoRect.height() * windowScaleFactor; + + const qreal windowToVideoHeightRatio = qreal(windowHeight) / videoHeight; + + switch(m_videoOutput->scaleMode()) { + case Phonon::VideoWidget::ScaleAndCrop: + if(videoHeight < windowHeight) { + videoWidth *= windowToVideoHeightRatio; + videoHeight = windowHeight; + } + break; + case Phonon::VideoWidget::FitInView: + default: + if(videoHeight > windowHeight) { + videoWidth *= windowToVideoHeightRatio; + videoHeight = windowHeight; + } + break; + } + + // Calculate scale factors + m_scaleWidth = 100.0f * videoWidth / m_videoFrameSize.width(); + m_scaleHeight = 100.0f * videoHeight / m_videoFrameSize.height(); + + m_videoRect = qt_QRect2TRect(windowRect); + + if (state() == LoadingState) + m_pendingChanges = true; + else { + applyVideoWindowChange(); + m_pendingChanges = false; + } +} + +void MMF::VideoPlayer::aspectRatioChanged() +{ + TRACE_CONTEXT(VideoPlayer::aspectRatioChanged, EVideoInternal); + TRACE_ENTRY("state %d aspectRatio %d", state()); + + updateVideoRect(); TRACE_EXIT_0(); } +void MMF::VideoPlayer::scaleModeChanged() +{ + TRACE_CONTEXT(VideoPlayer::scaleModeChanged, EVideoInternal); + TRACE_ENTRY("state %d", state()); + + updateVideoRect(); + + TRACE_EXIT_0(); +} #ifndef QT_NO_DEBUG @@ -383,113 +514,61 @@ void getDsaRegion(RWsSession &session, const RWindowBase &window) #endif // _DEBUG -void MMF::VideoPlayer::updateMmfOutput() +void MMF::VideoPlayer::applyPendingChanges() { - TRACE_CONTEXT(VideoPlayer::updateMmfOutput, EVideoInternal); - TRACE_ENTRY_0(); + if(m_pendingChanges) + applyVideoWindowChange(); - // Calling SetDisplayWindowL is a no-op unless the MMF controller has - // been loaded, so we shouldn't do it. Instead, the - // m_mmfOutputChangePending flag is used to record the fact that we - // need to call SetDisplayWindowL, and this is checked in - // MvpuoPrepareComplete, at which point the MMF controller has been - // loaded. + m_pendingChanges = false; +} + +void MMF::VideoPlayer::applyVideoWindowChange() +{ + TRACE_CONTEXT(VideoPlayer::applyVideoWindowChange, EVideoInternal); + TRACE_ENTRY_0(); #ifndef QT_NO_DEBUG getDsaRegion(m_wsSession, *m_window); #endif - TRAPD(err, - m_player->SetDisplayWindowL - ( - m_wsSession, m_screenDevice, - *m_window, - m_rect, m_rect - ) - ); + static const TBool antialias = ETrue; - if (KErrNone != err) { - TRACE("SetDisplayWindowL error %d", err); + TRAPD(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight, antialias)); + if(KErrNone != err) { + TRACE("SetScaleFactorL (1) err %d", err); setError(NormalError); } - m_mmfOutputChangePending = false; + if(KErrNone == err) { + TRAP(err, + m_player->SetDisplayWindowL + ( + m_wsSession, m_screenDevice, + *m_window, + m_videoRect, m_videoRect + ) + ); + + if (KErrNone != err) { + TRACE("SetDisplayWindowL err %d", err); + setError(NormalError); + } else { + TRAP(err, m_player->SetScaleFactorL(m_scaleWidth, m_scaleHeight, antialias)); + if(KErrNone != err) { + TRACE("SetScaleFactorL (2) err %d", err); + setError(NormalError); + } + } + } TRACE_EXIT_0(); } //----------------------------------------------------------------------------- -// Private functions +// Metadata //----------------------------------------------------------------------------- -void MMF::VideoPlayer::videoOutputChanged() -{ - TRACE_CONTEXT(VideoPlayer::videoOutputChanged, EVideoInternal); - TRACE_ENTRY_0(); - - if (m_videoOutput) { - m_videoOutput->setObserver(this); - m_videoOutput->setFrameSize(m_frameSize); - } - - videoOutputRegionChanged(); - - TRACE_EXIT_0(); -} - -bool MMF::VideoPlayer::getNativeWindowSystemHandles() -{ - TRACE_CONTEXT(VideoPlayer::getNativeWindowSystemHandles, EVideoInternal); - TRACE_ENTRY_0(); - - CCoeControl *control = 0; - - if (m_videoOutput) - // Create native window - control = m_videoOutput->winId(); - else - // Get top-level window - control = QApplication::activeWindow()->effectiveWinId(); - -#ifndef QT_NO_DEBUG - if (m_videoOutput) { - QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper); - dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs - ObjectDump::addDefaultAnnotators(*dumper); - TRACE_0("Dumping VideoOutput:"); - dumper->dumpObject(*m_videoOutput); - } - else { - TRACE_0("m_videoOutput is null - dumping top-level control info:"); - TRACE("control %08x", control); - TRACE("control.parent %08x", control->Parent()); - TRACE("control.isVisible %d", control->IsVisible()); - TRACE("control.rect %d,%d %dx%d", - control->Position().iX, control->Position().iY, - control->Size().iWidth, control->Size().iHeight); - TRACE("control.ownsWindow %d", control->OwnsWindow()); - } -#endif - - RWindowBase *const window = control->DrawableWindow(); - const TRect rect(window->AbsPosition(), window->Size()); - - TRACE("rect %d %d - %d %d", - rect.iTl.iX, rect.iTl.iY, - rect.iBr.iX, rect.iBr.iY); - - bool changed = false; - - if (window != m_window || rect != m_rect) { - m_window = window; - m_rect = rect; - changed = true; - } - - TRACE_RETURN("changed %d", changed); -} - int MMF::VideoPlayer::numberOfMetaDataEntries() const { int numberOfEntries = 0; diff --git a/src/3rdparty/phonon/mmf/mmf_videoplayer.h b/src/3rdparty/phonon/mmf/mmf_videoplayer.h index fa4e59b..599bb88 100644 --- a/src/3rdparty/phonon/mmf/mmf_videoplayer.h +++ b/src/3rdparty/phonon/mmf/mmf_videoplayer.h @@ -23,7 +23,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "abstractmediaplayer.h" #include "videooutput.h" -#include "videooutputobserver.h" QT_BEGIN_NAMESPACE @@ -40,7 +39,6 @@ namespace MMF */ class VideoPlayer : public AbstractMediaPlayer , public MVideoPlayerUtilityObserver - , public VideoOutputObserver { Q_OBJECT @@ -70,8 +68,10 @@ public: virtual void MvpuoPlayComplete(TInt aError); virtual void MvpuoEvent(const TMMFEvent &aEvent); - // VideoOutputObserver - virtual void videoOutputRegionChanged(); +public Q_SLOTS: + void videoWindowChanged(); + void aspectRatioChanged(); + void scaleModeChanged(); private: void construct(); @@ -81,10 +81,13 @@ private: // AbstractPlayer virtual void videoOutputChanged(); - // Returns true if handles have changed - bool getNativeWindowSystemHandles(); + void getVideoWindow(); + void initVideoOutput(); - void updateMmfOutput(); + void updateVideoRect(); + + void applyPendingChanges(); + void applyVideoWindowChange(); // AbstractMediaPlayer virtual int numberOfMetaDataEntries() const; @@ -97,12 +100,17 @@ private: RWsSession& m_wsSession; CWsScreenDevice& m_screenDevice; RWindowBase* m_window; - TRect m_rect; - QSize m_frameSize; + /* Extent of the video display - will be clipped to m_windowRect */ + TRect m_videoRect; + + TReal32 m_scaleWidth; + TReal32 m_scaleHeight; + + QSize m_videoFrameSize; qint64 m_totalTime; - bool m_mmfOutputChangePending; + bool m_pendingChanges; }; diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_global.h b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_global.h deleted file mode 100644 index b8987e0..0000000 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_global.h +++ /dev/null @@ -1,30 +0,0 @@ -/* This file is part of the KDE project. - -Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - -This library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2.1 or 3 of the License. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library. If not, see <http://www.gnu.org/licenses/>. - -*/ - -#ifndef OBJECTDUMP_GLOBAL_H -#define OBJECTDUMP_GLOBAL_H - -#include <QtCore/QtGlobal> - -#if defined(OBJECTDUMP_LIBRARY) -# define OBJECTDUMP_EXPORT -#else -# define OBJECTDUMP_EXPORT -#endif - -#endif diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_stub.cpp b/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_stub.cpp deleted file mode 100644 index 6207dac..0000000 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_stub.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project. - -Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - -This library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2.1 or 3 of the License. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library. If not, see <http://www.gnu.org/licenses/>. - -*/ - -#include "objectdump.h" - -QT_BEGIN_NAMESPACE - -namespace ObjectDump -{ - -void addDefaultAnnotators_sys(QDumper& /*dumper*/) -{ - -} - -void addDefaultAnnotators_sys(QVisitor& /*visitor*/) -{ - -} - -} // namespace ObjectDump - -QT_END_NAMESPACE - - diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp b/src/3rdparty/phonon/mmf/objectdump.cpp index 9add439..3d10be4 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.cpp +++ b/src/3rdparty/phonon/mmf/objectdump.cpp @@ -523,5 +523,3 @@ void dumpAncestors(const QObject& leaf, QVisitor& visitor) QT_END_NAMESPACE - - diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h b/src/3rdparty/phonon/mmf/objectdump.h index e94b3ac..86aeaba 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump.h +++ b/src/3rdparty/phonon/mmf/objectdump.h @@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef OBJECTDUMP_H #define OBJECTDUMP_H -#include "objectdump_global.h" - #include <QObject> #include <QList> #include <QByteArray> @@ -34,7 +32,7 @@ namespace ObjectDump /** * Abstract base for annotator classes invoked by QVisitor. */ -class OBJECTDUMP_EXPORT QAnnotator : public QObject +class QAnnotator : public QObject { Q_OBJECT public: @@ -45,7 +43,7 @@ public: /** * Annotator which replicates QObject::dumpObjectTree functionality. */ -class OBJECTDUMP_EXPORT QAnnotatorBasic : public QAnnotator +class QAnnotatorBasic : public QAnnotator { Q_OBJECT public: @@ -55,7 +53,7 @@ public: /** * Annotator which returns widget information. */ -class OBJECTDUMP_EXPORT QAnnotatorWidget : public QAnnotator +class QAnnotatorWidget : public QAnnotator { Q_OBJECT public: @@ -68,7 +66,7 @@ class QDumperPrivate; /** * Class used to dump information about individual QObjects. */ -class OBJECTDUMP_EXPORT QDumper : public QObject +class QDumper : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDumper) @@ -103,7 +101,7 @@ class QVisitorPrivate; /** * Visitor class which dumps information about nodes in the object tree. */ -class OBJECTDUMP_EXPORT QVisitor : public QObject +class QVisitor : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QVisitor) @@ -152,12 +150,12 @@ private: // Utility functions //----------------------------------------------------------------------------- -void OBJECTDUMP_EXPORT addDefaultAnnotators(QDumper& dumper); -void OBJECTDUMP_EXPORT addDefaultAnnotators(QVisitor& visitor); +void addDefaultAnnotators(QDumper& dumper); +void addDefaultAnnotators(QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpTreeFromRoot(const QObject& root, QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor); -void OBJECTDUMP_EXPORT dumpAncestors(const QObject& leaf, QVisitor& visitor); +void dumpTreeFromRoot(const QObject& root, QVisitor& visitor); +void dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor); +void dumpAncestors(const QObject& leaf, QVisitor& visitor); } // namespace ObjectDump diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp index 03220a7..2efebdb 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.cpp +++ b/src/3rdparty/phonon/mmf/objectdump_symbian.cpp @@ -99,46 +99,39 @@ QList<QByteArray> QAnnotatorWindow::annotation(const QObject& object) if (widget) { const CCoeControl* control = widget->effectiveWinId(); - RDrawableWindow *window = 0; - if (control && (window = control->DrawableWindow())) { - - QByteArray array; - QTextStream stream(&array); + if (control) { + RDrawableWindow *const window = control->DrawableWindow(); + if(window) { + QByteArray array; + QTextStream stream(&array); - stream << "window: "; + stream << "window: "; - // ClientHandle() is available first in 5.0. -#if !defined(__SERIES60_31__) && !defined(__S60_32__) - if (QSysInfo::s60Version() > QSysInfo::SV_S60_3_2) - // Client-side window handle + // Server-side address of CWsWindow object + // This is useful for correlation with the window tree dumped by the window + // server (see RWsSession::LogCommand). // Cast to a void pointer so that log output is in hexadecimal format. - stream << "cli " << reinterpret_cast<const void*>(window->ClientHandle()) << ' '; -#endif - - // Server-side address of CWsWindow object - // This is useful for correlation with the window tree dumped by the window - // server (see RWsSession::LogCommand). - // Cast to a void pointer so that log output is in hexadecimal format. - stream << "srv " << reinterpret_cast<const void*>(window->WsHandle()) << ' '; + stream << "srv " << reinterpret_cast<const void*>(window->WsHandle()) << ' '; - stream << "group " << window->WindowGroupId() << ' '; + stream << "group " << window->WindowGroupId() << ' '; - // Client-side handle to the parent window. - // Cast to a void pointer so that log output is in hexadecimal format. - stream << "parent " << reinterpret_cast<const void*>(window->Parent()) << ' '; + // Client-side handle to the parent window. + // Cast to a void pointer so that log output is in hexadecimal format. + stream << "parent " << reinterpret_cast<const void*>(window->Parent()) << ' '; - stream << window->Position().iX << ',' << window->Position().iY << ' '; - stream << '(' << window->AbsPosition().iX << ',' << window->AbsPosition().iY << ") "; - stream << window->Size().iWidth << 'x' << window->Size().iHeight << ' '; + stream << window->Position().iX << ',' << window->Position().iY << ' '; + stream << '(' << window->AbsPosition().iX << ',' << window->AbsPosition().iY << ") "; + stream << window->Size().iWidth << 'x' << window->Size().iHeight << ' '; - const TDisplayMode displayMode = window->DisplayMode(); - stream << "mode " << displayMode << ' '; + const TDisplayMode displayMode = window->DisplayMode(); + stream << "mode " << displayMode << ' '; - stream << "ord " << window->OrdinalPosition(); + stream << "ord " << window->OrdinalPosition(); - stream.flush(); - result.append(array); + stream.flush(); + result.append(array); + } } } @@ -165,4 +158,3 @@ void addDefaultAnnotators_sys(QVisitor& visitor) QT_END_NAMESPACE - diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h b/src/3rdparty/phonon/mmf/objectdump_symbian.h index 563c862..563c862 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objectdump_symbian.h +++ b/src/3rdparty/phonon/mmf/objectdump_symbian.h diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp b/src/3rdparty/phonon/mmf/objecttree.cpp index bc61435..06b0ced 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.cpp +++ b/src/3rdparty/phonon/mmf/objecttree.cpp @@ -98,5 +98,3 @@ AncestorConstIterator::AncestorConstIterator(const QObject& leaf) QT_END_NAMESPACE - - diff --git a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h b/src/3rdparty/phonon/mmf/objecttree.h index 98bdf14..96adb6f 100644 --- a/src/3rdparty/phonon/mmf/mmfphonondebug/objecttree.h +++ b/src/3rdparty/phonon/mmf/objecttree.h @@ -19,8 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #ifndef OBJECTTREE_H #define OBJECTTREE_H -#include "objectdump_global.h" - #include <QObject> #include <QStack> @@ -32,7 +30,7 @@ namespace ObjectTree /** * Depth-first iterator for QObject tree */ -class OBJECTDUMP_EXPORT DepthFirstConstIterator +class DepthFirstConstIterator { public: DepthFirstConstIterator(); @@ -60,7 +58,7 @@ private: /** * Ancestor iterator for QObject tree */ -class OBJECTDUMP_EXPORT AncestorConstIterator +class AncestorConstIterator { public: AncestorConstIterator(); diff --git a/src/3rdparty/phonon/mmf/utils.cpp b/src/3rdparty/phonon/mmf/utils.cpp index 58d1ece..d728fcf 100644 --- a/src/3rdparty/phonon/mmf/utils.cpp +++ b/src/3rdparty/phonon/mmf/utils.cpp @@ -24,16 +24,24 @@ QT_BEGIN_NAMESPACE using namespace Phonon; using namespace Phonon::MMF; -/*! \namespace MMF::Utils +/*! \namespace Phonon::MMF::Utils \internal */ -/*! \class MMF::TTraceContext +/*! \class Phonon::MMF::TTraceContext \internal */ -/*! \class MMF::Utils - \internal +/*! \enum Phonon::MMF::PanicCode + \internal +*/ + +/*! \enum Phonon::MMF::TTraceCategory + \internal +*/ + +/*! \enum Phonon::MMF::MediaType + \internal */ _LIT(PanicCategory, "Phonon::MMF"); diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp index 1b338a2..ddf30de 100644 --- a/src/3rdparty/phonon/mmf/videooutput.cpp +++ b/src/3rdparty/phonon/mmf/videooutput.cpp @@ -19,7 +19,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include "ancestormovemonitor.h" #include "utils.h" #include "videooutput.h" -#include "videooutputobserver.h" #ifndef QT_NO_DEBUG #include "objectdump.h" @@ -30,8 +29,11 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QMoveEvent> #include <QResizeEvent> +#include <QtCore/private/qcore_symbian_p.h> // for qt_TRect2QRect #include <QtGui/private/qwidget_p.h> // to access QWExtra +#include <coecntrl.h> + QT_BEGIN_NAMESPACE using namespace Phonon; @@ -42,6 +44,16 @@ using namespace Phonon::MMF; */ //----------------------------------------------------------------------------- +// Constants +//----------------------------------------------------------------------------- + +static const Phonon::VideoWidget::AspectRatio DefaultAspectRatio = + Phonon::VideoWidget::AspectRatioAuto; +static const Phonon::VideoWidget::ScaleMode DefaultScaleMode = + Phonon::VideoWidget::FitInView; + + +//----------------------------------------------------------------------------- // Constructor / destructor //----------------------------------------------------------------------------- @@ -49,7 +61,8 @@ MMF::VideoOutput::VideoOutput (AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent) : QWidget(parent) , m_ancestorMoveMonitor(ancestorMoveMonitor) - , m_observer(0) + , m_aspectRatio(DefaultAspectRatio) + , m_scaleMode(DefaultScaleMode) { TRACE_CONTEXT(VideoOutput::VideoOutput, EVideoInternal); TRACE_ENTRY("parent 0x%08x", parent); @@ -66,6 +79,7 @@ MMF::VideoOutput::VideoOutput // to be invisible when running on the target device. qt_widget_private(this)->extraData()->disableBlit = true; + getVideoWindowRect(); registerForAncestorMoved(); dump(); @@ -83,33 +97,35 @@ MMF::VideoOutput::~VideoOutput() TRACE_EXIT_0(); } -void MMF::VideoOutput::setFrameSize(const QSize& frameSize) +void MMF::VideoOutput::setVideoSize(const QSize& frameSize) { - TRACE_CONTEXT(VideoOutput::setFrameSize, EVideoInternal); + TRACE_CONTEXT(VideoOutput::setVideoSize, EVideoInternal); TRACE("oldSize %d %d newSize %d %d", - m_frameSize.width(), m_frameSize.height(), + m_videoFrameSize.width(), m_videoFrameSize.height(), frameSize.width(), frameSize.height()); - if (frameSize != m_frameSize) { - m_frameSize = frameSize; + if (frameSize != m_videoFrameSize) { + m_videoFrameSize = frameSize; updateGeometry(); } } -void MMF::VideoOutput::setObserver(VideoOutputObserver* observer) -{ - TRACE_CONTEXT(VideoOutput::setObserver, EVideoInternal); - TRACE("observer 0x%08x", observer); - - m_observer = observer; -} - void MMF::VideoOutput::ancestorMoved() { TRACE_CONTEXT(VideoOutput::ancestorMoved, EVideoInternal); TRACE_ENTRY_0(); - videoOutputRegionChanged(); + RWindowBase *const window = videoWindow(); + + if(window) { + const TPoint newWindowPosSymbian = window->AbsPosition(); + const QPoint newWindowPos(newWindowPosSymbian.iX, newWindowPosSymbian.iY); + + if(newWindowPos != m_videoWindowRect.topLeft()) { + m_videoWindowRect.moveTo(newWindowPos); + emit videoWindowChanged(); + } + } TRACE_EXIT_0(); } @@ -123,9 +139,8 @@ QSize MMF::VideoOutput::sizeHint() const // TODO: replace this with a more sensible default QSize result(320, 240); - if (!m_frameSize.isNull()) { - result = m_frameSize; - } + if (!m_videoFrameSize.isNull()) + result = m_videoFrameSize; return result; } @@ -149,7 +164,10 @@ void MMF::VideoOutput::resizeEvent(QResizeEvent* event) event->oldSize().width(), event->oldSize().height(), event->size().width(), event->size().height()); - videoOutputRegionChanged(); + if(event->size() != event->oldSize()) { + m_videoWindowRect.setSize(event->size()); + emit videoWindowChanged(); + } } void MMF::VideoOutput::moveEvent(QMoveEvent* event) @@ -159,7 +177,10 @@ void MMF::VideoOutput::moveEvent(QMoveEvent* event) event->oldPos().x(), event->oldPos().y(), event->pos().x(), event->pos().y()); - videoOutputRegionChanged(); + if(event->pos() != event->oldPos()) { + m_videoWindowRect.moveTo(event->pos()); + emit videoWindowChanged(); + } } bool MMF::VideoOutput::event(QEvent* event) @@ -168,7 +189,8 @@ bool MMF::VideoOutput::event(QEvent* event) if (event->type() == QEvent::WinIdChange) { TRACE_0("WinIdChange"); - videoOutputRegionChanged(); + getVideoWindowRect(); + emit videoWindowChanged(); return true; } else if (event->type() == QEvent::ParentChange) { // Tell ancestor move monitor to update ancestor list for this widget @@ -180,14 +202,66 @@ bool MMF::VideoOutput::event(QEvent* event) //----------------------------------------------------------------------------- +// Public functions +//----------------------------------------------------------------------------- + +RWindowBase* MMF::VideoOutput::videoWindow() +{ + CCoeControl *control = internalWinId(); + if(!control) + control = effectiveWinId(); + + RWindowBase *window = 0; + if(control) + window = control->DrawableWindow(); + + return window; +} + +const QRect& MMF::VideoOutput::videoWindowRect() const +{ + return m_videoWindowRect; +} + +Phonon::VideoWidget::AspectRatio MMF::VideoOutput::aspectRatio() const +{ + return m_aspectRatio; +} + +void MMF::VideoOutput::setAspectRatio + (Phonon::VideoWidget::AspectRatio aspectRatio) +{ + if(m_aspectRatio != aspectRatio) { + m_aspectRatio = aspectRatio; + emit aspectRatioChanged(); + } +} + +Phonon::VideoWidget::ScaleMode MMF::VideoOutput::scaleMode() const +{ + return m_scaleMode; +} + +void MMF::VideoOutput::setScaleMode + (Phonon::VideoWidget::ScaleMode scaleMode) +{ + if(m_scaleMode != scaleMode) { + m_scaleMode = scaleMode; + emit scaleModeChanged(); + } +} + + +//----------------------------------------------------------------------------- // Private functions //----------------------------------------------------------------------------- -void MMF::VideoOutput::videoOutputRegionChanged() +void MMF::VideoOutput::getVideoWindowRect() { - dump(); - if (m_observer) - m_observer->videoOutputRegionChanged(); + RWindowBase *const window = videoWindow(); + if(window) + m_videoWindowRect = + qt_TRect2QRect(TRect(window->AbsPosition(), window->Size())); } void MMF::VideoOutput::registerForAncestorMoved() @@ -199,15 +273,20 @@ void MMF::VideoOutput::dump() const { #ifndef QT_NO_DEBUG TRACE_CONTEXT(VideoOutput::dump, EVideoInternal); + QScopedPointer<ObjectDump::QVisitor> visitor(new ObjectDump::QVisitor); visitor->setPrefix("Phonon::MMF"); // to aid searchability of logs ObjectDump::addDefaultAnnotators(*visitor); TRACE("Dumping tree from leaf 0x%08x:", this); - //ObjectDump::dumpAncestors(*this, *visitor); ObjectDump::dumpTreeFromLeaf(*this, *visitor); + + QScopedPointer<ObjectDump::QDumper> dumper(new ObjectDump::QDumper); + dumper->setPrefix("Phonon::MMF"); // to aid searchability of logs + ObjectDump::addDefaultAnnotators(*dumper); + TRACE_0("Dumping VideoOutput:"); + dumper->dumpObject(*this); #endif } - QT_END_NAMESPACE diff --git a/src/3rdparty/phonon/mmf/videooutput.h b/src/3rdparty/phonon/mmf/videooutput.h index db4d127..6dfe69d 100644 --- a/src/3rdparty/phonon/mmf/videooutput.h +++ b/src/3rdparty/phonon/mmf/videooutput.h @@ -24,6 +24,11 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #include <QRect> #include "defs.h" +#include <Phonon/VideoWidget> + +#include <e32std.h> +class RWindowBase; + QT_BEGIN_NAMESPACE namespace Phonon @@ -31,7 +36,6 @@ namespace Phonon namespace MMF { class AncestorMoveMonitor; -class VideoOutputObserver; class VideoOutput : public QWidget { @@ -41,11 +45,29 @@ public: VideoOutput(AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent); ~VideoOutput(); - void setFrameSize(const QSize& size); - void setObserver(VideoOutputObserver* observer); + // Set size of video frame. Called by VideoPlayer. + void setVideoSize(const QSize& size); + + RWindowBase* videoWindow(); + const QRect& videoWindowRect() const; + Phonon::VideoWidget::AspectRatio aspectRatio() const; + void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio); + + Phonon::VideoWidget::ScaleMode scaleMode() const; + void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode); + + // Called by AncestorMoveMonitor void ancestorMoved(); + // Debugging output + void dump() const; + +Q_SIGNALS: + void videoWindowChanged(); + void aspectRatioChanged(); + void scaleModeChanged(); + protected: // Override QWidget functions QSize sizeHint() const; @@ -55,19 +77,18 @@ protected: bool event(QEvent* event); private: - void dump() const; - void videoOutputRegionChanged(); - + void getVideoWindowRect(); void registerForAncestorMoved(); private: // Not owned AncestorMoveMonitor* m_ancestorMoveMonitor; - // Not owned - VideoOutputObserver* m_observer; + QSize m_videoFrameSize; + QRect m_videoWindowRect; - QSize m_frameSize; + Phonon::VideoWidget::AspectRatio m_aspectRatio; + Phonon::VideoWidget::ScaleMode m_scaleMode; }; } diff --git a/src/3rdparty/phonon/mmf/videooutputobserver.h b/src/3rdparty/phonon/mmf/videooutputobserver.h deleted file mode 100644 index e3ba305..0000000 --- a/src/3rdparty/phonon/mmf/videooutputobserver.h +++ /dev/null @@ -1,44 +0,0 @@ -/* This file is part of the KDE project. - -Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - -This library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2.1 or 3 of the License. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library. If not, see <http://www.gnu.org/licenses/>. - -*/ - -#ifndef PHONON_MMF_VIDEOOUTPUTOBSERVER_H -#define PHONON_MMF_VIDEOOUTPUTOBSERVER_H - -#include <QtGlobal> - -QT_BEGIN_NAMESPACE - -namespace Phonon -{ -namespace MMF -{ -/** - * Interface via which VideoOutput notifies VideoPlayer of changes to the - * video output screen region. - */ -class VideoOutputObserver -{ -public: - virtual void videoOutputRegionChanged() = 0; -}; -} -} - -QT_END_NAMESPACE - -#endif diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp index 7d7abf1..bd22307 100644 --- a/src/3rdparty/phonon/mmf/videowidget.cpp +++ b/src/3rdparty/phonon/mmf/videowidget.cpp @@ -35,11 +35,7 @@ using namespace Phonon::MMF; // Constants //----------------------------------------------------------------------------- -static const Phonon::VideoWidget::AspectRatio DefaultAspectRatio = - Phonon::VideoWidget::AspectRatioAuto; static const qreal DefaultBrightness = 1.0; -static const Phonon::VideoWidget::ScaleMode DefaultScaleMode = - Phonon::VideoWidget::FitInView; static const qreal DefaultContrast = 1.0; static const qreal DefaultHue = 1.0; static const qreal DefaultSaturation = 1.0; @@ -52,10 +48,8 @@ static const qreal DefaultSaturation = 1.0; MMF::VideoWidget::VideoWidget (AncestorMoveMonitor* ancestorMoveMonitor, QWidget* parent) : MediaNode(parent) - , m_widget(new VideoOutput(ancestorMoveMonitor, parent)) - , m_aspectRatio(DefaultAspectRatio) + , m_videoOutput(new VideoOutput(ancestorMoveMonitor, parent)) , m_brightness(DefaultBrightness) - , m_scaleMode(DefaultScaleMode) , m_contrast(DefaultContrast) , m_hue(DefaultHue) , m_saturation(DefaultSaturation) @@ -81,7 +75,7 @@ MMF::VideoWidget::~VideoWidget() Phonon::VideoWidget::AspectRatio MMF::VideoWidget::aspectRatio() const { - return m_aspectRatio; + return m_videoOutput->aspectRatio(); } void MMF::VideoWidget::setAspectRatio @@ -90,7 +84,7 @@ void MMF::VideoWidget::setAspectRatio TRACE_CONTEXT(VideoWidget::setAspectRatio, EVideoApi); TRACE("aspectRatio %d", aspectRatio); - m_aspectRatio = aspectRatio; + m_videoOutput->setAspectRatio(aspectRatio); } qreal MMF::VideoWidget::brightness() const @@ -108,7 +102,7 @@ void MMF::VideoWidget::setBrightness(qreal brightness) Phonon::VideoWidget::ScaleMode MMF::VideoWidget::scaleMode() const { - return m_scaleMode; + return m_videoOutput->scaleMode(); } void MMF::VideoWidget::setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode) @@ -116,7 +110,7 @@ void MMF::VideoWidget::setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode) TRACE_CONTEXT(VideoWidget::setScaleMode, EVideoApi); TRACE("setScaleMode %d", setScaleMode); - m_scaleMode = scaleMode; + m_videoOutput->setScaleMode(scaleMode); } qreal MMF::VideoWidget::contrast() const @@ -160,17 +154,12 @@ void MMF::VideoWidget::setSaturation(qreal saturation) QWidget* MMF::VideoWidget::widget() { - return m_widget.data(); -} - -VideoOutput& MMF::VideoWidget::videoOutput() -{ - return *static_cast<VideoOutput*>(widget()); + return m_videoOutput.data(); } bool MMF::VideoWidget::activateOnMediaObject(MediaObject *mo) { - mo->setVideoOutput(&videoOutput()); + mo->setVideoOutput(m_videoOutput.data()); return true; } diff --git a/src/3rdparty/phonon/mmf/videowidget.h b/src/3rdparty/phonon/mmf/videowidget.h index 318dfae..2f0978b 100644 --- a/src/3rdparty/phonon/mmf/videowidget.h +++ b/src/3rdparty/phonon/mmf/videowidget.h @@ -20,6 +20,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>. #define PHONON_MMF_VIDEOWIDGET_H #include "mmf_medianode.h" +#include "videooutput.h" #include <QtGui/QWidget> #include <Phonon/VideoWidget> @@ -59,17 +60,13 @@ public: virtual void setSaturation(qreal saturation); virtual QWidget *widget(); - VideoOutput& videoOutput(); - protected: virtual bool activateOnMediaObject(MediaObject *mo); private: - QScopedPointer<QWidget> m_widget; + QScopedPointer<VideoOutput> m_videoOutput; - Phonon::VideoWidget::AspectRatio m_aspectRatio; qreal m_brightness; - Phonon::VideoWidget::ScaleMode m_scaleMode; qreal m_contrast; qreal m_hue; qreal m_saturation; diff --git a/src/3rdparty/phonon/mmf/volumeobserver.h b/src/3rdparty/phonon/mmf/volumeobserver.h deleted file mode 100644 index bedd3de..0000000 --- a/src/3rdparty/phonon/mmf/volumeobserver.h +++ /dev/null @@ -1,44 +0,0 @@ -/* This file is part of the KDE project. - -Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - -This library is free software: you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation, either version 2.1 or 3 of the License. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with this library. If not, see <http://www.gnu.org/licenses/>. - -*/ - -#ifndef PHONON_MMF_VOLUMEOBSERVER_H -#define PHONON_MMF_VOLUMEOBSERVER_H - -#include <QtGlobal> - -QT_BEGIN_NAMESPACE - -namespace Phonon -{ -namespace MMF -{ -/** - * Interface used by AudioOutput to pass volume control commands - * back along the audio path to the MediaObject. - */ -class VolumeObserver -{ -public: - virtual void volumeChanged(qreal volume) = 0; -}; -} -} - -QT_END_NAMESPACE - -#endif diff --git a/src/3rdparty/phonon/phonon/audiooutput.cpp b/src/3rdparty/phonon/phonon/audiooutput.cpp index 3d03dc4..0f6a49b 100644 --- a/src/3rdparty/phonon/phonon/audiooutput.cpp +++ b/src/3rdparty/phonon/phonon/audiooutput.cpp @@ -259,6 +259,7 @@ void AudioOutputPrivate::setupBackendObject() // set up attributes pINTERFACE_CALL(setVolume(pow(volume, VOLTAGE_TO_LOUDNESS_EXPONENT))); +#ifndef QT_NO_PHONON_SETTINGSGROUP // if the output device is not available and the device was not explicitly set if (!callSetOutputDevice(this, device) && !outputDeviceOverridden) { // fall back in the preference list of output devices @@ -278,6 +279,7 @@ void AudioOutputPrivate::setupBackendObject() callSetOutputDevice(this, none); handleAutomaticDeviceChange(none, FallbackChange); } +#endif //QT_NO_PHONON_SETTINGSGROUP } void AudioOutputPrivate::_k_volumeChanged(qreal newVolume) @@ -307,6 +309,7 @@ void AudioOutputPrivate::_k_audioDeviceFailed() pDebug() << Q_FUNC_INFO; // outputDeviceIndex identifies a failing device // fall back in the preference list of output devices +#ifndef QT_NO_PHONON_SETTINGSGROUP const QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings | GlobalConfig::HideUnavailableDevices); for (int i = 0; i < deviceList.count(); ++i) { const int devIndex = deviceList.at(i); @@ -319,6 +322,7 @@ void AudioOutputPrivate::_k_audioDeviceFailed() } } } +#endif //QT_NO_PHONON_SETTINGSGROUP // if we get here there is no working output device. Tell the backend. const AudioOutputDevice none; callSetOutputDevice(this, none); @@ -328,6 +332,7 @@ void AudioOutputPrivate::_k_audioDeviceFailed() void AudioOutputPrivate::_k_deviceListChanged() { pDebug() << Q_FUNC_INFO; +#ifndef QT_NO_PHONON_SETTINGSGROUP // let's see if there's a usable device higher in the preference list const QList<int> deviceList = GlobalConfig().audioOutputDeviceListFor(category, GlobalConfig::AdvancedDevicesFromSettings); DeviceChangeType changeType = HigherPreferenceChange; @@ -353,6 +358,7 @@ void AudioOutputPrivate::_k_deviceListChanged() break; // found one with higher preference that works } } +#endif //QT_NO_PHONON_SETTINGSGROUP } static struct diff --git a/src/3rdparty/phonon/phonon/backendcapabilities.cpp b/src/3rdparty/phonon/phonon/backendcapabilities.cpp index 0bcc76c..fbeb020 100644 --- a/src/3rdparty/phonon/phonon/backendcapabilities.cpp +++ b/src/3rdparty/phonon/phonon/backendcapabilities.cpp @@ -75,10 +75,12 @@ bool BackendCapabilities::isMimeTypeAvailable(const QString &mimeType) QList<AudioOutputDevice> BackendCapabilities::availableAudioOutputDevices() { QList<AudioOutputDevice> ret; +#ifndef QT_NO_PHONON_SETTINGSGROUP const QList<int> deviceIndexes = GlobalConfig().audioOutputDeviceListFor(Phonon::NoCategory); for (int i = 0; i < deviceIndexes.count(); ++i) { ret.append(AudioOutputDevice::fromIndex(deviceIndexes.at(i))); } +#endif //QT_NO_PHONON_SETTINGSGROUP return ret; } diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp index ab1f44f..9967c971 100644 --- a/src/3rdparty/phonon/phonon/factory.cpp +++ b/src/3rdparty/phonon/phonon/factory.cpp @@ -469,7 +469,7 @@ GET_STRING_PROPERTY(backendWebsite) QObject *Factory::registerQObject(QObject *o) { if (o) { - QObject::connect(o, SIGNAL(destroyed(QObject *)), globalFactory, SLOT(objectDestroyed(QObject *)), Qt::DirectConnection); + QObject::connect(o, SIGNAL(destroyed(QObject*)), globalFactory, SLOT(objectDestroyed(QObject*)), Qt::DirectConnection); globalFactory->objects.append(o); } return o; diff --git a/src/3rdparty/phonon/phonon/globalconfig.cpp b/src/3rdparty/phonon/phonon/globalconfig.cpp index 6e6263a..3b77a18 100644 --- a/src/3rdparty/phonon/phonon/globalconfig.cpp +++ b/src/3rdparty/phonon/phonon/globalconfig.cpp @@ -178,13 +178,15 @@ QList<int> GlobalConfig::audioOutputDeviceListFor(Phonon::Category category, int return listSortedByConfig(backendConfig, category, defaultList); } -#endif //QT_NO_SETTINGSGROUPS +#endif //QT_NO_PHONON_SETTINGSGROUP int GlobalConfig::audioOutputDeviceFor(Phonon::Category category, int override) const { +#ifndef QT_NO_PHONON_SETTINGSGROUP QList<int> ret = audioOutputDeviceListFor(category, override); - if (ret.isEmpty()) - return -1; - return ret.first(); + if (!ret.isEmpty()) + return ret.first(); +#endif //QT_NO_PHONON_SETTINGSGROUP + return -1; } #ifndef QT_NO_PHONON_AUDIOCAPTURE diff --git a/src/3rdparty/phonon/phonon/mediaobject.cpp b/src/3rdparty/phonon/phonon/mediaobject.cpp index 13d303c..41e8dc2 100644 --- a/src/3rdparty/phonon/phonon/mediaobject.cpp +++ b/src/3rdparty/phonon/phonon/mediaobject.cpp @@ -453,9 +453,9 @@ void MediaObjectPrivate::setupBackendObject() //pDebug() << Q_FUNC_INFO; #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM - QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SLOT(_k_stateChanged(Phonon::State, Phonon::State))); + QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), q, SLOT(_k_stateChanged(Phonon::State,Phonon::State))); #else - QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), q, SIGNAL(stateChanged(Phonon::State, Phonon::State))); + QObject::connect(m_backendObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), q, SIGNAL(stateChanged(Phonon::State,Phonon::State))); #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM QObject::connect(m_backendObject, SIGNAL(tick(qint64)), q, SIGNAL(tick(qint64))); QObject::connect(m_backendObject, SIGNAL(seekableChanged(bool)), q, SIGNAL(seekableChanged(bool))); @@ -467,10 +467,10 @@ void MediaObjectPrivate::setupBackendObject() QObject::connect(m_backendObject, SIGNAL(aboutToFinish()), q, SLOT(_k_aboutToFinish())); QObject::connect(m_backendObject, SIGNAL(prefinishMarkReached(qint32)), q, SIGNAL(prefinishMarkReached(qint32))); QObject::connect(m_backendObject, SIGNAL(totalTimeChanged(qint64)), q, SIGNAL(totalTimeChanged(qint64))); - QObject::connect(m_backendObject, SIGNAL(metaDataChanged(const QMultiMap<QString, QString> &)), - q, SLOT(_k_metaDataChanged(const QMultiMap<QString, QString> &))); - QObject::connect(m_backendObject, SIGNAL(currentSourceChanged(const MediaSource&)), - q, SLOT(_k_currentSourceChanged(const MediaSource&))); + QObject::connect(m_backendObject, SIGNAL(metaDataChanged(QMultiMap<QString,QString>)), + q, SLOT(_k_metaDataChanged(QMultiMap<QString,QString>))); + QObject::connect(m_backendObject, SIGNAL(currentSourceChanged(MediaSource)), + q, SLOT(_k_currentSourceChanged(MediaSource))); // set up attributes pINTERFACE_CALL(setTickInterval(tickInterval)); diff --git a/src/3rdparty/phonon/phonon/seekslider.cpp b/src/3rdparty/phonon/phonon/seekslider.cpp index b5b25f0..41baf2d 100644 --- a/src/3rdparty/phonon/phonon/seekslider.cpp +++ b/src/3rdparty/phonon/phonon/seekslider.cpp @@ -72,12 +72,12 @@ void SeekSlider::setMediaObject(MediaObject *media) d->media = media; if (media) { - connect(media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), + connect(media, SIGNAL(stateChanged(Phonon::State,Phonon::State)), SLOT(_k_stateChanged(Phonon::State))); connect(media, SIGNAL(totalTimeChanged(qint64)), SLOT(_k_length(qint64))); connect(media, SIGNAL(tick(qint64)), SLOT(_k_tick(qint64))); connect(media, SIGNAL(seekableChanged(bool)), SLOT(_k_seekableChanged(bool))); - connect(media, SIGNAL(currentSourceChanged(const Phonon::MediaSource&)), SLOT(_k_currentSourceChanged())); + connect(media, SIGNAL(currentSourceChanged(Phonon::MediaSource)), SLOT(_k_currentSourceChanged())); d->_k_stateChanged(media->state()); d->_k_seekableChanged(media->isSeekable()); d->_k_length(media->totalTime()); diff --git a/src/3rdparty/phonon/waveout/mediaobject.cpp b/src/3rdparty/phonon/waveout/mediaobject.cpp index 35d9e0b..db71942 100644 --- a/src/3rdparty/phonon/waveout/mediaobject.cpp +++ b/src/3rdparty/phonon/waveout/mediaobject.cpp @@ -247,7 +247,7 @@ namespace Phonon m_stopped(0) { m_thread = new WorkerThread(); - connect(this, SIGNAL(outOfData(QIODevice*, QByteArray*, bool*)), m_thread, SLOT(stream(QIODevice*, QByteArray*, bool*))); + connect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*))); m_thread->start(); m_soundBuffer1.waveHeader = new WAVEHDR; m_soundBuffer2.waveHeader = new WAVEHDR; @@ -258,7 +258,7 @@ namespace Phonon MediaObject::~MediaObject() { stop(); - disconnect(this, SIGNAL(outOfData(QIODevice*, QByteArray*, bool*)), m_thread, SLOT(stream(QIODevice*, QByteArray*, bool*))); + disconnect(this, SIGNAL(outOfData(QIODevice*,QByteArray*,bool*)), m_thread, SLOT(stream(QIODevice*,QByteArray*,bool*))); do { //The event loop of m_thread might not be started, yet m_thread->quit(); //If the event loop is not started yet quit() does nothing m_thread->wait(100); diff --git a/src/3rdparty/webkit/.gitignore b/src/3rdparty/webkit/.gitignore new file mode 100644 index 0000000..b9595b3 --- /dev/null +++ b/src/3rdparty/webkit/.gitignore @@ -0,0 +1,6 @@ +*.mode* +*.pbxuser +*.perspective* +*.pyc +build/ +/WebKitBuild/ diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index dc43e0e..26dbaf7 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,17 @@ +2009-10-30 Adam Barth <abarth@webkit.org> + + Reviewed by Mark Rowe. + + Teach git to ignore some files + https://bugs.webkit.org/show_bug.cgi?id=30951 + + Ignore WebKitBuild because we never want to version that directory. + Also, ignore the xcode project files so git clean doesn't blow away + your project settings. Finally, ignore the compiled python files in + WebKitTools/Script modules because they clutter up git status. + + * .gitignore: Added. + 2009-10-26 Holger Hans Peter Freyther <zecke@selfish.org> Rubber-stamped by Darin Adler. diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index e6ab073..382a8c7 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,105 @@ +2009-11-23 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Symbian] Fix lastIndexOf() for Symbian + https://bugs.webkit.org/show_bug.cgi?id=31773 + + Symbian soft floating point library has problems with operators + comparing NaN to numbers. Without a workaround lastIndexOf() + function does not work. + + Patch developed by David Leong. + + * runtime/StringPrototype.cpp: + (JSC::stringProtoFuncLastIndexOf):Add an extra test + to check for NaN for Symbian. + +2009-11-18 Harald Fernengel <harald.fernengel@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix detection of linux-g++ + + Never use "linux-g++*" to check for linux-g++, since this will break embedded + builds which use linux-arm-g++ and friends. Use 'linux*-g++*' to check for any + g++ on linux mkspec. + + * JavaScriptCore.pri: + +2009-11-16 Joerg Bornemann <joerg.bornemann@trolltech.com> + + Reviewed by Simon Hausmann. + + Fix Qt build on Windows CE 6. + + * JavaScriptCore.pri: Add missing include path. + * wtf/Platform.h: Include ce_time.h for Windows CE 6. + +2009-11-12 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix linking on Linux 32-bit. + + It was missing the ".text" directive at the top of the file, + indicating that code would follow. Without it, the assembler created + "NOTYPE" symbols, which would result in linker errors. + https://bugs.webkit.org/show_bug.cgi?id=30863 + + * jit/JITStubs.cpp: + +2009-11-13 Ä°smail Dönmez <ismail@namtrac.org> + + Reviewed by Antti Koivisto. + + Fix typo, ce_time.cpp should be ce_time.c + + * JavaScriptCore.pri: + +2009-11-12 Richard Moe Gustavsen <richard.gustavsen@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Disable pthread_setname_np. + + This allows Qt builds on Mac from 10.6 to run on earlier version + where this symbol is not present. + https://bugs.webkit.org/show_bug.cgi?id=31403 + + * wtf/Platform.h: + +2009-11-02 Oliver Hunt <oliver@apple.com> + + Reviewed by Gavin Barraclough. + + REGRESSION (r48573): JSC may incorrectly cache chain lookups with a dictionary at the head of the chain + https://bugs.webkit.org/show_bug.cgi?id=31045 + + Add guards to prevent caching of prototype chain lookups with dictionaries at the + head of the chain. Also add a few tighter assertions to cached prototype lookups + to catch this in future. + + * interpreter/Interpreter.cpp: + (JSC::Interpreter::tryCacheGetByID): + (JSC::Interpreter::privateExecute): + * jit/JITStubs.cpp: + (JSC::JITThunks::tryCacheGetByID): + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by NOBODY (OOPS!). + + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. + + https://bugs.webkit.org/show_bug.cgi?id=29381 + + * runtime/TimeoutChecker.h: Add getter for the timeout interval + 2009-10-29 Gabor Loki <loki@inf.u-szeged.hu> Reviewed by Gavin Barraclough. diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri index 8bd4225..bb531e5 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pri @@ -54,7 +54,7 @@ win32-* { # Rules when JIT enabled (not disabled) !contains(DEFINES, ENABLE_JIT=0) { - linux-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { + linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) { QMAKE_CXXFLAGS += -fno-stack-protector QMAKE_CFLAGS += -fno-stack-protector } diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp index 5b1be71..4f78903 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,159 +54,28 @@ /* Pure parsers. */ #define YYPURE 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ -#define yyparse jscyyparse -#define yylex jscyylex -#define yyerror jscyyerror -#define yylval jscyylval -#define yychar jscyychar -#define yydebug jscyydebug -#define yynerrs jscyynerrs -#define yylloc jscyylloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NULLTOKEN = 258, - TRUETOKEN = 259, - FALSETOKEN = 260, - BREAK = 261, - CASE = 262, - DEFAULT = 263, - FOR = 264, - NEW = 265, - VAR = 266, - CONSTTOKEN = 267, - CONTINUE = 268, - FUNCTION = 269, - RETURN = 270, - VOIDTOKEN = 271, - DELETETOKEN = 272, - IF = 273, - THISTOKEN = 274, - DO = 275, - WHILE = 276, - INTOKEN = 277, - INSTANCEOF = 278, - TYPEOF = 279, - SWITCH = 280, - WITH = 281, - RESERVED = 282, - THROW = 283, - TRY = 284, - CATCH = 285, - FINALLY = 286, - DEBUGGER = 287, - IF_WITHOUT_ELSE = 288, - ELSE = 289, - EQEQ = 290, - NE = 291, - STREQ = 292, - STRNEQ = 293, - LE = 294, - GE = 295, - OR = 296, - AND = 297, - PLUSPLUS = 298, - MINUSMINUS = 299, - LSHIFT = 300, - RSHIFT = 301, - URSHIFT = 302, - PLUSEQUAL = 303, - MINUSEQUAL = 304, - MULTEQUAL = 305, - DIVEQUAL = 306, - LSHIFTEQUAL = 307, - RSHIFTEQUAL = 308, - URSHIFTEQUAL = 309, - ANDEQUAL = 310, - MODEQUAL = 311, - XOREQUAL = 312, - OREQUAL = 313, - OPENBRACE = 314, - CLOSEBRACE = 315, - NUMBER = 316, - IDENT = 317, - STRING = 318, - AUTOPLUSPLUS = 319, - AUTOMINUSMINUS = 320 - }; -#endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - - - +#define yyparse jscyyparse +#define yylex jscyylex +#define yyerror jscyyerror +#define yylval jscyylval +#define yychar jscyychar +#define yydebug jscyydebug +#define yynerrs jscyynerrs +#define yylloc jscyylloc /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 3 "../parser/Grammar.y" @@ -352,6 +220,9 @@ static inline void appendToVarDeclarationList(JSGlobalData* globalData, ParserAr +/* Line 189 of yacc.c */ +#line 225 "JavaScriptCore/tmp/../generated/Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -370,10 +241,88 @@ static inline void appendToVarDeclarationList(JSGlobalData* globalData, ParserAr # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NULLTOKEN = 258, + TRUETOKEN = 259, + FALSETOKEN = 260, + BREAK = 261, + CASE = 262, + DEFAULT = 263, + FOR = 264, + NEW = 265, + VAR = 266, + CONSTTOKEN = 267, + CONTINUE = 268, + FUNCTION = 269, + RETURN = 270, + VOIDTOKEN = 271, + DELETETOKEN = 272, + IF = 273, + THISTOKEN = 274, + DO = 275, + WHILE = 276, + INTOKEN = 277, + INSTANCEOF = 278, + TYPEOF = 279, + SWITCH = 280, + WITH = 281, + RESERVED = 282, + THROW = 283, + TRY = 284, + CATCH = 285, + FINALLY = 286, + DEBUGGER = 287, + IF_WITHOUT_ELSE = 288, + ELSE = 289, + EQEQ = 290, + NE = 291, + STREQ = 292, + STRNEQ = 293, + LE = 294, + GE = 295, + OR = 296, + AND = 297, + PLUSPLUS = 298, + MINUSMINUS = 299, + LSHIFT = 300, + RSHIFT = 301, + URSHIFT = 302, + PLUSEQUAL = 303, + MINUSEQUAL = 304, + MULTEQUAL = 305, + DIVEQUAL = 306, + LSHIFTEQUAL = 307, + RSHIFTEQUAL = 308, + URSHIFTEQUAL = 309, + ANDEQUAL = 310, + MODEQUAL = 311, + XOREQUAL = 312, + OREQUAL = 313, + OPENBRACE = 314, + CLOSEBRACE = 315, + NUMBER = 316, + IDENT = 317, + STRING = 318, + AUTOPLUSPLUS = 319, + AUTOMINUSMINUS = 320 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 146 "../parser/Grammar.y" { + +/* Line 214 of yacc.c */ +#line 146 "../parser/Grammar.y" + int intValue; double doubleValue; const Identifier* ident; @@ -403,13 +352,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 187 of yacc.c. */ -#line 409 "JavaScriptCore/tmp/../generated/Grammar.tab.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 360 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED @@ -427,6 +378,8 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ + +/* Line 264 of yacc.c */ #line 178 "../parser/Grammar.y" @@ -442,8 +395,8 @@ static inline void setExceptionLocation(ThrowableExpressionData* node, unsigned -/* Line 216 of yacc.c. */ -#line 447 "JavaScriptCore/tmp/../generated/Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 400 "JavaScriptCore/tmp/../generated/Grammar.tab.c" #ifdef short # undef short @@ -518,14 +471,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -607,9 +560,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -644,12 +597,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -2363,17 +2316,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -2408,11 +2364,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -2694,10 +2650,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -2716,10 +2670,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -2743,88 +2696,97 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ +/* Location data for the lookahead symbol. */ YYLTYPE yylloc; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + /* Number of syntax errors so far. */ + int yynerrs; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; - YYSIZE_T yystacksize = YYINITDEPTH; + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; yylsp = yyls; + #if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; + yylloc.first_column = yylloc.last_column = 1; #endif goto yysetstate; @@ -2863,6 +2825,7 @@ YYLTYPE yylloc; &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; @@ -2884,9 +2847,9 @@ YYLTYPE yylloc; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2907,6 +2870,9 @@ YYLTYPE yylloc; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -2915,16 +2881,16 @@ YYLTYPE yylloc; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2956,20 +2922,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -3010,31 +2972,43 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 293 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;} break; case 3: + +/* Line 1455 of yacc.c */ #line 294 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;} break; case 4: + +/* Line 1455 of yacc.c */ #line 295 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;} break; case 5: + +/* Line 1455 of yacc.c */ #line 296 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;} break; case 6: + +/* Line 1455 of yacc.c */ #line 297 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;} break; case 7: + +/* Line 1455 of yacc.c */ #line 298 "../parser/Grammar.y" { Lexer& l = *GLOBAL_DATA->lexer; @@ -3050,6 +3024,8 @@ yyreduce: break; case 8: + +/* Line 1455 of yacc.c */ #line 309 "../parser/Grammar.y" { Lexer& l = *GLOBAL_DATA->lexer; @@ -3065,26 +3041,36 @@ yyreduce: break; case 9: + +/* Line 1455 of yacc.c */ #line 323 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 10: + +/* Line 1455 of yacc.c */ #line 324 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 11: + +/* Line 1455 of yacc.c */ #line 325 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, (yyvsp[(1) - (3)].doubleValue), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 12: + +/* Line 1455 of yacc.c */ #line 326 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;} break; case 13: + +/* Line 1455 of yacc.c */ #line 328 "../parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -3097,6 +3083,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 339 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node); (yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head; @@ -3105,6 +3093,8 @@ yyreduce: break; case 15: + +/* Line 1455 of yacc.c */ #line 343 "../parser/Grammar.y" { (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head; (yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail); @@ -3113,51 +3103,71 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 351 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;} break; case 18: + +/* Line 1455 of yacc.c */ #line 352 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;} break; case 19: + +/* Line 1455 of yacc.c */ #line 354 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;} break; case 20: + +/* Line 1455 of yacc.c */ #line 358 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;} break; case 23: + +/* Line 1455 of yacc.c */ #line 361 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 24: + +/* Line 1455 of yacc.c */ #line 362 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;} break; case 25: + +/* Line 1455 of yacc.c */ #line 366 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;} break; case 26: + +/* Line 1455 of yacc.c */ #line 367 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;} break; case 27: + +/* Line 1455 of yacc.c */ #line 368 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;} break; case 28: + +/* Line 1455 of yacc.c */ #line 372 "../parser/Grammar.y" { (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node); (yyval.elementList).m_node.tail = (yyval.elementList).m_node.head; @@ -3166,6 +3176,8 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 377 "../parser/Grammar.y" { (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head; (yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node); @@ -3174,26 +3186,36 @@ yyreduce: break; case 30: + +/* Line 1455 of yacc.c */ #line 384 "../parser/Grammar.y" { (yyval.intValue) = 0; ;} break; case 32: + +/* Line 1455 of yacc.c */ #line 389 "../parser/Grammar.y" { (yyval.intValue) = 1; ;} break; case 33: + +/* Line 1455 of yacc.c */ #line 390 "../parser/Grammar.y" { (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;} break; case 35: + +/* Line 1455 of yacc.c */ #line 395 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;} break; case 36: + +/* Line 1455 of yacc.c */ #line 396 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3202,6 +3224,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 400 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3210,6 +3234,8 @@ yyreduce: break; case 38: + +/* Line 1455 of yacc.c */ #line 404 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3218,6 +3244,8 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 412 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3226,6 +3254,8 @@ yyreduce: break; case 41: + +/* Line 1455 of yacc.c */ #line 416 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3234,6 +3264,8 @@ yyreduce: break; case 42: + +/* Line 1455 of yacc.c */ #line 420 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3242,6 +3274,8 @@ yyreduce: break; case 44: + +/* Line 1455 of yacc.c */ #line 428 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3250,6 +3284,8 @@ yyreduce: break; case 46: + +/* Line 1455 of yacc.c */ #line 436 "../parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3258,16 +3294,22 @@ yyreduce: break; case 47: + +/* Line 1455 of yacc.c */ #line 443 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 48: + +/* Line 1455 of yacc.c */ #line 444 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 49: + +/* Line 1455 of yacc.c */ #line 445 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3276,6 +3318,8 @@ yyreduce: break; case 50: + +/* Line 1455 of yacc.c */ #line 449 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3283,16 +3327,22 @@ yyreduce: break; case 51: + +/* Line 1455 of yacc.c */ #line 455 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 52: + +/* Line 1455 of yacc.c */ #line 456 "../parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 53: + +/* Line 1455 of yacc.c */ #line 457 "../parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3301,6 +3351,8 @@ yyreduce: break; case 54: + +/* Line 1455 of yacc.c */ #line 461 "../parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3309,16 +3361,22 @@ yyreduce: break; case 55: + +/* Line 1455 of yacc.c */ #line 468 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;} break; case 56: + +/* Line 1455 of yacc.c */ #line 469 "../parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;} break; case 57: + +/* Line 1455 of yacc.c */ #line 473 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node); (yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head; @@ -3327,6 +3385,8 @@ yyreduce: break; case 58: + +/* Line 1455 of yacc.c */ #line 477 "../parser/Grammar.y" { (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head; (yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node); @@ -3335,181 +3395,253 @@ yyreduce: break; case 64: + +/* Line 1455 of yacc.c */ #line 495 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 65: + +/* Line 1455 of yacc.c */ #line 496 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 67: + +/* Line 1455 of yacc.c */ #line 501 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 68: + +/* Line 1455 of yacc.c */ #line 502 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 69: + +/* Line 1455 of yacc.c */ #line 506 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 70: + +/* Line 1455 of yacc.c */ #line 507 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;} break; case 71: + +/* Line 1455 of yacc.c */ #line 508 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 72: + +/* Line 1455 of yacc.c */ #line 509 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 73: + +/* Line 1455 of yacc.c */ #line 510 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 74: + +/* Line 1455 of yacc.c */ #line 511 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 75: + +/* Line 1455 of yacc.c */ #line 512 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 76: + +/* Line 1455 of yacc.c */ #line 513 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 77: + +/* Line 1455 of yacc.c */ #line 514 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 78: + +/* Line 1455 of yacc.c */ #line 515 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 79: + +/* Line 1455 of yacc.c */ #line 516 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 85: + +/* Line 1455 of yacc.c */ #line 530 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 86: + +/* Line 1455 of yacc.c */ #line 531 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 87: + +/* Line 1455 of yacc.c */ #line 532 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 89: + +/* Line 1455 of yacc.c */ #line 538 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 90: + +/* Line 1455 of yacc.c */ #line 540 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 91: + +/* Line 1455 of yacc.c */ #line 542 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 93: + +/* Line 1455 of yacc.c */ #line 547 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 94: + +/* Line 1455 of yacc.c */ #line 548 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 96: + +/* Line 1455 of yacc.c */ #line 554 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 97: + +/* Line 1455 of yacc.c */ #line 556 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 99: + +/* Line 1455 of yacc.c */ #line 561 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 100: + +/* Line 1455 of yacc.c */ #line 562 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 101: + +/* Line 1455 of yacc.c */ #line 563 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 103: + +/* Line 1455 of yacc.c */ #line 568 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 104: + +/* Line 1455 of yacc.c */ #line 569 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 105: + +/* Line 1455 of yacc.c */ #line 570 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 107: + +/* Line 1455 of yacc.c */ #line 575 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 108: + +/* Line 1455 of yacc.c */ #line 576 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 109: + +/* Line 1455 of yacc.c */ #line 577 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 110: + +/* Line 1455 of yacc.c */ #line 578 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 111: + +/* Line 1455 of yacc.c */ #line 579 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3517,6 +3649,8 @@ yyreduce: break; case 112: + +/* Line 1455 of yacc.c */ #line 582 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3524,26 +3658,36 @@ yyreduce: break; case 114: + +/* Line 1455 of yacc.c */ #line 589 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 115: + +/* Line 1455 of yacc.c */ #line 590 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 116: + +/* Line 1455 of yacc.c */ #line 591 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 117: + +/* Line 1455 of yacc.c */ #line 592 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 118: + +/* Line 1455 of yacc.c */ #line 594 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3551,26 +3695,36 @@ yyreduce: break; case 120: + +/* Line 1455 of yacc.c */ #line 601 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 121: + +/* Line 1455 of yacc.c */ #line 602 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 122: + +/* Line 1455 of yacc.c */ #line 603 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 123: + +/* Line 1455 of yacc.c */ #line 604 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 124: + +/* Line 1455 of yacc.c */ #line 606 "../parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3578,6 +3732,8 @@ yyreduce: break; case 125: + +/* Line 1455 of yacc.c */ #line 610 "../parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3585,156 +3741,218 @@ yyreduce: break; case 127: + +/* Line 1455 of yacc.c */ #line 617 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 128: + +/* Line 1455 of yacc.c */ #line 618 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 129: + +/* Line 1455 of yacc.c */ #line 619 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 130: + +/* Line 1455 of yacc.c */ #line 620 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 132: + +/* Line 1455 of yacc.c */ #line 626 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 133: + +/* Line 1455 of yacc.c */ #line 628 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 134: + +/* Line 1455 of yacc.c */ #line 630 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 135: + +/* Line 1455 of yacc.c */ #line 632 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 137: + +/* Line 1455 of yacc.c */ #line 638 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 138: + +/* Line 1455 of yacc.c */ #line 639 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 139: + +/* Line 1455 of yacc.c */ #line 641 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 140: + +/* Line 1455 of yacc.c */ #line 643 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 142: + +/* Line 1455 of yacc.c */ #line 648 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 144: + +/* Line 1455 of yacc.c */ #line 654 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 146: + +/* Line 1455 of yacc.c */ #line 659 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 148: + +/* Line 1455 of yacc.c */ #line 664 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 150: + +/* Line 1455 of yacc.c */ #line 670 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 152: + +/* Line 1455 of yacc.c */ #line 676 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 154: + +/* Line 1455 of yacc.c */ #line 681 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 156: + +/* Line 1455 of yacc.c */ #line 687 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 158: + +/* Line 1455 of yacc.c */ #line 693 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 160: + +/* Line 1455 of yacc.c */ #line 698 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 162: + +/* Line 1455 of yacc.c */ #line 704 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 164: + +/* Line 1455 of yacc.c */ #line 710 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 166: + +/* Line 1455 of yacc.c */ #line 715 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 168: + +/* Line 1455 of yacc.c */ #line 721 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 170: + +/* Line 1455 of yacc.c */ #line 726 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 172: + +/* Line 1455 of yacc.c */ #line 732 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 174: + +/* Line 1455 of yacc.c */ #line 738 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 176: + +/* Line 1455 of yacc.c */ #line 744 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 178: + +/* Line 1455 of yacc.c */ #line 750 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3742,6 +3960,8 @@ yyreduce: break; case 180: + +/* Line 1455 of yacc.c */ #line 758 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3749,6 +3969,8 @@ yyreduce: break; case 182: + +/* Line 1455 of yacc.c */ #line 766 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3756,99 +3978,137 @@ yyreduce: break; case 183: + +/* Line 1455 of yacc.c */ #line 772 "../parser/Grammar.y" { (yyval.op) = OpEqual; ;} break; case 184: + +/* Line 1455 of yacc.c */ #line 773 "../parser/Grammar.y" { (yyval.op) = OpPlusEq; ;} break; case 185: + +/* Line 1455 of yacc.c */ #line 774 "../parser/Grammar.y" { (yyval.op) = OpMinusEq; ;} break; case 186: + +/* Line 1455 of yacc.c */ #line 775 "../parser/Grammar.y" { (yyval.op) = OpMultEq; ;} break; case 187: + +/* Line 1455 of yacc.c */ #line 776 "../parser/Grammar.y" { (yyval.op) = OpDivEq; ;} break; case 188: + +/* Line 1455 of yacc.c */ #line 777 "../parser/Grammar.y" { (yyval.op) = OpLShift; ;} break; case 189: + +/* Line 1455 of yacc.c */ #line 778 "../parser/Grammar.y" { (yyval.op) = OpRShift; ;} break; case 190: + +/* Line 1455 of yacc.c */ #line 779 "../parser/Grammar.y" { (yyval.op) = OpURShift; ;} break; case 191: + +/* Line 1455 of yacc.c */ #line 780 "../parser/Grammar.y" { (yyval.op) = OpAndEq; ;} break; case 192: + +/* Line 1455 of yacc.c */ #line 781 "../parser/Grammar.y" { (yyval.op) = OpXOrEq; ;} break; case 193: + +/* Line 1455 of yacc.c */ #line 782 "../parser/Grammar.y" { (yyval.op) = OpOrEq; ;} break; case 194: + +/* Line 1455 of yacc.c */ #line 783 "../parser/Grammar.y" { (yyval.op) = OpModEq; ;} break; case 196: + +/* Line 1455 of yacc.c */ #line 788 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 198: + +/* Line 1455 of yacc.c */ #line 793 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 200: + +/* Line 1455 of yacc.c */ #line 798 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 218: + +/* Line 1455 of yacc.c */ #line 822 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 219: + +/* Line 1455 of yacc.c */ #line 824 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 220: + +/* Line 1455 of yacc.c */ #line 829 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 221: + +/* Line 1455 of yacc.c */ #line 831 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); @@ -3856,6 +4116,8 @@ yyreduce: break; case 222: + +/* Line 1455 of yacc.c */ #line 837 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3867,6 +4129,8 @@ yyreduce: break; case 223: + +/* Line 1455 of yacc.c */ #line 844 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3880,6 +4144,8 @@ yyreduce: break; case 224: + +/* Line 1455 of yacc.c */ #line 854 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3891,6 +4157,8 @@ yyreduce: break; case 225: + +/* Line 1455 of yacc.c */ #line 862 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3904,6 +4172,8 @@ yyreduce: break; case 226: + +/* Line 1455 of yacc.c */ #line 874 "../parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3915,6 +4185,8 @@ yyreduce: break; case 227: + +/* Line 1455 of yacc.c */ #line 881 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3928,6 +4200,8 @@ yyreduce: break; case 228: + +/* Line 1455 of yacc.c */ #line 891 "../parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3939,6 +4213,8 @@ yyreduce: break; case 229: + +/* Line 1455 of yacc.c */ #line 899 "../parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3952,18 +4228,24 @@ yyreduce: break; case 230: + +/* Line 1455 of yacc.c */ #line 911 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 231: + +/* Line 1455 of yacc.c */ #line 914 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} break; case 232: + +/* Line 1455 of yacc.c */ #line 919 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head; @@ -3976,6 +4258,8 @@ yyreduce: break; case 233: + +/* Line 1455 of yacc.c */ #line 928 "../parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head; (yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node; @@ -3988,49 +4272,67 @@ yyreduce: break; case 234: + +/* Line 1455 of yacc.c */ #line 939 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 235: + +/* Line 1455 of yacc.c */ #line 940 "../parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 236: + +/* Line 1455 of yacc.c */ #line 944 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 237: + +/* Line 1455 of yacc.c */ #line 948 "../parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 238: + +/* Line 1455 of yacc.c */ #line 952 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;} break; case 239: + +/* Line 1455 of yacc.c */ #line 956 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 240: + +/* Line 1455 of yacc.c */ #line 958 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 241: + +/* Line 1455 of yacc.c */ #line 964 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 242: + +/* Line 1455 of yacc.c */ #line 967 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4041,24 +4343,32 @@ yyreduce: break; case 243: + +/* Line 1455 of yacc.c */ #line 976 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 244: + +/* Line 1455 of yacc.c */ #line 978 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 245: + +/* Line 1455 of yacc.c */ #line 980 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 246: + +/* Line 1455 of yacc.c */ #line 983 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations, (yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features, @@ -4068,6 +4378,8 @@ yyreduce: break; case 247: + +/* Line 1455 of yacc.c */ #line 989 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations), @@ -4078,6 +4390,8 @@ yyreduce: break; case 248: + +/* Line 1455 of yacc.c */ #line 996 "../parser/Grammar.y" { ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node); @@ -4090,6 +4404,8 @@ yyreduce: break; case 249: + +/* Line 1455 of yacc.c */ #line 1005 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column); setExceptionLocation(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column); @@ -4099,6 +4415,8 @@ yyreduce: break; case 250: + +/* Line 1455 of yacc.c */ #line 1011 "../parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column); setExceptionLocation(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column); @@ -4110,16 +4428,22 @@ yyreduce: break; case 251: + +/* Line 1455 of yacc.c */ #line 1021 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 253: + +/* Line 1455 of yacc.c */ #line 1026 "../parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 255: + +/* Line 1455 of yacc.c */ #line 1031 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4128,6 +4452,8 @@ yyreduce: break; case 256: + +/* Line 1455 of yacc.c */ #line 1035 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4136,6 +4462,8 @@ yyreduce: break; case 257: + +/* Line 1455 of yacc.c */ #line 1039 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4144,6 +4472,8 @@ yyreduce: break; case 258: + +/* Line 1455 of yacc.c */ #line 1043 "../parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4152,6 +4482,8 @@ yyreduce: break; case 259: + +/* Line 1455 of yacc.c */ #line 1050 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4159,6 +4491,8 @@ yyreduce: break; case 260: + +/* Line 1455 of yacc.c */ #line 1053 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4166,6 +4500,8 @@ yyreduce: break; case 261: + +/* Line 1455 of yacc.c */ #line 1056 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4173,6 +4509,8 @@ yyreduce: break; case 262: + +/* Line 1455 of yacc.c */ #line 1059 "../parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4180,6 +4518,8 @@ yyreduce: break; case 263: + +/* Line 1455 of yacc.c */ #line 1065 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4187,6 +4527,8 @@ yyreduce: break; case 264: + +/* Line 1455 of yacc.c */ #line 1068 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4194,6 +4536,8 @@ yyreduce: break; case 265: + +/* Line 1455 of yacc.c */ #line 1071 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4201,6 +4545,8 @@ yyreduce: break; case 266: + +/* Line 1455 of yacc.c */ #line 1074 "../parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4208,6 +4554,8 @@ yyreduce: break; case 267: + +/* Line 1455 of yacc.c */ #line 1080 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); @@ -4215,6 +4563,8 @@ yyreduce: break; case 268: + +/* Line 1455 of yacc.c */ #line 1086 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants); @@ -4222,11 +4572,15 @@ yyreduce: break; case 269: + +/* Line 1455 of yacc.c */ #line 1092 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;} break; case 270: + +/* Line 1455 of yacc.c */ #line 1094 "../parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations), @@ -4236,11 +4590,15 @@ yyreduce: break; case 271: + +/* Line 1455 of yacc.c */ #line 1102 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;} break; case 273: + +/* Line 1455 of yacc.c */ #line 1107 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node); (yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head; @@ -4251,6 +4609,8 @@ yyreduce: break; case 274: + +/* Line 1455 of yacc.c */ #line 1113 "../parser/Grammar.y" { (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head; (yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node); @@ -4262,26 +4622,36 @@ yyreduce: break; case 275: + +/* Line 1455 of yacc.c */ #line 1123 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;} break; case 276: + +/* Line 1455 of yacc.c */ #line 1124 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;} break; case 277: + +/* Line 1455 of yacc.c */ #line 1128 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;} break; case 278: + +/* Line 1455 of yacc.c */ #line 1129 "../parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;} break; case 279: + +/* Line 1455 of yacc.c */ #line 1133 "../parser/Grammar.y" { LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4289,6 +4659,8 @@ yyreduce: break; case 280: + +/* Line 1455 of yacc.c */ #line 1139 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4297,6 +4669,8 @@ yyreduce: break; case 281: + +/* Line 1455 of yacc.c */ #line 1143 "../parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4305,6 +4679,8 @@ yyreduce: break; case 282: + +/* Line 1455 of yacc.c */ #line 1150 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations), @@ -4315,6 +4691,8 @@ yyreduce: break; case 283: + +/* Line 1455 of yacc.c */ #line 1156 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4325,6 +4703,8 @@ yyreduce: break; case 284: + +/* Line 1455 of yacc.c */ #line 1163 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations), @@ -4335,23 +4715,31 @@ yyreduce: break; case 285: + +/* Line 1455 of yacc.c */ #line 1172 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 286: + +/* Line 1455 of yacc.c */ #line 1174 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 287: + +/* Line 1455 of yacc.c */ #line 1179 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)->body()); ;} break; case 288: + +/* Line 1455 of yacc.c */ #line 1181 "../parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4363,11 +4751,15 @@ yyreduce: break; case 289: + +/* Line 1455 of yacc.c */ #line 1191 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;} break; case 290: + +/* Line 1455 of yacc.c */ #line 1193 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0); @@ -4378,11 +4770,15 @@ yyreduce: break; case 291: + +/* Line 1455 of yacc.c */ #line 1199 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;} break; case 292: + +/* Line 1455 of yacc.c */ #line 1201 "../parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4393,6 +4789,8 @@ yyreduce: break; case 293: + +/* Line 1455 of yacc.c */ #line 1210 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)); (yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0; @@ -4400,6 +4798,8 @@ yyreduce: break; case 294: + +/* Line 1455 of yacc.c */ #line 1213 "../parser/Grammar.y" { (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head; (yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0); @@ -4407,27 +4807,37 @@ yyreduce: break; case 295: + +/* Line 1455 of yacc.c */ #line 1219 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 296: + +/* Line 1455 of yacc.c */ #line 1220 "../parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 297: + +/* Line 1455 of yacc.c */ #line 1224 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;} break; case 298: + +/* Line 1455 of yacc.c */ #line 1225 "../parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features, (yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;} break; case 299: + +/* Line 1455 of yacc.c */ #line 1230 "../parser/Grammar.y" { (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA); (yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node); @@ -4439,6 +4849,8 @@ yyreduce: break; case 300: + +/* Line 1455 of yacc.c */ #line 1237 "../parser/Grammar.y" { (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations); @@ -4449,188 +4861,261 @@ yyreduce: break; case 304: + +/* Line 1455 of yacc.c */ #line 1251 "../parser/Grammar.y" { ;} break; case 305: + +/* Line 1455 of yacc.c */ #line 1252 "../parser/Grammar.y" { ;} break; case 306: + +/* Line 1455 of yacc.c */ #line 1253 "../parser/Grammar.y" { if (!GLOBAL_DATA->lexer->skipRegExp()) YYABORT; ;} break; case 307: + +/* Line 1455 of yacc.c */ #line 1254 "../parser/Grammar.y" { if (!GLOBAL_DATA->lexer->skipRegExp()) YYABORT; ;} break; case 308: + +/* Line 1455 of yacc.c */ #line 1258 "../parser/Grammar.y" { ;} break; case 309: + +/* Line 1455 of yacc.c */ #line 1259 "../parser/Grammar.y" { ;} break; case 310: + +/* Line 1455 of yacc.c */ #line 1260 "../parser/Grammar.y" { ;} break; case 311: + +/* Line 1455 of yacc.c */ #line 1261 "../parser/Grammar.y" { if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;} break; case 312: + +/* Line 1455 of yacc.c */ #line 1262 "../parser/Grammar.y" { if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;} break; case 316: + +/* Line 1455 of yacc.c */ #line 1272 "../parser/Grammar.y" { ;} break; case 317: + +/* Line 1455 of yacc.c */ #line 1273 "../parser/Grammar.y" { ;} break; case 318: + +/* Line 1455 of yacc.c */ #line 1275 "../parser/Grammar.y" { ;} break; case 322: + +/* Line 1455 of yacc.c */ #line 1282 "../parser/Grammar.y" { ;} break; case 517: + +/* Line 1455 of yacc.c */ #line 1650 "../parser/Grammar.y" { ;} break; case 518: + +/* Line 1455 of yacc.c */ #line 1651 "../parser/Grammar.y" { ;} break; case 520: + +/* Line 1455 of yacc.c */ #line 1656 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 521: + +/* Line 1455 of yacc.c */ #line 1660 "../parser/Grammar.y" { ;} break; case 522: + +/* Line 1455 of yacc.c */ #line 1661 "../parser/Grammar.y" { ;} break; case 525: + +/* Line 1455 of yacc.c */ #line 1667 "../parser/Grammar.y" { ;} break; case 526: + +/* Line 1455 of yacc.c */ #line 1668 "../parser/Grammar.y" { ;} break; case 530: + +/* Line 1455 of yacc.c */ #line 1675 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 533: + +/* Line 1455 of yacc.c */ #line 1684 "../parser/Grammar.y" { ;} break; case 534: + +/* Line 1455 of yacc.c */ #line 1685 "../parser/Grammar.y" { ;} break; case 539: + +/* Line 1455 of yacc.c */ #line 1702 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 555: + +/* Line 1455 of yacc.c */ #line 1733 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 557: + +/* Line 1455 of yacc.c */ #line 1735 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 559: + +/* Line 1455 of yacc.c */ #line 1740 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 561: + +/* Line 1455 of yacc.c */ #line 1742 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 563: + +/* Line 1455 of yacc.c */ #line 1747 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 565: + +/* Line 1455 of yacc.c */ #line 1749 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 568: + +/* Line 1455 of yacc.c */ #line 1761 "../parser/Grammar.y" { ;} break; case 569: + +/* Line 1455 of yacc.c */ #line 1762 "../parser/Grammar.y" { ;} break; case 578: + +/* Line 1455 of yacc.c */ #line 1786 "../parser/Grammar.y" { ;} break; case 580: + +/* Line 1455 of yacc.c */ #line 1791 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 585: + +/* Line 1455 of yacc.c */ #line 1802 "../parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 592: + +/* Line 1455 of yacc.c */ #line 1818 "../parser/Grammar.y" { ;} break; -/* Line 1267 of yacc.c. */ -#line 4634 "JavaScriptCore/tmp/../generated/Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 5119 "JavaScriptCore/tmp/../generated/Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4706,7 +5191,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -4723,7 +5208,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -4781,14 +5266,11 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ + the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); *++yylsp = yyloc; @@ -4813,7 +5295,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4824,7 +5306,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); /* Do not reclaim the symbols of the rule which action triggered @@ -4850,6 +5332,8 @@ yyreturn: } + +/* Line 1675 of yacc.c */ #line 1834 "../parser/Grammar.y" diff --git a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h index 1fdb035..a485e42 100644 --- a/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h +++ b/src/3rdparty/webkit/JavaScriptCore/generated/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -104,78 +104,16 @@ AUTOMINUSMINUS = 320 }; #endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 146 "../parser/Grammar.y" { + +/* Line 1676 of yacc.c */ +#line 146 "../parser/Grammar.y" + int intValue; double doubleValue; const Identifier* ident; @@ -205,13 +143,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 1489 of yacc.c. */ -#line 211 "JavaScriptCore/tmp/../generated/Grammar.tab.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 151 "JavaScriptCore/tmp/../generated/Grammar.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif @@ -230,3 +170,4 @@ typedef struct YYLTYPE #endif + diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index c77a0f1..db0edc4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -1029,6 +1029,11 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* return; } + if (structure->isDictionary()) { + vPC[0] = getOpcode(op_get_by_id_generic); + return; + } + if (slot.slotBase() == structure->prototypeForLookup(callFrame)) { ASSERT(slot.slotBase().isObject()); @@ -1039,6 +1044,8 @@ NEVER_INLINE void Interpreter::tryCacheGetByID(CallFrame* callFrame, CodeBlock* if (baseObject->structure()->isDictionary()) baseObject->setStructure(Structure::fromDictionaryTransition(baseObject->structure())); + ASSERT(!baseObject->structure()->isUncacheableDictionary()); + vPC[0] = getOpcode(op_get_by_id_proto); vPC[5] = baseObject->structure(); vPC[6] = slot.cachedOffset(); @@ -2134,6 +2141,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int offset = vPC[6].u.operand; ASSERT(protoObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset)); + ASSERT(baseValue.get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == protoObject->getDirectOffset(offset)); callFrame->r(dst) = JSValue(protoObject->getDirectOffset(offset)); vPC += OPCODE_LENGTH(op_get_by_id_proto); @@ -2189,6 +2197,7 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi int offset = vPC[7].u.operand; ASSERT(baseObject->get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); + ASSERT(baseValue.get(callFrame, callFrame->codeBlock()->identifier(vPC[3].u.operand)) == baseObject->getDirectOffset(offset)); callFrame->r(dst) = JSValue(baseObject->getDirectOffset(offset)); vPC += OPCODE_LENGTH(op_get_by_id_chain); diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index 470ed0b..8385f92 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -75,7 +75,7 @@ namespace JSC { #define THUMB_FUNC_PARAM(name) #endif -#if PLATFORM(LINUX) && (PLATFORM(X86_64) || PLATFORM(X86)) +#if PLATFORM(LINUX) && PLATFORM(X86_64) #define SYMBOL_STRING_RELOCATION(name) #name "@plt" #else #define SYMBOL_STRING_RELOCATION(name) SYMBOL_STRING(name) @@ -795,6 +795,11 @@ NEVER_INLINE void JITThunks::tryCacheGetByID(CallFrame* callFrame, CodeBlock* co return; } + if (structure->isDictionary()) { + ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic)); + return; + } + if (slot.slotBase() == structure->prototypeForLookup(callFrame)) { ASSERT(slot.slotBase().isObject()); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp index a0713b8..a0cc9f1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/StringPrototype.cpp @@ -469,6 +469,11 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV dpos = 0; else if (!(dpos <= len)) // true for NaN dpos = len; +#if PLATFORM(SYMBIAN) + // Work around for broken NaN compare operator + else if (isnan(dpos)) + dpos = len; +#endif return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos))); } diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h index 7bfa6d0..5925641 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h @@ -40,6 +40,7 @@ namespace JSC { TimeoutChecker(); void setTimeoutInterval(unsigned timeoutInterval) { m_timeoutInterval = timeoutInterval; } + unsigned timeoutInterval() const { return m_timeoutInterval; } unsigned ticksUntilNextCheck() { return m_ticksUntilNextCheck; } diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 7bfde5b..cb6c9b9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -370,6 +370,8 @@ # if Q_BYTE_ORDER == Q_BIG_EDIAN # define WTF_PLATFORM_BIG_ENDIAN 1 # endif + +# include <ce_time.h> #endif #if PLATFORM(WINCE) && PLATFORM(QT) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index ae1c3b6..5818e83 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - 363898ca378e2198b855ca2f8921c5e4f898c5e2 + efa69b6181ce5c045097351cdcf6c158da3f4888 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index be07193..9644470 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,276 @@ +2009-11-19 Olivier Goffart <ogoffart@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Normalize signal and slot signatures. + + * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp: + (WebCore::MediaPlayerPrivate::MediaPlayerPrivate): + +2009-11-18 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] WebKit crashes when loading certain SVG images + + Check if the familly exist before creating the PlatformData from it. + + https://bugs.webkit.org/show_bug.cgi?id=29443 + + Test: svg/text/text-font-invalid.html + + * platform/graphics/qt/FontFallbackListQt.cpp: + (WebCore::FontFallbackList::fontDataAt): + +2009-11-14 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Antti Koivisto. + + [Qt] Broken back/forward after using ErrorPageExtension to set error page + https://bugs.webkit.org/show_bug.cgi?id=30573 + + Make FrameLoader::checkLoadCompleteForThisFrame method + to check for any working DocumentLoader instance (through + activeDocumentLoader()) instead of only checking for + 'm_provisionalDocumentLoader' in order to decide to if + it is going to reset of not the back and forward history. + after an error page has been loaded. + + Test: LayoutTests/fast/history/back-forward-reset-after-error-handling.html + + * loader/FrameLoader.cpp: + (WebCore::FrameLoader::checkLoadCompleteForThisFrame): + +2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Few classes have virtual functions but non-virtual destructor + https://bugs.webkit.org/show_bug.cgi?id=31269 + + No new tests as there is no functional change. + + * platform/qt/QWebPageClient.h: + (QWebPageClient::~QWebPageClient): Add virtual destructor. + +2009-11-09 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Allow setting HTTP headers with empty value in XMLHTTPRequest + https://bugs.webkit.org/show_bug.cgi?id=31140 + + QtNetwork interprets null string as request to remove the header, not add it. + Replace null values with empty values before passing them to QtNetwork. + + Test: http/tests/xmlhttprequest/xmlhttprequest-setrequestheader-no-value.html + + * platform/network/qt/ResourceRequestQt.cpp: + (WebCore::ResourceRequest::toNetworkRequest): + +2009-11-05 Jakub Wieczorek <faw217@gmail.com> + + Reviewed by Holger Freyther. + + [Qt] The XML tokenizer reports a parse error twice if it occurs before the document element is found. + https://bugs.webkit.org/show_bug.cgi?id=31144 + + XMLTokenizer::doEnd() uses an additional logic to report a parse failure in + documents that end prematurely but are not considered invalid by QXmlStream. + This is to stay compatible with the libxml2 implementation. + However, that code path would be also hit in situations when it should not, + i.e. the error would have already been caught and handled. As a result, the + same error would be reported twice. + + No new tests, because the problem is already covered by + fast/parser/xml-declaration-missing-ending-mark.html. + + * dom/XMLTokenizerQt.cpp: + (WebCore::XMLTokenizer::doEnd): + +2009-11-05 Yuta Kitamura <yutak@chromium.org> + + Reviewed by Eric Seidel. + + Fix ASSERT(currentStyle = renderStyle()). + https://bugs.webkit.org/show_bug.cgi?id=31152 + + * dom/Element.cpp: + (WebCore::Element::pseudoStyleCacheIsInvalid): We should have used "==" instead of "=". + +2009-11-04 Yael Aharon <yael.aharon@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] ASSERT failure when receiving 401 HTTP Authentication response. + https://bugs.webkit.org/show_bug.cgi?id=31077 + + Allow sending the response body under the same conditions that we + allow it to finish without reporting an error. + + * platform/network/qt/QNetworkReplyHandler.cpp: + (WebCore::QNetworkReplyHandler::sendResponseIfNeeded): + +2009-11-03 Evan Martin <evan@chromium.org> + + Reviewed by Darin Adler. + + Fix an off-by-one in the CSS lexer that causes memory corruption in + hard-to-trigger circumstances. + + https://bugs.webkit.org/show_bug.cgi?id=30827 + + Test: fast/css/end-of-buffer-crash.html + + * css/maketokenizer: Add comments, fix off-by-one. + +2009-11-02 Darin Adler <darin@apple.com> + + Reviewed by Dan Bernstein. + + Crash due to double-destroy related to CSS run-in property + https://bugs.webkit.org/show_bug.cgi?id=31034 + rdar://problem/7328458 + + Test: fast/css/run-in-crash.html + + * rendering/RenderBlock.cpp: + (WebCore::RenderBlock::destroy): Reorder destruction so the + continuation is destroyed after anonymous children. See comment + in the code for more details of why this is right. + * rendering/RenderInline.cpp: + (WebCore::RenderInline::destroy): Ditto. + +2009-10-30 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Holger Hans Peter Freyther. + + If the owner widget of the page has a palette set, we + should use that one. This was only working when the + owner was a QWebView. This patch fixes that. + + * platform/qt/RenderThemeQt.cpp: + (WebCore::RenderThemeQt::applyTheme): + +2009-10-29 Xan Lopez <xlopez@igalia.com> + + Reviewed by Oliver Hunt. + + [GTK] Threading problems with some of the tests + https://bugs.webkit.org/show_bug.cgi?id=30814 + + Create strings shared among threads with crossThreadString + constructor method. + + * storage/Database.cpp: + (WebCore::Database::Database): + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by NOBODY (OOPS!). + + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. + + https://bugs.webkit.org/show_bug.cgi?id=29381 + + * html/HTMLTokenizer.cpp: Change debug output to print the actual tokenizer delay + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Clear the initial request when loading synchronously to prevent duplicate loads + + MainResourceLoader uses the member m_initialRequest to store a request for future + deferred loads. When doing a synchronous load, in handleDataLoadNow(), we therefore + have to clear this request so that subsequent entries into the loader will not start + yet another load. + + This can for example happen in setDefersLoading() as a result of a PageGroupLoadDeferrer + going out of scope when returning from Chrome::runJavaScriptAlert(), where the alert() + came from a script executed as part of the first/original load. + + https://bugs.webkit.org/show_bug.cgi?id=30879 + + * loader/MainResourceLoader.cpp: + (WebCore::MainResourceLoader::handleDataLoadNow): clear m_initialRequest + +2009-11-04 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Timothy Hatcher. + + WebInspector: Use a different method to identify the webkit port in + InspectorBackent::platform(). + This corrects the inspector expected behavior with Qt on Windows. + https://bugs.webkit.org/show_bug.cgi?id=31116 + + * inspector/InspectorBackend.cpp: + (WebCore::InspectorBackend::platform): + (WebCore::InspectorBackend::port): + * inspector/InspectorBackend.h: + * inspector/InspectorBackend.idl: + * inspector/front-end/InspectorControllerStub.js: + (.WebInspector.InspectorControllerStub.prototype.port): + * inspector/front-end/inspector.css: + * inspector/front-end/inspector.js: + (WebInspector.loaded): + (WebInspector.toolbarDragStart): + +2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Custom printing shrink factors + https://bugs.webkit.org/show_bug.cgi?id=29042 + + This reverts commit r49769. The public API for this needs to be reviewed + before its inclusion in Qt. + + * page/PrintContext.cpp: + (WebCore::PrintContext::begin): + * page/Settings.cpp: + (WebCore::Settings::Settings): + * page/Settings.h: + +2009-11-09 Norbert Leser <norbert.leser@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Moved macro MMP_RULES (LINKEROPTION) into symbian instead of symbian-sbsv2, + since adjustment of RW-section base address will be needed for all new symbian + tool chains, specifically for arm and gcc compilation targets. + Also, change target address to 0xE00000 to be sufficient for all targets. + + * WebCore.pro: + +2009-11-11 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Eric Seidel. + + [Qt] Make the default style background color valid. + Currently the color is transparent but invalid, this causes + list boxes in QtWebKit to be drawn with a black background + since r49242. + https://bugs.webkit.org/show_bug.cgi?id=31295 + + * rendering/style/RenderStyle.h: + (WebCore::InheritedFlags::initialBackgroundColor): + * rendering/style/StyleBackgroundData.cpp: + (WebCore::StyleBackgroundData::StyleBackgroundData): + +2009-11-11 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Introduce a function for querying the input method status + in QWebPageClient. + + * platform/qt/QWebPageClient.h: + 2009-11-09 Yael Aharon <yael.aharon@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 4e84a80..9239089 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -12,10 +12,10 @@ symbian: { DEPLOYMENT += webkitlibs TARGET.UID3 = 0x200267C2 + # RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target. + # Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000. + MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000" } -# RO-section in qtwebkit.dll exceeds allocated space in SBSv2. Move RW-section -# base address to start from 0x800000 instead of the toolchain default 0x400000. -symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000" include($$PWD/../WebKit.pri) diff --git a/src/3rdparty/webkit/WebCore/css/maketokenizer b/src/3rdparty/webkit/WebCore/css/maketokenizer index d14b37a..efac3c6 100644 --- a/src/3rdparty/webkit/WebCore/css/maketokenizer +++ b/src/3rdparty/webkit/WebCore/css/maketokenizer @@ -73,30 +73,36 @@ typedef unsigned int flex_uint32_t; END } - +# Skip over the flex output prologue: the above typedefs, forward declarations, etc. +# Stop when we get to the declarations of tables. while (<>) { last if /YY_NUM_RULES/; } +# Dump the generated tables. /yy_last_accepting/ matches the first declaration after the tables. print; while (<>) { last if /yy_last_accepting/; print; } -# media query, tokenizer state support +# Skip down the the declaration of yytext; the body of the flex output begins after it. while (<>) { last if /yytext/; } +# Dump the definitions of states (INITIAL, media query, tokenizer state support). while (<>) { last if not (/define/ || /line/) ; print; } +# Skip to main scanner function. while (<>) { last if /^YY_DECL/; } +# Dump main scanner declarations, substituting in our 16-bit character type. +# Declarations end with the declaration matching /yy_act/. print; while (<>) { s/char/UChar/; @@ -104,23 +110,34 @@ while (<>) { last if /yy_act/; } +# Skip past initialization code, down to main loop. while (<>) { last if /while \( 1 \)/; } +# Dump the main loop, skipping over labels we don't use. +# Stop before dumping the end-of-buffer handling, because we output our own custom end-of-buffer handling. print; while (<>) { next if /^yy_match:/; next if /^do_action:/; last if /YY_END_OF_BUFFER/; + if (/^case YY_STATE_EOF\(INITIAL\):/) { + print "case YY_END_OF_BUFFER:\n"; + # flex outputs a ton of logic related to end-of-buffer handling; we just want to fall through to + # the yyterminate() found in other EOF states. But we need to be careful to back up to behind + # the terminating double-NUL so that subsequent calls to flex will have the pointers in order, + # so this logic is a reduction of the normal flex-generated YY_END_OF_BUFFER code. + print "\tyy_c_buf_p = yy_cp - 1;\n"; + print "\tyy_cp = yy_c_buf_p;\n"; + } print; - print "case YY_END_OF_BUFFER:\n" if /^case YY_STATE_EOF\(INITIAL\):/; } +# Skip over the end-of-buffer handling; dump the rest of the function. while (<>) { last if /default:/; } - print; while (<>) { print; diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp index 9edde25..6924773 100644 --- a/src/3rdparty/webkit/WebCore/dom/Element.cpp +++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp @@ -752,7 +752,7 @@ void Element::detach() bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderStyle* newStyle) { - ASSERT(currentStyle = renderStyle()); + ASSERT(currentStyle == renderStyle()); if (!renderer() || !currentStyle) return false; diff --git a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp index c6e73ba..79fc51e 100644 --- a/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp +++ b/src/3rdparty/webkit/WebCore/dom/XMLTokenizerQt.cpp @@ -256,7 +256,7 @@ void XMLTokenizer::doEnd() #endif if (m_stream.error() == QXmlStreamReader::PrematureEndOfDocumentError - || (m_wroteText && !m_sawFirstElement && !m_sawXSLTransform)) + || (m_wroteText && !m_sawFirstElement && !m_sawXSLTransform && !m_sawError)) handleError(fatal, qPrintable(m_stream.errorString()), lineNumber(), columnNumber()); } diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp index 335562e..20e3fcb 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,161 +54,28 @@ /* Pure parsers. */ #define YYPURE 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse cssyyparse -#define yylex cssyylex -#define yyerror cssyyerror -#define yylval cssyylval -#define yychar cssyychar -#define yydebug cssyydebug -#define yynerrs cssyynerrs - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TOKEN_EOF = 0, - LOWEST_PREC = 258, - UNIMPORTANT_TOK = 259, - WHITESPACE = 260, - SGML_CD = 261, - INCLUDES = 262, - DASHMATCH = 263, - BEGINSWITH = 264, - ENDSWITH = 265, - CONTAINS = 266, - STRING = 267, - IDENT = 268, - NTH = 269, - HEX = 270, - IDSEL = 271, - IMPORT_SYM = 272, - PAGE_SYM = 273, - MEDIA_SYM = 274, - FONT_FACE_SYM = 275, - CHARSET_SYM = 276, - NAMESPACE_SYM = 277, - WEBKIT_RULE_SYM = 278, - WEBKIT_DECLS_SYM = 279, - WEBKIT_KEYFRAME_RULE_SYM = 280, - WEBKIT_KEYFRAMES_SYM = 281, - WEBKIT_VALUE_SYM = 282, - WEBKIT_MEDIAQUERY_SYM = 283, - WEBKIT_SELECTOR_SYM = 284, - WEBKIT_VARIABLES_SYM = 285, - WEBKIT_DEFINE_SYM = 286, - VARIABLES_FOR = 287, - WEBKIT_VARIABLES_DECLS_SYM = 288, - ATKEYWORD = 289, - IMPORTANT_SYM = 290, - MEDIA_ONLY = 291, - MEDIA_NOT = 292, - MEDIA_AND = 293, - REMS = 294, - QEMS = 295, - EMS = 296, - EXS = 297, - PXS = 298, - CMS = 299, - MMS = 300, - INS = 301, - PTS = 302, - PCS = 303, - DEGS = 304, - RADS = 305, - GRADS = 306, - TURNS = 307, - MSECS = 308, - SECS = 309, - HERZ = 310, - KHERZ = 311, - DIMEN = 312, - PERCENTAGE = 313, - FLOATTOKEN = 314, - INTEGER = 315, - URI = 316, - FUNCTION = 317, - NOTFUNCTION = 318, - UNICODERANGE = 319, - VARCALL = 320 - }; -#endif -/* Tokens. */ -#define TOKEN_EOF 0 -#define LOWEST_PREC 258 -#define UNIMPORTANT_TOK 259 -#define WHITESPACE 260 -#define SGML_CD 261 -#define INCLUDES 262 -#define DASHMATCH 263 -#define BEGINSWITH 264 -#define ENDSWITH 265 -#define CONTAINS 266 -#define STRING 267 -#define IDENT 268 -#define NTH 269 -#define HEX 270 -#define IDSEL 271 -#define IMPORT_SYM 272 -#define PAGE_SYM 273 -#define MEDIA_SYM 274 -#define FONT_FACE_SYM 275 -#define CHARSET_SYM 276 -#define NAMESPACE_SYM 277 -#define WEBKIT_RULE_SYM 278 -#define WEBKIT_DECLS_SYM 279 -#define WEBKIT_KEYFRAME_RULE_SYM 280 -#define WEBKIT_KEYFRAMES_SYM 281 -#define WEBKIT_VALUE_SYM 282 -#define WEBKIT_MEDIAQUERY_SYM 283 -#define WEBKIT_SELECTOR_SYM 284 -#define WEBKIT_VARIABLES_SYM 285 -#define WEBKIT_DEFINE_SYM 286 -#define VARIABLES_FOR 287 -#define WEBKIT_VARIABLES_DECLS_SYM 288 -#define ATKEYWORD 289 -#define IMPORTANT_SYM 290 -#define MEDIA_ONLY 291 -#define MEDIA_NOT 292 -#define MEDIA_AND 293 -#define REMS 294 -#define QEMS 295 -#define EMS 296 -#define EXS 297 -#define PXS 298 -#define CMS 299 -#define MMS 300 -#define INS 301 -#define PTS 302 -#define PCS 303 -#define DEGS 304 -#define RADS 305 -#define GRADS 306 -#define TURNS 307 -#define MSECS 308 -#define SECS 309 -#define HERZ 310 -#define KHERZ 311 -#define DIMEN 312 -#define PERCENTAGE 313 -#define FLOATTOKEN 314 -#define INTEGER 315 -#define URI 316 -#define FUNCTION 317 -#define NOTFUNCTION 318 -#define UNICODERANGE 319 -#define VARCALL 320 - - +#define yyparse cssyyparse +#define yylex cssyylex +#define yyerror cssyyerror +#define yylval cssyylval +#define yychar cssyychar +#define yydebug cssyydebug +#define yynerrs cssyynerrs /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "../css/CSSGrammar.y" @@ -270,6 +136,9 @@ using namespace HTMLNames; +/* Line 189 of yacc.c */ +#line 141 "WebCore/tmp/../generated/CSSGrammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -288,10 +157,89 @@ using namespace HTMLNames; # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + TOKEN_EOF = 0, + LOWEST_PREC = 258, + UNIMPORTANT_TOK = 259, + WHITESPACE = 260, + SGML_CD = 261, + INCLUDES = 262, + DASHMATCH = 263, + BEGINSWITH = 264, + ENDSWITH = 265, + CONTAINS = 266, + STRING = 267, + IDENT = 268, + NTH = 269, + HEX = 270, + IDSEL = 271, + IMPORT_SYM = 272, + PAGE_SYM = 273, + MEDIA_SYM = 274, + FONT_FACE_SYM = 275, + CHARSET_SYM = 276, + NAMESPACE_SYM = 277, + WEBKIT_RULE_SYM = 278, + WEBKIT_DECLS_SYM = 279, + WEBKIT_KEYFRAME_RULE_SYM = 280, + WEBKIT_KEYFRAMES_SYM = 281, + WEBKIT_VALUE_SYM = 282, + WEBKIT_MEDIAQUERY_SYM = 283, + WEBKIT_SELECTOR_SYM = 284, + WEBKIT_VARIABLES_SYM = 285, + WEBKIT_DEFINE_SYM = 286, + VARIABLES_FOR = 287, + WEBKIT_VARIABLES_DECLS_SYM = 288, + ATKEYWORD = 289, + IMPORTANT_SYM = 290, + MEDIA_ONLY = 291, + MEDIA_NOT = 292, + MEDIA_AND = 293, + REMS = 294, + QEMS = 295, + EMS = 296, + EXS = 297, + PXS = 298, + CMS = 299, + MMS = 300, + INS = 301, + PTS = 302, + PCS = 303, + DEGS = 304, + RADS = 305, + GRADS = 306, + TURNS = 307, + MSECS = 308, + SECS = 309, + HERZ = 310, + KHERZ = 311, + DIMEN = 312, + PERCENTAGE = 313, + FLOATTOKEN = 314, + INTEGER = 315, + URI = 316, + FUNCTION = 317, + NOTFUNCTION = 318, + UNICODERANGE = 319, + VARCALL = 320 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 62 "../css/CSSGrammar.y" { + +/* Line 214 of yacc.c */ +#line 62 "../css/CSSGrammar.y" + bool boolean; char character; int integer; @@ -313,18 +261,21 @@ typedef union YYSTYPE WebKitCSSKeyframeRule* keyframeRule; WebKitCSSKeyframesRule* keyframesRule; float val; -} -/* Line 187 of yacc.c. */ -#line 319 "WebCore/tmp/../generated/CSSGrammar.tab.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 269 "WebCore/tmp/../generated/CSSGrammar.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ + +/* Line 264 of yacc.c */ #line 86 "../css/CSSGrammar.y" @@ -340,8 +291,8 @@ static int cssyylex(YYSTYPE* yylval, void* parser) -/* Line 216 of yacc.c. */ -#line 345 "WebCore/tmp/../generated/CSSGrammar.tab.c" +/* Line 264 of yacc.c */ +#line 296 "WebCore/tmp/../generated/CSSGrammar.tab.c" #ifdef short # undef short @@ -416,14 +367,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -504,9 +455,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -540,12 +491,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -1557,17 +1508,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -1601,11 +1555,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1885,10 +1839,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1907,10 +1859,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1934,74 +1885,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; + /* Number of syntax errors so far. */ + int yynerrs; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -2031,7 +1983,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -2039,7 +1990,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -2062,9 +2012,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2075,7 +2024,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -2085,6 +2033,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -2093,16 +2044,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2134,20 +2085,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -2187,6 +2134,8 @@ yyreduce: switch (yyn) { case 12: + +/* Line 1455 of yacc.c */ #line 287 "../css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_rule = (yyvsp[(4) - (6)].rule); @@ -2194,6 +2143,8 @@ yyreduce: break; case 13: + +/* Line 1455 of yacc.c */ #line 293 "../css/CSSGrammar.y" { static_cast<CSSParser*>(parser)->m_keyframe = (yyvsp[(4) - (6)].keyframeRule); @@ -2201,6 +2152,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 299 "../css/CSSGrammar.y" { /* can be empty */ @@ -2208,6 +2161,8 @@ yyreduce: break; case 15: + +/* Line 1455 of yacc.c */ #line 305 "../css/CSSGrammar.y" { /* can be empty */ @@ -2215,6 +2170,8 @@ yyreduce: break; case 16: + +/* Line 1455 of yacc.c */ #line 311 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2230,6 +2187,8 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 325 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2238,6 +2197,8 @@ yyreduce: break; case 18: + +/* Line 1455 of yacc.c */ #line 332 "../css/CSSGrammar.y" { if ((yyvsp[(4) - (5)].selectorList)) { @@ -2249,12 +2210,16 @@ yyreduce: break; case 25: + +/* Line 1455 of yacc.c */ #line 354 "../css/CSSGrammar.y" { ;} break; case 28: + +/* Line 1455 of yacc.c */ #line 364 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2265,18 +2230,24 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 370 "../css/CSSGrammar.y" { ;} break; case 30: + +/* Line 1455 of yacc.c */ #line 372 "../css/CSSGrammar.y" { ;} break; case 32: + +/* Line 1455 of yacc.c */ #line 378 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2286,12 +2257,16 @@ yyreduce: break; case 33: + +/* Line 1455 of yacc.c */ #line 383 "../css/CSSGrammar.y" { ;} break; case 35: + +/* Line 1455 of yacc.c */ #line 389 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2301,6 +2276,8 @@ yyreduce: break; case 39: + +/* Line 1455 of yacc.c */ #line 403 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2310,11 +2287,15 @@ yyreduce: break; case 49: + +/* Line 1455 of yacc.c */ #line 426 "../css/CSSGrammar.y" { (yyval.ruleList) = 0; ;} break; case 50: + +/* Line 1455 of yacc.c */ #line 427 "../css/CSSGrammar.y" { (yyval.ruleList) = (yyvsp[(1) - (3)].ruleList); @@ -2327,6 +2308,8 @@ yyreduce: break; case 60: + +/* Line 1455 of yacc.c */ #line 454 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createImportRule((yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].mediaList)); @@ -2334,6 +2317,8 @@ yyreduce: break; case 61: + +/* Line 1455 of yacc.c */ #line 457 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2341,6 +2326,8 @@ yyreduce: break; case 62: + +/* Line 1455 of yacc.c */ #line 460 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2348,6 +2335,8 @@ yyreduce: break; case 63: + +/* Line 1455 of yacc.c */ #line 463 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2355,6 +2344,8 @@ yyreduce: break; case 64: + +/* Line 1455 of yacc.c */ #line 469 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), true); @@ -2362,6 +2353,8 @@ yyreduce: break; case 65: + +/* Line 1455 of yacc.c */ #line 473 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createVariablesRule((yyvsp[(3) - (7)].mediaList), false); @@ -2369,6 +2362,8 @@ yyreduce: break; case 66: + +/* Line 1455 of yacc.c */ #line 479 "../css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); @@ -2376,6 +2371,8 @@ yyreduce: break; case 67: + +/* Line 1455 of yacc.c */ #line 483 "../css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(3) - (3)].mediaList); @@ -2383,6 +2380,8 @@ yyreduce: break; case 68: + +/* Line 1455 of yacc.c */ #line 489 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -2390,6 +2389,8 @@ yyreduce: break; case 69: + +/* Line 1455 of yacc.c */ #line 492 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -2399,6 +2400,8 @@ yyreduce: break; case 70: + +/* Line 1455 of yacc.c */ #line 497 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -2406,6 +2409,8 @@ yyreduce: break; case 71: + +/* Line 1455 of yacc.c */ #line 500 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2413,6 +2418,8 @@ yyreduce: break; case 72: + +/* Line 1455 of yacc.c */ #line 503 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2420,6 +2427,8 @@ yyreduce: break; case 73: + +/* Line 1455 of yacc.c */ #line 506 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -2427,6 +2436,8 @@ yyreduce: break; case 74: + +/* Line 1455 of yacc.c */ #line 512 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (3)].boolean); @@ -2434,6 +2445,8 @@ yyreduce: break; case 75: + +/* Line 1455 of yacc.c */ #line 515 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2441,6 +2454,8 @@ yyreduce: break; case 76: + +/* Line 1455 of yacc.c */ #line 518 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2448,6 +2463,8 @@ yyreduce: break; case 77: + +/* Line 1455 of yacc.c */ #line 521 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2455,6 +2472,8 @@ yyreduce: break; case 78: + +/* Line 1455 of yacc.c */ #line 524 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); @@ -2464,6 +2483,8 @@ yyreduce: break; case 79: + +/* Line 1455 of yacc.c */ #line 529 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); @@ -2471,6 +2492,8 @@ yyreduce: break; case 80: + +/* Line 1455 of yacc.c */ #line 532 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (6)].boolean); @@ -2478,6 +2501,8 @@ yyreduce: break; case 81: + +/* Line 1455 of yacc.c */ #line 538 "../css/CSSGrammar.y" { (yyval.boolean) = static_cast<CSSParser*>(parser)->addVariable((yyvsp[(1) - (4)].string), (yyvsp[(4) - (4)].valueList)); @@ -2485,6 +2510,8 @@ yyreduce: break; case 82: + +/* Line 1455 of yacc.c */ #line 542 "../css/CSSGrammar.y" { (yyval.boolean) = static_cast<CSSParser*>(parser)->addVariableDeclarationBlock((yyvsp[(1) - (7)].string)); @@ -2492,6 +2519,8 @@ yyreduce: break; case 83: + +/* Line 1455 of yacc.c */ #line 546 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2499,6 +2528,8 @@ yyreduce: break; case 84: + +/* Line 1455 of yacc.c */ #line 550 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -2506,6 +2537,8 @@ yyreduce: break; case 85: + +/* Line 1455 of yacc.c */ #line 554 "../css/CSSGrammar.y" { /* @variables { varname: } Just reduce away this variable with no value. */ @@ -2514,6 +2547,8 @@ yyreduce: break; case 86: + +/* Line 1455 of yacc.c */ #line 559 "../css/CSSGrammar.y" { /* if we come across rules with invalid values like this case: @variables { varname: *; }, just discard the property/value pair */ @@ -2522,6 +2557,8 @@ yyreduce: break; case 87: + +/* Line 1455 of yacc.c */ #line 566 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); @@ -2529,6 +2566,8 @@ yyreduce: break; case 88: + +/* Line 1455 of yacc.c */ #line 572 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2538,16 +2577,22 @@ yyreduce: break; case 91: + +/* Line 1455 of yacc.c */ #line 582 "../css/CSSGrammar.y" { (yyval.string).characters = 0; ;} break; case 92: + +/* Line 1455 of yacc.c */ #line 583 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 95: + +/* Line 1455 of yacc.c */ #line 592 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); @@ -2555,6 +2600,8 @@ yyreduce: break; case 96: + +/* Line 1455 of yacc.c */ #line 598 "../css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -2562,6 +2609,8 @@ yyreduce: break; case 97: + +/* Line 1455 of yacc.c */ #line 601 "../css/CSSGrammar.y" { (yyval.valueList) = (yyvsp[(3) - (4)].valueList); @@ -2569,6 +2618,8 @@ yyreduce: break; case 98: + +/* Line 1455 of yacc.c */ #line 607 "../css/CSSGrammar.y" { (yyvsp[(3) - (7)].string).lower(); @@ -2577,6 +2628,8 @@ yyreduce: break; case 99: + +/* Line 1455 of yacc.c */ #line 614 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2586,6 +2639,8 @@ yyreduce: break; case 100: + +/* Line 1455 of yacc.c */ #line 619 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(1) - (5)].mediaQueryExpList); @@ -2594,6 +2649,8 @@ yyreduce: break; case 101: + +/* Line 1455 of yacc.c */ #line 626 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = static_cast<CSSParser*>(parser)->createFloatingMediaQueryExpList(); @@ -2601,6 +2658,8 @@ yyreduce: break; case 102: + +/* Line 1455 of yacc.c */ #line 629 "../css/CSSGrammar.y" { (yyval.mediaQueryExpList) = (yyvsp[(3) - (3)].mediaQueryExpList); @@ -2608,6 +2667,8 @@ yyreduce: break; case 103: + +/* Line 1455 of yacc.c */ #line 635 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::None; @@ -2615,6 +2676,8 @@ yyreduce: break; case 104: + +/* Line 1455 of yacc.c */ #line 638 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Only; @@ -2622,6 +2685,8 @@ yyreduce: break; case 105: + +/* Line 1455 of yacc.c */ #line 641 "../css/CSSGrammar.y" { (yyval.mediaQueryRestrictor) = MediaQuery::Not; @@ -2629,6 +2694,8 @@ yyreduce: break; case 106: + +/* Line 1455 of yacc.c */ #line 647 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2637,6 +2704,8 @@ yyreduce: break; case 107: + +/* Line 1455 of yacc.c */ #line 652 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2646,6 +2715,8 @@ yyreduce: break; case 108: + +/* Line 1455 of yacc.c */ #line 660 "../css/CSSGrammar.y" { (yyval.mediaList) = static_cast<CSSParser*>(parser)->createMediaList(); @@ -2653,6 +2724,8 @@ yyreduce: break; case 110: + +/* Line 1455 of yacc.c */ #line 667 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2662,6 +2735,8 @@ yyreduce: break; case 111: + +/* Line 1455 of yacc.c */ #line 672 "../css/CSSGrammar.y" { (yyval.mediaList) = (yyvsp[(1) - (4)].mediaList); @@ -2671,6 +2746,8 @@ yyreduce: break; case 112: + +/* Line 1455 of yacc.c */ #line 677 "../css/CSSGrammar.y" { (yyval.mediaList) = 0; @@ -2678,6 +2755,8 @@ yyreduce: break; case 113: + +/* Line 1455 of yacc.c */ #line 683 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule((yyvsp[(3) - (7)].mediaList), (yyvsp[(6) - (7)].ruleList)); @@ -2685,6 +2764,8 @@ yyreduce: break; case 114: + +/* Line 1455 of yacc.c */ #line 686 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createMediaRule(0, (yyvsp[(5) - (6)].ruleList)); @@ -2692,6 +2773,8 @@ yyreduce: break; case 115: + +/* Line 1455 of yacc.c */ #line 692 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); @@ -2699,6 +2782,8 @@ yyreduce: break; case 116: + +/* Line 1455 of yacc.c */ #line 698 "../css/CSSGrammar.y" { (yyval.rule) = (yyvsp[(7) - (8)].keyframesRule); @@ -2707,11 +2792,15 @@ yyreduce: break; case 119: + +/* Line 1455 of yacc.c */ #line 710 "../css/CSSGrammar.y" { (yyval.keyframesRule) = static_cast<CSSParser*>(parser)->createKeyframesRule(); ;} break; case 120: + +/* Line 1455 of yacc.c */ #line 711 "../css/CSSGrammar.y" { (yyval.keyframesRule) = (yyvsp[(1) - (3)].keyframesRule); @@ -2721,6 +2810,8 @@ yyreduce: break; case 121: + +/* Line 1455 of yacc.c */ #line 719 "../css/CSSGrammar.y" { (yyval.keyframeRule) = static_cast<CSSParser*>(parser)->createKeyframeRule((yyvsp[(1) - (6)].valueList)); @@ -2728,6 +2819,8 @@ yyreduce: break; case 122: + +/* Line 1455 of yacc.c */ #line 725 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2737,6 +2830,8 @@ yyreduce: break; case 123: + +/* Line 1455 of yacc.c */ #line 730 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2747,11 +2842,15 @@ yyreduce: break; case 124: + +/* Line 1455 of yacc.c */ #line 739 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (1)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 125: + +/* Line 1455 of yacc.c */ #line 740 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; @@ -2766,6 +2865,8 @@ yyreduce: break; case 126: + +/* Line 1455 of yacc.c */ #line 764 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2773,6 +2874,8 @@ yyreduce: break; case 127: + +/* Line 1455 of yacc.c */ #line 767 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2780,6 +2883,8 @@ yyreduce: break; case 128: + +/* Line 1455 of yacc.c */ #line 774 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createFontFaceRule(); @@ -2787,6 +2892,8 @@ yyreduce: break; case 129: + +/* Line 1455 of yacc.c */ #line 777 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2794,6 +2901,8 @@ yyreduce: break; case 130: + +/* Line 1455 of yacc.c */ #line 780 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -2801,31 +2910,43 @@ yyreduce: break; case 131: + +/* Line 1455 of yacc.c */ #line 786 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::DirectAdjacent; ;} break; case 132: + +/* Line 1455 of yacc.c */ #line 787 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::IndirectAdjacent; ;} break; case 133: + +/* Line 1455 of yacc.c */ #line 788 "../css/CSSGrammar.y" { (yyval.relation) = CSSSelector::Child; ;} break; case 134: + +/* Line 1455 of yacc.c */ #line 792 "../css/CSSGrammar.y" { (yyval.integer) = -1; ;} break; case 135: + +/* Line 1455 of yacc.c */ #line 793 "../css/CSSGrammar.y" { (yyval.integer) = 1; ;} break; case 136: + +/* Line 1455 of yacc.c */ #line 797 "../css/CSSGrammar.y" { (yyval.rule) = static_cast<CSSParser*>(parser)->createStyleRule((yyvsp[(1) - (5)].selectorList)); @@ -2833,6 +2954,8 @@ yyreduce: break; case 137: + +/* Line 1455 of yacc.c */ #line 803 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].selector)) { @@ -2846,6 +2969,8 @@ yyreduce: break; case 138: + +/* Line 1455 of yacc.c */ #line 812 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (4)].selectorList) && (yyvsp[(4) - (4)].selector)) { @@ -2858,6 +2983,8 @@ yyreduce: break; case 139: + +/* Line 1455 of yacc.c */ #line 820 "../css/CSSGrammar.y" { (yyval.selectorList) = 0; @@ -2865,6 +2992,8 @@ yyreduce: break; case 140: + +/* Line 1455 of yacc.c */ #line 826 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (2)].selector); @@ -2872,6 +3001,8 @@ yyreduce: break; case 141: + +/* Line 1455 of yacc.c */ #line 832 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -2879,6 +3010,8 @@ yyreduce: break; case 142: + +/* Line 1455 of yacc.c */ #line 836 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -2886,6 +3019,8 @@ yyreduce: break; case 143: + +/* Line 1455 of yacc.c */ #line 840 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -2905,6 +3040,8 @@ yyreduce: break; case 144: + +/* Line 1455 of yacc.c */ #line 855 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); @@ -2929,6 +3066,8 @@ yyreduce: break; case 145: + +/* Line 1455 of yacc.c */ #line 875 "../css/CSSGrammar.y" { (yyval.selector) = 0; @@ -2936,21 +3075,29 @@ yyreduce: break; case 146: + +/* Line 1455 of yacc.c */ #line 881 "../css/CSSGrammar.y" { (yyval.string).characters = 0; (yyval.string).length = 0; ;} break; case 147: + +/* Line 1455 of yacc.c */ #line 882 "../css/CSSGrammar.y" { static UChar star = '*'; (yyval.string).characters = ☆ (yyval.string).length = 1; ;} break; case 148: + +/* Line 1455 of yacc.c */ #line 883 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 149: + +/* Line 1455 of yacc.c */ #line 887 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -2960,6 +3107,8 @@ yyreduce: break; case 150: + +/* Line 1455 of yacc.c */ #line 892 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -2971,6 +3120,8 @@ yyreduce: break; case 151: + +/* Line 1455 of yacc.c */ #line 899 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -2981,6 +3132,8 @@ yyreduce: break; case 152: + +/* Line 1455 of yacc.c */ #line 905 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(1) - (2)].string); @@ -2995,6 +3148,8 @@ yyreduce: break; case 153: + +/* Line 1455 of yacc.c */ #line 915 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(3) - (3)].selector); @@ -3011,6 +3166,8 @@ yyreduce: break; case 154: + +/* Line 1455 of yacc.c */ #line 927 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(2) - (2)].selector); @@ -3025,6 +3182,8 @@ yyreduce: break; case 155: + +/* Line 1455 of yacc.c */ #line 940 "../css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (1)].string); @@ -3037,6 +3196,8 @@ yyreduce: break; case 156: + +/* Line 1455 of yacc.c */ #line 948 "../css/CSSGrammar.y" { static UChar star = '*'; @@ -3046,6 +3207,8 @@ yyreduce: break; case 157: + +/* Line 1455 of yacc.c */ #line 956 "../css/CSSGrammar.y" { (yyval.selector) = (yyvsp[(1) - (1)].selector); @@ -3053,6 +3216,8 @@ yyreduce: break; case 158: + +/* Line 1455 of yacc.c */ #line 959 "../css/CSSGrammar.y" { if (!(yyvsp[(2) - (2)].selector)) @@ -3070,6 +3235,8 @@ yyreduce: break; case 159: + +/* Line 1455 of yacc.c */ #line 972 "../css/CSSGrammar.y" { (yyval.selector) = 0; @@ -3077,6 +3244,8 @@ yyreduce: break; case 160: + +/* Line 1455 of yacc.c */ #line 978 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3089,6 +3258,8 @@ yyreduce: break; case 161: + +/* Line 1455 of yacc.c */ #line 986 "../css/CSSGrammar.y" { if ((yyvsp[(1) - (1)].string).characters[0] >= '0' && (yyvsp[(1) - (1)].string).characters[0] <= '9') { @@ -3105,6 +3276,8 @@ yyreduce: break; case 165: + +/* Line 1455 of yacc.c */ #line 1004 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3117,6 +3290,8 @@ yyreduce: break; case 166: + +/* Line 1455 of yacc.c */ #line 1015 "../css/CSSGrammar.y" { CSSParserString& str = (yyvsp[(1) - (2)].string); @@ -3129,6 +3304,8 @@ yyreduce: break; case 167: + +/* Line 1455 of yacc.c */ #line 1026 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3138,6 +3315,8 @@ yyreduce: break; case 168: + +/* Line 1455 of yacc.c */ #line 1031 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3148,6 +3327,8 @@ yyreduce: break; case 169: + +/* Line 1455 of yacc.c */ #line 1037 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (5)].string); @@ -3160,6 +3341,8 @@ yyreduce: break; case 170: + +/* Line 1455 of yacc.c */ #line 1045 "../css/CSSGrammar.y" { AtomicString namespacePrefix = (yyvsp[(3) - (9)].string); @@ -3173,6 +3356,8 @@ yyreduce: break; case 171: + +/* Line 1455 of yacc.c */ #line 1057 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Exact; @@ -3180,6 +3365,8 @@ yyreduce: break; case 172: + +/* Line 1455 of yacc.c */ #line 1060 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::List; @@ -3187,6 +3374,8 @@ yyreduce: break; case 173: + +/* Line 1455 of yacc.c */ #line 1063 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Hyphen; @@ -3194,6 +3383,8 @@ yyreduce: break; case 174: + +/* Line 1455 of yacc.c */ #line 1066 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Begin; @@ -3201,6 +3392,8 @@ yyreduce: break; case 175: + +/* Line 1455 of yacc.c */ #line 1069 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::End; @@ -3208,6 +3401,8 @@ yyreduce: break; case 176: + +/* Line 1455 of yacc.c */ #line 1072 "../css/CSSGrammar.y" { (yyval.integer) = CSSSelector::Contain; @@ -3215,6 +3410,8 @@ yyreduce: break; case 179: + +/* Line 1455 of yacc.c */ #line 1083 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3249,6 +3446,8 @@ yyreduce: break; case 180: + +/* Line 1455 of yacc.c */ #line 1113 "../css/CSSGrammar.y" { (yyval.selector) = static_cast<CSSParser*>(parser)->createFloatingSelector(); @@ -3272,6 +3471,8 @@ yyreduce: break; case 181: + +/* Line 1455 of yacc.c */ #line 1133 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3293,6 +3494,8 @@ yyreduce: break; case 182: + +/* Line 1455 of yacc.c */ #line 1151 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3314,6 +3517,8 @@ yyreduce: break; case 183: + +/* Line 1455 of yacc.c */ #line 1169 "../css/CSSGrammar.y" { CSSParser *p = static_cast<CSSParser*>(parser); @@ -3336,6 +3541,8 @@ yyreduce: break; case 184: + +/* Line 1455 of yacc.c */ #line 1188 "../css/CSSGrammar.y" { if (!(yyvsp[(4) - (6)].selector) || (yyvsp[(4) - (6)].selector)->simpleSelector() || (yyvsp[(4) - (6)].selector)->tagHistory()) @@ -3352,6 +3559,8 @@ yyreduce: break; case 185: + +/* Line 1455 of yacc.c */ #line 1203 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -3359,6 +3568,8 @@ yyreduce: break; case 186: + +/* Line 1455 of yacc.c */ #line 1206 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3368,6 +3579,8 @@ yyreduce: break; case 187: + +/* Line 1455 of yacc.c */ #line 1211 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (1)].boolean); @@ -3375,6 +3588,8 @@ yyreduce: break; case 188: + +/* Line 1455 of yacc.c */ #line 1214 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3382,6 +3597,8 @@ yyreduce: break; case 189: + +/* Line 1455 of yacc.c */ #line 1217 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3389,6 +3606,8 @@ yyreduce: break; case 190: + +/* Line 1455 of yacc.c */ #line 1220 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3396,6 +3615,8 @@ yyreduce: break; case 191: + +/* Line 1455 of yacc.c */ #line 1223 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (2)].boolean); @@ -3403,6 +3624,8 @@ yyreduce: break; case 192: + +/* Line 1455 of yacc.c */ #line 1229 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (3)].boolean); @@ -3410,6 +3633,8 @@ yyreduce: break; case 193: + +/* Line 1455 of yacc.c */ #line 1232 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3417,6 +3642,8 @@ yyreduce: break; case 194: + +/* Line 1455 of yacc.c */ #line 1235 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3424,6 +3651,8 @@ yyreduce: break; case 195: + +/* Line 1455 of yacc.c */ #line 1238 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3431,6 +3660,8 @@ yyreduce: break; case 196: + +/* Line 1455 of yacc.c */ #line 1241 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); @@ -3440,6 +3671,8 @@ yyreduce: break; case 197: + +/* Line 1455 of yacc.c */ #line 1246 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (4)].boolean); @@ -3447,6 +3680,8 @@ yyreduce: break; case 198: + +/* Line 1455 of yacc.c */ #line 1249 "../css/CSSGrammar.y" { (yyval.boolean) = (yyvsp[(1) - (6)].boolean); @@ -3454,6 +3689,8 @@ yyreduce: break; case 199: + +/* Line 1455 of yacc.c */ #line 1255 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3471,6 +3708,8 @@ yyreduce: break; case 200: + +/* Line 1455 of yacc.c */ #line 1269 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3486,6 +3725,8 @@ yyreduce: break; case 201: + +/* Line 1455 of yacc.c */ #line 1281 "../css/CSSGrammar.y" { (yyval.boolean) = false; @@ -3493,6 +3734,8 @@ yyreduce: break; case 202: + +/* Line 1455 of yacc.c */ #line 1285 "../css/CSSGrammar.y" { /* The default movable type template has letter-spacing: .none; Handle this by looking for @@ -3503,6 +3746,8 @@ yyreduce: break; case 203: + +/* Line 1455 of yacc.c */ #line 1292 "../css/CSSGrammar.y" { /* When we encounter something like p {color: red !important fail;} we should drop the declaration */ @@ -3511,6 +3756,8 @@ yyreduce: break; case 204: + +/* Line 1455 of yacc.c */ #line 1297 "../css/CSSGrammar.y" { /* Handle this case: div { text-align: center; !important } Just reduce away the stray !important. */ @@ -3519,6 +3766,8 @@ yyreduce: break; case 205: + +/* Line 1455 of yacc.c */ #line 1302 "../css/CSSGrammar.y" { /* div { font-family: } Just reduce away this property with no value. */ @@ -3527,6 +3776,8 @@ yyreduce: break; case 206: + +/* Line 1455 of yacc.c */ #line 1307 "../css/CSSGrammar.y" { /* if we come across rules with invalid values like this case: p { weight: *; }, just discard the rule */ @@ -3535,6 +3786,8 @@ yyreduce: break; case 207: + +/* Line 1455 of yacc.c */ #line 1312 "../css/CSSGrammar.y" { /* if we come across: div { color{;color:maroon} }, ignore everything within curly brackets */ @@ -3543,6 +3796,8 @@ yyreduce: break; case 208: + +/* Line 1455 of yacc.c */ #line 1319 "../css/CSSGrammar.y" { (yyval.integer) = cssPropertyID((yyvsp[(1) - (2)].string)); @@ -3550,16 +3805,22 @@ yyreduce: break; case 209: + +/* Line 1455 of yacc.c */ #line 1325 "../css/CSSGrammar.y" { (yyval.boolean) = true; ;} break; case 210: + +/* Line 1455 of yacc.c */ #line 1326 "../css/CSSGrammar.y" { (yyval.boolean) = false; ;} break; case 211: + +/* Line 1455 of yacc.c */ #line 1330 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3569,6 +3830,8 @@ yyreduce: break; case 212: + +/* Line 1455 of yacc.c */ #line 1335 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3587,6 +3850,8 @@ yyreduce: break; case 213: + +/* Line 1455 of yacc.c */ #line 1349 "../css/CSSGrammar.y" { (yyval.valueList) = 0; @@ -3594,6 +3859,8 @@ yyreduce: break; case 214: + +/* Line 1455 of yacc.c */ #line 1355 "../css/CSSGrammar.y" { (yyval.character) = '/'; @@ -3601,6 +3868,8 @@ yyreduce: break; case 215: + +/* Line 1455 of yacc.c */ #line 1358 "../css/CSSGrammar.y" { (yyval.character) = ','; @@ -3608,6 +3877,8 @@ yyreduce: break; case 216: + +/* Line 1455 of yacc.c */ #line 1361 "../css/CSSGrammar.y" { (yyval.character) = 0; @@ -3615,21 +3886,29 @@ yyreduce: break; case 217: + +/* Line 1455 of yacc.c */ #line 1367 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); ;} break; case 218: + +/* Line 1455 of yacc.c */ #line 1368 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(2) - (2)].value); (yyval.value).fValue *= (yyvsp[(1) - (2)].integer); ;} break; case 219: + +/* Line 1455 of yacc.c */ #line 1369 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_STRING; ;} break; case 220: + +/* Line 1455 of yacc.c */ #line 1370 "../css/CSSGrammar.y" { (yyval.value).id = cssValueKeywordID((yyvsp[(1) - (2)].string)); @@ -3639,36 +3918,50 @@ yyreduce: break; case 221: + +/* Line 1455 of yacc.c */ #line 1376 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 222: + +/* Line 1455 of yacc.c */ #line 1377 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(2) - (3)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_DIMENSION; ;} break; case 223: + +/* Line 1455 of yacc.c */ #line 1378 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_URI; ;} break; case 224: + +/* Line 1455 of yacc.c */ #line 1379 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (2)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_UNICODE_RANGE; ;} break; case 225: + +/* Line 1455 of yacc.c */ #line 1380 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = (yyvsp[(1) - (1)].string); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 226: + +/* Line 1455 of yacc.c */ #line 1381 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).string = CSSParserString(); (yyval.value).unit = CSSPrimitiveValue::CSS_PARSER_HEXCOLOR; ;} break; case 227: + +/* Line 1455 of yacc.c */ #line 1383 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (1)].value); @@ -3676,6 +3969,8 @@ yyreduce: break; case 228: + +/* Line 1455 of yacc.c */ #line 1386 "../css/CSSGrammar.y" { (yyval.value) = (yyvsp[(1) - (2)].value); @@ -3683,6 +3978,8 @@ yyreduce: break; case 229: + +/* Line 1455 of yacc.c */ #line 1389 "../css/CSSGrammar.y" { /* Handle width: %; */ (yyval.value).id = 0; (yyval.value).unit = 0; @@ -3690,106 +3987,148 @@ yyreduce: break; case 230: + +/* Line 1455 of yacc.c */ #line 1395 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = true; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 231: + +/* Line 1455 of yacc.c */ #line 1396 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).isInt = false; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_NUMBER; ;} break; case 232: + +/* Line 1455 of yacc.c */ #line 1397 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PERCENTAGE; ;} break; case 233: + +/* Line 1455 of yacc.c */ #line 1398 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PX; ;} break; case 234: + +/* Line 1455 of yacc.c */ #line 1399 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_CM; ;} break; case 235: + +/* Line 1455 of yacc.c */ #line 1400 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MM; ;} break; case 236: + +/* Line 1455 of yacc.c */ #line 1401 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_IN; ;} break; case 237: + +/* Line 1455 of yacc.c */ #line 1402 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PT; ;} break; case 238: + +/* Line 1455 of yacc.c */ #line 1403 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_PC; ;} break; case 239: + +/* Line 1455 of yacc.c */ #line 1404 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_DEG; ;} break; case 240: + +/* Line 1455 of yacc.c */ #line 1405 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_RAD; ;} break; case 241: + +/* Line 1455 of yacc.c */ #line 1406 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_GRAD; ;} break; case 242: + +/* Line 1455 of yacc.c */ #line 1407 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_TURN; ;} break; case 243: + +/* Line 1455 of yacc.c */ #line 1408 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_MS; ;} break; case 244: + +/* Line 1455 of yacc.c */ #line 1409 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_S; ;} break; case 245: + +/* Line 1455 of yacc.c */ #line 1410 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_HZ; ;} break; case 246: + +/* Line 1455 of yacc.c */ #line 1411 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_KHZ; ;} break; case 247: + +/* Line 1455 of yacc.c */ #line 1412 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EMS; ;} break; case 248: + +/* Line 1455 of yacc.c */ #line 1413 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSParserValue::Q_EMS; ;} break; case 249: + +/* Line 1455 of yacc.c */ #line 1414 "../css/CSSGrammar.y" { (yyval.value).id = 0; (yyval.value).fValue = (yyvsp[(1) - (2)].number); (yyval.value).unit = CSSPrimitiveValue::CSS_EXS; ;} break; case 250: + +/* Line 1455 of yacc.c */ #line 1415 "../css/CSSGrammar.y" { (yyval.value).id = 0; @@ -3802,6 +4141,8 @@ yyreduce: break; case 251: + +/* Line 1455 of yacc.c */ #line 1426 "../css/CSSGrammar.y" { (yyval.value).id = 0; @@ -3811,6 +4152,8 @@ yyreduce: break; case 252: + +/* Line 1455 of yacc.c */ #line 1434 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3824,6 +4167,8 @@ yyreduce: break; case 253: + +/* Line 1455 of yacc.c */ #line 1443 "../css/CSSGrammar.y" { CSSParser* p = static_cast<CSSParser*>(parser); @@ -3837,16 +4182,22 @@ yyreduce: break; case 254: + +/* Line 1455 of yacc.c */ #line 1459 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 255: + +/* Line 1455 of yacc.c */ #line 1460 "../css/CSSGrammar.y" { (yyval.string) = (yyvsp[(1) - (2)].string); ;} break; case 256: + +/* Line 1455 of yacc.c */ #line 1467 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3854,6 +4205,8 @@ yyreduce: break; case 257: + +/* Line 1455 of yacc.c */ #line 1470 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3861,6 +4214,8 @@ yyreduce: break; case 258: + +/* Line 1455 of yacc.c */ #line 1476 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3868,6 +4223,8 @@ yyreduce: break; case 259: + +/* Line 1455 of yacc.c */ #line 1479 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3875,6 +4232,8 @@ yyreduce: break; case 262: + +/* Line 1455 of yacc.c */ #line 1490 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3882,6 +4241,8 @@ yyreduce: break; case 263: + +/* Line 1455 of yacc.c */ #line 1496 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3889,6 +4250,8 @@ yyreduce: break; case 264: + +/* Line 1455 of yacc.c */ #line 1502 "../css/CSSGrammar.y" { (yyval.rule) = 0; @@ -3896,8 +4259,9 @@ yyreduce: break; -/* Line 1267 of yacc.c. */ -#line 3901 "WebCore/tmp/../generated/CSSGrammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 4265 "WebCore/tmp/../generated/CSSGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3908,7 +4272,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -3973,7 +4336,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -3990,7 +4353,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -4047,9 +4410,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -4074,7 +4434,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4085,7 +4445,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -4111,6 +4471,8 @@ yyreturn: } + +/* Line 1675 of yacc.c */ #line 1529 "../css/CSSGrammar.y" diff --git a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h index e718f52..ad6b20a 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSGrammar.h @@ -1,26 +1,25 @@ #ifndef CSSGRAMMAR_H #define CSSGRAMMAR_H -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -31,10 +30,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -107,79 +107,16 @@ VARCALL = 320 }; #endif -/* Tokens. */ -#define TOKEN_EOF 0 -#define LOWEST_PREC 258 -#define UNIMPORTANT_TOK 259 -#define WHITESPACE 260 -#define SGML_CD 261 -#define INCLUDES 262 -#define DASHMATCH 263 -#define BEGINSWITH 264 -#define ENDSWITH 265 -#define CONTAINS 266 -#define STRING 267 -#define IDENT 268 -#define NTH 269 -#define HEX 270 -#define IDSEL 271 -#define IMPORT_SYM 272 -#define PAGE_SYM 273 -#define MEDIA_SYM 274 -#define FONT_FACE_SYM 275 -#define CHARSET_SYM 276 -#define NAMESPACE_SYM 277 -#define WEBKIT_RULE_SYM 278 -#define WEBKIT_DECLS_SYM 279 -#define WEBKIT_KEYFRAME_RULE_SYM 280 -#define WEBKIT_KEYFRAMES_SYM 281 -#define WEBKIT_VALUE_SYM 282 -#define WEBKIT_MEDIAQUERY_SYM 283 -#define WEBKIT_SELECTOR_SYM 284 -#define WEBKIT_VARIABLES_SYM 285 -#define WEBKIT_DEFINE_SYM 286 -#define VARIABLES_FOR 287 -#define WEBKIT_VARIABLES_DECLS_SYM 288 -#define ATKEYWORD 289 -#define IMPORTANT_SYM 290 -#define MEDIA_ONLY 291 -#define MEDIA_NOT 292 -#define MEDIA_AND 293 -#define REMS 294 -#define QEMS 295 -#define EMS 296 -#define EXS 297 -#define PXS 298 -#define CMS 299 -#define MMS 300 -#define INS 301 -#define PTS 302 -#define PCS 303 -#define DEGS 304 -#define RADS 305 -#define GRADS 306 -#define TURNS 307 -#define MSECS 308 -#define SECS 309 -#define HERZ 310 -#define KHERZ 311 -#define DIMEN 312 -#define PERCENTAGE 313 -#define FLOATTOKEN 314 -#define INTEGER 315 -#define URI 316 -#define FUNCTION 317 -#define NOTFUNCTION 318 -#define UNICODERANGE 319 -#define VARCALL 320 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 62 "../css/CSSGrammar.y" { + +/* Line 1676 of yacc.c */ +#line 62 "../css/CSSGrammar.y" + bool boolean; char character; int integer; @@ -201,15 +138,18 @@ typedef union YYSTYPE WebKitCSSKeyframeRule* keyframeRule; WebKitCSSKeyframesRule* keyframesRule; float val; -} -/* Line 1489 of yacc.c. */ -#line 205 "WebCore/tmp/../generated/CSSGrammar.tab.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 144 "WebCore/tmp/../generated/CSSGrammar.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + #endif diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp index ee402fc..95fc52d 100644 --- a/src/3rdparty/webkit/WebCore/generated/Grammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/Grammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,159 +54,28 @@ /* Pure parsers. */ #define YYPURE 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ -#define yyparse jscyyparse -#define yylex jscyylex -#define yyerror jscyyerror -#define yylval jscyylval -#define yychar jscyychar -#define yydebug jscyydebug -#define yynerrs jscyynerrs -#define yylloc jscyylloc - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - NULLTOKEN = 258, - TRUETOKEN = 259, - FALSETOKEN = 260, - BREAK = 261, - CASE = 262, - DEFAULT = 263, - FOR = 264, - NEW = 265, - VAR = 266, - CONSTTOKEN = 267, - CONTINUE = 268, - FUNCTION = 269, - RETURN = 270, - VOIDTOKEN = 271, - DELETETOKEN = 272, - IF = 273, - THISTOKEN = 274, - DO = 275, - WHILE = 276, - INTOKEN = 277, - INSTANCEOF = 278, - TYPEOF = 279, - SWITCH = 280, - WITH = 281, - RESERVED = 282, - THROW = 283, - TRY = 284, - CATCH = 285, - FINALLY = 286, - DEBUGGER = 287, - IF_WITHOUT_ELSE = 288, - ELSE = 289, - EQEQ = 290, - NE = 291, - STREQ = 292, - STRNEQ = 293, - LE = 294, - GE = 295, - OR = 296, - AND = 297, - PLUSPLUS = 298, - MINUSMINUS = 299, - LSHIFT = 300, - RSHIFT = 301, - URSHIFT = 302, - PLUSEQUAL = 303, - MINUSEQUAL = 304, - MULTEQUAL = 305, - DIVEQUAL = 306, - LSHIFTEQUAL = 307, - RSHIFTEQUAL = 308, - URSHIFTEQUAL = 309, - ANDEQUAL = 310, - MODEQUAL = 311, - XOREQUAL = 312, - OREQUAL = 313, - OPENBRACE = 314, - CLOSEBRACE = 315, - NUMBER = 316, - IDENT = 317, - STRING = 318, - AUTOPLUSPLUS = 319, - AUTOMINUSMINUS = 320 - }; -#endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - - - +#define yyparse jscyyparse +#define yylex jscyylex +#define yyerror jscyyerror +#define yylval jscyylval +#define yychar jscyychar +#define yydebug jscyydebug +#define yynerrs jscyynerrs +#define yylloc jscyylloc /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 3 "../../JavaScriptCore/parser/Grammar.y" @@ -352,6 +220,9 @@ static inline void appendToVarDeclarationList(JSGlobalData* globalData, ParserAr +/* Line 189 of yacc.c */ +#line 225 "WebCore/tmp/../generated/Grammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -370,10 +241,88 @@ static inline void appendToVarDeclarationList(JSGlobalData* globalData, ParserAr # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NULLTOKEN = 258, + TRUETOKEN = 259, + FALSETOKEN = 260, + BREAK = 261, + CASE = 262, + DEFAULT = 263, + FOR = 264, + NEW = 265, + VAR = 266, + CONSTTOKEN = 267, + CONTINUE = 268, + FUNCTION = 269, + RETURN = 270, + VOIDTOKEN = 271, + DELETETOKEN = 272, + IF = 273, + THISTOKEN = 274, + DO = 275, + WHILE = 276, + INTOKEN = 277, + INSTANCEOF = 278, + TYPEOF = 279, + SWITCH = 280, + WITH = 281, + RESERVED = 282, + THROW = 283, + TRY = 284, + CATCH = 285, + FINALLY = 286, + DEBUGGER = 287, + IF_WITHOUT_ELSE = 288, + ELSE = 289, + EQEQ = 290, + NE = 291, + STREQ = 292, + STRNEQ = 293, + LE = 294, + GE = 295, + OR = 296, + AND = 297, + PLUSPLUS = 298, + MINUSMINUS = 299, + LSHIFT = 300, + RSHIFT = 301, + URSHIFT = 302, + PLUSEQUAL = 303, + MINUSEQUAL = 304, + MULTEQUAL = 305, + DIVEQUAL = 306, + LSHIFTEQUAL = 307, + RSHIFTEQUAL = 308, + URSHIFTEQUAL = 309, + ANDEQUAL = 310, + MODEQUAL = 311, + XOREQUAL = 312, + OREQUAL = 313, + OPENBRACE = 314, + CLOSEBRACE = 315, + NUMBER = 316, + IDENT = 317, + STRING = 318, + AUTOPLUSPLUS = 319, + AUTOMINUSMINUS = 320 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 146 "../../JavaScriptCore/parser/Grammar.y" { + +/* Line 214 of yacc.c */ +#line 146 "../../JavaScriptCore/parser/Grammar.y" + int intValue; double doubleValue; const Identifier* ident; @@ -403,13 +352,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 187 of yacc.c. */ -#line 409 "WebCore/tmp/../generated/Grammar.tab.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 360 "WebCore/tmp/../generated/Grammar.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED @@ -427,6 +378,8 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ + +/* Line 264 of yacc.c */ #line 178 "../../JavaScriptCore/parser/Grammar.y" @@ -442,8 +395,8 @@ static inline void setExceptionLocation(ThrowableExpressionData* node, unsigned -/* Line 216 of yacc.c. */ -#line 447 "WebCore/tmp/../generated/Grammar.tab.c" +/* Line 264 of yacc.c */ +#line 400 "WebCore/tmp/../generated/Grammar.tab.c" #ifdef short # undef short @@ -518,14 +471,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -607,9 +560,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - YYLTYPE yyls; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ @@ -644,12 +597,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -2363,17 +2316,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -2408,11 +2364,11 @@ yy_reduce_print (yyvsp, yylsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -2694,10 +2650,8 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -2716,10 +2670,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -2743,88 +2696,97 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; -/* Location data for the look-ahead symbol. */ +/* Location data for the lookahead symbol. */ YYLTYPE yylloc; - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif + /* Number of syntax errors so far. */ + int yynerrs; - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2]; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; - YYSIZE_T yystacksize = YYINITDEPTH; + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[2]; + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; yylsp = yyls; + #if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; + yylloc.first_column = yylloc.last_column = 1; #endif goto yysetstate; @@ -2863,6 +2825,7 @@ YYLTYPE yylloc; &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); + yyls = yyls1; yyss = yyss1; yyvs = yyvs1; @@ -2884,9 +2847,9 @@ YYLTYPE yylloc; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - YYSTACK_RELOCATE (yyls); + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -2907,6 +2870,9 @@ YYLTYPE yylloc; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -2915,16 +2881,16 @@ YYLTYPE yylloc; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -2956,20 +2922,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -3010,31 +2972,43 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 293 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NullNode(GLOBAL_DATA), 0, 1); ;} break; case 3: + +/* Line 1455 of yacc.c */ #line 294 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, true), 0, 1); ;} break; case 4: + +/* Line 1455 of yacc.c */ #line 295 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BooleanNode(GLOBAL_DATA, false), 0, 1); ;} break; case 5: + +/* Line 1455 of yacc.c */ #line 296 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNumberNode(GLOBAL_DATA, (yyvsp[(1) - (1)].doubleValue)), 0, 1); ;} break; case 6: + +/* Line 1455 of yacc.c */ #line 297 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StringNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)), 0, 1); ;} break; case 7: + +/* Line 1455 of yacc.c */ #line 298 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *GLOBAL_DATA->lexer; @@ -3050,6 +3024,8 @@ yyreduce: break; case 8: + +/* Line 1455 of yacc.c */ #line 309 "../../JavaScriptCore/parser/Grammar.y" { Lexer& l = *GLOBAL_DATA->lexer; @@ -3065,26 +3041,36 @@ yyreduce: break; case 9: + +/* Line 1455 of yacc.c */ #line 323 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 10: + +/* Line 1455 of yacc.c */ #line 324 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 11: + +/* Line 1455 of yacc.c */ #line 325 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(new (GLOBAL_DATA) PropertyNode(GLOBAL_DATA, (yyvsp[(1) - (3)].doubleValue), (yyvsp[(3) - (3)].expressionNode).m_node, PropertyNode::Constant), (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 12: + +/* Line 1455 of yacc.c */ #line 326 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (7)].ident), *(yyvsp[(2) - (7)].ident), 0, (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); if (!(yyval.propertyNode).m_node) YYABORT; ;} break; case 13: + +/* Line 1455 of yacc.c */ #line 328 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyNode) = createNodeInfo<PropertyNode*>(makeGetterOrSetterPropertyNode(GLOBAL_DATA, *(yyvsp[(1) - (8)].ident), *(yyvsp[(2) - (8)].ident), (yyvsp[(4) - (8)].parameterList).m_node.head, (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line)), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -3097,6 +3083,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 339 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyList).m_node.head = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].propertyNode).m_node); (yyval.propertyList).m_node.tail = (yyval.propertyList).m_node.head; @@ -3105,6 +3093,8 @@ yyreduce: break; case 15: + +/* Line 1455 of yacc.c */ #line 343 "../../JavaScriptCore/parser/Grammar.y" { (yyval.propertyList).m_node.head = (yyvsp[(1) - (3)].propertyList).m_node.head; (yyval.propertyList).m_node.tail = new (GLOBAL_DATA) PropertyListNode(GLOBAL_DATA, (yyvsp[(3) - (3)].propertyNode).m_node, (yyvsp[(1) - (3)].propertyList).m_node.tail); @@ -3113,51 +3103,71 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 351 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA), 0, 0); ;} break; case 18: + +/* Line 1455 of yacc.c */ #line 352 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (3)].propertyList).m_node.head), (yyvsp[(2) - (3)].propertyList).m_features, (yyvsp[(2) - (3)].propertyList).m_numConstants); ;} break; case 19: + +/* Line 1455 of yacc.c */ #line 354 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ObjectLiteralNode(GLOBAL_DATA, (yyvsp[(2) - (4)].propertyList).m_node.head), (yyvsp[(2) - (4)].propertyList).m_features, (yyvsp[(2) - (4)].propertyList).m_numConstants); ;} break; case 20: + +/* Line 1455 of yacc.c */ #line 358 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ThisNode(GLOBAL_DATA), ThisFeature, 0); ;} break; case 23: + +/* Line 1455 of yacc.c */ #line 361 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), (yylsp[(1) - (1)]).first_column), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 24: + +/* Line 1455 of yacc.c */ #line 362 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (3)].expressionNode); ;} break; case 25: + +/* Line 1455 of yacc.c */ #line 366 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].intValue)), 0, (yyvsp[(2) - (3)].intValue) ? 1 : 0); ;} break; case 26: + +/* Line 1455 of yacc.c */ #line 367 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(2) - (3)].elementList).m_node.head), (yyvsp[(2) - (3)].elementList).m_features, (yyvsp[(2) - (3)].elementList).m_numConstants); ;} break; case 27: + +/* Line 1455 of yacc.c */ #line 368 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ArrayNode(GLOBAL_DATA, (yyvsp[(4) - (5)].intValue), (yyvsp[(2) - (5)].elementList).m_node.head), (yyvsp[(2) - (5)].elementList).m_features, (yyvsp[(4) - (5)].intValue) ? (yyvsp[(2) - (5)].elementList).m_numConstants + 1 : (yyvsp[(2) - (5)].elementList).m_numConstants); ;} break; case 28: + +/* Line 1455 of yacc.c */ #line 372 "../../JavaScriptCore/parser/Grammar.y" { (yyval.elementList).m_node.head = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].intValue), (yyvsp[(2) - (2)].expressionNode).m_node); (yyval.elementList).m_node.tail = (yyval.elementList).m_node.head; @@ -3166,6 +3176,8 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 377 "../../JavaScriptCore/parser/Grammar.y" { (yyval.elementList).m_node.head = (yyvsp[(1) - (4)].elementList).m_node.head; (yyval.elementList).m_node.tail = new (GLOBAL_DATA) ElementNode(GLOBAL_DATA, (yyvsp[(1) - (4)].elementList).m_node.tail, (yyvsp[(3) - (4)].intValue), (yyvsp[(4) - (4)].expressionNode).m_node); @@ -3174,26 +3186,36 @@ yyreduce: break; case 30: + +/* Line 1455 of yacc.c */ #line 384 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = 0; ;} break; case 32: + +/* Line 1455 of yacc.c */ #line 389 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = 1; ;} break; case 33: + +/* Line 1455 of yacc.c */ #line 390 "../../JavaScriptCore/parser/Grammar.y" { (yyval.intValue) = (yyvsp[(1) - (2)].intValue) + 1; ;} break; case 35: + +/* Line 1455 of yacc.c */ #line 395 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>((yyvsp[(1) - (1)].funcExprNode).m_node, (yyvsp[(1) - (1)].funcExprNode).m_features, (yyvsp[(1) - (1)].funcExprNode).m_numConstants); ;} break; case 36: + +/* Line 1455 of yacc.c */ #line 396 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3202,6 +3224,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 400 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3210,6 +3234,8 @@ yyreduce: break; case 38: + +/* Line 1455 of yacc.c */ #line 404 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3218,6 +3244,8 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 412 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3226,6 +3254,8 @@ yyreduce: break; case 41: + +/* Line 1455 of yacc.c */ #line 416 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3234,6 +3264,8 @@ yyreduce: break; case 42: + +/* Line 1455 of yacc.c */ #line 420 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].argumentsNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3242,6 +3274,8 @@ yyreduce: break; case 44: + +/* Line 1455 of yacc.c */ #line 428 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3250,6 +3284,8 @@ yyreduce: break; case 46: + +/* Line 1455 of yacc.c */ #line 436 "../../JavaScriptCore/parser/Grammar.y" { NewExprNode* node = new (GLOBAL_DATA) NewExprNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); @@ -3258,16 +3294,22 @@ yyreduce: break; case 47: + +/* Line 1455 of yacc.c */ #line 443 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 48: + +/* Line 1455 of yacc.c */ #line 444 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 49: + +/* Line 1455 of yacc.c */ #line 445 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3276,6 +3318,8 @@ yyreduce: break; case 50: + +/* Line 1455 of yacc.c */ #line 449 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3283,16 +3327,22 @@ yyreduce: break; case 51: + +/* Line 1455 of yacc.c */ #line 455 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 52: + +/* Line 1455 of yacc.c */ #line 456 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = makeFunctionCallNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode), (yyvsp[(2) - (2)].argumentsNode), (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column); ;} break; case 53: + +/* Line 1455 of yacc.c */ #line 457 "../../JavaScriptCore/parser/Grammar.y" { BracketAccessorNode* node = new (GLOBAL_DATA) BracketAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_node, (yyvsp[(3) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (4)]).first_column, (yylsp[(1) - (4)]).last_column, (yylsp[(4) - (4)]).last_column); @@ -3301,6 +3351,8 @@ yyreduce: break; case 54: + +/* Line 1455 of yacc.c */ #line 461 "../../JavaScriptCore/parser/Grammar.y" { DotAccessorNode* node = new (GLOBAL_DATA) DotAccessorNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, *(yyvsp[(3) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(1) - (3)]).last_column, (yylsp[(3) - (3)]).last_column); @@ -3309,16 +3361,22 @@ yyreduce: break; case 55: + +/* Line 1455 of yacc.c */ #line 468 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA), 0, 0); ;} break; case 56: + +/* Line 1455 of yacc.c */ #line 469 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentsNode) = createNodeInfo<ArgumentsNode*>(new (GLOBAL_DATA) ArgumentsNode(GLOBAL_DATA, (yyvsp[(2) - (3)].argumentList).m_node.head), (yyvsp[(2) - (3)].argumentList).m_features, (yyvsp[(2) - (3)].argumentList).m_numConstants); ;} break; case 57: + +/* Line 1455 of yacc.c */ #line 473 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentList).m_node.head = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].expressionNode).m_node); (yyval.argumentList).m_node.tail = (yyval.argumentList).m_node.head; @@ -3327,6 +3385,8 @@ yyreduce: break; case 58: + +/* Line 1455 of yacc.c */ #line 477 "../../JavaScriptCore/parser/Grammar.y" { (yyval.argumentList).m_node.head = (yyvsp[(1) - (3)].argumentList).m_node.head; (yyval.argumentList).m_node.tail = new (GLOBAL_DATA) ArgumentListNode(GLOBAL_DATA, (yyvsp[(1) - (3)].argumentList).m_node.tail, (yyvsp[(3) - (3)].expressionNode).m_node); @@ -3335,181 +3395,253 @@ yyreduce: break; case 64: + +/* Line 1455 of yacc.c */ #line 495 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 65: + +/* Line 1455 of yacc.c */ #line 496 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 67: + +/* Line 1455 of yacc.c */ #line 501 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 68: + +/* Line 1455 of yacc.c */ #line 502 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePostfixNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(1) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (2)].expressionNode).m_numConstants); ;} break; case 69: + +/* Line 1455 of yacc.c */ #line 506 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDeleteNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).last_column, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 70: + +/* Line 1455 of yacc.c */ #line 507 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) VoidNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants + 1); ;} break; case 71: + +/* Line 1455 of yacc.c */ #line 508 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeTypeOfNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 72: + +/* Line 1455 of yacc.c */ #line 509 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 73: + +/* Line 1455 of yacc.c */ #line 510 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpPlusPlus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 74: + +/* Line 1455 of yacc.c */ #line 511 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 75: + +/* Line 1455 of yacc.c */ #line 512 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makePrefixNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node, OpMinusMinus, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column), (yyvsp[(2) - (2)].expressionNode).m_features | AssignFeature, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 76: + +/* Line 1455 of yacc.c */ #line 513 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnaryPlusNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 77: + +/* Line 1455 of yacc.c */ #line 514 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeNegateNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 78: + +/* Line 1455 of yacc.c */ #line 515 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeBitwiseNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 79: + +/* Line 1455 of yacc.c */ #line 516 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalNotNode(GLOBAL_DATA, (yyvsp[(2) - (2)].expressionNode).m_node), (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 85: + +/* Line 1455 of yacc.c */ #line 530 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 86: + +/* Line 1455 of yacc.c */ #line 531 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 87: + +/* Line 1455 of yacc.c */ #line 532 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 89: + +/* Line 1455 of yacc.c */ #line 538 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeMultNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 90: + +/* Line 1455 of yacc.c */ #line 540 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeDivNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 91: + +/* Line 1455 of yacc.c */ #line 542 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ModNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 93: + +/* Line 1455 of yacc.c */ #line 547 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 94: + +/* Line 1455 of yacc.c */ #line 548 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 96: + +/* Line 1455 of yacc.c */ #line 554 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAddNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 97: + +/* Line 1455 of yacc.c */ #line 556 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeSubNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 99: + +/* Line 1455 of yacc.c */ #line 561 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 100: + +/* Line 1455 of yacc.c */ #line 562 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 101: + +/* Line 1455 of yacc.c */ #line 563 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 103: + +/* Line 1455 of yacc.c */ #line 568 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeLeftShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 104: + +/* Line 1455 of yacc.c */ #line 569 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 105: + +/* Line 1455 of yacc.c */ #line 570 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) UnsignedRightShiftNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 107: + +/* Line 1455 of yacc.c */ #line 575 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 108: + +/* Line 1455 of yacc.c */ #line 576 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 109: + +/* Line 1455 of yacc.c */ #line 577 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 110: + +/* Line 1455 of yacc.c */ #line 578 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 111: + +/* Line 1455 of yacc.c */ #line 579 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3517,6 +3649,8 @@ yyreduce: break; case 112: + +/* Line 1455 of yacc.c */ #line 582 "../../JavaScriptCore/parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3524,26 +3658,36 @@ yyreduce: break; case 114: + +/* Line 1455 of yacc.c */ #line 589 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 115: + +/* Line 1455 of yacc.c */ #line 590 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 116: + +/* Line 1455 of yacc.c */ #line 591 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 117: + +/* Line 1455 of yacc.c */ #line 592 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 118: + +/* Line 1455 of yacc.c */ #line 594 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3551,26 +3695,36 @@ yyreduce: break; case 120: + +/* Line 1455 of yacc.c */ #line 601 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 121: + +/* Line 1455 of yacc.c */ #line 602 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 122: + +/* Line 1455 of yacc.c */ #line 603 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LessEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 123: + +/* Line 1455 of yacc.c */ #line 604 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) GreaterEqNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 124: + +/* Line 1455 of yacc.c */ #line 606 "../../JavaScriptCore/parser/Grammar.y" { InstanceOfNode* node = new (GLOBAL_DATA) InstanceOfNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3578,6 +3732,8 @@ yyreduce: break; case 125: + +/* Line 1455 of yacc.c */ #line 610 "../../JavaScriptCore/parser/Grammar.y" { InNode* node = new (GLOBAL_DATA) InNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(3) - (3)]).first_column, (yylsp[(3) - (3)]).last_column); @@ -3585,156 +3741,218 @@ yyreduce: break; case 127: + +/* Line 1455 of yacc.c */ #line 617 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 128: + +/* Line 1455 of yacc.c */ #line 618 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 129: + +/* Line 1455 of yacc.c */ #line 619 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 130: + +/* Line 1455 of yacc.c */ #line 620 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 132: + +/* Line 1455 of yacc.c */ #line 626 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 133: + +/* Line 1455 of yacc.c */ #line 628 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 134: + +/* Line 1455 of yacc.c */ #line 630 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 135: + +/* Line 1455 of yacc.c */ #line 632 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 137: + +/* Line 1455 of yacc.c */ #line 638 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) EqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 138: + +/* Line 1455 of yacc.c */ #line 639 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 139: + +/* Line 1455 of yacc.c */ #line 641 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) StrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 140: + +/* Line 1455 of yacc.c */ #line 643 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) NotStrictEqualNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 142: + +/* Line 1455 of yacc.c */ #line 648 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 144: + +/* Line 1455 of yacc.c */ #line 654 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 146: + +/* Line 1455 of yacc.c */ #line 659 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitAndNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 148: + +/* Line 1455 of yacc.c */ #line 664 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 150: + +/* Line 1455 of yacc.c */ #line 670 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 152: + +/* Line 1455 of yacc.c */ #line 676 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitXOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 154: + +/* Line 1455 of yacc.c */ #line 681 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 156: + +/* Line 1455 of yacc.c */ #line 687 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 158: + +/* Line 1455 of yacc.c */ #line 693 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) BitOrNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 160: + +/* Line 1455 of yacc.c */ #line 698 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 162: + +/* Line 1455 of yacc.c */ #line 704 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 164: + +/* Line 1455 of yacc.c */ #line 710 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalAnd), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 166: + +/* Line 1455 of yacc.c */ #line 715 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 168: + +/* Line 1455 of yacc.c */ #line 721 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 170: + +/* Line 1455 of yacc.c */ #line 726 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) LogicalOpNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node, OpLogicalOr), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 172: + +/* Line 1455 of yacc.c */ #line 732 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 174: + +/* Line 1455 of yacc.c */ #line 738 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 176: + +/* Line 1455 of yacc.c */ #line 744 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(new (GLOBAL_DATA) ConditionalNode(GLOBAL_DATA, (yyvsp[(1) - (5)].expressionNode).m_node, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].expressionNode).m_node), (yyvsp[(1) - (5)].expressionNode).m_features | (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].expressionNode).m_features, (yyvsp[(1) - (5)].expressionNode).m_numConstants + (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].expressionNode).m_numConstants); ;} break; case 178: + +/* Line 1455 of yacc.c */ #line 750 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3742,6 +3960,8 @@ yyreduce: break; case 180: + +/* Line 1455 of yacc.c */ #line 758 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3749,6 +3969,8 @@ yyreduce: break; case 182: + +/* Line 1455 of yacc.c */ #line 766 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(makeAssignNode(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(2) - (3)].op), (yyvsp[(3) - (3)].expressionNode).m_node, (yyvsp[(1) - (3)].expressionNode).m_features & AssignFeature, (yyvsp[(3) - (3)].expressionNode).m_features & AssignFeature, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).first_column + 1, (yylsp[(3) - (3)]).last_column), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features | AssignFeature, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); @@ -3756,99 +3978,137 @@ yyreduce: break; case 183: + +/* Line 1455 of yacc.c */ #line 772 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpEqual; ;} break; case 184: + +/* Line 1455 of yacc.c */ #line 773 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpPlusEq; ;} break; case 185: + +/* Line 1455 of yacc.c */ #line 774 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpMinusEq; ;} break; case 186: + +/* Line 1455 of yacc.c */ #line 775 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpMultEq; ;} break; case 187: + +/* Line 1455 of yacc.c */ #line 776 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpDivEq; ;} break; case 188: + +/* Line 1455 of yacc.c */ #line 777 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpLShift; ;} break; case 189: + +/* Line 1455 of yacc.c */ #line 778 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpRShift; ;} break; case 190: + +/* Line 1455 of yacc.c */ #line 779 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpURShift; ;} break; case 191: + +/* Line 1455 of yacc.c */ #line 780 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpAndEq; ;} break; case 192: + +/* Line 1455 of yacc.c */ #line 781 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpXOrEq; ;} break; case 193: + +/* Line 1455 of yacc.c */ #line 782 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpOrEq; ;} break; case 194: + +/* Line 1455 of yacc.c */ #line 783 "../../JavaScriptCore/parser/Grammar.y" { (yyval.op) = OpModEq; ;} break; case 196: + +/* Line 1455 of yacc.c */ #line 788 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 198: + +/* Line 1455 of yacc.c */ #line 793 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 200: + +/* Line 1455 of yacc.c */ #line 798 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(combineCommaNodes(GLOBAL_DATA, (yyvsp[(1) - (3)].expressionNode).m_node, (yyvsp[(3) - (3)].expressionNode).m_node), (yyvsp[(1) - (3)].expressionNode).m_features | (yyvsp[(3) - (3)].expressionNode).m_features, (yyvsp[(1) - (3)].expressionNode).m_numConstants + (yyvsp[(3) - (3)].expressionNode).m_numConstants); ;} break; case 218: + +/* Line 1455 of yacc.c */ #line 822 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, 0), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 219: + +/* Line 1455 of yacc.c */ #line 824 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) BlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].sourceElements).m_node), (yyvsp[(2) - (3)].sourceElements).m_varDeclarations, (yyvsp[(2) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (3)].sourceElements).m_features, (yyvsp[(2) - (3)].sourceElements).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 220: + +/* Line 1455 of yacc.c */ #line 829 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 221: + +/* Line 1455 of yacc.c */ #line 831 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(makeVarStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].varDeclList).m_node), (yyvsp[(2) - (3)].varDeclList).m_varDeclarations, (yyvsp[(2) - (3)].varDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].varDeclList).m_features, (yyvsp[(2) - (3)].varDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); @@ -3856,6 +4116,8 @@ yyreduce: break; case 222: + +/* Line 1455 of yacc.c */ #line 837 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3867,6 +4129,8 @@ yyreduce: break; case 223: + +/* Line 1455 of yacc.c */ #line 844 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3880,6 +4144,8 @@ yyreduce: break; case 224: + +/* Line 1455 of yacc.c */ #line 854 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3891,6 +4157,8 @@ yyreduce: break; case 225: + +/* Line 1455 of yacc.c */ #line 862 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3904,6 +4172,8 @@ yyreduce: break; case 226: + +/* Line 1455 of yacc.c */ #line 874 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = 0; (yyval.varDeclList).m_varDeclarations = new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::VarStack>; @@ -3915,6 +4185,8 @@ yyreduce: break; case 227: + +/* Line 1455 of yacc.c */ #line 881 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node, (yyvsp[(2) - (2)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(2) - (2)]).first_column + 1, (yylsp[(2) - (2)]).last_column); @@ -3928,6 +4200,8 @@ yyreduce: break; case 228: + +/* Line 1455 of yacc.c */ #line 891 "../../JavaScriptCore/parser/Grammar.y" { (yyval.varDeclList).m_node = (yyvsp[(1) - (3)].varDeclList).m_node; (yyval.varDeclList).m_varDeclarations = (yyvsp[(1) - (3)].varDeclList).m_varDeclarations; @@ -3939,6 +4213,8 @@ yyreduce: break; case 229: + +/* Line 1455 of yacc.c */ #line 899 "../../JavaScriptCore/parser/Grammar.y" { AssignResolveNode* node = new (GLOBAL_DATA) AssignResolveNode(GLOBAL_DATA, *(yyvsp[(3) - (4)].ident), (yyvsp[(4) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].expressionNode).m_features & AssignFeature); setExceptionLocation(node, (yylsp[(3) - (4)]).first_column, (yylsp[(4) - (4)]).first_column + 1, (yylsp[(4) - (4)]).last_column); @@ -3952,18 +4228,24 @@ yyreduce: break; case 230: + +/* Line 1455 of yacc.c */ #line 911 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(3) - (3)])); ;} break; case 231: + +/* Line 1455 of yacc.c */ #line 914 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ConstStatementNode(GLOBAL_DATA, (yyvsp[(2) - (3)].constDeclList).m_node.head), (yyvsp[(2) - (3)].constDeclList).m_varDeclarations, (yyvsp[(2) - (3)].constDeclList).m_funcDeclarations, (yyvsp[(2) - (3)].constDeclList).m_features, (yyvsp[(2) - (3)].constDeclList).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (3)]), (yylsp[(2) - (3)])); AUTO_SEMICOLON; ;} break; case 232: + +/* Line 1455 of yacc.c */ #line 919 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (1)].constDeclNode).m_node; (yyval.constDeclList).m_node.tail = (yyval.constDeclList).m_node.head; @@ -3976,6 +4258,8 @@ yyreduce: break; case 233: + +/* Line 1455 of yacc.c */ #line 928 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclList).m_node.head = (yyvsp[(1) - (3)].constDeclList).m_node.head; (yyvsp[(1) - (3)].constDeclList).m_node.tail->m_next = (yyvsp[(3) - (3)].constDeclNode).m_node; @@ -3988,49 +4272,67 @@ yyreduce: break; case 234: + +/* Line 1455 of yacc.c */ #line 939 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident), 0), (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0, 0); ;} break; case 235: + +/* Line 1455 of yacc.c */ #line 940 "../../JavaScriptCore/parser/Grammar.y" { (yyval.constDeclNode) = createNodeInfo<ConstDeclNode*>(new (GLOBAL_DATA) ConstDeclNode(GLOBAL_DATA, *(yyvsp[(1) - (2)].ident), (yyvsp[(2) - (2)].expressionNode).m_node), ((*(yyvsp[(1) - (2)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(2) - (2)].expressionNode).m_features, (yyvsp[(2) - (2)].expressionNode).m_numConstants); ;} break; case 236: + +/* Line 1455 of yacc.c */ #line 944 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 237: + +/* Line 1455 of yacc.c */ #line 948 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = (yyvsp[(2) - (2)].expressionNode); ;} break; case 238: + +/* Line 1455 of yacc.c */ #line 952 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) EmptyStatementNode(GLOBAL_DATA), 0, 0, 0, 0); ;} break; case 239: + +/* Line 1455 of yacc.c */ #line 956 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 240: + +/* Line 1455 of yacc.c */ #line 958 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ExprStatementNode(GLOBAL_DATA, (yyvsp[(1) - (2)].expressionNode).m_node), 0, 0, (yyvsp[(1) - (2)].expressionNode).m_features, (yyvsp[(1) - (2)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 241: + +/* Line 1455 of yacc.c */ #line 964 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 242: + +/* Line 1455 of yacc.c */ #line 967 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) IfElseNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].statementNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node), mergeDeclarationLists((yyvsp[(5) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4041,24 +4343,32 @@ yyreduce: break; case 243: + +/* Line 1455 of yacc.c */ #line 976 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 244: + +/* Line 1455 of yacc.c */ #line 978 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DoWhileNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node), (yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(2) - (7)].statementNode).m_funcDeclarations, (yyvsp[(2) - (7)].statementNode).m_features | (yyvsp[(5) - (7)].expressionNode).m_features, (yyvsp[(2) - (7)].statementNode).m_numConstants + (yyvsp[(5) - (7)].expressionNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (7)]), (yylsp[(3) - (7)])); ;} break; case 245: + +/* Line 1455 of yacc.c */ #line 980 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WhileNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); ;} break; case 246: + +/* Line 1455 of yacc.c */ #line 983 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(3) - (9)].expressionNode).m_node, (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, false), (yyvsp[(9) - (9)].statementNode).m_varDeclarations, (yyvsp[(9) - (9)].statementNode).m_funcDeclarations, (yyvsp[(3) - (9)].expressionNode).m_features | (yyvsp[(5) - (9)].expressionNode).m_features | (yyvsp[(7) - (9)].expressionNode).m_features | (yyvsp[(9) - (9)].statementNode).m_features, @@ -4068,6 +4378,8 @@ yyreduce: break; case 247: + +/* Line 1455 of yacc.c */ #line 989 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) ForNode(GLOBAL_DATA, (yyvsp[(4) - (10)].varDeclList).m_node, (yyvsp[(6) - (10)].expressionNode).m_node, (yyvsp[(8) - (10)].expressionNode).m_node, (yyvsp[(10) - (10)].statementNode).m_node, true), mergeDeclarationLists((yyvsp[(4) - (10)].varDeclList).m_varDeclarations, (yyvsp[(10) - (10)].statementNode).m_varDeclarations), @@ -4078,6 +4390,8 @@ yyreduce: break; case 248: + +/* Line 1455 of yacc.c */ #line 996 "../../JavaScriptCore/parser/Grammar.y" { ForInNode* node = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, (yyvsp[(3) - (7)].expressionNode).m_node, (yyvsp[(5) - (7)].expressionNode).m_node, (yyvsp[(7) - (7)].statementNode).m_node); @@ -4090,6 +4404,8 @@ yyreduce: break; case 249: + +/* Line 1455 of yacc.c */ #line 1005 "../../JavaScriptCore/parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (8)].ident), 0, (yyvsp[(6) - (8)].expressionNode).m_node, (yyvsp[(8) - (8)].statementNode).m_node, (yylsp[(5) - (8)]).first_column, (yylsp[(5) - (8)]).first_column - (yylsp[(4) - (8)]).first_column, (yylsp[(6) - (8)]).last_column - (yylsp[(5) - (8)]).first_column); setExceptionLocation(forIn, (yylsp[(4) - (8)]).first_column, (yylsp[(5) - (8)]).first_column + 1, (yylsp[(6) - (8)]).last_column); @@ -4099,6 +4415,8 @@ yyreduce: break; case 250: + +/* Line 1455 of yacc.c */ #line 1011 "../../JavaScriptCore/parser/Grammar.y" { ForInNode *forIn = new (GLOBAL_DATA) ForInNode(GLOBAL_DATA, *(yyvsp[(4) - (9)].ident), (yyvsp[(5) - (9)].expressionNode).m_node, (yyvsp[(7) - (9)].expressionNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node, (yylsp[(5) - (9)]).first_column, (yylsp[(5) - (9)]).first_column - (yylsp[(4) - (9)]).first_column, (yylsp[(5) - (9)]).last_column - (yylsp[(5) - (9)]).first_column); setExceptionLocation(forIn, (yylsp[(4) - (9)]).first_column, (yylsp[(6) - (9)]).first_column + 1, (yylsp[(7) - (9)]).last_column); @@ -4110,16 +4428,22 @@ yyreduce: break; case 251: + +/* Line 1455 of yacc.c */ #line 1021 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 253: + +/* Line 1455 of yacc.c */ #line 1026 "../../JavaScriptCore/parser/Grammar.y" { (yyval.expressionNode) = createNodeInfo<ExpressionNode*>(0, 0, 0); ;} break; case 255: + +/* Line 1455 of yacc.c */ #line 1031 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4128,6 +4452,8 @@ yyreduce: break; case 256: + +/* Line 1455 of yacc.c */ #line 1035 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4136,6 +4462,8 @@ yyreduce: break; case 257: + +/* Line 1455 of yacc.c */ #line 1039 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4144,6 +4472,8 @@ yyreduce: break; case 258: + +/* Line 1455 of yacc.c */ #line 1043 "../../JavaScriptCore/parser/Grammar.y" { ContinueNode* node = new (GLOBAL_DATA) ContinueNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4152,6 +4482,8 @@ yyreduce: break; case 259: + +/* Line 1455 of yacc.c */ #line 1050 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4159,6 +4491,8 @@ yyreduce: break; case 260: + +/* Line 1455 of yacc.c */ #line 1053 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4166,6 +4500,8 @@ yyreduce: break; case 261: + +/* Line 1455 of yacc.c */ #line 1056 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4173,6 +4509,8 @@ yyreduce: break; case 262: + +/* Line 1455 of yacc.c */ #line 1059 "../../JavaScriptCore/parser/Grammar.y" { BreakNode* node = new (GLOBAL_DATA) BreakNode(GLOBAL_DATA, *(yyvsp[(2) - (3)].ident)); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4180,6 +4518,8 @@ yyreduce: break; case 263: + +/* Line 1455 of yacc.c */ #line 1065 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4187,6 +4527,8 @@ yyreduce: break; case 264: + +/* Line 1455 of yacc.c */ #line 1068 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, 0); setExceptionLocation(node, (yylsp[(1) - (2)]).first_column, (yylsp[(1) - (2)]).last_column, (yylsp[(1) - (2)]).last_column); @@ -4194,6 +4536,8 @@ yyreduce: break; case 265: + +/* Line 1455 of yacc.c */ #line 1071 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4201,6 +4545,8 @@ yyreduce: break; case 266: + +/* Line 1455 of yacc.c */ #line 1074 "../../JavaScriptCore/parser/Grammar.y" { ReturnNode* node = new (GLOBAL_DATA) ReturnNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4208,6 +4554,8 @@ yyreduce: break; case 267: + +/* Line 1455 of yacc.c */ #line 1080 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) WithNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].statementNode).m_node, (yylsp[(3) - (5)]).last_column, (yylsp[(3) - (5)]).last_column - (yylsp[(3) - (5)]).first_column), (yyvsp[(5) - (5)].statementNode).m_varDeclarations, (yyvsp[(5) - (5)].statementNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].statementNode).m_features | WithFeature, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].statementNode).m_numConstants); @@ -4215,6 +4563,8 @@ yyreduce: break; case 268: + +/* Line 1455 of yacc.c */ #line 1086 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) SwitchNode(GLOBAL_DATA, (yyvsp[(3) - (5)].expressionNode).m_node, (yyvsp[(5) - (5)].caseBlockNode).m_node), (yyvsp[(5) - (5)].caseBlockNode).m_varDeclarations, (yyvsp[(5) - (5)].caseBlockNode).m_funcDeclarations, (yyvsp[(3) - (5)].expressionNode).m_features | (yyvsp[(5) - (5)].caseBlockNode).m_features, (yyvsp[(3) - (5)].expressionNode).m_numConstants + (yyvsp[(5) - (5)].caseBlockNode).m_numConstants); @@ -4222,11 +4572,15 @@ yyreduce: break; case 269: + +/* Line 1455 of yacc.c */ #line 1092 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (3)].clauseList).m_node.head, 0, 0), (yyvsp[(2) - (3)].clauseList).m_varDeclarations, (yyvsp[(2) - (3)].clauseList).m_funcDeclarations, (yyvsp[(2) - (3)].clauseList).m_features, (yyvsp[(2) - (3)].clauseList).m_numConstants); ;} break; case 270: + +/* Line 1455 of yacc.c */ #line 1094 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseBlockNode) = createNodeDeclarationInfo<CaseBlockNode*>(new (GLOBAL_DATA) CaseBlockNode(GLOBAL_DATA, (yyvsp[(2) - (5)].clauseList).m_node.head, (yyvsp[(3) - (5)].caseClauseNode).m_node, (yyvsp[(4) - (5)].clauseList).m_node.head), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (5)].clauseList).m_varDeclarations, (yyvsp[(3) - (5)].caseClauseNode).m_varDeclarations), (yyvsp[(4) - (5)].clauseList).m_varDeclarations), @@ -4236,11 +4590,15 @@ yyreduce: break; case 271: + +/* Line 1455 of yacc.c */ #line 1102 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = 0; (yyval.clauseList).m_node.tail = 0; (yyval.clauseList).m_varDeclarations = 0; (yyval.clauseList).m_funcDeclarations = 0; (yyval.clauseList).m_features = 0; (yyval.clauseList).m_numConstants = 0; ;} break; case 273: + +/* Line 1455 of yacc.c */ #line 1107 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (1)].caseClauseNode).m_node); (yyval.clauseList).m_node.tail = (yyval.clauseList).m_node.head; @@ -4251,6 +4609,8 @@ yyreduce: break; case 274: + +/* Line 1455 of yacc.c */ #line 1113 "../../JavaScriptCore/parser/Grammar.y" { (yyval.clauseList).m_node.head = (yyvsp[(1) - (2)].clauseList).m_node.head; (yyval.clauseList).m_node.tail = new (GLOBAL_DATA) ClauseListNode(GLOBAL_DATA, (yyvsp[(1) - (2)].clauseList).m_node.tail, (yyvsp[(2) - (2)].caseClauseNode).m_node); @@ -4262,26 +4622,36 @@ yyreduce: break; case 275: + +/* Line 1455 of yacc.c */ #line 1123 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node), 0, 0, (yyvsp[(2) - (3)].expressionNode).m_features, (yyvsp[(2) - (3)].expressionNode).m_numConstants); ;} break; case 276: + +/* Line 1455 of yacc.c */ #line 1124 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, (yyvsp[(2) - (4)].expressionNode).m_node, (yyvsp[(4) - (4)].sourceElements).m_node), (yyvsp[(4) - (4)].sourceElements).m_varDeclarations, (yyvsp[(4) - (4)].sourceElements).m_funcDeclarations, (yyvsp[(2) - (4)].expressionNode).m_features | (yyvsp[(4) - (4)].sourceElements).m_features, (yyvsp[(2) - (4)].expressionNode).m_numConstants + (yyvsp[(4) - (4)].sourceElements).m_numConstants); ;} break; case 277: + +/* Line 1455 of yacc.c */ #line 1128 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0), 0, 0, 0, 0); ;} break; case 278: + +/* Line 1455 of yacc.c */ #line 1129 "../../JavaScriptCore/parser/Grammar.y" { (yyval.caseClauseNode) = createNodeDeclarationInfo<CaseClauseNode*>(new (GLOBAL_DATA) CaseClauseNode(GLOBAL_DATA, 0, (yyvsp[(3) - (3)].sourceElements).m_node), (yyvsp[(3) - (3)].sourceElements).m_varDeclarations, (yyvsp[(3) - (3)].sourceElements).m_funcDeclarations, (yyvsp[(3) - (3)].sourceElements).m_features, (yyvsp[(3) - (3)].sourceElements).m_numConstants); ;} break; case 279: + +/* Line 1455 of yacc.c */ #line 1133 "../../JavaScriptCore/parser/Grammar.y" { LabelNode* node = new (GLOBAL_DATA) LabelNode(GLOBAL_DATA, *(yyvsp[(1) - (3)].ident), (yyvsp[(3) - (3)].statementNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4289,6 +4659,8 @@ yyreduce: break; case 280: + +/* Line 1455 of yacc.c */ #line 1139 "../../JavaScriptCore/parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4297,6 +4669,8 @@ yyreduce: break; case 281: + +/* Line 1455 of yacc.c */ #line 1143 "../../JavaScriptCore/parser/Grammar.y" { ThrowNode* node = new (GLOBAL_DATA) ThrowNode(GLOBAL_DATA, (yyvsp[(2) - (3)].expressionNode).m_node); setExceptionLocation(node, (yylsp[(1) - (3)]).first_column, (yylsp[(2) - (3)]).last_column, (yylsp[(2) - (3)]).last_column); @@ -4305,6 +4679,8 @@ yyreduce: break; case 282: + +/* Line 1455 of yacc.c */ #line 1150 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (4)].statementNode).m_node, GLOBAL_DATA->propertyNames->nullIdentifier, false, 0, (yyvsp[(4) - (4)].statementNode).m_node), mergeDeclarationLists((yyvsp[(2) - (4)].statementNode).m_varDeclarations, (yyvsp[(4) - (4)].statementNode).m_varDeclarations), @@ -4315,6 +4691,8 @@ yyreduce: break; case 283: + +/* Line 1455 of yacc.c */ #line 1156 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (7)].statementNode).m_node, *(yyvsp[(5) - (7)].ident), ((yyvsp[(7) - (7)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (7)].statementNode).m_node, 0), mergeDeclarationLists((yyvsp[(2) - (7)].statementNode).m_varDeclarations, (yyvsp[(7) - (7)].statementNode).m_varDeclarations), @@ -4325,6 +4703,8 @@ yyreduce: break; case 284: + +/* Line 1455 of yacc.c */ #line 1163 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) TryNode(GLOBAL_DATA, (yyvsp[(2) - (9)].statementNode).m_node, *(yyvsp[(5) - (9)].ident), ((yyvsp[(7) - (9)].statementNode).m_features & EvalFeature) != 0, (yyvsp[(7) - (9)].statementNode).m_node, (yyvsp[(9) - (9)].statementNode).m_node), mergeDeclarationLists(mergeDeclarationLists((yyvsp[(2) - (9)].statementNode).m_varDeclarations, (yyvsp[(7) - (9)].statementNode).m_varDeclarations), (yyvsp[(9) - (9)].statementNode).m_varDeclarations), @@ -4335,23 +4715,31 @@ yyreduce: break; case 285: + +/* Line 1455 of yacc.c */ #line 1172 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(2) - (2)])); ;} break; case 286: + +/* Line 1455 of yacc.c */ #line 1174 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) DebuggerStatementNode(GLOBAL_DATA), 0, 0, 0, 0); setStatementLocation((yyval.statementNode).m_node, (yylsp[(1) - (2)]), (yylsp[(1) - (2)])); AUTO_SEMICOLON; ;} break; case 287: + +/* Line 1455 of yacc.c */ #line 1179 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (7)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); (yyval.statementNode).m_funcDeclarations->data.append(static_cast<FuncDeclNode*>((yyval.statementNode).m_node)->body()); ;} break; case 288: + +/* Line 1455 of yacc.c */ #line 1181 "../../JavaScriptCore/parser/Grammar.y" { (yyval.statementNode) = createNodeDeclarationInfo<StatementNode*>(new (GLOBAL_DATA) FuncDeclNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), 0, new (GLOBAL_DATA) ParserArenaData<DeclarationStacks::FunctionStack>, ((*(yyvsp[(2) - (8)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0) | (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4363,11 +4751,15 @@ yyreduce: break; case 289: + +/* Line 1455 of yacc.c */ #line 1191 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(5) - (6)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(4) - (6)].intValue), (yyvsp[(6) - (6)].intValue), (yylsp[(4) - (6)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(5) - (6)].functionBodyNode), (yylsp[(4) - (6)]), (yylsp[(6) - (6)])); ;} break; case 290: + +/* Line 1455 of yacc.c */ #line 1193 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, GLOBAL_DATA->propertyNames->nullIdentifier, (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line), (yyvsp[(3) - (7)].parameterList).m_node.head), (yyvsp[(3) - (7)].parameterList).m_features | ClosureFeature, 0); @@ -4378,11 +4770,15 @@ yyreduce: break; case 291: + +/* Line 1455 of yacc.c */ #line 1199 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (7)].ident), (yyvsp[(6) - (7)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(5) - (7)].intValue), (yyvsp[(7) - (7)].intValue), (yylsp[(5) - (7)]).first_line)), ClosureFeature, 0); setStatementLocation((yyvsp[(6) - (7)].functionBodyNode), (yylsp[(5) - (7)]), (yylsp[(7) - (7)])); ;} break; case 292: + +/* Line 1455 of yacc.c */ #line 1201 "../../JavaScriptCore/parser/Grammar.y" { (yyval.funcExprNode) = createNodeInfo(new (GLOBAL_DATA) FuncExprNode(GLOBAL_DATA, *(yyvsp[(2) - (8)].ident), (yyvsp[(7) - (8)].functionBodyNode), GLOBAL_DATA->lexer->sourceCode((yyvsp[(6) - (8)].intValue), (yyvsp[(8) - (8)].intValue), (yylsp[(6) - (8)]).first_line), (yyvsp[(4) - (8)].parameterList).m_node.head), (yyvsp[(4) - (8)].parameterList).m_features | ClosureFeature, 0); @@ -4393,6 +4789,8 @@ yyreduce: break; case 293: + +/* Line 1455 of yacc.c */ #line 1210 "../../JavaScriptCore/parser/Grammar.y" { (yyval.parameterList).m_node.head = new (GLOBAL_DATA) ParameterNode(GLOBAL_DATA, *(yyvsp[(1) - (1)].ident)); (yyval.parameterList).m_features = (*(yyvsp[(1) - (1)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0; @@ -4400,6 +4798,8 @@ yyreduce: break; case 294: + +/* Line 1455 of yacc.c */ #line 1213 "../../JavaScriptCore/parser/Grammar.y" { (yyval.parameterList).m_node.head = (yyvsp[(1) - (3)].parameterList).m_node.head; (yyval.parameterList).m_features = (yyvsp[(1) - (3)].parameterList).m_features | ((*(yyvsp[(3) - (3)].ident) == GLOBAL_DATA->propertyNames->arguments) ? ArgumentsFeature : 0); @@ -4407,27 +4807,37 @@ yyreduce: break; case 295: + +/* Line 1455 of yacc.c */ #line 1219 "../../JavaScriptCore/parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 296: + +/* Line 1455 of yacc.c */ #line 1220 "../../JavaScriptCore/parser/Grammar.y" { (yyval.functionBodyNode) = FunctionBodyNode::create(GLOBAL_DATA); ;} break; case 297: + +/* Line 1455 of yacc.c */ #line 1224 "../../JavaScriptCore/parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing(new (GLOBAL_DATA) SourceElements(GLOBAL_DATA), 0, 0, NoFeatures, (yylsp[(0) - (0)]).last_line, 0); ;} break; case 298: + +/* Line 1455 of yacc.c */ #line 1225 "../../JavaScriptCore/parser/Grammar.y" { GLOBAL_DATA->parser->didFinishParsing((yyvsp[(1) - (1)].sourceElements).m_node, (yyvsp[(1) - (1)].sourceElements).m_varDeclarations, (yyvsp[(1) - (1)].sourceElements).m_funcDeclarations, (yyvsp[(1) - (1)].sourceElements).m_features, (yylsp[(1) - (1)]).last_line, (yyvsp[(1) - (1)].sourceElements).m_numConstants); ;} break; case 299: + +/* Line 1455 of yacc.c */ #line 1230 "../../JavaScriptCore/parser/Grammar.y" { (yyval.sourceElements).m_node = new (GLOBAL_DATA) SourceElements(GLOBAL_DATA); (yyval.sourceElements).m_node->append((yyvsp[(1) - (1)].statementNode).m_node); @@ -4439,6 +4849,8 @@ yyreduce: break; case 300: + +/* Line 1455 of yacc.c */ #line 1237 "../../JavaScriptCore/parser/Grammar.y" { (yyval.sourceElements).m_node->append((yyvsp[(2) - (2)].statementNode).m_node); (yyval.sourceElements).m_varDeclarations = mergeDeclarationLists((yyvsp[(1) - (2)].sourceElements).m_varDeclarations, (yyvsp[(2) - (2)].statementNode).m_varDeclarations); @@ -4449,188 +4861,261 @@ yyreduce: break; case 304: + +/* Line 1455 of yacc.c */ #line 1251 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 305: + +/* Line 1455 of yacc.c */ #line 1252 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 306: + +/* Line 1455 of yacc.c */ #line 1253 "../../JavaScriptCore/parser/Grammar.y" { if (!GLOBAL_DATA->lexer->skipRegExp()) YYABORT; ;} break; case 307: + +/* Line 1455 of yacc.c */ #line 1254 "../../JavaScriptCore/parser/Grammar.y" { if (!GLOBAL_DATA->lexer->skipRegExp()) YYABORT; ;} break; case 308: + +/* Line 1455 of yacc.c */ #line 1258 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 309: + +/* Line 1455 of yacc.c */ #line 1259 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 310: + +/* Line 1455 of yacc.c */ #line 1260 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 311: + +/* Line 1455 of yacc.c */ #line 1261 "../../JavaScriptCore/parser/Grammar.y" { if (*(yyvsp[(1) - (7)].ident) != "get" && *(yyvsp[(1) - (7)].ident) != "set") YYABORT; ;} break; case 312: + +/* Line 1455 of yacc.c */ #line 1262 "../../JavaScriptCore/parser/Grammar.y" { if (*(yyvsp[(1) - (8)].ident) != "get" && *(yyvsp[(1) - (8)].ident) != "set") YYABORT; ;} break; case 316: + +/* Line 1455 of yacc.c */ #line 1272 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 317: + +/* Line 1455 of yacc.c */ #line 1273 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 318: + +/* Line 1455 of yacc.c */ #line 1275 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 322: + +/* Line 1455 of yacc.c */ #line 1282 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 517: + +/* Line 1455 of yacc.c */ #line 1650 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 518: + +/* Line 1455 of yacc.c */ #line 1651 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 520: + +/* Line 1455 of yacc.c */ #line 1656 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 521: + +/* Line 1455 of yacc.c */ #line 1660 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 522: + +/* Line 1455 of yacc.c */ #line 1661 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 525: + +/* Line 1455 of yacc.c */ #line 1667 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 526: + +/* Line 1455 of yacc.c */ #line 1668 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 530: + +/* Line 1455 of yacc.c */ #line 1675 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 533: + +/* Line 1455 of yacc.c */ #line 1684 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 534: + +/* Line 1455 of yacc.c */ #line 1685 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 539: + +/* Line 1455 of yacc.c */ #line 1702 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 555: + +/* Line 1455 of yacc.c */ #line 1733 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 557: + +/* Line 1455 of yacc.c */ #line 1735 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 559: + +/* Line 1455 of yacc.c */ #line 1740 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 561: + +/* Line 1455 of yacc.c */ #line 1742 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 563: + +/* Line 1455 of yacc.c */ #line 1747 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 565: + +/* Line 1455 of yacc.c */ #line 1749 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 568: + +/* Line 1455 of yacc.c */ #line 1761 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 569: + +/* Line 1455 of yacc.c */ #line 1762 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 578: + +/* Line 1455 of yacc.c */ #line 1786 "../../JavaScriptCore/parser/Grammar.y" { ;} break; case 580: + +/* Line 1455 of yacc.c */ #line 1791 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 585: + +/* Line 1455 of yacc.c */ #line 1802 "../../JavaScriptCore/parser/Grammar.y" { AUTO_SEMICOLON; ;} break; case 592: + +/* Line 1455 of yacc.c */ #line 1818 "../../JavaScriptCore/parser/Grammar.y" { ;} break; -/* Line 1267 of yacc.c. */ -#line 4634 "WebCore/tmp/../generated/Grammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 5119 "WebCore/tmp/../generated/Grammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -4706,7 +5191,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -4723,7 +5208,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -4781,14 +5266,11 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; yyerror_range[1] = yylloc; /* Using YYLLOC is tempting, but would change the location of - the look-ahead. YYLOC is available though. */ + the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); *++yylsp = yyloc; @@ -4813,7 +5295,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -4824,7 +5306,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); /* Do not reclaim the symbols of the rule which action triggered @@ -4850,6 +5332,8 @@ yyreturn: } + +/* Line 1675 of yacc.c */ #line 1834 "../../JavaScriptCore/parser/Grammar.y" diff --git a/src/3rdparty/webkit/WebCore/generated/Grammar.h b/src/3rdparty/webkit/WebCore/generated/Grammar.h index 63b66ce..e555cfb 100644 --- a/src/3rdparty/webkit/WebCore/generated/Grammar.h +++ b/src/3rdparty/webkit/WebCore/generated/Grammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -104,78 +104,16 @@ AUTOMINUSMINUS = 320 }; #endif -/* Tokens. */ -#define NULLTOKEN 258 -#define TRUETOKEN 259 -#define FALSETOKEN 260 -#define BREAK 261 -#define CASE 262 -#define DEFAULT 263 -#define FOR 264 -#define NEW 265 -#define VAR 266 -#define CONSTTOKEN 267 -#define CONTINUE 268 -#define FUNCTION 269 -#define RETURN 270 -#define VOIDTOKEN 271 -#define DELETETOKEN 272 -#define IF 273 -#define THISTOKEN 274 -#define DO 275 -#define WHILE 276 -#define INTOKEN 277 -#define INSTANCEOF 278 -#define TYPEOF 279 -#define SWITCH 280 -#define WITH 281 -#define RESERVED 282 -#define THROW 283 -#define TRY 284 -#define CATCH 285 -#define FINALLY 286 -#define DEBUGGER 287 -#define IF_WITHOUT_ELSE 288 -#define ELSE 289 -#define EQEQ 290 -#define NE 291 -#define STREQ 292 -#define STRNEQ 293 -#define LE 294 -#define GE 295 -#define OR 296 -#define AND 297 -#define PLUSPLUS 298 -#define MINUSMINUS 299 -#define LSHIFT 300 -#define RSHIFT 301 -#define URSHIFT 302 -#define PLUSEQUAL 303 -#define MINUSEQUAL 304 -#define MULTEQUAL 305 -#define DIVEQUAL 306 -#define LSHIFTEQUAL 307 -#define RSHIFTEQUAL 308 -#define URSHIFTEQUAL 309 -#define ANDEQUAL 310 -#define MODEQUAL 311 -#define XOREQUAL 312 -#define OREQUAL 313 -#define OPENBRACE 314 -#define CLOSEBRACE 315 -#define NUMBER 316 -#define IDENT 317 -#define STRING 318 -#define AUTOPLUSPLUS 319 -#define AUTOMINUSMINUS 320 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 146 "../../JavaScriptCore/parser/Grammar.y" { + +/* Line 1676 of yacc.c */ +#line 146 "../../JavaScriptCore/parser/Grammar.y" + int intValue; double doubleValue; const Identifier* ident; @@ -205,13 +143,15 @@ typedef union YYSTYPE ParameterListInfo parameterList; Operator op; -} -/* Line 1489 of yacc.c. */ -#line 211 "WebCore/tmp/../generated/Grammar.tab.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 151 "WebCore/tmp/../generated/Grammar.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif @@ -230,3 +170,4 @@ typedef struct YYLTYPE #endif + diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp index f72baaa..bea3845 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.cpp @@ -99,7 +99,7 @@ bool JSInspectorBackendConstructor::getOwnPropertyDescriptor(ExecState* exec, co /* Hash table for prototype */ -static const HashTableValue JSInspectorBackendPrototypeTableValues[77] = +static const HashTableValue JSInspectorBackendPrototypeTableValues[78] = { { "hideDOMNodeHighlight", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHideDOMNodeHighlight, (intptr_t)0 }, { "highlightDOMNode", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHighlightDOMNode, (intptr_t)1 }, @@ -122,6 +122,7 @@ static const HashTableValue JSInspectorBackendPrototypeTableValues[77] = { "localizedStringsURL", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionLocalizedStringsURL, (intptr_t)0 }, { "hiddenPanels", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionHiddenPanels, (intptr_t)0 }, { "platform", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionPlatform, (intptr_t)0 }, + { "port", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionPort, (intptr_t)0 }, { "startTimelineProfiler", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStartTimelineProfiler, (intptr_t)0 }, { "stopTimelineProfiler", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionStopTimelineProfiler, (intptr_t)0 }, { "timelineProfilerEnabled", DontDelete|Function, (intptr_t)jsInspectorBackendPrototypeFunctionTimelineProfilerEnabled, (intptr_t)0 }, @@ -493,6 +494,19 @@ JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPlatform(ExecState* exe return result; } +JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPort(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) +{ + UNUSED_PARAM(args); + if (!thisValue.inherits(&JSInspectorBackend::s_info)) + return throwError(exec, TypeError); + JSInspectorBackend* castedThisObj = static_cast<JSInspectorBackend*>(asObject(thisValue)); + InspectorBackend* imp = static_cast<InspectorBackend*>(castedThisObj->impl()); + + + JSC::JSValue result = jsString(exec, imp->port()); + return result; +} + JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStartTimelineProfiler(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); diff --git a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h index f4a1925..7c220dc 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h +++ b/src/3rdparty/webkit/WebCore/generated/JSInspectorBackend.h @@ -114,6 +114,7 @@ JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionInspectedWindow(JS JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionLocalizedStringsURL(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionHiddenPanels(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPlatform(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); +JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionPort(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStartTimelineProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionStopTimelineProfiler(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); JSC::JSValue JSC_HOST_CALL jsInspectorBackendPrototypeFunctionTimelineProfilerEnabled(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&); diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp index 1120387..5f34852 100644 --- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp +++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.cpp @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,7 +28,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -47,7 +46,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "2.4.1" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,69 +54,28 @@ /* Pure parsers. */ #define YYPURE 1 +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ -#define yyparse xpathyyparse -#define yylex xpathyylex -#define yyerror xpathyyerror -#define yylval xpathyylval -#define yychar xpathyychar -#define yydebug xpathyydebug -#define yynerrs xpathyynerrs - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - MULOP = 258, - RELOP = 259, - EQOP = 260, - MINUS = 261, - PLUS = 262, - AND = 263, - OR = 264, - AXISNAME = 265, - NODETYPE = 266, - PI = 267, - FUNCTIONNAME = 268, - LITERAL = 269, - VARIABLEREFERENCE = 270, - NUMBER = 271, - DOTDOT = 272, - SLASHSLASH = 273, - NAMETEST = 274, - XPATH_ERROR = 275 - }; -#endif -/* Tokens. */ -#define MULOP 258 -#define RELOP 259 -#define EQOP 260 -#define MINUS 261 -#define PLUS 262 -#define AND 263 -#define OR 264 -#define AXISNAME 265 -#define NODETYPE 266 -#define PI 267 -#define FUNCTIONNAME 268 -#define LITERAL 269 -#define VARIABLEREFERENCE 270 -#define NUMBER 271 -#define DOTDOT 272 -#define SLASHSLASH 273 -#define NAMETEST 274 -#define XPATH_ERROR 275 - - +#define yyparse xpathyyparse +#define yylex xpathyylex +#define yyerror xpathyyerror +#define yylval xpathyylval +#define yychar xpathyychar +#define yydebug xpathyydebug +#define yynerrs xpathyynerrs /* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 28 "../xml/XPathGrammar.y" @@ -148,6 +106,9 @@ using namespace XPath; +/* Line 189 of yacc.c */ +#line 111 "WebCore/tmp/../generated/XPathGrammar.tab.c" + /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 @@ -166,10 +127,43 @@ using namespace XPath; # define YYTOKEN_TABLE 0 #endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + MULOP = 258, + RELOP = 259, + EQOP = 260, + MINUS = 261, + PLUS = 262, + AND = 263, + OR = 264, + AXISNAME = 265, + NODETYPE = 266, + PI = 267, + FUNCTIONNAME = 268, + LITERAL = 269, + VARIABLEREFERENCE = 270, + NUMBER = 271, + DOTDOT = 272, + SLASHSLASH = 273, + NAMETEST = 274, + XPATH_ERROR = 275 + }; +#endif + + + #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 60 "../xml/XPathGrammar.y" { + +/* Line 214 of yacc.c */ +#line 60 "../xml/XPathGrammar.y" + Step::Axis axis; Step::NodeTest* nodeTest; NumericOp::Opcode numop; @@ -180,18 +174,21 @@ typedef union YYSTYPE Vector<Expression*>* argList; Step* step; LocationPath* locationPath; -} -/* Line 187 of yacc.c. */ -#line 186 "WebCore/tmp/../generated/XPathGrammar.tab.c" - YYSTYPE; + + + +/* Line 214 of yacc.c */ +#line 182 "WebCore/tmp/../generated/XPathGrammar.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif - /* Copy the second part of user declarations. */ + +/* Line 264 of yacc.c */ #line 73 "../xml/XPathGrammar.y" @@ -200,8 +197,8 @@ static void xpathyyerror(const char*) { } -/* Line 216 of yacc.c. */ -#line 205 "WebCore/tmp/../generated/XPathGrammar.tab.c" +/* Line 264 of yacc.c */ +#line 202 "WebCore/tmp/../generated/XPathGrammar.tab.c" #ifdef short # undef short @@ -276,14 +273,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -364,9 +361,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -400,12 +397,12 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ @@ -858,17 +855,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -902,11 +902,11 @@ yy_reduce_print (yyvsp, yyrule) /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); + YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, "\n"); } } @@ -1186,10 +1186,8 @@ yydestruct (yymsg, yytype, yyvaluep) break; } } - /* Prevent warnings from -Wmissing-prototypes. */ - #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); @@ -1208,10 +1206,9 @@ int yyparse (); - -/*----------. -| yyparse. | -`----------*/ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ @@ -1235,74 +1232,75 @@ yyparse () #endif #endif { - /* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ + /* Number of syntax errors so far. */ + int yynerrs; - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; - YYSIZE_T yystacksize = YYINITDEPTH; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; @@ -1332,7 +1330,6 @@ int yynerrs; YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might @@ -1340,7 +1337,6 @@ int yynerrs; yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); yyss = yyss1; @@ -1363,9 +1359,8 @@ int yynerrs; (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); @@ -1376,7 +1371,6 @@ int yynerrs; yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); @@ -1386,6 +1380,9 @@ int yynerrs; YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1394,16 +1391,16 @@ int yynerrs; yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yyn == YYPACT_NINF) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); @@ -1435,20 +1432,16 @@ yybackup: goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; @@ -1488,6 +1481,8 @@ yyreduce: switch (yyn) { case 2: + +/* Line 1455 of yacc.c */ #line 122 "../xml/XPathGrammar.y" { PARSER->m_topExpr = (yyvsp[(1) - (1)].expr); @@ -1495,6 +1490,8 @@ yyreduce: break; case 3: + +/* Line 1455 of yacc.c */ #line 129 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(false); @@ -1502,6 +1499,8 @@ yyreduce: break; case 4: + +/* Line 1455 of yacc.c */ #line 134 "../xml/XPathGrammar.y" { (yyval.locationPath)->setAbsolute(true); @@ -1509,6 +1508,8 @@ yyreduce: break; case 5: + +/* Line 1455 of yacc.c */ #line 141 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1517,6 +1518,8 @@ yyreduce: break; case 6: + +/* Line 1455 of yacc.c */ #line 147 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1524,6 +1527,8 @@ yyreduce: break; case 7: + +/* Line 1455 of yacc.c */ #line 152 "../xml/XPathGrammar.y" { (yyval.locationPath) = (yyvsp[(2) - (2)].locationPath); @@ -1533,6 +1538,8 @@ yyreduce: break; case 8: + +/* Line 1455 of yacc.c */ #line 161 "../xml/XPathGrammar.y" { (yyval.locationPath) = new LocationPath; @@ -1543,6 +1550,8 @@ yyreduce: break; case 9: + +/* Line 1455 of yacc.c */ #line 169 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(3) - (3)].step)); @@ -1551,6 +1560,8 @@ yyreduce: break; case 10: + +/* Line 1455 of yacc.c */ #line 175 "../xml/XPathGrammar.y" { (yyval.locationPath)->appendStep((yyvsp[(2) - (3)].step)); @@ -1561,6 +1572,8 @@ yyreduce: break; case 11: + +/* Line 1455 of yacc.c */ #line 185 "../xml/XPathGrammar.y" { if ((yyvsp[(2) - (2)].predList)) { @@ -1574,6 +1587,8 @@ yyreduce: break; case 12: + +/* Line 1455 of yacc.c */ #line 196 "../xml/XPathGrammar.y" { String localName; @@ -1594,6 +1609,8 @@ yyreduce: break; case 13: + +/* Line 1455 of yacc.c */ #line 214 "../xml/XPathGrammar.y" { if ((yyvsp[(3) - (3)].predList)) { @@ -1607,6 +1624,8 @@ yyreduce: break; case 14: + +/* Line 1455 of yacc.c */ #line 225 "../xml/XPathGrammar.y" { String localName; @@ -1627,6 +1646,8 @@ yyreduce: break; case 17: + +/* Line 1455 of yacc.c */ #line 249 "../xml/XPathGrammar.y" { (yyval.axis) = Step::AttributeAxis; @@ -1634,6 +1655,8 @@ yyreduce: break; case 18: + +/* Line 1455 of yacc.c */ #line 256 "../xml/XPathGrammar.y" { if (*(yyvsp[(1) - (3)].str) == "node") @@ -1649,6 +1672,8 @@ yyreduce: break; case 19: + +/* Line 1455 of yacc.c */ #line 269 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest); @@ -1658,6 +1683,8 @@ yyreduce: break; case 20: + +/* Line 1455 of yacc.c */ #line 276 "../xml/XPathGrammar.y" { (yyval.nodeTest) = new Step::NodeTest(Step::NodeTest::ProcessingInstructionNodeTest, (yyvsp[(3) - (4)].str)->stripWhiteSpace()); @@ -1668,6 +1695,8 @@ yyreduce: break; case 21: + +/* Line 1455 of yacc.c */ #line 286 "../xml/XPathGrammar.y" { (yyval.predList) = 0; @@ -1675,6 +1704,8 @@ yyreduce: break; case 23: + +/* Line 1455 of yacc.c */ #line 295 "../xml/XPathGrammar.y" { (yyval.predList) = new Vector<Predicate*>; @@ -1685,6 +1716,8 @@ yyreduce: break; case 24: + +/* Line 1455 of yacc.c */ #line 303 "../xml/XPathGrammar.y" { (yyval.predList)->append(new Predicate((yyvsp[(2) - (2)].expr))); @@ -1693,6 +1726,8 @@ yyreduce: break; case 25: + +/* Line 1455 of yacc.c */ #line 311 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1700,6 +1735,8 @@ yyreduce: break; case 26: + +/* Line 1455 of yacc.c */ #line 318 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::DescendantOrSelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1708,6 +1745,8 @@ yyreduce: break; case 27: + +/* Line 1455 of yacc.c */ #line 326 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::SelfAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1716,6 +1755,8 @@ yyreduce: break; case 28: + +/* Line 1455 of yacc.c */ #line 332 "../xml/XPathGrammar.y" { (yyval.step) = new Step(Step::ParentAxis, Step::NodeTest(Step::NodeTest::AnyNodeTest)); @@ -1724,6 +1765,8 @@ yyreduce: break; case 29: + +/* Line 1455 of yacc.c */ #line 340 "../xml/XPathGrammar.y" { (yyval.expr) = new VariableReference(*(yyvsp[(1) - (1)].str)); @@ -1733,6 +1776,8 @@ yyreduce: break; case 30: + +/* Line 1455 of yacc.c */ #line 347 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); @@ -1740,6 +1785,8 @@ yyreduce: break; case 31: + +/* Line 1455 of yacc.c */ #line 352 "../xml/XPathGrammar.y" { (yyval.expr) = new StringExpression(*(yyvsp[(1) - (1)].str)); @@ -1749,6 +1796,8 @@ yyreduce: break; case 32: + +/* Line 1455 of yacc.c */ #line 359 "../xml/XPathGrammar.y" { (yyval.expr) = new Number((yyvsp[(1) - (1)].str)->toDouble()); @@ -1758,6 +1807,8 @@ yyreduce: break; case 34: + +/* Line 1455 of yacc.c */ #line 370 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (3)].str)); @@ -1769,6 +1820,8 @@ yyreduce: break; case 35: + +/* Line 1455 of yacc.c */ #line 379 "../xml/XPathGrammar.y" { (yyval.expr) = createFunction(*(yyvsp[(1) - (4)].str), *(yyvsp[(3) - (4)].argList)); @@ -1781,6 +1834,8 @@ yyreduce: break; case 36: + +/* Line 1455 of yacc.c */ #line 391 "../xml/XPathGrammar.y" { (yyval.argList) = new Vector<Expression*>; @@ -1791,6 +1846,8 @@ yyreduce: break; case 37: + +/* Line 1455 of yacc.c */ #line 399 "../xml/XPathGrammar.y" { (yyval.argList)->append((yyvsp[(3) - (3)].expr)); @@ -1799,6 +1856,8 @@ yyreduce: break; case 40: + +/* Line 1455 of yacc.c */ #line 413 "../xml/XPathGrammar.y" { (yyval.expr) = new Union; @@ -1811,6 +1870,8 @@ yyreduce: break; case 41: + +/* Line 1455 of yacc.c */ #line 425 "../xml/XPathGrammar.y" { (yyval.expr) = (yyvsp[(1) - (1)].locationPath); @@ -1818,6 +1879,8 @@ yyreduce: break; case 43: + +/* Line 1455 of yacc.c */ #line 432 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->setAbsolute(true); @@ -1829,6 +1892,8 @@ yyreduce: break; case 44: + +/* Line 1455 of yacc.c */ #line 441 "../xml/XPathGrammar.y" { (yyvsp[(3) - (3)].locationPath)->insertFirstStep((yyvsp[(2) - (3)].step)); @@ -1842,6 +1907,8 @@ yyreduce: break; case 46: + +/* Line 1455 of yacc.c */ #line 456 "../xml/XPathGrammar.y" { (yyval.expr) = new Filter((yyvsp[(1) - (2)].expr), *(yyvsp[(2) - (2)].predList)); @@ -1852,6 +1919,8 @@ yyreduce: break; case 48: + +/* Line 1455 of yacc.c */ #line 468 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_Or, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1862,6 +1931,8 @@ yyreduce: break; case 50: + +/* Line 1455 of yacc.c */ #line 480 "../xml/XPathGrammar.y" { (yyval.expr) = new LogicalOp(LogicalOp::OP_And, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1872,6 +1943,8 @@ yyreduce: break; case 52: + +/* Line 1455 of yacc.c */ #line 492 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1882,6 +1955,8 @@ yyreduce: break; case 54: + +/* Line 1455 of yacc.c */ #line 504 "../xml/XPathGrammar.y" { (yyval.expr) = new EqTestOp((yyvsp[(2) - (3)].eqop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1892,6 +1967,8 @@ yyreduce: break; case 56: + +/* Line 1455 of yacc.c */ #line 516 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Add, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1902,6 +1979,8 @@ yyreduce: break; case 57: + +/* Line 1455 of yacc.c */ #line 524 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp(NumericOp::OP_Sub, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1912,6 +1991,8 @@ yyreduce: break; case 59: + +/* Line 1455 of yacc.c */ #line 536 "../xml/XPathGrammar.y" { (yyval.expr) = new NumericOp((yyvsp[(2) - (3)].numop), (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); @@ -1922,6 +2003,8 @@ yyreduce: break; case 61: + +/* Line 1455 of yacc.c */ #line 548 "../xml/XPathGrammar.y" { (yyval.expr) = new Negative; @@ -1932,8 +2015,9 @@ yyreduce: break; -/* Line 1267 of yacc.c. */ -#line 1937 "WebCore/tmp/../generated/XPathGrammar.tab.c" + +/* Line 1455 of yacc.c */ +#line 2021 "WebCore/tmp/../generated/XPathGrammar.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1944,7 +2028,6 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2009,7 +2092,7 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an + /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) @@ -2026,7 +2109,7 @@ yyerrlab: } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -2083,9 +2166,6 @@ yyerrlab1: YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - *++yyvsp = yylval; @@ -2110,7 +2190,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2121,7 +2201,7 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) + if (yychar != YYEMPTY) yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); /* Do not reclaim the symbols of the rule which action triggered @@ -2147,6 +2227,8 @@ yyreturn: } + +/* Line 1675 of yacc.c */ #line 556 "../xml/XPathGrammar.y" diff --git a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h index 0276481..cdf2b32 100644 --- a/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h +++ b/src/3rdparty/webkit/WebCore/generated/XPathGrammar.h @@ -1,24 +1,23 @@ -/* A Bison parser, made by GNU Bison 2.3. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* A Bison parser, made by GNU Bison 2.4.1. */ - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -29,10 +28,11 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ + /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE @@ -59,33 +59,16 @@ XPATH_ERROR = 275 }; #endif -/* Tokens. */ -#define MULOP 258 -#define RELOP 259 -#define EQOP 260 -#define MINUS 261 -#define PLUS 262 -#define AND 263 -#define OR 264 -#define AXISNAME 265 -#define NODETYPE 266 -#define PI 267 -#define FUNCTIONNAME 268 -#define LITERAL 269 -#define VARIABLEREFERENCE 270 -#define NUMBER 271 -#define DOTDOT 272 -#define SLASHSLASH 273 -#define NAMETEST 274 -#define XPATH_ERROR 275 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 60 "../xml/XPathGrammar.y" { + +/* Line 1676 of yacc.c */ +#line 60 "../xml/XPathGrammar.y" + Step::Axis axis; Step::NodeTest* nodeTest; NumericOp::Opcode numop; @@ -96,14 +79,17 @@ typedef union YYSTYPE Vector<Expression*>* argList; Step* step; LocationPath* locationPath; -} -/* Line 1489 of yacc.c. */ -#line 102 "WebCore/tmp/../generated/XPathGrammar.tab.h" - YYSTYPE; + + + +/* Line 1676 of yacc.c */ +#line 87 "WebCore/tmp/../generated/XPathGrammar.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 #endif + diff --git a/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp b/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp index 1f1ff89..a0f10b5 100644 --- a/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/generated/tokenizer.cpp @@ -2193,8 +2193,10 @@ YY_RULE_SETUP ECHO; YY_BREAK #line 2745 "<stdout>" -case YY_STATE_EOF(INITIAL): case YY_END_OF_BUFFER: + yy_c_buf_p = yy_cp - 1; + yy_cp = yy_c_buf_p; +case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(mediaquery): case YY_STATE_EOF(forkeyword): yyterminate(); diff --git a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp index 91285d9..9d8136b 100644 --- a/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp +++ b/src/3rdparty/webkit/WebCore/html/HTMLTokenizer.cpp @@ -1615,7 +1615,8 @@ inline bool HTMLTokenizer::continueProcessing(int& processedCount, double startT m_timer.startOneShot(0); #ifdef INSTRUMENT_LAYOUT_SCHEDULING if (currentTime() - startTime > m_tokenizerTimeDelay) - printf("Deferring processing of data because 500ms elapsed away from event loop.\n"); + printf("Deferring processing of data because %dms elapsed away from event loop.\n", + int(m_tokenizerTimeDelay * 1000)); #endif return false; } diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp index 83a9719..67c08b9 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.cpp @@ -245,12 +245,6 @@ const String& InspectorBackend::platform() const #endif #elif PLATFORM(WIN_OS) DEFINE_STATIC_LOCAL(const String, platform, ("windows")); -#elif PLATFORM(QT) - DEFINE_STATIC_LOCAL(const String, platform, ("qt")); -#elif PLATFORM(GTK) - DEFINE_STATIC_LOCAL(const String, platform, ("gtk")); -#elif PLATFORM(WX) - DEFINE_STATIC_LOCAL(const String, platform, ("wx")); #else DEFINE_STATIC_LOCAL(const String, platform, ("unknown")); #endif @@ -258,6 +252,22 @@ const String& InspectorBackend::platform() const return platform; } + +const String& InspectorBackend::port() const +{ +#if PLATFORM(QT) + DEFINE_STATIC_LOCAL(const String, port, ("qt")); +#elif PLATFORM(GTK) + DEFINE_STATIC_LOCAL(const String, port, ("gtk")); +#elif PLATFORM(WX) + DEFINE_STATIC_LOCAL(const String, port, ("wx")); +#else + DEFINE_STATIC_LOCAL(const String, port, ("unknown")); +#endif + + return port; +} + void InspectorBackend::startTimelineProfiler() { if (m_inspectorController) diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h index 9d75e2f..08bb5e5 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.h @@ -94,6 +94,7 @@ public: void closeWindow(); const String& platform() const; + const String& port() const; void startTimelineProfiler(); void stopTimelineProfiler(); diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl index 7a00c6a..fd5dd79 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorBackend.idl @@ -61,6 +61,7 @@ module core { DOMString localizedStringsURL(); DOMString hiddenPanels(); DOMString platform(); + DOMString port(); void startTimelineProfiler(); void stopTimelineProfiler(); boolean timelineProfilerEnabled(); diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js b/src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js index 6fb5a1b..f78c9bd 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/InspectorControllerStub.js @@ -58,6 +58,11 @@ WebInspector.InspectorControllerStub.prototype = { return "mac-leopard"; }, + port: function() + { + return "unknown"; + }, + closeWindow: function() { diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css index 78ab23d..a83d38b 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.css @@ -94,7 +94,7 @@ body.attached #toolbar { padding-left: 0; } -body.attached.platform-qt #toolbar { +body.attached.port-qt #toolbar { cursor: auto; } @@ -237,7 +237,7 @@ body.detached .toolbar-item.close-left, body.detached .toolbar-item.close-right display: none; } -body.attached.platform-qt .toolbar-item.close-left, body.attached.platform-qt .toolbar-item.close-right { +body.attached.port-qt .toolbar-item.close-left, body.attached.port-qt .toolbar-item.close-right { display: none; } @@ -392,7 +392,7 @@ body.detached #dock-status-bar-item .glyph { -webkit-mask-image: url(Images/dockButtonGlyph.png); } -body.platform-qt #dock-status-bar-item { +body.port-qt #dock-status-bar-item { display: none } diff --git a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js index c24d589..083a0af 100644 --- a/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js +++ b/src/3rdparty/webkit/WebCore/inspector/front-end/inspector.js @@ -370,6 +370,8 @@ WebInspector.loaded = function() { var platform = InspectorController.platform(); document.body.addStyleClass("platform-" + platform); + var port = InspectorController.port(); + document.body.addStyleClass("port-" + port); this._loadPreferences(); this.pendingDispatches = 0; @@ -821,7 +823,7 @@ WebInspector.toggleAttach = function() WebInspector.toolbarDragStart = function(event) { - if ((!WebInspector.attached && InspectorController.platform() !== "mac-leopard") || InspectorController.platform() == "qt") + if ((!WebInspector.attached && InspectorController.platform() !== "mac-leopard") || InspectorController.port() == "qt") return; var target = event.target; diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp index 9b15448..a85dcf5 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.cpp @@ -2890,8 +2890,8 @@ void FrameLoader::checkLoadCompleteForThisFrame() // delegate callback. if (pdl == m_provisionalDocumentLoader) clearProvisionalLoad(); - else if (m_provisionalDocumentLoader) { - KURL unreachableURL = m_provisionalDocumentLoader->unreachableURL(); + else if (activeDocumentLoader()) { + KURL unreachableURL = activeDocumentLoader()->unreachableURL(); if (!unreachableURL.isEmpty() && unreachableURL == pdl->request().url()) shouldReset = false; } diff --git a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp index c37daef..4970f06 100644 --- a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp +++ b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp @@ -433,6 +433,10 @@ void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*) KURL url = m_substituteData.responseURL(); if (url.isEmpty()) url = m_initialRequest.url(); + + // Clear the initial request here so that subsequent entries into the + // loader will not think there's still a deferred load left to do. + m_initialRequest = ResourceRequest(); ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), ""); didReceiveResponse(response); diff --git a/src/3rdparty/webkit/WebCore/page/PrintContext.cpp b/src/3rdparty/webkit/WebCore/page/PrintContext.cpp index bba678a..4d3a839 100644 --- a/src/3rdparty/webkit/WebCore/page/PrintContext.cpp +++ b/src/3rdparty/webkit/WebCore/page/PrintContext.cpp @@ -25,7 +25,6 @@ #include "Frame.h" #include "FrameView.h" #include "RenderView.h" -#include "Settings.h" using namespace WebCore; @@ -96,23 +95,18 @@ void PrintContext::computePageRects(const FloatRect& printRect, float headerHeig void PrintContext::begin(float width) { - float PrintingMinimumShrinkFactor = m_frame->settings() ? m_frame->settings()->printingMinimumShrinkFactor() : 0.0f; - float PrintingMaximumShrinkFactor = m_frame->settings() ? m_frame->settings()->printingMaximumShrinkFactor() : 0.0f; - - if (PrintingMaximumShrinkFactor < PrintingMinimumShrinkFactor || PrintingMinimumShrinkFactor <= 0.0f) { - // By imaging to a width a little wider than the available pixels, - // thin pages will be scaled down a little, matching the way they - // print in IE and Camino. This lets them use fewer sheets than they - // would otherwise, which is presumably why other browsers do this. - // Wide pages will be scaled down more than this. - PrintingMinimumShrinkFactor = 1.25f; - - // This number determines how small we are willing to reduce the page content - // in order to accommodate the widest line. If the page would have to be - // reduced smaller to make the widest line fit, we just clip instead (this - // behavior matches MacIE and Mozilla, at least) - PrintingMaximumShrinkFactor = 2.0f; - } + // By imaging to a width a little wider than the available pixels, + // thin pages will be scaled down a little, matching the way they + // print in IE and Camino. This lets them use fewer sheets than they + // would otherwise, which is presumably why other browsers do this. + // Wide pages will be scaled down more than this. + const float PrintingMinimumShrinkFactor = 1.25f; + + // This number determines how small we are willing to reduce the page content + // in order to accommodate the widest line. If the page would have to be + // reduced smaller to make the widest line fit, we just clip instead (this + // behavior matches MacIE and Mozilla, at least) + const float PrintingMaximumShrinkFactor = 2.0f; float minLayoutWidth = width * PrintingMinimumShrinkFactor; float maxLayoutWidth = width * PrintingMaximumShrinkFactor; diff --git a/src/3rdparty/webkit/WebCore/page/Settings.cpp b/src/3rdparty/webkit/WebCore/page/Settings.cpp index 48f310b..f528f37 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.cpp +++ b/src/3rdparty/webkit/WebCore/page/Settings.cpp @@ -63,8 +63,6 @@ Settings::Settings(Page* page) , m_maximumDecodedImageSize(numeric_limits<size_t>::max()) , m_localStorageQuota(5 * 1024 * 1024) // Suggested by the HTML5 spec. , m_pluginAllowedRunTime(numeric_limits<unsigned>::max()) - , m_printingMinimumShrinkFactor(0.0f) - , m_printingMaximumShrinkFactor(0.0f) , m_isJavaEnabled(false) , m_loadsImagesAutomatically(false) , m_privateBrowsingEnabled(false) @@ -531,14 +529,4 @@ void Settings::setWebGLEnabled(bool enabled) m_webGLEnabled = enabled; } -void Settings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor) -{ - m_printingMinimumShrinkFactor = printingMinimumShrinkFactor; -} - -void Settings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor) -{ - m_printingMaximumShrinkFactor = printingMaximumShrinkFactor; -} - } // namespace WebCore diff --git a/src/3rdparty/webkit/WebCore/page/Settings.h b/src/3rdparty/webkit/WebCore/page/Settings.h index bdb07b9..09b5bec 100644 --- a/src/3rdparty/webkit/WebCore/page/Settings.h +++ b/src/3rdparty/webkit/WebCore/page/Settings.h @@ -270,12 +270,6 @@ namespace WebCore { void setWebGLEnabled(bool); bool webGLEnabled() const { return m_webGLEnabled; } - void setPrintingMinimumShrinkFactor(float); - float printingMinimumShrinkFactor() const { return m_printingMinimumShrinkFactor; } - - void setPrintingMaximumShrinkFactor(float); - float printingMaximumShrinkFactor() const { return m_printingMaximumShrinkFactor; } - private: Page* m_page; @@ -298,8 +292,6 @@ namespace WebCore { size_t m_maximumDecodedImageSize; unsigned m_localStorageQuota; unsigned m_pluginAllowedRunTime; - float m_printingMinimumShrinkFactor; - float m_printingMaximumShrinkFactor; bool m_isJavaEnabled : 1; bool m_loadsImagesAutomatically : 1; bool m_privateBrowsingEnabled : 1; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp index 1113eae..469a72e 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp @@ -177,15 +177,20 @@ typedef HashMap<FontPlatformDataCacheKey, FontPlatformData*, FontPlatformDataCac // using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this. static FontPlatformDataCache* gFontPlatformDataCache = 0; -FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString&, bool) +FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool) { if (!gFontPlatformDataCache) gFontPlatformDataCache = new FontPlatformDataCache; - FontPlatformDataCacheKey key(description); + FontDescription descriptionWithResolvedFamily(description); + FontFamily resolvedFamily; + resolvedFamily.setFamily(family); + descriptionWithResolvedFamily.setFamily(resolvedFamily); + + FontPlatformDataCacheKey key(descriptionWithResolvedFamily); FontPlatformData* platformData = gFontPlatformDataCache->get(key); if (!platformData) { - platformData = new FontPlatformData(description); + platformData = new FontPlatformData(descriptionWithResolvedFamily); gFontPlatformDataCache->add(key, platformData); } return platformData; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp index 8e1e4f6..0306abf 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp @@ -102,7 +102,7 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne const FontDescription& description = _font->fontDescription(); const FontFamily* family = &description.family(); while (family) { - if (m_fontSelector) { + if (family->family().length() && m_fontSelector) { FontData* data = m_fontSelector->getFontData(description, family->family()); if (data) { if (data->isLoading()) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp index f0d513c..9faa234 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.cpp @@ -104,15 +104,15 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) foreach (QWidget* widget, qFindChildren<QWidget*>(m_videoWidget)) widget->installEventFilter(this); - connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), - this, SLOT(stateChanged(Phonon::State, Phonon::State))); + connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)), + this, SLOT(stateChanged(Phonon::State,Phonon::State))); connect(m_mediaObject, SIGNAL(metaDataChanged()), this, SLOT(metaDataChanged())); connect(m_mediaObject, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool))); connect(m_mediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool))); connect(m_mediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int))); connect(m_mediaObject, SIGNAL(finished()), this, SLOT(finished())); - connect(m_mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource&)), - this, SLOT(currentSourceChanged(const Phonon::MediaSource&))); + connect(m_mediaObject, SIGNAL(currentSourceChanged(Phonon::MediaSource)), + this, SLOT(currentSourceChanged(Phonon::MediaSource))); connect(m_mediaObject, SIGNAL(aboutToFinish()), this, SLOT(aboutToFinish())); connect(m_mediaObject, SIGNAL(totalTimeChanged(qint64)), this, SLOT(totalTimeChanged(qint64))); } diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp index bbf5525..2f4722f 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp @@ -259,7 +259,7 @@ void QNetworkReplyHandler::sendResponseIfNeeded() if (m_shouldSendResponse) return; - if (m_reply->error()) + if (m_reply->error() && !ignoreHttpError(m_reply, m_responseDataSent)) return; if (m_responseSent || !m_resourceHandle) diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp index c866a54..a183c40 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/network/qt/ResourceRequestQt.cpp @@ -41,7 +41,12 @@ QNetworkRequest ResourceRequest::toNetworkRequest(QObject* originatingFrame) con it != end; ++it) { QByteArray name = QString(it->first).toAscii(); QByteArray value = QString(it->second).toAscii(); - request.setRawHeader(name, value); + // QNetworkRequest::setRawHeader() would remove the header if the value is null + // Make sure to set an empty header instead of null header. + if (!value.isNull()) + request.setRawHeader(name, value); + else + request.setRawHeader(name, ""); } switch (cachePolicy()) { diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp index 442ffa3..8221760 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformScreenQt.cpp @@ -72,7 +72,7 @@ int screenDepthPerComponent(Widget* w) bool screenIsMonochrome(Widget* w) { - return QApplication::desktop()->screen(screenNumber(w))->colorCount() < 2; + return QApplication::desktop()->screen(screenNumber(w))->numColors() < 2; } FloatRect screenRect(Widget* w) diff --git a/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h b/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h index 28ef724..61adb97 100644 --- a/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h +++ b/src/3rdparty/webkit/WebCore/platform/qt/QWebPageClient.h @@ -30,9 +30,12 @@ class QWebPageClient { public: + virtual ~QWebPageClient() { } + virtual void scroll(int dx, int dy, const QRect&) = 0; virtual void update(const QRect&) = 0; virtual void setInputMethodEnabled(bool enable) = 0; + virtual bool inputMethodEnabled() const = 0; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable) = 0; #endif diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp index 5ccce0e..b313afb 100644 --- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp @@ -145,7 +145,7 @@ HDC WINAPI PluginView::hookedBeginPaint(HWND hWnd, PAINTSTRUCT* lpPaint) "push %3\n" "call *%4\n" : "=a" (result) - : "a" (beginPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*beginPaint) + : "a" (beginPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (beginPaint) : "memory" ); return result; @@ -175,7 +175,7 @@ BOOL WINAPI PluginView::hookedEndPaint(HWND hWnd, const PAINTSTRUCT* lpPaint) "push %3\n" "call *%4\n" : "=a" (result) - : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (*endPaint) + : "a" (endPaintSysCall), "g" (lpPaint), "g" (hWnd), "m" (endPaint) ); return result; #elif defined (_M_IX86) diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp index 237478d..d5bb778 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp @@ -163,15 +163,18 @@ RenderBlock::~RenderBlock() void RenderBlock::destroy() { - // Detach our continuation first. - if (m_inlineContinuation) - m_inlineContinuation->destroy(); - m_inlineContinuation = 0; - // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will - // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise. + // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise. children()->destroyLeftoverChildren(); + // Destroy our continuation before anything other than anonymous children. + // The reason we don't destroy it before anonymous children is that they may + // have continuations of their own that are anonymous children of our continuation. + if (m_inlineContinuation) { + m_inlineContinuation->destroy(); + m_inlineContinuation = 0; + } + if (!documentBeingDestroyed()) { if (firstLineBox()) { // We can't wait for RenderBox::destroy to clear the selection, diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp index 0302113..2f9a247 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderInline.cpp @@ -52,15 +52,18 @@ RenderInline::RenderInline(Node* node) void RenderInline::destroy() { - // Detach our continuation first. - if (m_continuation) - m_continuation->destroy(); - m_continuation = 0; - // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will // properly dirty line boxes that they are removed from. Effects that do :before/:after only on hover could crash otherwise. children()->destroyLeftoverChildren(); + // Destroy our continuation before anything other than anonymous children. + // The reason we don't destroy it before anonymous children is that they may + // have continuations of their own that are anonymous children of our continuation. + if (m_continuation) { + m_continuation->destroy(); + m_continuation = 0; + } + if (!documentBeingDestroyed()) { if (firstLineBox()) { // We can't wait for RenderBoxModelObject::destroy to clear the selection, diff --git a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h index 1e1688c..2e8fb0a 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h +++ b/src/3rdparty/webkit/WebCore/rendering/style/RenderStyle.h @@ -1182,6 +1182,7 @@ public: static float initialPerspective() { return 0; } static Length initialPerspectiveOriginX() { return Length(50.0, Percent); } static Length initialPerspectiveOriginY() { return Length(50.0, Percent); } + static Color initialBackgroundColor() { return Color::transparent; } // Keep these at the end. static int initialLineClamp() { return -1; } diff --git a/src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.cpp b/src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.cpp index 68a9ddd..08f5527 100644 --- a/src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/style/StyleBackgroundData.cpp @@ -22,12 +22,14 @@ #include "config.h" #include "StyleBackgroundData.h" +#include "RenderStyle.h" #include "RenderStyleConstants.h" namespace WebCore { StyleBackgroundData::StyleBackgroundData() : m_background(BackgroundFillLayer) + , m_color(RenderStyle::initialBackgroundColor()) { } diff --git a/src/3rdparty/webkit/WebCore/storage/Database.cpp b/src/3rdparty/webkit/WebCore/storage/Database.cpp index 5aaa26f..2f82743 100644 --- a/src/3rdparty/webkit/WebCore/storage/Database.cpp +++ b/src/3rdparty/webkit/WebCore/storage/Database.cpp @@ -152,8 +152,8 @@ Database::Database(Document* document, const String& name, const String& expecte , m_document(document) , m_name(name.crossThreadString()) , m_guid(0) - , m_expectedVersion(expectedVersion) - , m_displayName(displayName) + , m_expectedVersion(expectedVersion.crossThreadString()) + , m_displayName(displayName.crossThreadString()) , m_estimatedSize(estimatedSize) , m_deleted(false) , m_stopped(false) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 38d8c47..ceb5ee1 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -41,9 +41,11 @@ public: , page(0) {} + virtual ~QGraphicsWebViewPrivate(); virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -65,6 +67,10 @@ public: QWebPage* page; }; +QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() +{ +} + void QGraphicsWebViewPrivate::_q_doLoadFinished(bool success) { // If the page had no title, still make sure it gets the signal @@ -92,6 +98,15 @@ void QGraphicsWebViewPrivate::setInputMethodEnabled(bool enable) #endif } +bool QGraphicsWebViewPrivate::inputMethodEnabled() const +{ +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + return q->flags() & QGraphicsItem::ItemAcceptsInputMethod; +#else + return false; +#endif +} + #if QT_VERSION >= 0x040600 void QGraphicsWebViewPrivate::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -149,9 +164,9 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const An instance of this class renders Web content from a URL or supplied as data, using features of the QtWebKit module. - If the width and height of the item is not set, they will dynamically adjust to - a size appropriate for the content. This width may be large (e.g., 980 pixels or - more) for typical online Web pages. + If the width and height of the item are not set, they will default to 800 and 600, + respectively. If the Web page contents is larger than that, scrollbars will be shown + if not disabled explicitly. \section1 Browser Features @@ -188,12 +203,6 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const */ /*! - \fn void QGraphicsWebView::statusChanged() - - This signal is emitted when the status bar text is changed by the page. -*/ - -/*! \fn void QGraphicsWebView::iconChanged() This signal is emitted whenever the icon of the page is loaded or changes. @@ -209,7 +218,7 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const This signal is emitted when a new load of the page is started. - \sa progressChanged(), loadFinished() + \sa loadProgress(), loadFinished() */ /*! @@ -222,22 +231,6 @@ QObject* QGraphicsWebViewPrivate::pluginParent() const */ /*! - \fn void QGraphicsWebView::progressChanged(qreal progress) - - This signal is emitted every time an element in the web page - completes loading and the overall loading progress advances. - - This signal tracks the progress of all child frames. - - The current value is provided by \a progress and scales from 0.0 to 1.0, - which is the default range of QProgressBar. - - \sa loadStarted(), loadFinished() -*/ - - - -/*! Constructs an empty QGraphicsWebView with parent \a parent. \sa load() @@ -426,22 +419,22 @@ void QGraphicsWebView::setPage(QWebPage* page) QWebFrame* mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl&)), - this, SIGNAL(urlChanged(const QUrl&))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); connect(d->page, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SLOT(_q_doLoadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString&)), - this, SIGNAL(statusBarMessage(const QString&))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); } /*! @@ -736,7 +729,7 @@ void QGraphicsWebView::triggerPageAction(QWebPage::WebAction action, bool checke Returns true if \a subString was found; otherwise returns false. - \sa selectedText(), selectionChanged() + \sa QWebPage::selectedText(), QWebPage::selectionChanged() */ bool QGraphicsWebView::findText(const QString &subString, QWebPage::FindFlags options) { @@ -986,6 +979,26 @@ void QGraphicsWebView::inputMethodEvent(QInputMethodEvent* ev) } /*! + \fn void QGraphicsWebView::statusBarMessage(const QString& text) + + This signal is emitted when the statusbar \a text is changed by the page. +*/ + +/*! + \fn void QGraphicsWebView::loadProgress(int progress) + + This signal is emitted every time an element in the web page + completes loading and the overall loading progress advances. + + This signal tracks the progress of all child frames. + + The current value is provided by \a progress and scales from 0 to 100, + which is the default range of QProgressBar. + + \sa loadStarted(), loadFinished() +*/ + +/*! \fn void QGraphicsWebView::linkClicked(const QUrl &url) This signal is emitted whenever the user clicks on a link and the page's linkDelegationPolicy diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp index 6305d10..8922150 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.cpp @@ -453,6 +453,30 @@ bool QWebElement::hasAttributes() const } /*! + Return the list of attributes for the namespace given as \a namespaceUri. + + \sa attribute(), setAttribute() +*/ +QStringList QWebElement::attributeNames(const QString& namespaceUri) const +{ + if (!m_element) + return QStringList(); + + QStringList attributeNameList; + const NamedNodeMap* const attrs = m_element->attributes(/* read only = */ true); + if (attrs) { + const String namespaceUriString(namespaceUri); // convert QString -> String once + const unsigned attrsCount = attrs->length(); + for (unsigned i = 0; i < attrsCount; ++i) { + const Attribute* const attribute = attrs->attributeItem(i); + if (namespaceUriString == attribute->namespaceURI()) + attributeNameList.append(attribute->localName()); + } + } + return attributeNameList; +} + +/*! Returns true if the element has keyboard input focus; otherwise, returns false \sa setFocus() @@ -1661,22 +1685,6 @@ QList<QWebElement> QWebElementCollection::toList() const QWebElementCollection provides STL style const iterators for fast low-level access to the elements. QWebElementCollection::const_iterator allows you to iterate over a QWebElementCollection. - - The default QWebElementCollection::const_iterator constructors creates an uninitialized iterator. You must initialize - it using a QWebElementCollection function like QWebElementCollection::begin() or QWebElementCollection::end() before you - can start iterating. -*/ - -/*! - \fn QWebElementCollection::const_iterator::const_iterator() - - Constructs an uninitialized iterator. - - Functions like operator*() and operator++() should not be called on - an uninitialized iterator. Use operator=() to assign a value - to it before using it. - - \sa QWebElementCollection::begin() */ /*! @@ -1824,3 +1832,193 @@ QList<QWebElement> QWebElementCollection::toList() const Returns true if the element pointed to by this iterator is greater than or equal to the element pointed to by the \a other iterator. */ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::begin() + + Returns an STL-style iterator pointing to the first element in the collection. + + \sa end() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::end() + + Returns an STL-style iterator pointing to the imaginary element after the + last element in the list. + + \sa begin() +*/ + +/*! + \fn QWebElementCollection::const_iterator QWebElementCollection::constBegin() const + + Returns an STL-style iterator pointing to the first element in the collection. + + \sa end() +*/ + +/*! + \fn QWebElementCollection::const_iterator QWebElementCollection::constEnd() const + + Returns an STL-style iterator pointing to the imaginary element after the + last element in the list. + + \sa begin() +*/ + +/*! + \class QWebElementCollection::iterator + \since 4.6 + \brief The QWebElementCollection::iterator class provides an STL-style iterator for QWebElementCollection. + + QWebElementCollection provides STL style iterators for fast low-level access to the elements. + + QWebElementCollection::iterator allows you to iterate over a QWebElementCollection. +*/ + +/*! + \fn QWebElementCollection::iterator::iterator(const iterator &other) + + Constructs a copy of \a other. +*/ + +/*! + \fn QWebElementCollection::iterator::iterator(const QWebElementCollection *collection, int index) + \internal +*/ + +/*! + \fn const QWebElement QWebElementCollection::iterator::operator*() const + + Returns the current element. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator==(const iterator &other) const + + Returns true if \a other points to the same item as this iterator; + otherwise returns false. + + \sa operator!=() +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator!=(const iterator &other) const + + Returns true if \a other points to a different element than this; + iterator; otherwise returns false. + + \sa operator==() +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator++() + + The prefix ++ operator (\c{++it}) advances the iterator to the next element in the collection + and returns an iterator to the new current element. + + Calling this function on QWebElementCollection::end() leads to undefined results. + + \sa operator--() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator++(int) + + \overload + + The postfix ++ operator (\c{it++}) advances the iterator to the next element in the collection + and returns an iterator to the previously current element. + + Calling this function on QWebElementCollection::end() leads to undefined results. +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator--() + + The prefix -- operator (\c{--it}) makes the preceding element current and returns an + iterator to the new current element. + + Calling this function on QWebElementCollection::begin() leads to undefined results. + + \sa operator++() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator--(int) + + \overload + + The postfix -- operator (\c{it--}) makes the preceding element current and returns + an iterator to the previously current element. +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator+=(int j) + + Advances the iterator by \a j elements. If \a j is negative, the iterator goes backward. + + \sa operator-=(), operator+() +*/ + +/*! + \fn QWebElementCollection::iterator &QWebElementCollection::iterator::operator-=(int j) + + Makes the iterator go back by \a j elements. If \a j is negative, the iterator goes forward. + + \sa operator+=(), operator-() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator+(int j) const + + Returns an iterator to the element at \a j positions forward from this iterator. If \a j + is negative, the iterator goes backward. + + \sa operator-(), operator+=() +*/ + +/*! + \fn QWebElementCollection::iterator QWebElementCollection::iterator::operator-(int j) const + + Returns an iterator to the element at \a j positiosn backward from this iterator. + If \a j is negative, the iterator goes forward. + + \sa operator+(), operator-=() +*/ + +/*! + \fn int QWebElementCollection::iterator::operator-(iterator other) const + + Returns the number of elements between the item point to by \a other + and the element pointed to by this iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator<(const iterator &other) const + + Returns true if the element pointed to by this iterator is less than the element pointed to + by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator<=(const iterator &other) const + + Returns true if the element pointed to by this iterator is less than or equal to the + element pointed to by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator>(const iterator &other) const + + Returns true if the element pointed to by this iterator is greater than the element pointed to + by the \a other iterator. +*/ + +/*! + \fn bool QWebElementCollection::iterator::operator>=(const iterator &other) const + + Returns true if the element pointed to by this iterator is greater than or equal to the + element pointed to by the \a other iterator. +*/ diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h index 9cb1ea1..3833070 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebelement.h @@ -21,6 +21,7 @@ #define QWEBELEMENT_H #include <QString> +#include <QStringList> #include <QRect> #include <QVariant> #include <QExplicitlySharedDataPointer> @@ -72,6 +73,7 @@ public: void removeAttribute(const QString& name); void removeAttributeNS(const QString& namespaceUri, const QString& name); bool hasAttributes() const; + QStringList attributeNames(const QString& namespaceUri = QString()) const; QStringList classes() const; bool hasClass(const QString& name) const; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 17a0118..e84b8df 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -324,7 +324,7 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l the HTML content readily available, you can use setHtml() instead. The page() function returns a pointer to the web page object. See - \l{Elements of QWebView} for an explanation of how web + \l{QWebView}{Elements of QWebView} for an explanation of how web frames are related to a web page and web view. The QWebFrame class also offers methods to retrieve both the URL currently @@ -356,6 +356,19 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l \sa QWebPage */ +/*! + \enum QWebFrame::RenderLayer + + This enum describes the layers available for rendering using \l{QWebFrame::}{render()}. + The layers can be OR-ed together from the following list: + + \value ContentsLayer The web content of the frame + \value ScrollBarLayer The scrollbars of the frame + \value PanIconLayer The icon used when panning the frame + + \value AllLayers Includes all the above layers +*/ + QWebFrame::QWebFrame(QWebPage *parent, QWebFrameData *frameData) : QObject(parent) , d(new QWebFramePrivate) @@ -471,7 +484,9 @@ QString QWebFrame::toPlainText() const d->frame->view()->layout(); Element *documentElement = d->frame->document()->documentElement(); - return documentElement->innerText(); + if (documentElement) + return documentElement->innerText(); + return QString(); } /*! @@ -766,6 +781,10 @@ void QWebFrame::load(const QNetworkRequest &req, The \a html is loaded immediately; external objects are loaded asynchronously. + If a script in the \a html runs longer than the default script timeout (currently 10 seconds), + for example due to being blocked by a modal JavaScript alert dialog, this method will return + as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously. + When using this method WebKit assumes that external resources such as JavaScript programs or style sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external script can be specified through the charset attribute of the HTML script tag. It is also possible diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index d4a491b..aedf95a 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -153,6 +153,7 @@ public: virtual void scroll(int dx, int dy, const QRect&); virtual void update(const QRect& dirtyRect); virtual void setInputMethodEnabled(bool enable); + virtual bool inputMethodEnabled() const; #if QT_VERSION >= 0x040600 virtual void setInputMethodHint(Qt::InputMethodHint hint, bool enable); #endif @@ -185,6 +186,12 @@ void QWebPageWidgetClient::setInputMethodEnabled(bool enable) { view->setAttribute(Qt::WA_InputMethodEnabled, enable); } + +bool QWebPageWidgetClient::inputMethodEnabled() const +{ + return view->testAttribute(Qt::WA_InputMethodEnabled); +} + #if QT_VERSION >= 0x040600 void QWebPageWidgetClient::setInputMethodHint(Qt::InputMethodHint hint, bool enable) { @@ -857,13 +864,13 @@ void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev) void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button) { #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) - if (q->view() && q->view()->testAttribute(Qt::WA_InputMethodEnabled) + if (client && client->inputMethodEnabled() && button == Qt::LeftButton && qApp->autoSipEnabled()) { QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( - q->view()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); + client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { QEvent event(QEvent::RequestSoftwareInputPanel); - QApplication::sendEvent(q->view(), &event); + QApplication::sendEvent(client->ownerWidget(), &event); } } @@ -1055,11 +1062,9 @@ void QWebPagePrivate::keyReleaseEvent(QKeyEvent *ev) void QWebPagePrivate::focusInEvent(QFocusEvent*) { FocusController *focusController = page->focusController(); - Frame *frame = focusController->focusedFrame(); focusController->setActive(true); - if (frame) - focusController->setFocused(true); - else + focusController->setFocused(true); + if (!focusController->focusedFrame()) focusController->setFocusedFrame(QWebFramePrivate::core(mainFrame)); } @@ -1675,7 +1680,7 @@ InspectorController* QWebPagePrivate::inspectorController() */ /*! - Constructs an empty QWebView with parent \a parent. + Constructs an empty QWebPage with parent \a parent. */ QWebPage::QWebPage(QObject *parent) : QObject(parent) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index ff86e1f..b637d04 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -62,8 +62,6 @@ public: QString localStoragePath; QString offlineWebApplicationCachePath; qint64 offlineStorageDefaultQuota; - float printingMinimumShrinkFactor; - float printingMaximumShrinkFactor; void apply(); WebCore::Settings* settings; @@ -176,12 +174,6 @@ void QWebSettingsPrivate::apply() QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath; settings->setLocalStorageDatabasePath(storagePath); - float minimumShrinkFactor = printingMinimumShrinkFactor > 0.0f ? printingMinimumShrinkFactor : global->printingMinimumShrinkFactor; - settings->setPrintingMinimumShrinkFactor(minimumShrinkFactor); - - float maximumShrinkFactor = printingMaximumShrinkFactor > 0.0f ? printingMaximumShrinkFactor : global->printingMaximumShrinkFactor; - settings->setPrintingMaximumShrinkFactor(maximumShrinkFactor); - value = attributes.value(QWebSettings::ZoomTextOnly, global->attributes.value(QWebSettings::ZoomTextOnly)); settings->setZoomsTextOnly(value); @@ -206,6 +198,7 @@ void QWebSettingsPrivate::apply() value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); settings->setAllowUniversalAccessFromFileURLs(value); + settings->setUsesPageCache(WebCore::pageCache()->capacity()); } else { QList<QWebSettingsPrivate*> settings = *::allSettings(); for (int i = 0; i < settings.count(); ++i) @@ -269,7 +262,7 @@ QWebSettings* QWebSettings::globalSettings() setOfflineStoragePath() with an appropriate file path, and can limit the quota for each application by calling setOfflineStorageDefaultQuota(). - \sa QWebPage::settings(), QWebView::settings(), {Browser} + \sa QWebPage::settings(), QWebView::settings(), {Web Browser} */ /*! @@ -346,6 +339,8 @@ QWebSettings* QWebSettings::globalSettings() web application cache feature is enabled or not. Disabled by default. \value LocalStorageEnabled Specifies whether support for the HTML 5 local storage feature is enabled or not. Disabled by default. + \value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use + QWebSettings::LocalStorageEnabled instead. \value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls. */ @@ -379,8 +374,6 @@ QWebSettings::QWebSettings() d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false); d->offlineStorageDefaultQuota = 5 * 1024 * 1024; d->defaultTextEncoding = QLatin1String("iso-8859-1"); - d->printingMinimumShrinkFactor = 0.0f; - d->printingMaximumShrinkFactor = 0.0f; } /*! @@ -495,60 +488,6 @@ QString QWebSettings::defaultTextEncoding() const } /*! - \since 4.7 - Specifies minimum shrink fator allowed for printing. If set to 0 a - default value is used. - - When printing, content will be shrunk to reduce page usage, it - will reduced by a factor between printingMinimumShrinkFactor and - printingMaximumShrinkFactor. - - \sa printingMinimumShrinkFactor() - \sa setPrintingMaximumShrinkFactor() - \sa printingMaximumShrinkFactor() -*/ -void QWebSettings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor) -{ - d->printingMinimumShrinkFactor = printingMinimumShrinkFactor; - d->apply(); -} - -/*! - \since 4.7 - returns the minimum shrink factor used for printing. - - \sa setPrintingMinimumShrinkFactor() -*/ -float QWebSettings::printingMinimumShrinkFactor() const -{ - return d->printingMinimumShrinkFactor; -} - -/*! - \since 4.7 - Specifies maximum shrink fator allowed for printing. If set to 0 a - default value is used. - - \sa setPrintingMinimumShrinkFactor() -*/ -void QWebSettings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor) -{ - d->printingMaximumShrinkFactor = printingMaximumShrinkFactor; - d->apply(); -} - -/*! - \since 4.7 - returns the maximum shrink factor used for printing. - - \sa setPrintingMinimumShrinkFactor() -*/ -float QWebSettings::printingMaximumShrinkFactor() const -{ - return d->printingMaximumShrinkFactor; -} - -/*! Sets the path of the icon database to \a path. The icon database is used to store "favicons" associated with web sites. @@ -618,7 +557,7 @@ QIcon QWebSettings::iconForUrl(const QUrl& url) return* icon; } -/*! +/* Returns the plugin database object. QWebPluginDatabase *QWebSettings::pluginDatabase() @@ -704,7 +643,9 @@ void QWebSettings::clearMemoryCaches() */ void QWebSettings::setMaximumPagesInCache(int pages) { + QWebSettingsPrivate* global = QWebSettings::globalSettings()->d; WebCore::pageCache()->setCapacity(qMax(0, pages)); + global->apply(); } /*! diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h index 3b6d1a7..50cf424 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h @@ -102,12 +102,6 @@ public: void setDefaultTextEncoding(const QString &encoding); QString defaultTextEncoding() const; - void setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor); - float printingMinimumShrinkFactor() const; - - void setPrintingMaximumShrinkFactor(float printingMaximimShrinkFactor); - float printingMaximumShrinkFactor() const; - static void setIconDatabasePath(const QString &location); static QString iconDatabasePath(); static void clearIconDatabase(); diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp index 55ce1f7..1d4b46f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp @@ -219,12 +219,12 @@ void QWebView::setPage(QWebPage* page) d->page->setPalette(palette()); // #### connect signals QWebFrame *mainFrame = d->page->mainFrame(); - connect(mainFrame, SIGNAL(titleChanged(const QString&)), - this, SIGNAL(titleChanged(const QString&))); + connect(mainFrame, SIGNAL(titleChanged(QString)), + this, SIGNAL(titleChanged(QString))); connect(mainFrame, SIGNAL(iconChanged()), this, SIGNAL(iconChanged())); - connect(mainFrame, SIGNAL(urlChanged(const QUrl &)), - this, SIGNAL(urlChanged(const QUrl &))); + connect(mainFrame, SIGNAL(urlChanged(QUrl)), + this, SIGNAL(urlChanged(QUrl))); connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted())); @@ -232,10 +232,10 @@ void QWebView::setPage(QWebPage* page) this, SIGNAL(loadProgress(int))); connect(d->page, SIGNAL(loadFinished(bool)), this, SIGNAL(loadFinished(bool))); - connect(d->page, SIGNAL(statusBarMessage(const QString &)), - this, SIGNAL(statusBarMessage(const QString &))); - connect(d->page, SIGNAL(linkClicked(const QUrl &)), - this, SIGNAL(linkClicked(const QUrl &))); + connect(d->page, SIGNAL(statusBarMessage(QString)), + this, SIGNAL(statusBarMessage(QString))); + connect(d->page, SIGNAL(linkClicked(QUrl)), + this, SIGNAL(linkClicked(QUrl))); connect(d->page, SIGNAL(microFocusChanged()), this, SLOT(updateMicroFocus())); @@ -251,7 +251,7 @@ void QWebView::setPage(QWebPage* page) \note The view remains the same until enough data has arrived to display the new \a url. - \sa setUrl(), url(), urlChanged(), guessUrlFromString() + \sa setUrl(), url(), urlChanged(), QUrl::fromUserInput() */ void QWebView::load(const QUrl &url) { @@ -759,8 +759,12 @@ void QWebView::paintEvent(QPaintEvent *ev) } /*! - This function is called whenever WebKit wants to create a new window of the given \a type, for example as a result of - a JavaScript request to open a document in a new window. + This function is called from the createWindow() method of the associated QWebPage, + each time the page wants to create a new window of the given \a type. This might + be the result, for example, of a JavaScript request to open a document in a new window. + + \note If the createWindow() method of the associated page is reimplemented, this + method is not called, unless explicitly done so in the reimplementation. \sa QWebPage::createWindow() */ diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 296e06c..2408dd4 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,333 @@ +2009-11-19 Olivier Goffart <ogoffart@trolltech.com> + + Reviewed by Simon Hausmann. + + [Qt] Normalize signal and slot signatures. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebView::setPage): + * Api/qwebview.cpp: + (QWebView::setPage): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::setFrame): + * docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp: + (wrapInFunction): + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::modified): + (tst_QWebPage::database): + +2009-11-18 Paul Olav Tvete <paul.tvete@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Make the QWebElement::render() test pass when pixmaps aren't 32 bit. + + * tests/qwebelement/tst_qwebelement.cpp: + (tst_QWebElement::render): + +2009-11-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Clarify and simplify the legal section in the overview documentation, + after review with our legal team. + + * docs/qtwebkit.qdoc: + +2009-11-18 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed and suggested by Tor Arne Vestbø. + + Fix the autotest after commit ecbb2c0dd21bfc197e1f7b53150ec9b1a1d8cb8f + to compare the Qt::ImFont property's family against an explicitly + previously configured family. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::inputMethods): + +2009-11-16 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + API documentation fixes. + + * Api/qgraphicswebview.cpp: Removed duplicate docs. + * Api/qwebelement.cpp: Added missing docs. + * Api/qwebsettings.cpp: Ditto. + +2009-11-14 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Antti Koivisto. + + [Qt] Broken back/forward after using ErrorPageExtension to set error page + https://bugs.webkit.org/show_bug.cgi?id=30573 + + Implemented autotests for covering the back/forward + reset problem involving error pages. + + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::errorPageExtension): + +2009-11-16 Holger Hans Peter Freyther <zecke@selfish.org> + + Reviewed by NOBODY (OOPS!). + + [Qt] Do not show the QWidget when the WebCore::Widget is hidden + https://bugs.webkit.org/show_bug.cgi?id=31203 + + The clipping code was making a QWidget visible even if the + WebCore::Widget was hidden. Fix the bug by calling setVisible + only if the WebCore::Widget is shown. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::QtPluginWidget::show): Override WebCore::Widget + (WebCore::QtPluginWidget::hide): Override WebCore::Widget + (WebCore::QtPluginWidget::handleVisibility): New method to call setVisible when we are visible + (FrameLoaderClientQt::createPlugin): Hide the QWidget by default + +2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + https://bugs.webkit.org/show_bug.cgi?id=30628 + Add an API to get all the attributes from a QWebElement. + + * Api/qwebelement.cpp: + (QWebElement::attributesName): + * Api/qwebelement.h: + * tests/qwebelement/tst_qwebelement.cpp: + (tst_QWebElement::listAttributes): + +2009-11-13 Andras Becsi <becsi.andras@stud.u-szeged.hu> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Enable Page Cache if setMaximumPagesInCache needs it. + This fixes https://bugs.webkit.org/show_bug.cgi?id=31266. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::setMaximumPagesInCache): + +2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Update documentation for the Qt API + + * Api/qgraphicswebview.cpp: + * Api/qwebelement.cpp: + * Api/qwebframe.cpp: + * Api/qwebsettings.cpp: + * Api/qwebview.cpp: + +2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + Use correct install-path when running qdoc3 + + * docs/docs.pri: + +2009-11-12 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Jan Alonzo. + + [Qt] Various doc fixes + https://bugs.webkit.org/show_bug.cgi?id=31358 + + QWebPage's constructor docs are mentioning "QWebView": + "Constructs an empty QWebView with parent". + + * Api/qwebpage.cpp: + +2009-11-11 Antonio Gomes <tonikitoo@webkit.org> + + Reviewed by Kenneth Christiansen. + + [Qt] Various doc fixes + https://bugs.webkit.org/show_bug.cgi?id=31358 + + Fixed wrong documentation: item's dimensions do fit to Web page + content by default. + + Kenneth agreed to land this as a followup patch to the + just landed documentation patch. + + * Api/qgraphicswebview.cpp: + +2009-11-11 David Boddie <dboddie@trolltech.com> + + Reviewed by Kenneth Christiansen. + + [Qt] Various doc fixes + https://bugs.webkit.org/show_bug.cgi?id=31323 + + Fixed and synchronized QWebView related documentation. + + * Api/qgraphicswebview.cpp: + * Api/qwebview.cpp: + +2009-11-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Few classes have virtual functions but non-virtual destructor + https://bugs.webkit.org/show_bug.cgi?id=31269 + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate): Add virtual + destructor. + +2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by NOBODY (OOPS!). + + [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml() + + This ensures that long-running JavaScript (for example due to a modal alert() dialog), + will not trigger a deferred load after only 500ms (the default tokenizer delay) while + still giving a reasonable timeout (10 seconds) to prevent deadlock. + + https://bugs.webkit.org/show_bug.cgi?id=29381 + + * Api/qwebframe.cpp: Document the behaviour + * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads + * tests/qwebframe/tst_qwebframe.cpp: Add test + +2009-11-13 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Fix initial QWebView focus behavior. + + focusController->setFocused(true) was not always called. + https://bugs.webkit.org/show_bug.cgi?id=31466 + + * Api/qwebpage.cpp: + (QWebPagePrivate::focusInEvent): + +2009-11-12 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Kenneth Rohde Christiansen. + + Custom printing shrink factors + https://bugs.webkit.org/show_bug.cgi?id=29042 + + This reverts commit r49769. The public API for this needs to be reviewed + before its inclusion in Qt. + + * Api/qwebsettings.cpp: + (QWebSettingsPrivate::apply): + (QWebSettings::QWebSettings): + * Api/qwebsettings.h: + +2009-11-11 Liang QI <liang.qi@nokia.com> + Update documentation for the Qt API + + * Api/qgraphicswebview.cpp: + * Api/qwebelement.cpp: + * Api/qwebframe.cpp: + * Api/qwebsettings.cpp: + * Api/qwebview.cpp: + +2009-11-13 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> + + Reviewed by Simon Hausmann. + + + [Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian. + + * tests/qwebframe/qwebframe.pro: + * tests/qwebframe/tst_qwebframe.cpp: + * tests/qwebpage/qwebpage.pro: + * tests/qwebpage/tst_qwebpage.cpp: + +2009-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Simon Hausmann. + + Fix a crash in the layout test plugins/document-open.html + + * Api/qwebframe.cpp: + (QWebFrame::toPlainText): + +2009-11-11 Warwick Allison <warwick.allison@nokia.com>, Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + [Qt] Regression: Preserve the parent of plugin objects when using + QtWebKit with only a QWebPage. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): Don't reparent + plugins to 0. + * tests/qwebpage/tst_qwebpage.cpp: + (PluginCounterPage::PluginCounterPage): Initialize m_pluginParent to 0. + (PluginCounterPage::~PluginCounterPage): Delete the plugin parent later + (after the page) + (PluginTracerPage::createPlugin): Assign a dummy parent to the plugin. + (PluginTracerPage::PluginTracerPage): Set up the plugin parent. + (tst_QWebPage::createViewlessPlugin): Verify that for viewless pages the + plugin parent remains unchanged. + +2009-11-11 David Boddie <dboddie@trolltech.com> + + [Qt] Doc: Added internal or hidden placeholder documentation. + + * Api/qwebpage.cpp: + +2009-11-11 Martin Smith <msmith@trolltech.com> + + [Qt] doc: Changed Trolltech to Nokia + + * Api/qwebview.cpp: + +2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Unreviewed documentation fixes. + + Added a few improvements from Jocelyn Turcotte to the + createWindow docs. + + * Api/qwebview.cpp: + +2009-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Unreviewed documentation fix. + + [Qt] Make qwebpage's createWindow not qwebview dependent. + https://bugs.webkit.org/show_bug.cgi?id=30771 + + Update documentation to make it clear that a reimplementation + of the createWindow method of the associated QWebPage can + result in the QWebView::createWindow method to never be called. + + * Api/qwebview.cpp: + +2009-11-11 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Tor Arne Vestbø. + + Fix enabling of software input panel when activating editable elements + in QGraphicsWebView. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::inputMethodEnabled): Implement method to + query for input method support. + * Api/qwebpage.cpp: + (QWebPageWidgetClient::inputMethodEnabled): Ditto for QWidget. + (QWebPagePrivate::handleSoftwareInputPanel): Don't use view() to + test for input method support. Instead query using QWebPageClient + and send the SIPR event to the ownerWidget() instead of the view(). + The latter is null for QGraphicsWebView. + * tests/qwebpage/tst_qwebpage.cpp: + (EventSpy::EventSpy): + (EventSpy::eventFilter): + (tst_QWebPage::inputMethods): Modify the test to verify that SIPR + events are dispatched when activating focusable content. + 2009-11-09 Benjamin Poulain <benjamin.poulain@nokia.com> Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index f706d77..5cabca0 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -37,6 +37,7 @@ #include "FrameTree.h" #include "FrameView.h" #include "DocumentLoader.h" +#include "JSDOMWindowBase.h" #include "MIMETypeRegistry.h" #include "ResourceResponse.h" #include "Page.h" @@ -176,8 +177,8 @@ void FrameLoaderClientQt::setFrame(QWebFrame* webFrame, Frame* frame) m_webFrame->page(), SIGNAL(loadFinished(bool))); connect(this, SIGNAL(loadFinished(bool)), m_webFrame, SIGNAL(loadFinished(bool))); - connect(this, SIGNAL(titleChanged(const QString&)), - m_webFrame, SIGNAL(titleChanged(const QString&))); + connect(this, SIGNAL(titleChanged(QString)), + m_webFrame, SIGNAL(titleChanged(QString))); } QWebFrame* FrameLoaderClientQt::webFrame() const @@ -770,8 +771,16 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&) WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData) { RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData); - if (substituteData.isValid()) + if (substituteData.isValid()) { loader->setDeferMainResourceDataLoad(false); + // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures + // that long-running JavaScript will still allow setHtml() to be synchronous, while + // still giving a reasonable timeout to prevent deadlock. + double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f; + m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay); + } else { + m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1); + } return loader.release(); } @@ -1088,7 +1097,11 @@ const unsigned numqStyleSheetProperties = sizeof(qstyleSheetProperties) / sizeof class QtPluginWidget: public Widget { public: - QtPluginWidget(QWidget* w = 0): Widget(w) {} + QtPluginWidget(QWidget* w = 0) + : Widget(w) + , m_visible(false) + {} + ~QtPluginWidget() { if (platformWidget()) @@ -1119,10 +1132,37 @@ public: QRegion clipRegion = QRegion(clipRect); platformWidget()->setMask(clipRegion); + handleVisibility(); + } + + virtual void hide() + { + m_visible = false; + Widget::hide(); + } + + virtual void show() + { + m_visible = true; + if (!platformWidget()) + return; + + handleVisibility(); + } + +private: + void handleVisibility() + { + if (!m_visible) + return; + // if setMask is set with an empty QRegion, no clipping will // be performed, so in that case we hide the platformWidget - platformWidget()->setVisible(!clipRegion.isEmpty()); + QRegion mask = platformWidget()->mask(); + platformWidget()->setVisible(!mask.isEmpty()); } + + bool m_visible; }; #if QT_VERSION >= 0x040600 @@ -1233,12 +1273,12 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, if (object) { QWidget* widget = qobject_cast<QWidget*>(object); if (widget) { - QWidget* parentWidget; + QWidget* parentWidget = 0; if (m_webFrame->page()->d->client) parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent()); - else - parentWidget = 0; // The plug-in won't be fully functional because the QWebView doesn't exist. - widget->setParent(parentWidget); + if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose. + widget->setParent(parentWidget); + widget->hide(); RefPtr<QtPluginWidget> w = adoptRef(new QtPluginWidget()); w->setPlatformWidget(widget); // Make sure it's invisible until properly placed into the layout @@ -1248,13 +1288,12 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, #if QT_VERSION >= 0x040600 QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object); if (graphicsWidget) { - QGraphicsObject* parentWidget; + QGraphicsObject* parentWidget = 0; if (m_webFrame->page()->d->client) parentWidget = qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent()); - else - parentWidget = 0; // The plug-in won't be fully functional because the QWebView doesn't exist. graphicsWidget->hide(); - graphicsWidget->setParentItem(parentWidget); + if (parentWidget) // don't reparent to nothing (i.e. keep whatever parent QWebPage::createPlugin() chose. + graphicsWidget->setParentItem(parentWidget); RefPtr<QtPluginGraphicsWidget> w = QtPluginGraphicsWidget::create(graphicsWidget); // Make sure it's invisible until properly placed into the layout w->setFrameRect(IntRect(0, 0, 0, 0)); diff --git a/src/3rdparty/webkit/WebKit/qt/docs/docs.pri b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri index 4a8c165..804817b 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/docs.pri +++ b/src/3rdparty/webkit/WebKit/qt/docs/docs.pri @@ -1,9 +1,9 @@ include(../../../WebKit.pri) unix { - QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/tools/qdoc3/qdoc3 + QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$$OUTPUT_DIR $$(QTDIR)/bin/qdoc3 } else { - QDOC = $$(QTDIR)\tools\qdoc3\release\qdoc3.exe + QDOC = $$(QTDIR)\bin\qdoc3.exe } unix { diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 09dfae5..411762a 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -25,13 +25,10 @@ Qt Commercial Edition licensees that wish to distribute applications that use the QtWebKit module need to be aware of their obligations under the - GNU Lesser General Public License (LGPL). + GNU Library General Public License (LGPL). Developers using the Open Source Edition can choose to redistribute - the module under the appropriate version of the GNU LGPL; version 2.1 - for applications and libraries licensed under the GNU GPL version 2, - or version 3 for applications and libraries licensed under the GNU - GPL version 2. + the module under the appropriate version of the GNU LGPL. \legalese WebKit is licensed under the GNU Library General Public License. diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp index 0ba1cad..a6b6620 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp +++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_qwebinspector_snippet.cpp @@ -10,7 +10,7 @@ void wrapInFunction() QWebInspector *inspector = new QWebInspector; inspector->setPage(page); - connect(page, SIGNAL(webInspectorTriggered(const QWebElement&)), inspector, SLOT(show())); + connect(page, SIGNAL(webInspectorTriggered(QWebElement)), inspector, SLOT(show())); //! [0] } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp index 117393a..e9dae18 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebelement/tst_qwebelement.cpp @@ -68,6 +68,7 @@ private slots: void simpleCollection(); void attributes(); void attributesNS(); + void listAttributes(); void classes(); void namespaceURI(); void iteration(); @@ -187,6 +188,29 @@ void tst_QWebElement::attributesNS() QCOMPARE(svg.attributeNS("http://www.w3.org/2000/svg", "foobar", "defaultblah"), QString("true")); } +void tst_QWebElement::listAttributes() +{ + QString content = "<html xmlns=\"http://www.w3.org/1999/xhtml\" " + "xmlns:svg=\"http://www.w3.org/2000/svg\">" + "<body><svg:svg foo=\"\" svg:bar=\"\">" + "</svg:svg></body></html>"; + + m_mainFrame->setContent(content.toUtf8(), "application/xhtml+xml"); + + QWebElement svg = m_mainFrame->findFirstElement("svg"); + QVERIFY(!svg.isNull()); + + QVERIFY(svg.attributeNames().contains("foo")); + QVERIFY(svg.attributeNames("http://www.w3.org/2000/svg").contains("bar")); + + svg.setAttributeNS("http://www.w3.org/2000/svg", "svg:foobar", "true"); + QVERIFY(svg.attributeNames().contains("foo")); + QStringList attributes = svg.attributeNames("http://www.w3.org/2000/svg"); + QCOMPARE(attributes.size(), 2); + QVERIFY(attributes.contains("bar")); + QVERIFY(attributes.contains("foobar")); +} + void tst_QWebElement::classes() { m_mainFrame->setHtml("<body><p class=\"a b c d a c\">Test"); @@ -971,7 +995,10 @@ void tst_QWebElement::render() QImage testImage(resource.width(), resource.height(), QImage::Format_ARGB32); QPainter painter0(&testImage); painter0.fillRect(imageRect, Qt::white); - painter0.drawImage(0, 0, resource); + // render() uses pixmaps internally, and pixmaps might have bit depths + // other than 32, giving different pixel values due to rounding. + QPixmap pix = QPixmap::fromImage(resource); + painter0.drawPixmap(0, 0, pix); painter0.end(); QImage image1(resource.width(), resource.height(), QImage::Format_ARGB32); diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 6f07e90..d88d905 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -591,6 +591,7 @@ private slots: void setHtml(); void setHtmlWithResource(); void setHtmlWithBaseURL(); + void setHtmlWithJSAlert(); void ipv6HostEncoding(); void metaData(); void popupFocus(); @@ -2290,7 +2291,7 @@ void tst_QWebFrame::requestedUrl() qRegisterMetaType<QList<QSslError> >("QList<QSslError>"); qRegisterMetaType<QNetworkReply* >("QNetworkReply*"); - QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&))); + QSignalSpy spy2(page.networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>))); frame->setUrl(QUrl("qrc:/fake-ssl-error.html")); QTest::qWait(200); QCOMPARE(spy2.count(), 1); @@ -2398,6 +2399,33 @@ void tst_QWebFrame::setHtmlWithBaseURL() QCOMPARE(m_view->page()->history()->count(), 0); } +class MyPage : public QWebPage +{ +public: + MyPage() : QWebPage(), alerts(0) {} + int alerts; + +protected: + virtual void javaScriptAlert(QWebFrame*, const QString& msg) + { + alerts++; + QCOMPARE(msg, QString("foo")); + // Should not be enough to trigger deferred loading, since we've upped the HTML + // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing() + QTest::qWait(1000); + } +}; + +void tst_QWebFrame::setHtmlWithJSAlert() +{ + QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>"); + MyPage page; + m_view->setPage(&page); + page.mainFrame()->setHtml(html); + QCOMPARE(page.alerts, 1); + QCOMPARE(m_view->page()->mainFrame()->toHtml(), html); +} + class TestNetworkManager : public QNetworkAccessManager { public: @@ -2752,7 +2780,7 @@ void tst_QWebFrame::evaluateWillCauseRepaint() view.page()->mainFrame()->evaluateJavaScript( "document.getElementById('junk').style.display = 'none';"); - ::waitForSignal(view.page(), SIGNAL(repaintRequested( const QRect &))); + ::waitForSignal(view.page(), SIGNAL(repaintRequested(QRect))); QTest::qWait(2000); } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 93a1784..32002e7 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -85,6 +85,22 @@ static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) return timeoutSpy.isEmpty(); } +class EventSpy : public QObject, public QList<QEvent::Type> +{ + Q_OBJECT +public: + EventSpy(QObject* objectToSpy) + { + objectToSpy->installEventFilter(this); + } + + virtual bool eventFilter(QObject* receiver, QEvent* event) + { + append(event->type()); + return false; + } +}; + class tst_QWebPage : public QObject { Q_OBJECT @@ -432,7 +448,7 @@ void tst_QWebPage::modified() m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fourth page")); QVERIFY(m_page->history()->count() == 2); m_page->mainFrame()->setUrl(QUrl("data:text/html,<body>This is fifth page")); - QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*, QWebHistoryItem*)))); + QVERIFY(::waitForSignal(m_page, SIGNAL(saveFrameStateRequested(QWebFrame*,QWebHistoryItem*)))); } void tst_QWebPage::contextMenuCrash() @@ -468,7 +484,7 @@ void tst_QWebPage::database() QFile::remove(dbFileName); qRegisterMetaType<QWebFrame*>("QWebFrame*"); - QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame *, QString))); + QSignalSpy spy(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString))); m_view->setHtml(QString("<html><head><script>var db; db=openDatabase('testdb', '1.0', 'test database API', 50000); </script></head><body><div></div></body></html>"), QUrl("http://www.myexample.com")); QTRY_COMPARE(spy.count(), 1); m_page->mainFrame()->evaluateJavaScript("var db2; db2=openDatabase('testdb', '1.0', 'test database API', 50000);"); @@ -646,20 +662,41 @@ class PluginCounterPage : public QWebPage { public: int m_count; QPointer<QObject> m_widget; - PluginCounterPage(QObject* parent = 0) : QWebPage(parent), m_count(0), m_widget(0) + QObject* m_pluginParent; + PluginCounterPage(QObject* parent = 0) + : QWebPage(parent) + , m_count(0) + , m_widget(0) + , m_pluginParent(0) { settings()->setAttribute(QWebSettings::PluginsEnabled, true); } + ~PluginCounterPage() + { + if (m_pluginParent) + m_pluginParent->deleteLater(); + } }; template<class T> class PluginTracerPage : public PluginCounterPage { public: - PluginTracerPage(QObject* parent = 0) : PluginCounterPage(parent) {} + PluginTracerPage(QObject* parent = 0) + : PluginCounterPage(parent) + { + // this is a dummy parent object for the created plugin + m_pluginParent = new T; + } virtual QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) { m_count++; - return m_widget = new T(); + m_widget = new T; + // need a cast to the specific type, as QObject::setParent cannot be called, + // because it is not virtual. Instead it is necesary to call QWidget::setParent, + // which also takes a QWidget* instead of a QObject*. Therefore we need to + // upcast to T*, which is a QWidget. + static_cast<T*>(m_widget.data())->setParent(static_cast<T*>(m_pluginParent)); + return m_widget; } }; @@ -725,6 +762,8 @@ void tst_QWebPage::createViewlessPlugin() page->mainFrame()->setHtml(content); QCOMPARE(page->m_count, 1); QVERIFY(page->m_widget); + QVERIFY(page->m_pluginParent); + QVERIFY(page->m_widget->parent() == page->m_pluginParent); delete page; } @@ -1332,12 +1371,15 @@ void tst_QWebPage::inputMethods() else QVERIFY2(false, "Unknown view type"); + page->settings()->setFontFamily(QWebSettings::SerifFont, "FooSerifFont"); page->mainFrame()->setHtml("<html><body>" \ "<input type='text' id='input1' style='font-family: serif' value='' maxlength='20'/><br>" \ "<input type='password'/>" \ "</body></html>"); page->mainFrame()->setFocus(); + EventSpy viewEventSpy(container); + QWebElementCollection inputs = page->mainFrame()->documentElement().findAll("input"); QMouseEvent evpres(QEvent::MouseButtonPress, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); @@ -1345,6 +1387,18 @@ void tst_QWebPage::inputMethods() QMouseEvent evrel(QEvent::MouseButtonRelease, inputs.at(0).geometry().center(), Qt::LeftButton, Qt::NoButton, Qt::NoModifier); page->event(&evrel); +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QVERIFY(!viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); +#endif + viewEventSpy.clear(); + + page->event(&evpres); + page->event(&evrel); + +#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0) + QVERIFY(viewEventSpy.contains(QEvent::RequestSoftwareInputPanel)); +#endif + //ImMicroFocus QVariant variant = page->inputMethodQuery(Qt::ImMicroFocus); QRect focusRect = variant.toRect(); @@ -1353,7 +1407,7 @@ void tst_QWebPage::inputMethods() //ImFont variant = page->inputMethodQuery(Qt::ImFont); QFont font = variant.value<QFont>(); - QCOMPARE(QString("-webkit-serif"), font.family()); + QCOMPARE(page->settings()->fontFamily(QWebSettings::SerifFont), font.family()); QList<QInputMethodEvent::Attribute> inputAttributes; @@ -1604,6 +1658,22 @@ void tst_QWebPage::errorPageExtension() QCOMPARE(page->history()->canGoBack(), true); QCOMPARE(page->history()->canGoForward(), false); + page->triggerAction(QWebPage::Back); + QTest::qWait(2000); + QCOMPARE(page->history()->canGoBack(), false); + QCOMPARE(page->history()->canGoForward(), true); + + page->triggerAction(QWebPage::Forward); + QTest::qWait(2000); + QCOMPARE(page->history()->canGoBack(), true); + QCOMPARE(page->history()->canGoForward(), false); + + page->triggerAction(QWebPage::Back); + QTest::qWait(2000); + QCOMPARE(page->history()->canGoBack(), false); + QCOMPARE(page->history()->canGoForward(), true); + QCOMPARE(page->history()->currentItem().url(), QUrl("qrc:///frametest/index.html")); + m_view->setPage(0); } diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp index be99b3b..ef4989b 100644 --- a/src/corelib/animation/qabstractanimation.cpp +++ b/src/corelib/animation/qabstractanimation.cpp @@ -665,7 +665,7 @@ int QAbstractAnimation::currentLoopTime() const The animation's current time starts at 0, and ends at totalDuration(). - \sa loopCount, currentLoopTime + \sa loopCount, currentLoopTime() */ int QAbstractAnimation::currentTime() const { diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp index c735778..d529f67 100644 --- a/src/corelib/animation/qvariantanimation.cpp +++ b/src/corelib/animation/qvariantanimation.cpp @@ -104,15 +104,32 @@ QT_BEGIN_NAMESPACE \o \l{QMetaType::}{QLine} \o \l{QMetaType::}{QLineF} \o \l{QMetaType::}{QPoint} + \o \l{QMetaType::}{QPointF} \o \l{QMetaType::}{QSize} \o \l{QMetaType::}{QSizeF} \o \l{QMetaType::}{QRect} \o \l{QMetaType::}{QRectF} + \o \l{QMetaType::}{QColor} \endlist If you need to interpolate other variant types, including custom types, you have to implement interpolation for these yourself. - You do this by reimplementing interpolated(), which returns + To do this, you can register an interpolator function for a given + type. This function takes 3 parameters: the start value, the end value + and the current progress. + + Example: + \code + QVariant myColorInterpolator(const QColor &start, const QColor &end, qreal progress) + { + ... + return QColor(...); + } + ... + qRegisterAnimationInterpolator<QColor>(myColorInterpolator); + \endcode + + Another option is to reimplement interpolated(), which returns interpolation values for the value being interpolated. \omit We need some snippets around here. \endomit diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 680fcd7..5d62095 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1573,9 +1573,6 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba) cannot be detected from the content provided, \a defaultCodec is returned. - The behavior of this function is undefined if \a ba is not - encoded in unicode. - \sa codecForHtml() */ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec) @@ -1620,9 +1617,6 @@ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba, QTextCodec *defaul that is capable of decoding the text to unicode. If the codec cannot be detected, this overload returns a Latin-1 QTextCodec. - The behavior of this function is undefined if \a ba is not - encoded in unicode. - \sa codecForHtml() */ QTextCodec *QTextCodec::codecForUtfText(const QByteArray &ba) diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri index 0fe757d..b916b4d 100644 --- a/src/corelib/global/global.pri +++ b/src/corelib/global/global.pri @@ -19,7 +19,7 @@ INCLUDEPATH += $$QT_BUILD_TREE/src/corelib/global # Only used on platforms with CONFIG += precompile_header PRECOMPILED_HEADER = global/qt_pch.h -linux-g++*:!static { +linux*-g++*:!static { QMAKE_LFLAGS += -Wl,-e,qt_core_boilerplate prog=$$quote(if (/program interpreter: (.*)]/) { print $1; }) DEFINES += ELF_INTERPRETER=\\\"$$system(readelf -l /bin/ls | perl -n -e \'$$prog\')\\\" diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index 77785e8..1c52d4c 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -217,6 +217,9 @@ // Session Manager //#define QT_NO_SESSIONMANAGER +// QSettings +//#define QT_NO_SETTINGS + // QSharedMemory //#define QT_NO_SHAREDMEMORY @@ -352,6 +355,11 @@ #define QT_NO_IMAGEFORMAT_XPM #endif +// QLibrary +#if !defined(QT_NO_LIBRARY) && (defined(QT_NO_SETTINGS)) +#define QT_NO_LIBRARY +#endif + // QMenu #if !defined(QT_NO_MENU) && (defined(QT_NO_ACTION)) #define QT_NO_MENU @@ -367,6 +375,11 @@ #define QT_NO_PHONON_SEEKSLIDER #endif +// Phonon::AbstractMediaStream +#if !defined(QT_NO_PHONON_SETTINGSGROUP) && (defined(QT_NO_SETTINGS)) +#define QT_NO_PHONON_SETTINGSGROUP +#endif + // Phonon::VideoPlayer #if !defined(QT_NO_PHONON_VIDEOPLAYER) && (defined(QT_NO_PHONON_VIDEO)) #define QT_NO_PHONON_VIDEOPLAYER @@ -422,11 +435,6 @@ #define QT_NO_SCROLLBAR #endif -// QSettings -#if !defined(QT_NO_SETTINGS) && (defined(QT_NO_TEXTSTREAM)) -#define QT_NO_SETTINGS -#endif - // SOCKS5 #if !defined(QT_NO_SOCKS5) && (defined(QT_NO_NETWORKPROXY)) #define QT_NO_SOCKS5 @@ -507,14 +515,14 @@ #define QT_NO_HTTP #endif -// QLibrary -#if !defined(QT_NO_LIBRARY) && (defined(QT_NO_SETTINGS)) -#define QT_NO_LIBRARY +// QInputContext +#if !defined(QT_NO_IM) && (defined(QT_NO_LIBRARY)) +#define QT_NO_IM #endif -// Phonon::AbstractMediaStream -#if !defined(QT_NO_PHONON_SETTINGSGROUP) && (defined(QT_NO_SETTINGS)) -#define QT_NO_PHONON_SETTINGSGROUP +// Phonon::PlatformPlugin +#if !defined(QT_NO_PHONON_PLATFORMPLUGIN) && (defined(QT_NO_LIBRARY)) +#define QT_NO_PHONON_PLATFORMPLUGIN #endif // QScrollArea @@ -562,21 +570,11 @@ #define QT_NO_GRAPHICSVIEW #endif -// QInputContext -#if !defined(QT_NO_IM) && (defined(QT_NO_LIBRARY)) -#define QT_NO_IM -#endif - // QMdiArea #if !defined(QT_NO_MDIAREA) && (defined(QT_NO_SCROLLAREA)) #define QT_NO_MDIAREA #endif -// Phonon::PlatformPlugin -#if !defined(QT_NO_PHONON_PLATFORMPLUGIN) && (defined(QT_NO_LIBRARY)) -#define QT_NO_PHONON_PLATFORMPLUGIN -#endif - // Phonon::VolumeSlider #if !defined(QT_NO_PHONON_VOLUMESLIDER) && (defined(QT_NO_SLIDER) || defined(QT_NO_TOOLBUTTON)) #define QT_NO_PHONON_VOLUMESLIDER @@ -587,6 +585,11 @@ #define QT_NO_PRINTER #endif +// QWSInputMethod +#if !defined(QT_NO_QWS_INPUTMETHODS) && (defined(QT_NO_IM)) +#define QT_NO_QWS_INPUTMETHODS +#endif + // QSpinBox #if !defined(QT_NO_SPINBOX) && (defined(QT_NO_SPINWIDGET) || defined(QT_NO_LINEEDIT) || defined(QT_NO_VALIDATOR)) #define QT_NO_SPINBOX @@ -627,6 +630,11 @@ #define QT_NO_TABDIALOG #endif +// QTextCodecPlugin +#if !defined(QT_NO_TEXTCODECPLUGIN) && (defined(QT_NO_TEXTCODEC) || defined(QT_NO_LIBRARY)) +#define QT_NO_TEXTCODECPLUGIN +#endif + // QColorDialog #if !defined(QT_NO_COLORDIALOG) && (defined(QT_NO_SPINBOX)) #define QT_NO_COLORDIALOG @@ -647,11 +655,6 @@ #define QT_NO_MENUBAR #endif -// QWSInputMethod -#if !defined(QT_NO_QWS_INPUTMETHODS) && (defined(QT_NO_IM)) -#define QT_NO_QWS_INPUTMETHODS -#endif - // Sound Server #if !defined(QT_NO_QWS_SOUNDSERVER) && (defined(QT_NO_SOUND) || defined(QT_NO_HOSTINFO) || defined(QT_NO_QWS_MULTIPROCESS)) #define QT_NO_QWS_SOUNDSERVER @@ -672,11 +675,6 @@ #define QT_NO_TABWIDGET #endif -// QTextCodecPlugin -#if !defined(QT_NO_TEXTCODECPLUGIN) && (defined(QT_NO_TEXTCODEC) || defined(QT_NO_LIBRARY)) -#define QT_NO_TEXTCODECPLUGIN -#endif - // QTextEdit #if !defined(QT_NO_TEXTEDIT) && (defined(QT_NO_SCROLLAREA) || defined(QT_NO_PROPERTIES)) #define QT_NO_TEXTEDIT @@ -757,6 +755,11 @@ #define QT_NO_COMPLETER #endif +// Common UNIX Printing System +#if !defined(QT_NO_CUPS) && (defined(QT_NO_PRINTER) || defined(QT_NO_LIBRARY)) +#define QT_NO_CUPS +#endif + // QDataWidgetMapper #if !defined(QT_NO_DATAWIDGETMAPPER) && (defined(QT_NO_ITEMVIEWS) || defined(QT_NO_PROPERTIES)) #define QT_NO_DATAWIDGETMAPPER @@ -787,11 +790,6 @@ #define QT_NO_TREEWIDGET #endif -// Common UNIX Printing System -#if !defined(QT_NO_CUPS) && (defined(QT_NO_PRINTER) || defined(QT_NO_LIBRARY)) -#define QT_NO_CUPS -#endif - // QDirModel #if !defined(QT_NO_DIRMODEL) && (defined(QT_NO_ITEMVIEWS) || defined(QT_NO_FILESYSTEMMODEL)) #define QT_NO_DIRMODEL diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index ec4945f..251391e 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -216,7 +216,7 @@ SeeAlso: ??? Feature: SETTINGS Description: Supports persistent application settings. Section: File I/O -Requires: TEXTSTREAM +Requires: Name: QSettings SeeAlso: ??? diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index e2c524d..1f0b80c 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -910,6 +910,8 @@ QT_END_INCLUDE_NAMESPACE /* Symbian OS defines TRUE = 1 and FALSE = 0, redefine to built-in booleans to make autotests work properly */ #ifdef Q_OS_SYMBIAN + #include <e32def.h> /* Symbian OS defines */ + #undef TRUE #undef FALSE #endif diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 15325ae..77a86bb 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -46,7 +46,11 @@ #include "qlibraryinfo.h" #include "qscopedpointer.h" -#ifdef QT_BUILD_QMAKE +#if defined(QT_BUILD_QMAKE) || defined(QT_BOOTSTRAPPED) +# define BOOTSTRAPPING +#endif + +#ifdef BOOTSTRAPPING QT_BEGIN_NAMESPACE extern QString qmake_libraryInfoFile(); QT_END_NAMESPACE @@ -91,7 +95,7 @@ public: QLibrarySettings::QLibrarySettings() : settings(QLibraryInfoPrivate::findConfiguration()) { -#ifndef QT_BUILD_QMAKE +#ifndef BOOTSTRAPPING qAddPostRoutine(QLibraryInfoPrivate::cleanup); #endif } @@ -99,7 +103,7 @@ QLibrarySettings::QLibrarySettings() QSettings *QLibraryInfoPrivate::findConfiguration() { QString qtconfig = QLatin1String(":/qt/etc/qt.conf"); -#ifdef QT_BUILD_QMAKE +#ifdef BOOTSTRAPPING if(!QFile::exists(qtconfig)) qtconfig = qmake_libraryInfoFile(); #else @@ -425,7 +429,7 @@ QLibraryInfo::location(LibraryLocation loc) if (QDir::isRelativePath(ret)) { if (loc == PrefixPath) { // we make the prefix path absolute to the executable's directory -#ifdef QT_BUILD_QMAKE +#ifdef BOOTSTRAPPING return QFileInfo(qmake_libraryInfoFile()).absolutePath(); #else if (QCoreApplication::instance()) { diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index ae47f13..7ee7a76 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -884,7 +884,7 @@ \value WA_InputMethodEnabled Enables input methods for Asian languages. Must be set when creating custom text editing widgets. - On Windows CE this flag can be used in addition to + On Windows CE and Symbian this flag can be used in addition to QApplication::autoSipEnabled to automatically display the SIP when entering a widget. diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 308e847..e6cda93 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -42,7 +42,7 @@ #include "qdatastream.h" #include "qdatastream_p.h" -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) #include "qbuffer.h" #include "qstring.h" #include <stdio.h> diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index f8e0608..cf7633f 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -66,7 +66,7 @@ template <typename T> class QSet; template <class Key, class T> class QHash; template <class Key, class T> class QMap; -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) class QDataStreamPrivate; class Q_CORE_EXPORT QDataStream { diff --git a/src/corelib/io/qdatastream_p.h b/src/corelib/io/qdatastream_p.h index 157fee9..98dd21f 100644 --- a/src/corelib/io/qdatastream_p.h +++ b/src/corelib/io/qdatastream_p.h @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) class QDataStreamPrivate { public: diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index c9b2603..d4077bc 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1339,7 +1339,7 @@ QFile::setPermissions(const QString &fileName, Permissions permissions) static inline qint64 _qfile_writeData(QAbstractFileEngine *engine, QRingBuffer *buffer) { - qint64 ret = engine->write(buffer->readPointer(), buffer->size()); + qint64 ret = engine->write(buffer->readPointer(), buffer->nextDataBlockSize()); if (ret > 0) buffer->free(ret); return ret; diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp index f3cc211..87fe630 100644 --- a/src/corelib/io/qfilesystemwatcher_win.cpp +++ b/src/corelib/io/qfilesystemwatcher_win.cpp @@ -201,10 +201,10 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths, else files->append(path); - connect(thread, SIGNAL(fileChanged(const QString &, bool)), - this, SIGNAL(fileChanged(const QString &, bool))); - connect(thread, SIGNAL(directoryChanged(const QString &, bool)), - this, SIGNAL(directoryChanged(const QString &, bool))); + connect(thread, SIGNAL(fileChanged(QString,bool)), + this, SIGNAL(fileChanged(QString,bool))); + connect(thread, SIGNAL(directoryChanged(QString,bool)), + this, SIGNAL(directoryChanged(QString,bool))); thread->msg = '@'; thread->start(); diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 9ab831f..3cf9b7e 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -762,12 +762,10 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len) // Buffered stdlib mode. size_t result; - bool eof; do { result = fwrite(data + writtenBytes, 1, size_t(len - writtenBytes), fh); writtenBytes += result; - eof = feof(fh); - } while (!eof && (result == 0 ? errno == EINTR : writtenBytes < len)); + } while (result == 0 ? errno == EINTR : writtenBytes < len); } else if (fd != -1) { // Unbuffered stdio mode. @@ -783,7 +781,7 @@ qint64 QFSFileEnginePrivate::writeFdFh(const char *data, qint64 len) || (result > 0 && (writtenBytes += result) < len)); } - if (writtenBytes == 0) { + if (len && writtenBytes == 0) { writtenBytes = -1; q->setError(errno == ENOSPC ? QFile::ResourceError : QFile::WriteError, qt_error_string(errno)); } diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 05e6fab..8cbf6a3 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1245,7 +1245,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla } if (offset < 0 || offset != qint64(QT_OFF_T(offset)) - || size < 0 || size > qint64(size_t(-1))) { + || size < 0 || quint64(size) > quint64(size_t(-1))) { q->setError(QFile::UnspecifiedError, qt_error_string(int(EINVAL))); return 0; } @@ -1254,7 +1254,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla // undefined behavior. Otherwise, let mmap have its say. if (doStat() && (QT_OFF_T(size) > st.st_size - QT_OFF_T(offset))) - return 0; + qWarning("QFSFileEngine::map: Mapping a file beyond its size is not portable"); int access = 0; if (openMode & QIODevice::ReadOnly) access |= PROT_READ; diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 4494d2a..0e5a2de 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -619,7 +619,8 @@ qint64 QIODevice::size() const */ bool QIODevice::seek(qint64 pos) { - if (d_func()->openMode == NotOpen) { + Q_D(QIODevice); + if (d->openMode == NotOpen) { qWarning("QIODevice::seek: The device is not open"); return false; } @@ -628,7 +629,6 @@ bool QIODevice::seek(qint64 pos) return false; } - Q_D(QIODevice); #if defined QIODEVICE_DEBUG printf("%p QIODevice::seek(%d), before: d->pos = %d, d->buffer.size() = %d\n", this, int(pos), int(d->pos), d->buffer.size()); @@ -640,21 +640,16 @@ bool QIODevice::seek(qint64 pos) d->devicePos = pos; } - if (offset > 0 && !d->buffer.isEmpty()) { - // When seeking forwards, we need to pop bytes off the front of the - // buffer. - do { - int bytesToSkip = int(qMin<qint64>(offset, INT_MAX)); - d->buffer.skip(bytesToSkip); - offset -= bytesToSkip; - } while (offset > 0); - } else if (offset < 0) { + if (offset < 0 + || offset >= qint64(d->buffer.size())) // When seeking backwards, an operation that is only allowed for // random-access devices, the buffer is cleared. The next read // operation will then refill the buffer. We can optimize this, if we // find that seeking backwards becomes a significant performance hit. d->buffer.clear(); - } + else if (!d->buffer.isEmpty()) + d->buffer.skip(int(offset)); + #if defined QIODEVICE_DEBUG printf("%p \tafter: d->pos == %d, d->buffer.size() == %d\n", this, int(d->pos), d->buffer.size()); @@ -762,22 +757,20 @@ qint64 QIODevice::read(char *data, qint64 maxSize) // Short circuit for getChar() if (maxSize == 1) { - int chint = d->buffer.getChar(); - if (chint != -1) { + int chint; + while ((chint = d->buffer.getChar()) != -1) { + if (!sequential) + ++d->pos; + char c = char(uchar(chint)); - if (c == '\r' && (d->openMode & Text)) { - d->buffer.ungetChar(c); - } else { - if (data) - *data = c; - if (!sequential) - ++d->pos; + if (c == '\r' && (d->openMode & Text)) + continue; + *data = c; #if defined QIODEVICE_DEBUG - printf("%p \tread 0x%hhx (%c) returning 1 (shortcut)\n", this, - int(c), isprint(c) ? c : '?'); + printf("%p \tread 0x%hhx (%c) returning 1 (shortcut)\n", this, + int(c), isprint(c) ? c : '?'); #endif - return qint64(1); - } + return qint64(1); } } @@ -911,10 +904,10 @@ qint64 QIODevice::read(char *data, qint64 maxSize) QByteArray QIODevice::read(qint64 maxSize) { Q_D(QIODevice); - CHECK_MAXLEN(read, QByteArray()); - QByteArray tmp; - qint64 readSoFar = 0; - char buffer[4096]; + QByteArray result; + + CHECK_MAXLEN(read, result); + #if defined QIODEVICE_DEBUG printf("%p QIODevice::read(%d), d->pos = %d, d->buffer.size() = %d\n", this, int(maxSize), int(d->pos), int(d->buffer.size())); @@ -922,16 +915,34 @@ QByteArray QIODevice::read(qint64 maxSize) Q_UNUSED(d); #endif - do { - qint64 bytesToRead = qMin(int(maxSize - readSoFar), int(sizeof(buffer))); - qint64 readBytes = read(buffer, bytesToRead); - if (readBytes <= 0) - break; - tmp.append(buffer, (int) readBytes); - readSoFar += readBytes; - } while (readSoFar < maxSize && bytesAvailable() > 0); + if (maxSize != qint64(int(maxSize))) { + qWarning("QIODevice::read: maxSize argument exceeds QByteArray size limit"); + maxSize = INT_MAX; + } + + qint64 readBytes = 0; + if (maxSize) { + result.resize(int(maxSize)); + if (!result.size()) { + // If resize fails, read incrementally. + qint64 readResult; + do { + result.resize(int(qMin(maxSize, result.size() + QIODEVICE_BUFFERSIZE))); + readResult = read(result.data() + readBytes, result.size() - readBytes); + if (readResult > 0 || readBytes == 0) + readBytes += readResult; + } while (readResult == QIODEVICE_BUFFERSIZE); + } else { + readBytes = read(result.data(), result.size()); + } + } + + if (readBytes <= 0) + result.clear(); + else + result.resize(int(readBytes)); - return tmp; + return result; } /*! @@ -952,28 +963,30 @@ QByteArray QIODevice::readAll() this, int(d->pos), int(d->buffer.size())); #endif - QByteArray tmp; - if (d->isSequential() || size() == 0) { - // Read it in chunks. Use bytesAvailable() as an unreliable hint for - // sequential devices, but try to read 4K as a minimum. - int chunkSize = qMax(qint64(4096), bytesAvailable()); - qint64 totalRead = 0; - forever { - tmp.resize(tmp.size() + chunkSize); - qint64 readBytes = read(tmp.data() + totalRead, chunkSize); - tmp.chop(chunkSize - (readBytes < 0 ? 0 : readBytes)); - if (readBytes <= 0) - return tmp; - totalRead += readBytes; - chunkSize = qMax(qint64(4096), bytesAvailable()); - } + QByteArray result; + qint64 readBytes = 0; + if (d->isSequential() || (readBytes = size()) == 0) { + // Size is unknown, read incrementally. + qint64 readResult; + do { + result.resize(result.size() + QIODEVICE_BUFFERSIZE); + readResult = read(result.data() + readBytes, result.size() - readBytes); + if (readResult > 0 || readBytes == 0) + readBytes += readResult; + } while (readResult > 0); } else { // Read it all in one go. - tmp.resize(int(bytesAvailable())); - qint64 readBytes = read(tmp.data(), tmp.size()); - tmp.resize(readBytes < 0 ? 0 : int(readBytes)); + // If resize fails, don't read anything. + result.resize(int(readBytes - d->pos)); + readBytes = read(result.data(), result.size()); } - return tmp; + + if (readBytes <= 0) + result.clear(); + else + result.resize(int(readBytes)); + + return result; } /*! @@ -1122,11 +1135,9 @@ qint64 QIODevice::readLine(char *data, qint64 maxSize) QByteArray QIODevice::readLine(qint64 maxSize) { Q_D(QIODevice); - CHECK_MAXLEN(readLine, QByteArray()); - QByteArray tmp; - const int BufferGrowth = 4096; - qint64 readSoFar = 0; - qint64 readBytes = 0; + QByteArray result; + + CHECK_MAXLEN(readLine, result); #if defined QIODEVICE_DEBUG printf("%p QIODevice::readLine(%d), d->pos = %d, d->buffer.size() = %d\n", @@ -1135,25 +1146,38 @@ QByteArray QIODevice::readLine(qint64 maxSize) Q_UNUSED(d); #endif - do { - if (maxSize != 0) - tmp.resize(int(readSoFar + qMin(int(maxSize), BufferGrowth))); - else - tmp.resize(int(readSoFar + BufferGrowth)); - readBytes = readLine(tmp.data() + readSoFar, tmp.size() - readSoFar); - if (readBytes <= 0) - break; + if (maxSize > INT_MAX) { + qWarning("QIODevice::read: maxSize argument exceeds QByteArray size limit"); + maxSize = INT_MAX; + } - readSoFar += readBytes; - } while ((!maxSize || readSoFar < maxSize) && - readSoFar + 1 == tmp.size() && // +1 due to the ending null - tmp.at(readSoFar - 1) != '\n'); + result.resize(int(maxSize)); + qint64 readBytes = 0; + if (!result.size()) { + // If resize fails or maxSize == 0, read incrementally + if (maxSize == 0) + maxSize = INT_MAX; + + // The first iteration needs to leave an extra byte for the terminating null + result.resize(1); - if (readSoFar == 0 && readBytes == -1) - tmp.clear(); // return Null if we found an error + qint64 readResult; + do { + result.resize(int(qMin(maxSize, result.size() + QIODEVICE_BUFFERSIZE))); + readResult = readLine(result.data() + readBytes, result.size() - readBytes); + if (readResult > 0 || readBytes == 0) + readBytes += readResult; + } while (readResult == QIODEVICE_BUFFERSIZE + && result[int(readBytes - 1)] != '\n'); + } else + readBytes = readLine(result.data(), result.size()); + + if (readBytes <= 0) + result.clear(); else - tmp.resize(int(readSoFar)); - return tmp; + result.resize(readBytes); + + return result; } /*! @@ -1385,39 +1409,10 @@ bool QIODevicePrivate::putCharHelper(char c) bool QIODevice::getChar(char *c) { Q_D(QIODevice); - const OpenMode openMode = d->openMode; - if (!(openMode & ReadOnly)) { - if (openMode == NotOpen) - qWarning("QIODevice::getChar: Closed device"); - else - qWarning("QIODevice::getChar: WriteOnly device"); - return false; - } + CHECK_READABLE(getChar, false); - // Shortcut for QIODevice::read(c, 1) - QRingBuffer *buffer = &d->buffer; - const int chint = buffer->getChar(); - if (chint != -1) { - char ch = char(uchar(chint)); - if ((openMode & Text) && ch == '\r') { - buffer->ungetChar(ch); - } else { - if (c) - *c = ch; - if (!d->isSequential()) - ++d->pos; - return true; - } - } - - // Fall back to read(). char ch; - if (read(&ch, 1) == 1) { - if (c) - *c = ch; - return true; - } - return false; + return (1 == read(c ? c : &ch, 1)); } /*! diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 86680a5..fd51bcf 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -6210,8 +6210,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \list \o qt.nokia.com becomes http://qt.nokia.com \o ftp.qt.nokia.com becomes ftp://ftp.qt.nokia.com - \o localhost becomes http://localhost - \o /home/user/test.html becomes file:///home/user/test.html (if exists) + \o hostname becomes http://hostname + \o /home/user/test.html becomes file:///home/user/test.html \endlist \section2 Tips to avoid erroneous character conversion when dealing with @@ -6228,31 +6228,32 @@ QUrl QUrl::fromUserInput(const QString &userInput) { QString trimmedString = userInput.trimmed(); - // Check the most common case of a valid url with scheme and host first + // Check first for files, since on Windows drive letters can be interpretted as schemes + if (QDir::isAbsolutePath(trimmedString)) + return QUrl::fromLocalFile(trimmedString); + QUrl url = QUrl::fromEncoded(trimmedString.toUtf8(), QUrl::TolerantMode); - if (url.isValid() && !url.scheme().isEmpty() && !url.host().isEmpty()) + QUrl urlPrepended = QUrl::fromEncoded((QLatin1String("http://") + trimmedString).toUtf8(), QUrl::TolerantMode); + + // Check the most common case of a valid url with scheme and host + // We check if the port would be valid by adding the scheme to handle the case host:port + // where the host would be interpretted as the scheme + if (url.isValid() + && !url.scheme().isEmpty() + && (!url.host().isEmpty() || !url.path().isEmpty()) + && urlPrepended.port() == -1) return url; - // Absolute files that exists - if (QDir::isAbsolutePath(trimmedString) && QFile::exists(trimmedString)) - return QUrl::fromLocalFile(trimmedString); - - // If the string is missing the scheme or the scheme is not valid prepend a scheme - QString scheme = url.scheme(); - if (scheme.isEmpty() || scheme.contains(QLatin1Char('.')) || scheme == QLatin1String("localhost")) { - // Do not do anything for strings such as "foo", only "foo.com" + // Else, try the prepended one and adjust the scheme from the host name + if (urlPrepended.isValid() && (!urlPrepended.host().isEmpty() || !urlPrepended.path().isEmpty())) + { int dotIndex = trimmedString.indexOf(QLatin1Char('.')); - if (dotIndex != -1 || trimmedString.startsWith(QLatin1String("localhost"))) { - const QString hostscheme = trimmedString.left(dotIndex).toLower(); - QByteArray scheme = (hostscheme == QLatin1String("ftp")) ? "ftp" : "http"; - trimmedString = QLatin1String(scheme) + QLatin1String("://") + trimmedString; - } - url = QUrl::fromEncoded(trimmedString.toUtf8(), QUrl::TolerantMode); + const QString hostscheme = trimmedString.left(dotIndex).toLower(); + if (hostscheme == QLatin1String("ftp")) + urlPrepended.setScheme(QLatin1String("ftp")); + return urlPrepended; } - if (url.isValid()) - return url; - return QUrl(); } // end of BSD code diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 8e2273d..10a61ca 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2475,10 +2475,8 @@ void QAbstractItemModel::endRemoveRows() bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int start, int end, const QModelIndex &destinationParent, int destinationStart, Qt::Orientation orientation) { // Don't move the range within itself. - if ( ( destinationParent == srcParent ) - && ( destinationStart >= start ) - && ( destinationStart <= end + 1) ) - return false; + if (destinationParent == srcParent) + return !(destinationStart >= start && destinationStart <= end + 1); QModelIndex destinationAncestor = destinationParent; int pos = (Qt::Vertical == orientation) ? destinationAncestor.row() : destinationAncestor.column(); diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index 0518e24..b197b9d 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -675,11 +675,6 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) bool seenWM_QT_SENDPOSTEDEVENTS = false; bool needWM_QT_SENDPOSTEDEVENTS = false; do { - if (! (flags & QEventLoop::EventLoopExec)) { - // when called "manually", always send posted events - QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); - } - DWORD waitRet = 0; HANDLE pHandles[MAXIMUM_WAIT_OBJECTS - 1]; QVarLengthArray<MSG> processedTimers; @@ -730,7 +725,7 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) } } if (haveMessage) { - if (msg.message == WM_QT_SENDPOSTEDEVENTS && !(flags & QEventLoop::EventLoopExec)) { + if (d->internalHwnd == msg.hwnd && msg.message == WM_QT_SENDPOSTEDEVENTS) { if (seenWM_QT_SENDPOSTEDEVENTS) { needWM_QT_SENDPOSTEDEVENTS = true; continue; @@ -785,6 +780,11 @@ bool QEventDispatcherWin32::processEvents(QEventLoop::ProcessEventsFlags flags) } } while (canWait); + if (!seenWM_QT_SENDPOSTEDEVENTS && (flags & QEventLoop::EventLoopExec) == 0) { + // when called "manually", always send posted events + QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); + } + if (needWM_QT_SENDPOSTEDEVENTS) PostMessage(d->internalHwnd, WM_QT_SENDPOSTEDEVENTS, 0, 0); diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 1260d47..95602d9 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -154,6 +154,15 @@ QObjectPrivate::QObjectPrivate(int version) hasGuards = false; } +#ifdef Q_CC_INTEL +/* Workaround for a bug in win32-icc where it seems to inline ~QObjectPrivate too aggressive. + When icc compiles QtGui, it inlines ~QObjectPrivate so that it would generate a call to + ~QObjectData. However, ~QObjectData is not exported from QtCore, so it does not link. + See also QTBUG-5145 for info on how this manifested itself. + */ +# pragma auto_inline(off) +#endif + QObjectPrivate::~QObjectPrivate() { delete static_cast<QAbstractDynamicMetaObject*>(metaObject); @@ -165,6 +174,9 @@ QObjectPrivate::~QObjectPrivate() delete extraData; #endif } +#ifdef Q_CC_INTEL +# pragma auto_inline(on) +#endif int *QObjectPrivate::setDeleteWatch(QObjectPrivate *d, int *w) { diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index 40b9f04..a850df0 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -49,6 +49,7 @@ #include <errno.h> +#ifndef QT_NO_SHAREDMEMORY #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> @@ -56,6 +57,7 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> +#endif //QT_NO_SHAREDMEMORY #include "private/qcore_unix_p.h" diff --git a/src/corelib/kernel/qtcore_eval.cpp b/src/corelib/kernel/qtcore_eval.cpp index fe47a30..d5eb8c2 100644 --- a/src/corelib/kernel/qtcore_eval.cpp +++ b/src/corelib/kernel/qtcore_eval.cpp @@ -88,23 +88,12 @@ static const char will_shutdown_now[] = "timeout and will shut down.\n" "Contact http://qt.nokia.com/about/contact-us for pricing and purchasing information.\n"; -static int qt_eval_days_left() +static int qt_eval_is_supported() { const char *const license_key = qt_eval_key_data + 12; // fast fail if (!qt_eval_key_data[0] || !*license_key) - return -2; - - QDate today = QDate::currentDate(); - QDate build = QLibraryInfo::buildDate(); - return qMax(-1, today.daysTo(build) + 30); -} - -static int qt_eval_is_supported() -{ - const char *const license_key = qt_eval_key_data + 12; - if (!qt_eval_key_data[0] || !*license_key) return -1; // is this an unsupported evaluation? @@ -123,6 +112,16 @@ static int qt_eval_is_supported() return -1; } +static int qt_eval_days_left() +{ + if (qt_eval_is_supported() < 0) + return -2; + + QDate today = QDate::currentDate(); + QDate build = QLibraryInfo::buildDate(); + return qMax(-1, today.daysTo(build) + 30); +} + static QString qt_eval_string() { const char *msg; @@ -178,6 +177,9 @@ public: void qt_core_eval_init(uint type) { + if (!type) + return; // GUI app + switch (qt_eval_days_left()) { case -2: return; diff --git a/src/corelib/statemachine/qstatemachine.h b/src/corelib/statemachine/qstatemachine.h index ff2b667..13c43e5 100644 --- a/src/corelib/statemachine/qstatemachine.h +++ b/src/corelib/statemachine/qstatemachine.h @@ -70,7 +70,7 @@ class Q_CORE_EXPORT QStateMachine : public QState Q_PROPERTY(bool animated READ isAnimated WRITE setAnimated) #endif public: - class SignalEvent : public QEvent + class Q_CORE_EXPORT SignalEvent : public QEvent { public: SignalEvent(QObject *sender, int signalIndex, @@ -89,7 +89,7 @@ public: friend class QSignalTransitionPrivate; }; - class WrappedEvent : public QEvent + class Q_CORE_EXPORT WrappedEvent : public QEvent { public: WrappedEvent(QObject *object, QEvent *event); diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 7b86ee0..5017dbd 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -137,7 +137,12 @@ public: #if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE) union { T * volatile _q_value; - long volatile _q_value_integral; +# if !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86) + qint64 +# else + long +# endif + volatile _q_value_integral; }; #else T * volatile _q_value; diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index d8557e5..bf9b6bd 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -48,9 +48,7 @@ #include "qlocale_p.h" #include "qunicodetables_p.h" #include "qscopedpointer.h" -#ifndef QT_NO_DATASTREAM #include <qdatastream.h> -#endif #ifndef QT_NO_COMPRESS #include <zlib.h> @@ -2640,7 +2638,7 @@ void QByteArray::clear() d->ref.ref(); } -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)) /*! \relates QByteArray diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index e258481..7dd6f4f 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -572,7 +572,7 @@ inline QByteArray &QByteArray::setNum(float n, char f, int prec) { return setNum(double(n),f,prec); } -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)) Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QByteArray &); Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QByteArray &); #endif diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp index dd7cab6..dab7327 100644 --- a/src/corelib/tools/qcontiguouscache.cpp +++ b/src/corelib/tools/qcontiguouscache.cpp @@ -150,20 +150,45 @@ MyRecord record(int row) const */ /*! \fn void QContiguousCache::detach() - \internal */ /*! \fn bool QContiguousCache::isDetached() const - \internal */ /*! \fn void QContiguousCache::setSharable(bool sharable) - \internal */ +/*! \typedef QContiguousCache::value_type + \internal + */ + +/*! \typedef QContiguousCache::pointer + \internal + */ + +/*! \typedef QContiguousCache::const_pointer + \internal + */ + +/*! \typedef QContiguousCache::reference + \internal + */ + +/*! \typedef QContiguousCache::const_reference + \internal + */ + +/*! \typedef QContiguousCache::difference_type + \internal + */ + +/*! \typedef QContiguousCache::size_type + \internal + */ + /*! \fn QContiguousCache<T> &QContiguousCache::operator=(const QContiguousCache<T> &other) Assigns \a other to this cache and returns a reference to this cache. diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index a3ca2c3..22e9bdf 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -174,18 +174,20 @@ QT_BEGIN_NAMESPACE */ /*! - \fn bool QScopedPointer::operator==(const QScopedPointer<T, Cleanup> &other) const + \fn bool operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) - Equality operator. Returns true if the scoped pointer \a other - is pointing to the same object as this pointer, otherwise returns false. + Equality operator. Returns true if the scoped pointers + \a lhs and \a rhs are pointing to the same object. + Otherwise returns false. */ /*! - \fn bool QScopedPointer::operator!=(const QScopedPointer<T, Cleanup> &other) const + \fn bool operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) - Inequality operator. Returns true if the scoped pointer \a other - is not pointing to the same object as this pointer, otherwise returns false. + Inequality operator. Returns true if the scoped pointers + \a lhs and \a rhs are \e not pointing to the same object. + Otherwise returns false. */ /*! diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 4434fe7..33c45c4 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -7205,7 +7205,7 @@ QString QString::fromRawData(const QChar *unicode, int size) */ -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)) /*! \fn QDataStream &operator<<(QDataStream &stream, const QString &string) \relates QString diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 74f93a4..668be35 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -1065,7 +1065,7 @@ inline QChar &QString::ref(uint i) } #endif -#ifndef QT_NO_DATASTREAM +#if !defined(QT_NO_DATASTREAM) || (defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)) Q_CORE_EXPORT QDataStream &operator<<(QDataStream &, const QString &); Q_CORE_EXPORT QDataStream &operator>>(QDataStream &, QString &); #endif diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 930b006..f0de98d 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -69,6 +69,7 @@ struct Q_CORE_EXPORT QVectorData // workaround for bug in gcc 3.4.2 uint sharable; uint capacity; + uint reserved; #else uint sharable : 1; uint capacity : 1; diff --git a/src/corelib/xml/make-parser.sh b/src/corelib/xml/make-parser.sh index 9866555..35289d2 100755 --- a/src/corelib/xml/make-parser.sh +++ b/src/corelib/xml/make-parser.sh @@ -42,7 +42,7 @@ me=$(dirname $0) mkdir -p $me/out -(cd $me/out && ../../../../util/qlalr/qlalr --troll --no-debug --no-lines ../qxmlstream.g) +(cd $me/out && ../../../../util/qlalr/qlalr --qt --no-debug --no-lines ../qxmlstream.g) for f in $me/out/*.h; do n=$(basename $f) diff --git a/src/corelib/xml/qxmlstream.g b/src/corelib/xml/qxmlstream.g index 6c0c0cf..9921d41 100644 --- a/src/corelib/xml/qxmlstream.g +++ b/src/corelib/xml/qxmlstream.g @@ -158,6 +158,7 @@ public: if (tos + extraCapacity + 1 > cap) { cap = qMax(tos + extraCapacity + 1, cap << 1 ); data = reinterpret_cast<T *>(qRealloc(data, cap * sizeof(T))); + Q_CHECK_PTR(data); } } @@ -914,6 +915,7 @@ markup ::= markup_start markup_list RBRACK; markup_list ::= markup_decl | space | pereference; markup_list ::= markup_list markup_decl | markup_list space | markup_list pereference; +markup_list ::=; markup_decl ::= element_decl | attlist_decl | entity_decl | entity_done | notation_decl | processing_instruction | comment; diff --git a/src/corelib/xml/qxmlstream_p.h b/src/corelib/xml/qxmlstream_p.h index eee3a13..5eea065 100644 --- a/src/corelib/xml/qxmlstream_p.h +++ b/src/corelib/xml/qxmlstream_p.h @@ -1,4 +1,3 @@ -// This file was generated by qlalr - DO NOT EDIT! /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -51,6 +50,7 @@ // We mean it. // +// This file was generated by qlalr - DO NOT EDIT! #ifndef QXMLSTREAM_P_H #define QXMLSTREAM_P_H @@ -121,7 +121,7 @@ public: XML = 54, ACCEPT_STATE = 416, - RULE_COUNT = 269, + RULE_COUNT = 270, STATE_COUNT = 427, TERMINAL_COUNT = 57, NON_TERMINAL_COUNT = 84, @@ -132,13 +132,13 @@ public: }; static const char *const spell []; - static const qint16 lhs []; - static const qint16 rhs []; - static const qint16 goto_default []; - static const qint16 action_default []; - static const qint16 action_index []; - static const qint16 action_info []; - static const qint16 action_check []; + static const short lhs []; + static const short rhs []; + static const short goto_default []; + static const short action_default []; + static const short action_index []; + static const short action_info []; + static const short action_check []; static inline int nt_action (int state, int nt) { @@ -169,110 +169,110 @@ const char *const QXmlStreamReader_Table::spell [] = { "EMPTY", "ANY", "PCDATA", 0, 0, 0, 0, "CDATA", "ID", "IDREF", "IDREFS", "ENTITIES", "NMTOKEN", "NMTOKENS", "<?xml", "version", 0}; -const qint16 QXmlStreamReader_Table::lhs [] = { +const short QXmlStreamReader_Table::lhs [] = { 57, 57, 59, 59, 59, 59, 59, 59, 59, 59, 67, 68, 64, 72, 72, 72, 75, 66, 66, 66, - 66, 79, 78, 80, 80, 80, 80, 80, 80, 81, - 81, 81, 81, 81, 81, 81, 87, 83, 88, 88, - 88, 88, 91, 92, 93, 93, 93, 93, 94, 94, - 96, 96, 96, 97, 97, 98, 98, 99, 99, 100, - 100, 89, 89, 95, 90, 101, 101, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 104, 105, 105, - 105, 105, 107, 108, 109, 109, 84, 84, 110, 110, - 112, 112, 85, 85, 85, 65, 65, 76, 114, 63, - 115, 116, 86, 86, 86, 117, 117, 117, 117, 117, + 66, 79, 78, 80, 80, 80, 80, 80, 80, 80, + 81, 81, 81, 81, 81, 81, 81, 87, 83, 88, + 88, 88, 88, 91, 92, 93, 93, 93, 93, 94, + 94, 96, 96, 96, 97, 97, 98, 98, 99, 99, + 100, 100, 89, 89, 95, 90, 101, 101, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 103, 104, 105, + 105, 105, 105, 107, 108, 109, 109, 84, 84, 110, + 110, 112, 112, 85, 85, 85, 65, 65, 76, 114, + 63, 115, 116, 86, 86, 86, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 117, 117, 117, 117, 117, 118, 118, - 119, 119, 119, 119, 119, 119, 119, 119, 122, 70, - 70, 70, 70, 123, 124, 123, 124, 123, 124, 123, - 124, 126, 126, 126, 126, 126, 126, 126, 126, 126, + 117, 117, 117, 117, 117, 117, 117, 117, 117, 118, + 118, 119, 119, 119, 119, 119, 119, 119, 119, 122, + 70, 70, 70, 70, 123, 124, 123, 124, 123, 124, + 123, 124, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, - 126, 126, 126, 125, 73, 113, 113, 113, 113, 127, - 128, 127, 128, 127, 128, 127, 128, 129, 129, 129, + 126, 126, 126, 126, 125, 73, 113, 113, 113, 113, + 127, 128, 127, 128, 127, 128, 127, 128, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 106, 106, 106, 106, 131, 132, 131, 132, - 131, 131, 132, 132, 133, 133, 133, 133, 135, 71, - 71, 71, 136, 136, 137, 62, 60, 61, 138, 121, - 82, 130, 134, 120, 139, 139, 139, 139, 58, 58, - 58, 58, 58, 58, 58, 58, 58, 58, 74, 69, - 69, 77, 111, 102, 102, 102, 102, 102, 140}; - -const qint16 QXmlStreamReader_Table:: rhs[] = { + 129, 129, 129, 106, 106, 106, 106, 131, 132, 131, + 132, 131, 131, 132, 132, 133, 133, 133, 133, 135, + 71, 71, 71, 136, 136, 137, 62, 60, 61, 138, + 121, 82, 130, 134, 120, 139, 139, 139, 139, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 74, + 69, 69, 77, 111, 102, 102, 102, 102, 102, 140}; + +const short QXmlStreamReader_Table::rhs [] = { 2, 1, 4, 2, 2, 2, 2, 2, 2, 0, 1, 1, 9, 2, 4, 0, 4, 4, 6, 6, - 4, 1, 3, 1, 1, 1, 2, 2, 2, 1, - 1, 1, 1, 1, 1, 1, 4, 4, 1, 1, - 1, 1, 1, 2, 1, 1, 1, 0, 2, 2, - 2, 6, 6, 1, 5, 1, 5, 3, 5, 0, - 1, 6, 8, 4, 2, 1, 5, 1, 1, 1, - 1, 1, 1, 1, 1, 6, 7, 1, 2, 2, - 1, 4, 3, 3, 1, 2, 5, 6, 4, 6, - 3, 5, 5, 3, 4, 4, 5, 2, 3, 2, - 2, 4, 5, 5, 7, 1, 1, 1, 1, 1, + 4, 1, 3, 1, 1, 1, 2, 2, 2, 0, + 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, + 1, 1, 1, 1, 2, 1, 1, 1, 0, 2, + 2, 2, 6, 6, 1, 5, 1, 5, 3, 5, + 0, 1, 6, 8, 4, 2, 1, 5, 1, 1, + 1, 1, 1, 1, 1, 1, 6, 7, 1, 2, + 2, 1, 4, 3, 3, 1, 2, 5, 6, 4, + 6, 3, 5, 5, 3, 4, 4, 5, 2, 3, + 2, 2, 4, 5, 5, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, - 2, 3, 3, 2, 2, 2, 2, 1, 1, 1, + 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, + 2, 2, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 3, 3, 2, - 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, + 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 3, 3, 2, 2, 2, 2, - 1, 1, 1, 1, 1, 1, 1, 1, 5, 0, - 1, 3, 1, 3, 2, 4, 3, 5, 1, 3, - 3, 3, 3, 4, 1, 1, 2, 2, 2, 4, - 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2}; - -const qint16 QXmlStreamReader_Table::action_default [] = { - 10, 258, 0, 2, 1, 0, 124, 116, 118, 119, - 126, 128, 122, 11, 113, 107, 0, 108, 127, 110, - 114, 112, 120, 123, 125, 106, 109, 111, 117, 115, - 130, 121, 239, 12, 253, 135, 249, 252, 0, 129, - 139, 256, 16, 251, 137, 136, 0, 255, 138, 258, - 230, 257, 254, 0, 0, 263, 0, 246, 245, 0, - 248, 247, 244, 240, 98, 262, 0, 235, 0, 0, - 259, 96, 97, 100, 0, 131, 133, 132, 134, 0, - 0, 260, 0, 0, 175, 0, 172, 164, 166, 167, - 141, 153, 170, 161, 155, 156, 152, 158, 162, 160, - 168, 171, 151, 154, 157, 159, 165, 163, 173, 169, - 149, 174, 0, 143, 147, 145, 150, 140, 148, 0, - 146, 142, 144, 0, 15, 14, 261, 0, 22, 21, - 260, 0, 0, 20, 0, 0, 31, 36, 30, 0, - 32, 260, 0, 33, 0, 24, 0, 34, 0, 26, - 35, 25, 0, 241, 40, 39, 260, 42, 48, 260, - 41, 0, 43, 260, 48, 260, 0, 260, 0, 48, - 0, 47, 45, 46, 50, 51, 260, 260, 0, 56, - 260, 53, 260, 0, 57, 0, 54, 260, 52, 260, - 0, 55, 64, 0, 260, 60, 260, 0, 58, 61, - 62, 0, 260, 0, 0, 59, 63, 44, 49, 65, - 0, 38, 0, 0, 260, 0, 93, 94, 0, 0, - 0, 0, 260, 0, 209, 200, 202, 204, 177, 189, - 207, 198, 192, 190, 193, 188, 195, 197, 205, 208, - 187, 191, 194, 196, 201, 199, 203, 206, 210, 212, - 211, 185, 0, 0, 242, 179, 183, 181, 0, 0, - 92, 186, 176, 184, 0, 182, 178, 180, 91, 0, - 95, 0, 0, 0, 0, 0, 260, 85, 260, 0, - 261, 0, 86, 0, 88, 68, 73, 72, 69, 70, - 71, 260, 74, 75, 0, 0, 0, 268, 267, 265, - 266, 264, 66, 260, 0, 260, 0, 0, 67, 76, - 260, 0, 260, 0, 0, 77, 0, 78, 0, 81, - 84, 0, 0, 214, 224, 223, 0, 226, 228, 227, - 225, 0, 243, 216, 220, 218, 222, 213, 221, 0, - 219, 215, 217, 0, 80, 79, 0, 82, 0, 83, - 87, 99, 0, 37, 0, 0, 0, 0, 90, 89, - 0, 102, 23, 27, 29, 28, 0, 0, 260, 261, - 0, 260, 0, 105, 104, 260, 0, 103, 101, 0, - 0, 18, 260, 17, 0, 19, 0, 0, 250, 0, - 260, 0, 238, 0, 231, 237, 0, 236, 233, 260, - 260, 261, 232, 234, 0, 260, 0, 229, 260, 0, - 260, 0, 230, 0, 0, 13, 269, 9, 5, 8, - 4, 0, 7, 258, 6, 0, 3}; - -const qint16 QXmlStreamReader_Table::goto_default [] = { + 1, 1, 1, 2, 2, 3, 3, 2, 2, 2, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 5, + 0, 1, 3, 1, 3, 2, 4, 3, 5, 1, + 3, 3, 3, 3, 4, 1, 1, 2, 2, 2, + 4, 2, 2, 2, 2, 2, 2, 2, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 2}; + +const short QXmlStreamReader_Table::action_default [] = { + 10, 259, 0, 2, 1, 0, 125, 117, 119, 120, + 127, 129, 123, 11, 114, 108, 0, 109, 128, 111, + 115, 113, 121, 124, 126, 107, 110, 112, 118, 116, + 131, 122, 240, 12, 254, 136, 250, 253, 0, 130, + 140, 257, 16, 252, 138, 137, 0, 256, 139, 259, + 231, 258, 255, 0, 0, 264, 0, 247, 246, 0, + 249, 248, 245, 241, 99, 263, 0, 236, 0, 0, + 260, 97, 98, 101, 0, 132, 134, 133, 135, 0, + 0, 261, 0, 0, 176, 0, 173, 165, 167, 168, + 142, 154, 171, 162, 156, 157, 153, 159, 163, 161, + 169, 172, 152, 155, 158, 160, 166, 164, 174, 170, + 150, 175, 0, 144, 148, 146, 151, 141, 149, 0, + 147, 143, 145, 0, 15, 14, 262, 0, 22, 21, + 261, 30, 0, 20, 0, 0, 32, 37, 31, 0, + 33, 261, 0, 34, 0, 24, 0, 35, 0, 26, + 36, 25, 0, 242, 41, 40, 261, 43, 49, 261, + 42, 0, 44, 261, 49, 261, 0, 261, 0, 49, + 0, 48, 46, 47, 51, 52, 261, 261, 0, 57, + 261, 54, 261, 0, 58, 0, 55, 261, 53, 261, + 0, 56, 65, 0, 261, 61, 261, 0, 59, 62, + 63, 0, 261, 0, 0, 60, 64, 45, 50, 66, + 0, 39, 0, 0, 261, 0, 94, 95, 0, 0, + 0, 0, 261, 0, 210, 201, 203, 205, 178, 190, + 208, 199, 193, 191, 194, 189, 196, 198, 206, 209, + 188, 192, 195, 197, 202, 200, 204, 207, 211, 213, + 212, 186, 0, 0, 243, 180, 184, 182, 0, 0, + 93, 187, 177, 185, 0, 183, 179, 181, 92, 0, + 96, 0, 0, 0, 0, 0, 261, 86, 261, 0, + 262, 0, 87, 0, 89, 69, 74, 73, 70, 71, + 72, 261, 75, 76, 0, 0, 0, 269, 268, 266, + 267, 265, 67, 261, 0, 261, 0, 0, 68, 77, + 261, 0, 261, 0, 0, 78, 0, 79, 0, 82, + 85, 0, 0, 215, 225, 224, 0, 227, 229, 228, + 226, 0, 244, 217, 221, 219, 223, 214, 222, 0, + 220, 216, 218, 0, 81, 80, 0, 83, 0, 84, + 88, 100, 0, 38, 0, 0, 0, 0, 91, 90, + 0, 103, 23, 27, 29, 28, 0, 0, 261, 262, + 0, 261, 0, 106, 105, 261, 0, 104, 102, 0, + 0, 18, 261, 17, 0, 19, 0, 0, 251, 0, + 261, 0, 239, 0, 232, 238, 0, 237, 234, 261, + 261, 262, 233, 235, 0, 261, 0, 230, 261, 0, + 261, 0, 231, 0, 0, 13, 270, 9, 5, 8, + 4, 0, 7, 259, 6, 0, 3}; + +const short QXmlStreamReader_Table::goto_default [] = { 2, 4, 3, 49, 388, 43, 37, 52, 47, 41, 249, 53, 127, 84, 393, 81, 85, 126, 42, 46, 169, 130, 131, 146, 145, 149, 138, 136, 140, 147, @@ -283,7 +283,7 @@ const qint16 QXmlStreamReader_Table::goto_default [] = { 264, 252, 251, 250, 339, 326, 325, 329, 398, 399, 50, 51, 59, 0}; -const qint16 QXmlStreamReader_Table::action_index [] = { +const short QXmlStreamReader_Table::action_index [] = { -21, -57, 33, 119, 960, 70, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, 105, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, @@ -372,7 +372,7 @@ const qint16 QXmlStreamReader_Table::action_index [] = { 28, 15, 82, -84, -84, -84, -84, -84, -84, -84, -84, -84, -84, 3, -84, 98, -84}; -const qint16 QXmlStreamReader_Table::action_info [] = { +const short QXmlStreamReader_Table::action_info [] = { 65, 332, 65, 405, 392, 385, 377, 65, 414, 410, 415, 55, 397, 374, 373, 217, 206, 408, 65, 65, 207, 211, 216, 1, 55, 199, 182, 192, 70, 70, @@ -506,7 +506,7 @@ const qint16 QXmlStreamReader_Table::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const qint16 QXmlStreamReader_Table::action_check [] = { +const short QXmlStreamReader_Table::action_check [] = { 26, 18, 26, 14, 4, 4, 4, 26, 24, 14, 4, 26, 4, 4, 4, 4, 22, 55, 26, 26, 42, 4, 4, 44, 26, 22, 19, 12, 2, 2, @@ -736,8 +736,8 @@ public: } }; -class QXmlStreamEntityResolver; +class QXmlStreamEntityResolver; #ifndef QT_NO_XMLSTREAMREADER class QXmlStreamReaderPrivate : public QXmlStreamReader_Table, public QXmlStreamPrivateTagStack{ QXmlStreamReader *q_ptr; @@ -1355,44 +1355,44 @@ bool QXmlStreamReaderPrivate::parse() scanDtd = false; break; - case 36: + case 37: if (!scanString(spell[EMPTY], EMPTY, false) && !scanString(spell[ANY], ANY, false) && atEnd) { - resume(36); + resume(37); return false; } break; - case 42: + case 43: if (!scanString(spell[PCDATA], PCDATA, false) && atEnd) { - resume(42); + resume(43); return false; } break; - case 67: { + case 68: { lastAttributeIsCData = true; } break; - case 77: + case 78: if (!scanAfterDefaultDecl() && atEnd) { - resume(77); + resume(78); return false; } break; - case 82: + case 83: sym(1) = sym(2); lastAttributeValue.clear(); lastAttributeIsCData = false; if (!scanAttType() && atEnd) { - resume(82); + resume(83); return false; } break; - case 83: { + case 84: { DtdAttribute &dtdAttribute = dtdAttributes.push(); dtdAttribute.tagName.clear(); dtdAttribute.isCDATA = lastAttributeIsCData; @@ -1413,7 +1413,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 87: { + case 88: { if (referenceToUnparsedEntityDetected && !standalone) break; int n = dtdAttributes.size(); @@ -1433,9 +1433,9 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 88: { + case 89: { if (!scanPublicOrSystem() && atEnd) { - resume(88); + resume(89); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.push(); @@ -1443,9 +1443,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.name = symString(3); } break; - case 89: { + case 90: { if (!scanPublicOrSystem() && atEnd) { - resume(89); + resume(90); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.push(); @@ -1454,9 +1454,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.parameter = true; } break; - case 90: { + case 91: { if (!scanNData() && atEnd) { - resume(90); + resume(91); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.top(); @@ -1464,9 +1464,9 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.external = true; } break; - case 91: { + case 92: { if (!scanNData() && atEnd) { - resume(91); + resume(92); return false; } EntityDeclaration &entityDeclaration = entityDeclarations.top(); @@ -1475,7 +1475,7 @@ bool QXmlStreamReaderPrivate::parse() entityDeclaration.external = true; } break; - case 92: { + case 93: { EntityDeclaration &entityDeclaration = entityDeclarations.top(); entityDeclaration.notationName = symString(3); if (entityDeclaration.parameter) @@ -1483,8 +1483,8 @@ bool QXmlStreamReaderPrivate::parse() } //fall through - case 93: - case 94: { + case 94: + case 95: { if (referenceToUnparsedEntityDetected && !standalone) { entityDeclarations.pop(); break; @@ -1502,7 +1502,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 95: { + case 96: { setType(QXmlStreamReader::ProcessingInstruction); int pos = sym(4).pos + sym(4).len; processingInstructionTarget = symString(3); @@ -1515,39 +1515,39 @@ bool QXmlStreamReaderPrivate::parse() else if(!QXmlUtils::isNCName(piTarget)) raiseWellFormedError(QXmlStream::tr("%1 is an invalid processing instruction name.").arg(piTarget)); } else if (type != QXmlStreamReader::Invalid){ - resume(95); + resume(96); return false; } } break; - case 96: + case 97: setType(QXmlStreamReader::ProcessingInstruction); processingInstructionTarget = symString(3); if (!processingInstructionTarget.toString().compare(QLatin1String("xml"), Qt::CaseInsensitive)) raiseWellFormedError(QXmlStream::tr("Invalid processing instruction name.")); break; - case 97: + case 98: if (!scanAfterLangleBang() && atEnd) { - resume(97); + resume(98); return false; } break; - case 98: + case 99: if (!scanUntil("--")) { - resume(98); + resume(99); return false; } break; - case 99: { + case 100: { setType(QXmlStreamReader::Comment); int pos = sym(1).pos + 4; text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); } break; - case 100: { + case 101: { setType(QXmlStreamReader::Characters); isCDATA = true; isWhitespace = false; @@ -1555,131 +1555,131 @@ bool QXmlStreamReaderPrivate::parse() if (scanUntil("]]>", -1)) { text = QStringRef(&textBuffer, pos, textBuffer.size() - pos - 3); } else { - resume(100); + resume(101); return false; } } break; - case 101: { + case 102: { if (!scanPublicOrSystem() && atEnd) { - resume(101); + resume(102); return false; } NotationDeclaration ¬ationDeclaration = notationDeclarations.push(); notationDeclaration.name = symString(3); } break; - case 102: { + case 103: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); notationDeclaration.systemId = symString(3); notationDeclaration.publicId.clear(); } break; - case 103: { + case 104: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); notationDeclaration.systemId.clear(); checkPublicLiteral((notationDeclaration.publicId = symString(3))); } break; - case 104: { + case 105: { NotationDeclaration ¬ationDeclaration = notationDeclarations.top(); checkPublicLiteral((notationDeclaration.publicId = symString(3))); notationDeclaration.systemId = symString(5); } break; - case 128: + case 129: isWhitespace = false; // fall through - case 129: + case 130: sym(1).len += fastScanContentCharList(); if (atEnd && !inParseEntity) { - resume(129); + resume(130); return false; } break; - case 138: + case 139: if (!textBuffer.isEmpty()) { setType(QXmlStreamReader::Characters); text = &textBuffer; } break; - case 139: case 140: + case 141: clearSym(); break; - case 141: case 142: + case 143: sym(1) = sym(2); break; - case 143: case 144: case 145: case 146: + case 147: sym(1).len += sym(2).len; break; - case 172: + case 173: if (normalizeLiterals) textBuffer.data()[textBuffer.size()-1] = QLatin1Char(' '); break; - case 173: + case 174: sym(1).len += fastScanLiteralContent(); if (atEnd) { - resume(173); + resume(174); return false; } break; - case 174: { + case 175: { if (!QXmlUtils::isPublicID(symString(1).toString())) { raiseWellFormedError(QXmlStream::tr("%1 is an invalid PUBLIC identifier.").arg(symString(1).toString())); - resume(174); + resume(175); return false; } } break; - case 175: case 176: + case 177: clearSym(); break; - case 177: case 178: + case 179: sym(1) = sym(2); break; - case 179: case 180: case 181: case 182: + case 183: sym(1).len += sym(2).len; break; - case 212: case 213: + case 214: clearSym(); break; - case 214: case 215: + case 216: sym(1) = sym(2); lastAttributeValue = symString(1); break; - case 216: case 217: case 218: case 219: + case 220: sym(1).len += sym(2).len; break; - case 228: { + case 229: { QStringRef prefix = symPrefix(1); if (prefix.isEmpty() && symString(1) == QLatin1String("xmlns") && namespaceProcessing) { NamespaceDeclaration &namespaceDeclaration = namespaceDeclarations.push(); @@ -1749,7 +1749,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 234: { + case 235: { normalizeLiterals = true; Tag &tag = tagStack_push(); prefix = tag.namespaceDeclaration.prefix = addToStringStorage(symPrefix(2)); @@ -1759,11 +1759,11 @@ bool QXmlStreamReaderPrivate::parse() raiseWellFormedError(QXmlStream::tr("Invalid XML name.")); } break; - case 235: + case 236: isEmptyElement = true; // fall through - case 236: + case 237: setType(QXmlStreamReader::StartElement); resolveTag(); if (tagStack.size() == 1 && hasSeenTag && !inParseEntity) @@ -1771,7 +1771,7 @@ bool QXmlStreamReaderPrivate::parse() hasSeenTag = true; break; - case 237: { + case 238: { setType(QXmlStreamReader::EndElement); Tag &tag = tagStack_pop(); @@ -1782,7 +1782,7 @@ bool QXmlStreamReaderPrivate::parse() raiseWellFormedError(QXmlStream::tr("Opening and ending tag mismatch.")); } break; - case 238: + case 239: if (entitiesMustBeDeclared()) { raiseWellFormedError(QXmlStream::tr("Entity '%1' not declared.").arg(unresolvedEntity)); break; @@ -1791,7 +1791,7 @@ bool QXmlStreamReaderPrivate::parse() name = &unresolvedEntity; break; - case 239: { + case 240: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (entityHash.contains(reference)) { @@ -1830,7 +1830,7 @@ bool QXmlStreamReaderPrivate::parse() } break; - case 240: { + case 241: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (parameterEntityHash.contains(reference)) { @@ -1849,11 +1849,11 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 241: + case 242: sym(1).len += sym(2).len + 1; break; - case 242: { + case 243: { sym(1).len += sym(2).len + 1; QString reference = symString(2).toString(); if (entityHash.contains(reference)) { @@ -1889,7 +1889,7 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 243: { + case 244: { if (uint s = resolveCharRef(3)) { if (s >= 0xffff) putStringLiteral(QString::fromUcs4(&s, 1)); @@ -1903,43 +1903,43 @@ bool QXmlStreamReaderPrivate::parse() } } break; - case 246: case 247: + case 248: sym(1).len += sym(2).len; break; - case 258: + case 259: sym(1).len += fastScanSpace(); if (atEnd) { - resume(258); + resume(259); return false; } break; - case 261: { + case 262: { sym(1).len += fastScanName(&sym(1).prefix); if (atEnd) { - resume(261); + resume(262); return false; } } break; - case 262: + case 263: sym(1).len += fastScanName(); if (atEnd) { - resume(262); + resume(263); return false; } break; - case 263: case 264: case 265: case 266: case 267: + case 268: sym(1).len += fastScanNMTOKEN(); if (atEnd) { - resume(267); + resume(268); return false; } @@ -1958,7 +1958,8 @@ bool QXmlStreamReaderPrivate::parse() } return false; } +#endif //QT_NO_XMLSTREAMREADER.xml + -#endif //QT_NO_XMLSTREAMREADER #endif // QXMLSTREAM_P_H diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h index ed29e4e..b65e101 100644 --- a/src/dbus/qdbusconnection_p.h +++ b/src/dbus/qdbusconnection_p.h @@ -123,6 +123,7 @@ public: QObject* obj; int midx; QList<int> params; + QStringList argumentMatch; QByteArray matchRule; }; @@ -198,9 +199,6 @@ public: QDBusMetaObject *findMetaObject(const QString &service, const QString &path, const QString &interface, QDBusError &error); - void registerService(const QString &serviceName); - void unregisterService(const QString &serviceName); - void postEventToThread(int action, QObject *target, QEvent *event); inline void serverConnection(const QDBusConnection &connection) @@ -237,6 +235,8 @@ public slots: void objectDestroyed(QObject *o); void relaySignal(QObject *obj, const QMetaObject *, int signalId, const QVariantList &args); void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); + void registerService(const QString &serviceName); + void unregisterService(const QString &serviceName); signals: void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner); diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp index 414d318..0f9a67f 100644 --- a/src/dbus/qdbusconnectioninterface.cpp +++ b/src/dbus/qdbusconnectioninterface.cpp @@ -394,6 +394,12 @@ void QDBusConnectionInterface::disconnectNotify(const char *signalName) empty string, it means the name \a name has just been created; if \a newOwner is empty, the name \a name has no current owner and is no longer available. + + \note connecting to this signal will make the application listen for and + receive every single service ownership change on the bus. Depending on + how many services are running, this make the application be activated to + receive more signals than it needs. To avoid this problem, use the + QDBusServiceWatcher class, which can listen for specific changes. */ /*! diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 748658d..40febc4 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -934,7 +934,8 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p) rootNode(QString(QLatin1Char('/'))) { static const bool threads = q_dbus_threads_init_default(); - static const int debugging = ::isDebugging = qgetenv("QDBUS_DEBUG").toInt(); + static const int debugging = qgetenv("QDBUS_DEBUG").toInt(); + ::isDebugging = debugging; Q_UNUSED(threads) Q_UNUSED(debugging) @@ -947,9 +948,6 @@ QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p) rootNode.flags = 0; watchedServiceNames[QLatin1String(DBUS_SERVICE_DBUS)] = 1; - - connect(this, SIGNAL(serviceOwnerChanged(QString,QString,QString)), - this, SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } QDBusConnectionPrivate::~QDBusConnectionPrivate() @@ -1179,11 +1177,7 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in void QDBusConnectionPrivate::_q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner) { - if (oldOwner == baseService) - unregisterService(name); - if (newOwner == baseService) - registerService(name); - + Q_UNUSED(oldOwner); QDBusWriteLocker locker(UpdateSignalHookOwnerAction, this); QMutableHashIterator<QString, SignalHook> it(signalHooks); it.toFront(); @@ -1229,6 +1223,7 @@ bool QDBusConnectionPrivate::prepareHook(QDBusConnectionPrivate::SignalHook &hoo hook.owner = owner; // we don't care if the service has an owner yet hook.path = path; hook.obj = receiver; + hook.argumentMatch = argMatch; // build the D-Bus signal name and signature // This should not happen for QDBusConnection::connect, use buildSignature here, since @@ -1501,6 +1496,24 @@ void QDBusConnectionPrivate::handleSignal(const QString &key, const QDBusMessage continue; if (hook.signature.isEmpty() && !hook.signature.isNull() && !msg.signature().isEmpty()) continue; + if (!hook.argumentMatch.isEmpty()) { + const QVariantList arguments = msg.arguments(); + if (hook.argumentMatch.size() > arguments.size()) + continue; + + bool matched = true; + for (int i = 0; i < hook.argumentMatch.size(); ++i) { + const QString ¶m = hook.argumentMatch.at(i); + if (param.isNull()) + continue; // don't try to match against this + if (param == arguments.at(i).toString()) + continue; // matched + matched = false; + break; + } + if (!matched) + continue; + } activateSignal(hook, msg); } @@ -1635,9 +1648,16 @@ void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusError baseService = QString::fromUtf8(service); } else { - qWarning("QDBusConnectionPrivate::SetConnection: Unable to get base service"); + qWarning("QDBusConnectionPrivate::setConnection: Unable to get base service"); } + QString busService = QLatin1String(DBUS_SERVICE_DBUS); + connectSignal(busService, QString(), QString(), QString(), QLatin1String("NameAcquired"), QStringList(), QString(), + this, SLOT(registerService(QString))); + connectSignal(busService, QString(), QString(), QString(), QLatin1String("NameLost"), QStringList(), QString(), + this, SLOT(unregisterService(QString))); + + q_dbus_connection_add_filter(connection, qDBusSignalFilter, this, 0); //qDebug("base service: %s", service); diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp index 74b2a44..d0a693f 100644 --- a/src/dbus/qdbusinterface.cpp +++ b/src/dbus/qdbusinterface.cpp @@ -157,7 +157,9 @@ QDBusInterfacePrivate::QDBusInterfacePrivate(const QString &serv, const QString if (!metaObject) { // creation failed, somehow - isValid = false; + // most common causes are that the service doesn't exist or doesn't support introspection + // those are not fatal errors, so we continue working + if (!lastError.isValid()) lastError = QDBusError(QDBusError::InternalError, QLatin1String("Unknown error")); } @@ -232,7 +234,7 @@ QDBusInterface::~QDBusInterface() */ const QMetaObject *QDBusInterface::metaObject() const { - return d_func()->isValid ? d_func()->metaObject : &QDBusAbstractInterface::staticMetaObject; + return d_func()->metaObject ? d_func()->metaObject : &QDBusAbstractInterface::staticMetaObject; } /*! diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp index e028940..d4e90f6 100644 --- a/src/dbus/qdbusserver.cpp +++ b/src/dbus/qdbusserver.cpp @@ -69,8 +69,8 @@ QDBusServer::QDBusServer(const QString &address, QObject *parent) if (address.isEmpty()) return; - QObject::connect(d, SIGNAL(newServerConnection(const QDBusConnection &)), - this, SIGNAL(newConnection(const QDBusConnection &))); + QObject::connect(d, SIGNAL(newServerConnection(QDBusConnection)), + this, SIGNAL(newConnection(QDBusConnection))); // server = q_dbus_server_listen( "unix:tmpdir=/tmp", &error); QDBusErrorInternal error; diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp index 1557b47..4328558 100644 --- a/src/dbus/qdbusservicewatcher.cpp +++ b/src/dbus/qdbusservicewatcher.cpp @@ -50,7 +50,6 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS))) -Q_GLOBAL_STATIC_WITH_ARGS(QString, busPath, (QLatin1String(DBUS_PATH_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString, busInterface, (QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString, signalName, (QLatin1String("NameOwnerChanged"))) @@ -127,7 +126,7 @@ QStringList QDBusServiceWatcherPrivate::matchArgsForService(const QString &servi void QDBusServiceWatcherPrivate::addService(const QString &service) { QStringList matchArgs = matchArgsForService(service); - connection.connect(*busService(), *busPath(), *busInterface(), *signalName(), + connection.connect(*busService(), QString(), *busInterface(), *signalName(), matchArgs, QString(), q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } @@ -135,7 +134,7 @@ void QDBusServiceWatcherPrivate::addService(const QString &service) void QDBusServiceWatcherPrivate::removeService(const QString &service) { QStringList matchArgs = matchArgsForService(service); - connection.disconnect(*busService(), *busPath(), *busInterface(), *signalName(), + connection.disconnect(*busService(), QString(), *busInterface(), *signalName(), matchArgs, QString(), q_func(), SLOT(_q_serviceOwnerChanged(QString,QString,QString))); } diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp index 9870584..380b949 100644 --- a/src/dbus/qdbusxmlgenerator.cpp +++ b/src/dbus/qdbusxmlgenerator.cpp @@ -203,7 +203,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method const char *typeName = QVariant::typeToName( QVariant::Type(types.at(j)) ); xml += QString::fromLatin1(" <annotation name=\"com.trolltech.QtDBus.QtTypeName.%1%2\" value=\"%3\"/>\n") .arg(isOutput ? QLatin1String("Out") : QLatin1String("In")) - .arg(isOutput ? j - inputCount : j - 1) + .arg(isOutput && !isSignal ? j - inputCount : j - 1) .arg(typeNameToXml(typeName)); } } diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index a527ee7..a11ebea 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -984,6 +984,16 @@ const QAccessibleInterface *other, int otherChild) const */ /*! + \fn QAccessibleActionInterface *QAccessibleInterface::actionInterface() + \internal +*/ + +/*! + \fn QAccessibleImageInterface *QAccessibleInterface::imageInterface() + \internal +*/ + +/*! \class QAccessibleEvent \brief The QAccessibleEvent class is used to query addition accessibility information about complex widgets. diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index 44a82ef..a9126f6 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -1594,8 +1594,8 @@ void QColorDialogPrivate::init(const QColor &initial) cs = new QColorShower(q); QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb))); - QObject::connect(cs, SIGNAL(currentColorChanged(const QColor&)), - q, SIGNAL(currentColorChanged(const QColor&))); + QObject::connect(cs, SIGNAL(currentColorChanged(QColor)), + q, SIGNAL(currentColorChanged(QColor))); #if defined(Q_WS_S60) if (!nonTouchUI) pWidth -= cp->size().width(); @@ -1904,7 +1904,7 @@ void QColorDialog::setVisible(bool visible) void QColorDialog::open(QObject *receiver, const char *member) { Q_D(QColorDialog); - connect(this, SIGNAL(colorSelected(const QColor&)), receiver, member); + connect(this, SIGNAL(colorSelected(QColor)), receiver, member); d->receiverToDisconnectOnClose = receiver; d->memberToDisconnectOnClose = member; QDialog::open(); @@ -2036,7 +2036,7 @@ void QColorDialog::done(int result) d->selectedQColor = QColor(); } if (d->receiverToDisconnectOnClose) { - disconnect(this, SIGNAL(colorSelected(const QColor&)), + disconnect(this, SIGNAL(colorSelected(QColor)), d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); d->receiverToDisconnectOnClose = 0; } diff --git a/src/gui/dialogs/qcolordialog_mac.mm b/src/gui/dialogs/qcolordialog_mac.mm index 5f074c0..53d2e1e 100644 --- a/src/gui/dialogs/qcolordialog_mac.mm +++ b/src/gui/dialogs/qcolordialog_mac.mm @@ -336,7 +336,6 @@ QT_USE_NAMESPACE } } - QAbstractEventDispatcher::instance()->interrupt(); if (mResultCode == NSCancelButton) mPriv->colorDialog()->reject(); else diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 6bc6b76..45a410f 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -691,8 +691,8 @@ QFileDialog::Options QFileDialog::options() const void QFileDialog::open(QObject *receiver, const char *member) { Q_D(QFileDialog); - const char *signal = (fileMode() == ExistingFiles) ? SIGNAL(filesSelected(const QStringList&)) - : SIGNAL(fileSelected(const QString&)); + const char *signal = (fileMode() == ExistingFiles) ? SIGNAL(filesSelected(QStringList)) + : SIGNAL(fileSelected(QString)); connect(this, signal, receiver, member); d->signalToDisconnectOnClose = signal; d->receiverToDisconnectOnClose = receiver; @@ -2145,11 +2145,11 @@ void QFileDialogPrivate::createWidgets() model->setNameFilterDisables(false); #endif model->d_func()->disableRecursiveSort = true; - QFileDialog::connect(model, SIGNAL(fileRenamed(const QString &, const QString &, const QString &)), q, SLOT(_q_fileRenamed(const QString &, const QString &, const QString &))); - QFileDialog::connect(model, SIGNAL(rootPathChanged(const QString &)), - q, SLOT(_q_pathChanged(const QString &))); - QFileDialog::connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - q, SLOT(_q_rowsInserted(const QModelIndex &))); + QFileDialog::connect(model, SIGNAL(fileRenamed(QString,QString,QString)), q, SLOT(_q_fileRenamed(QString,QString,QString))); + QFileDialog::connect(model, SIGNAL(rootPathChanged(QString)), + q, SLOT(_q_pathChanged(QString))); + QFileDialog::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + q, SLOT(_q_rowsInserted(QModelIndex))); model->setReadOnly(false); qFileDialogUi.reset(new Ui_QFileDialog()); @@ -2159,8 +2159,8 @@ void QFileDialogPrivate::createWidgets() initialBookmarks << QUrl::fromLocalFile(QLatin1String("")) << QUrl::fromLocalFile(QDir::homePath()); qFileDialogUi->sidebar->init(model, initialBookmarks); - QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(const QUrl &)), - q, SLOT(_q_goToUrl(const QUrl &))); + QFileDialog::connect(qFileDialogUi->sidebar, SIGNAL(goToUrl(QUrl)), + q, SLOT(_q_goToUrl(QUrl))); QObject::connect(qFileDialogUi->buttonBox, SIGNAL(accepted()), q, SLOT(accept())); QObject::connect(qFileDialogUi->buttonBox, SIGNAL(rejected()), q, SLOT(reject())); @@ -2194,8 +2194,8 @@ void QFileDialogPrivate::createWidgets() qFileDialogUi->fileTypeCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(int)), q, SLOT(_q_useNameFilter(int))); - QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(const QString &)), - q, SIGNAL(filterSelected(const QString &))); + QObject::connect(qFileDialogUi->fileTypeCombo, SIGNAL(activated(QString)), + q, SIGNAL(filterSelected(QString))); qFileDialogUi->listView->init(this); qFileDialogUi->listView->setModel(model); @@ -2221,8 +2221,8 @@ void QFileDialogPrivate::createWidgets() QActionGroup *showActionGroup = new QActionGroup(q); showActionGroup->setExclusive(false); - QObject::connect(showActionGroup, SIGNAL(triggered(QAction *)), - q, SLOT(_q_showHeader(QAction *)));; + QObject::connect(showActionGroup, SIGNAL(triggered(QAction*)), + q, SLOT(_q_showHeader(QAction*)));; QAbstractItemModel *abstractModel = model; #ifndef QT_NO_PROXYMODEL @@ -2251,7 +2251,7 @@ void QFileDialogPrivate::createWidgets() // Selections QItemSelectionModel *selections = qFileDialogUi->listView->selectionModel(); - QObject::connect(selections, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), + QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), q, SLOT(_q_selectionChanged())); QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)), q, SLOT(_q_currentChanged(QModelIndex))); @@ -2289,11 +2289,11 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) QModelIndex idx = d->rootIndex(); if (d->proxyModel) { - disconnect(d->proxyModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + disconnect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } else { - disconnect(d->model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } if (proxyModel != 0) { @@ -2306,8 +2306,8 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) d->completer->setModel(d->proxyModel); d->completer->proxyModel = d->proxyModel; #endif - connect(d->proxyModel, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + connect(d->proxyModel, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } else { d->proxyModel = 0; d->qFileDialogUi->listView->setModel(d->model); @@ -2317,8 +2317,8 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) d->completer->sourceModel = d->model; d->completer->proxyModel = 0; #endif - connect(d->model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), - this, SLOT(_q_rowsInserted(const QModelIndex &))); + connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_rowsInserted(QModelIndex))); } QScopedPointer<QItemSelectionModel> selModel(d->qFileDialogUi->treeView->selectionModel()); d->qFileDialogUi->treeView->setSelectionModel(d->qFileDialogUi->listView->selectionModel()); @@ -2327,7 +2327,7 @@ void QFileDialog::setProxyModel(QAbstractProxyModel *proxyModel) // reconnect selection QItemSelectionModel *selections = d->qFileDialogUi->listView->selectionModel(); - QObject::connect(selections, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), + QObject::connect(selections, SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(_q_selectionChanged())); QObject::connect(selections, SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(_q_currentChanged(QModelIndex))); @@ -3022,12 +3022,6 @@ bool QFileDialogPrivate::itemViewKeyboardEvent(QKeyEvent *event) { case Qt::Key_Escape: q->hide(); return true; -#ifdef QT_KEYPAD_NAVIGATION - case Qt::Key_Down: - case Qt::Key_Up: - return (QApplication::navigationMode() != Qt::NavigationModeKeypadTabOrder - && QApplication::navigationMode() != Qt::NavigationModeKeypadDirectional); -#endif default: break; } @@ -3145,20 +3139,16 @@ QSize QFileDialogListView::sizeHint() const void QFileDialogListView::keyPressEvent(QKeyEvent *e) { - if (!d_ptr->itemViewKeyboardEvent(e)) { - QListView::keyPressEvent(e); - } #ifdef QT_KEYPAD_NAVIGATION - else if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder - || QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) - && !hasEditFocus()) { - e->ignore(); - } else { - e->accept(); + if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) { + QListView::keyPressEvent(e); + return; } -#else +#endif // QT_KEYPAD_NAVIGATION + + if (!d_ptr->itemViewKeyboardEvent(e)) + QListView::keyPressEvent(e); e->accept(); -#endif } QFileDialogTreeView::QFileDialogTreeView(QWidget *parent) : QTreeView(parent) @@ -3184,20 +3174,16 @@ void QFileDialogTreeView::init(QFileDialogPrivate *d_pointer) void QFileDialogTreeView::keyPressEvent(QKeyEvent *e) { - if (!d_ptr->itemViewKeyboardEvent(e)) { - QTreeView::keyPressEvent(e); - } #ifdef QT_KEYPAD_NAVIGATION - else if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder - || QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) - && !hasEditFocus()) { - e->ignore(); - } else { - e->accept(); + if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) { + QTreeView::keyPressEvent(e); + return; } -#else +#endif // QT_KEYPAD_NAVIGATION + + if (!d_ptr->itemViewKeyboardEvent(e)) + QTreeView::keyPressEvent(e); e->accept(); -#endif } QSize QFileDialogTreeView::sizeHint() const @@ -3213,13 +3199,16 @@ QSize QFileDialogTreeView::sizeHint() const */ void QFileDialogLineEdit::keyPressEvent(QKeyEvent *e) { +#ifdef QT_KEYPAD_NAVIGATION + if (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) { + QLineEdit::keyPressEvent(e); + return; + } +#endif // QT_KEYPAD_NAVIGATION + int key = e->key(); QLineEdit::keyPressEvent(e); - if (key != Qt::Key_Escape -#ifdef QT_KEYPAD_NAVIGATION - && QApplication::navigationMode() == Qt::NavigationModeNone -#endif - ) + if (key != Qt::Key_Escape) e->accept(); if (hideOnEsc && (key == Qt::Key_Escape || key == Qt::Key_Return || key == Qt::Key_Enter)) { e->accept(); diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp index 3822f16..73ca94c 100644 --- a/src/gui/dialogs/qfiledialog_win.cpp +++ b/src/gui/dialogs/qfiledialog_win.cpp @@ -501,7 +501,7 @@ static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd, DWORD newOptions; hr = pfd->GetOptions(&newOptions); if (SUCCEEDED(hr)) { - newOptions |= (FOS_NOCHANGEDIR | FOS_NOREADONLYRETURN); + newOptions |= FOS_NOCHANGEDIR; if (mode == QFileDialog::ExistingFile || mode == QFileDialog::ExistingFiles) newOptions |= (FOS_FILEMUSTEXIST | FOS_PATHMUSTEXIST); diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp index 76d87ae..2729530 100644 --- a/src/gui/dialogs/qfileinfogatherer.cpp +++ b/src/gui/dialogs/qfileinfogatherer.cpp @@ -75,8 +75,8 @@ QFileInfoGatherer::QFileInfoGatherer(QObject *parent) #endif #ifndef QT_NO_FILESYSTEMWATCHER watcher = new QFileSystemWatcher(this); - connect(watcher, SIGNAL(directoryChanged(const QString &)), this, SLOT(list(const QString &))); - connect(watcher, SIGNAL(fileChanged(const QString &)), this, SLOT(updateFile(const QString &))); + connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(list(QString))); + connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(updateFile(QString))); #endif start(LowPriority); } diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp index b9012c7..8e78503 100644 --- a/src/gui/dialogs/qfilesystemmodel.cpp +++ b/src/gui/dialogs/qfilesystemmodel.cpp @@ -1864,12 +1864,12 @@ void QFileSystemModelPrivate::init() { Q_Q(QFileSystemModel); qRegisterMetaType<QList<QPair<QString,QFileInfo> > >("QList<QPair<QString,QFileInfo> >"); - q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(const QString &, const QStringList &)), - q, SLOT(_q_directoryChanged(const QString &, const QStringList &))); - q->connect(&fileInfoGatherer, SIGNAL(updates(const QString &, const QList<QPair<QString, QFileInfo> > &)), - q, SLOT(_q_fileSystemChanged(const QString &, const QList<QPair<QString, QFileInfo> > &))); - q->connect(&fileInfoGatherer, SIGNAL(nameResolved(const QString &, const QString &)), - q, SLOT(_q_resolvedName(const QString &, const QString &))); + q->connect(&fileInfoGatherer, SIGNAL(newListOfFiles(QString,QStringList)), + q, SLOT(_q_directoryChanged(QString,QStringList))); + q->connect(&fileInfoGatherer, SIGNAL(updates(QString,QList<QPair<QString,QFileInfo> >)), + q, SLOT(_q_fileSystemChanged(QString,QList<QPair<QString,QFileInfo> >))); + q->connect(&fileInfoGatherer, SIGNAL(nameResolved(QString,QString)), + q, SLOT(_q_resolvedName(QString,QString))); q->connect(&delayedSortTimer, SIGNAL(timeout()), q, SLOT(_q_performDelayedSort()), Qt::QueuedConnection); } diff --git a/src/gui/dialogs/qfontdialog.cpp b/src/gui/dialogs/qfontdialog.cpp index 60fae27..d035ef4 100644 --- a/src/gui/dialogs/qfontdialog.cpp +++ b/src/gui/dialogs/qfontdialog.cpp @@ -948,7 +948,7 @@ bool QFontDialogPrivate::sharedFontPanelAvailable = true; void QFontDialog::open(QObject *receiver, const char *member) { Q_D(QFontDialog); - connect(this, SIGNAL(fontSelected(const QFont&)), receiver, member); + connect(this, SIGNAL(fontSelected(QFont)), receiver, member); d->receiverToDisconnectOnClose = receiver; d->memberToDisconnectOnClose = member; QDialog::open(); @@ -1038,7 +1038,7 @@ void QFontDialog::done(int result) d->selectedFont = QFont(); } if (d->receiverToDisconnectOnClose) { - disconnect(this, SIGNAL(fontSelected(const QFont&)), + disconnect(this, SIGNAL(fontSelected(QFont)), d->receiverToDisconnectOnClose, d->memberToDisconnectOnClose); d->receiverToDisconnectOnClose = 0; } diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index 86213b4..39ce1ab 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -95,7 +95,7 @@ class QInputDialogSpinBox : public QSpinBox public: QInputDialogSpinBox(QWidget *parent) : QSpinBox(parent) { - connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged())); + connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged())); connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged())); } @@ -130,7 +130,7 @@ class QInputDialogDoubleSpinBox : public QDoubleSpinBox public: QInputDialogDoubleSpinBox(QWidget *parent = 0) : QDoubleSpinBox(parent) { - connect(lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(notifyTextChanged())); + connect(lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(notifyTextChanged())); connect(this, SIGNAL(editingFinished()), this, SLOT(notifyTextChanged())); } @@ -245,8 +245,8 @@ void QInputDialogPrivate::ensureLineEdit() if (!lineEdit) { lineEdit = new QLineEdit(q); lineEdit->hide(); - QObject::connect(lineEdit, SIGNAL(textChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); + QObject::connect(lineEdit, SIGNAL(textChanged(QString)), + q, SLOT(_q_textChanged(QString))); } } @@ -256,10 +256,10 @@ void QInputDialogPrivate::ensureComboBox() if (!comboBox) { comboBox = new QComboBox(q); comboBox->hide(); - QObject::connect(comboBox, SIGNAL(editTextChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); - QObject::connect(comboBox, SIGNAL(currentIndexChanged(const QString&)), - q, SLOT(_q_textChanged(const QString&))); + QObject::connect(comboBox, SIGNAL(editTextChanged(QString)), + q, SLOT(_q_textChanged(QString))); + QObject::connect(comboBox, SIGNAL(currentIndexChanged(QString)), + q, SLOT(_q_textChanged(QString))); } } @@ -276,8 +276,8 @@ void QInputDialogPrivate::ensureListView() listView->setModel(comboBox->model()); listView->setCurrentIndex(QModelIndex()); // ### QObject::connect(listView->selectionModel(), - SIGNAL(currentRowChanged(const QModelIndex&, const QModelIndex&)), - q, SLOT(_q_currentRowChanged(const QModelIndex&, const QModelIndex&))); + SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), + q, SLOT(_q_currentRowChanged(QModelIndex,QModelIndex))); } } diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp index 37f01be..05a290d 100644 --- a/src/gui/dialogs/qprintdialog_qws.cpp +++ b/src/gui/dialogs/qprintdialog_qws.cpp @@ -266,8 +266,8 @@ void QPrintDialogPrivate::setupDestination() // print destinations printerOrFile = new QButtonGroup(q); - QObject::connect(printerOrFile, SIGNAL(buttonClicked(QAbstractButton *)), - q, SLOT(_q_printerOrFileSelected(QAbstractButton *))); + QObject::connect(printerOrFile, SIGNAL(buttonClicked(QAbstractButton*)), + q, SLOT(_q_printerOrFileSelected(QAbstractButton*))); printToPrinterButton = q->findChild<QRadioButton *>("printToPrinterButton"); printerOrFile->addButton(printToPrinterButton); @@ -288,8 +288,8 @@ void QPrintDialogPrivate::setupPrinterSettings() // color mode colorMode = new QButtonGroup(q); - QObject::connect(colorMode, SIGNAL(buttonClicked(QAbstractButton *)), - q, SLOT(_q_colorModeSelected(QAbstractButton *))); + QObject::connect(colorMode, SIGNAL(buttonClicked(QAbstractButton*)), + q, SLOT(_q_colorModeSelected(QAbstractButton*))); printColor = q->findChild<QRadioButton *>("printColor"); colorMode->addButton(printColor); diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 6fc270d..9d6cd55 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -835,9 +835,6 @@ void QUnixPrintWidgetPrivate::setOptionsPane(QPrintDialogPrivate *pane) void QUnixPrintWidgetPrivate::_q_btnBrowseClicked() { - const int prevPrinter = widget.printers->currentIndex(); - widget.printers->setCurrentIndex(widget.printers->count() - 2); // the pdf one - QString filename = widget.filename->text(); #ifndef QT_NO_FILEDIALOG filename = QFileDialog::getSaveFileName(parent, QPrintDialog::tr("Print To File ..."), filename, @@ -849,9 +846,11 @@ void QUnixPrintWidgetPrivate::_q_btnBrowseClicked() widget.filename->setText(filename); if (filename.endsWith(QString::fromLatin1(".ps"), Qt::CaseInsensitive)) widget.printers->setCurrentIndex(widget.printers->count() - 1); // the postscript one + else if (filename.endsWith(QString::fromLatin1(".pdf"), Qt::CaseInsensitive)) + widget.printers->setCurrentIndex(widget.printers->count() - 2); // the pdf one + else if (widget.printers->currentIndex() != widget.printers->count() - 1) // if ps is not selected, pdf is default + widget.printers->setCurrentIndex(widget.printers->count() - 2); // the pdf one } - else - widget.printers->setCurrentIndex(prevPrinter); } void QUnixPrintWidgetPrivate::applyPrinterProperties(QPrinter *p) diff --git a/src/gui/dialogs/qprintpreviewdialog.cpp b/src/gui/dialogs/qprintpreviewdialog.cpp index 1f0b51d..bb8437c 100644 --- a/src/gui/dialogs/qprintpreviewdialog.cpp +++ b/src/gui/dialogs/qprintpreviewdialog.cpp @@ -224,7 +224,7 @@ void QPrintPreviewDialogPrivate::init(QPrinter *_printer) printer = new QPrinter; preview = new QPrintPreviewWidget(printer, q); } - QObject::connect(preview, SIGNAL(paintRequested(QPrinter *)), q, SIGNAL(paintRequested(QPrinter *))); + QObject::connect(preview, SIGNAL(paintRequested(QPrinter*)), q, SIGNAL(paintRequested(QPrinter*))); QObject::connect(preview, SIGNAL(previewChanged()), q, SLOT(_q_previewChanged())); setupActions(); diff --git a/src/gui/dialogs/qsidebar.cpp b/src/gui/dialogs/qsidebar.cpp index 396889d..879d1b1 100644 --- a/src/gui/dialogs/qsidebar.cpp +++ b/src/gui/dialogs/qsidebar.cpp @@ -293,20 +293,20 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model) if (model == fileSystemModel) return; if (fileSystemModel != 0) { - disconnect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); + disconnect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); disconnect(model, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); - disconnect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + disconnect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(layoutChanged())); } fileSystemModel = model; if (fileSystemModel != 0) { - connect(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(dataChanged(const QModelIndex &, const QModelIndex &))); + connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(dataChanged(QModelIndex,QModelIndex))); connect(model, SIGNAL(layoutChanged()), this, SLOT(layoutChanged())); - connect(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)), + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(layoutChanged())); } clear(); @@ -381,14 +381,14 @@ void QSidebar::init(QFileSystemModel *model, const QList<QUrl> &newUrls) setModel(urlModel); setItemDelegate(new QSideBarDelegate(this)); - connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); #ifndef QT_NO_DRAGANDDROP setDragDropMode(QAbstractItemView::DragDrop); #endif setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(showContextMenu(const QPoint &))); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), + this, SLOT(showContextMenu(QPoint))); urlModel->setUrls(newUrls); setCurrentIndex(this->model()->index(0,0)); } @@ -414,8 +414,8 @@ QSize QSidebar::sizeHint() const void QSidebar::selectUrl(const QUrl &url) { - disconnect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + disconnect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); selectionModel()->clear(); for (int i = 0; i < model()->rowCount(); ++i) { @@ -425,8 +425,8 @@ void QSidebar::selectUrl(const QUrl &url) } } - connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), - this, SLOT(clicked(const QModelIndex &))); + connect(selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(clicked(QModelIndex))); } #ifndef QT_NO_MENU diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp index db1c9e9..472ca35 100644 --- a/src/gui/dialogs/qwizard.cpp +++ b/src/gui/dialogs/qwizard.cpp @@ -759,8 +759,8 @@ void QWizardPrivate::addField(const QWizardField &field) QObject::connect(myField.object, myField.changedSignal, myField.page, SLOT(_q_maybeEmitCompleteChanged())); QObject::connect( - myField.object, SIGNAL(destroyed(QObject *)), q, - SLOT(_q_handleFieldObjectDestroyed(QObject *))); + myField.object, SIGNAL(destroyed(QObject*)), q, + SLOT(_q_handleFieldObjectDestroyed(QObject*))); } void QWizardPrivate::removeFieldAt(int index) @@ -773,8 +773,8 @@ void QWizardPrivate::removeFieldAt(int index) QObject::disconnect(field.object, field.changedSignal, field.page, SLOT(_q_maybeEmitCompleteChanged())); QObject::disconnect( - field.object, SIGNAL(destroyed(QObject *)), q, - SLOT(_q_handleFieldObjectDestroyed(QObject *))); + field.object, SIGNAL(destroyed(QObject*)), q, + SLOT(_q_handleFieldObjectDestroyed(QObject*))); fields.remove(index); } diff --git a/src/gui/effects/qgraphicseffect.cpp b/src/gui/effects/qgraphicseffect.cpp index 3fca319..239e29c 100644 --- a/src/gui/effects/qgraphicseffect.cpp +++ b/src/gui/effects/qgraphicseffect.cpp @@ -135,19 +135,6 @@ QT_BEGIN_NAMESPACE */ /*! - \enum QGraphicsEffectSource::PixmapPadMode - - This enum describes how much of the effect will be rendered to a pixmap - created using the pixmap() function. - - \value NoExpandPadMode The pixmap is the size of the widget or graphics item. - \value ExpandToTransparentBorderPadMode The pixmap is expanded to include - the widget or graphics item plus a transparent border. - \value ExpandToEffectRectPadMode The pixmap is expanded to include the widget - or graphics item and the effect. -*/ - -/*! \internal */ QGraphicsEffectSource::QGraphicsEffectSource(QGraphicsEffectSourcePrivate &dd, QObject *parent) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 39291d3..c0e4890 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -62,6 +62,7 @@ QEglContext::QEglContext() , currentSurface(EGL_NO_SURFACE) , current(false) , ownsContext(true) + , sharing(false) { } @@ -174,6 +175,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties if (apiType == QEgl::OpenGL) contextProps.setValue(EGL_CONTEXT_CLIENT_VERSION, 2); #endif + sharing = false; if (shareContext && shareContext->ctx == EGL_NO_CONTEXT) shareContext = 0; if (shareContext) { @@ -181,6 +183,8 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties if (ctx == EGL_NO_CONTEXT) { qWarning() << "QEglContext::createContext(): Could not share context:" << errorString(eglGetError()); shareContext = 0; + } else { + sharing = true; } } if (ctx == EGL_NO_CONTEXT) { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 16b5b16..51bdbbe 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -81,6 +81,7 @@ public: bool isValid() const; bool isCurrent() const; + bool isSharing() const { return sharing; } QEgl::API api() const { return apiType; } void setApi(QEgl::API api) { apiType = api; } @@ -132,6 +133,7 @@ private: EGLSurface currentSurface; bool current; bool ownsContext; + bool sharing; static EGLDisplay getDisplay(QPaintDevice *device); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 872ec3c..7e5929e 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -477,9 +477,6 @@ void QGraphicsAnchorLayout::removeAt(int index) return; // Removing an item affects both horizontal and vertical graphs - d->restoreSimplifiedGraph(QGraphicsAnchorLayoutPrivate::Horizontal); - d->restoreSimplifiedGraph(QGraphicsAnchorLayoutPrivate::Vertical); - d->removeCenterConstraints(item, QGraphicsAnchorLayoutPrivate::Horizontal); d->removeCenterConstraints(item, QGraphicsAnchorLayoutPrivate::Vertical); d->removeAnchors(item); diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.h b/src/gui/graphicsview/qgraphicsanchorlayout.h index 01c3a86..063639e 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout.h @@ -76,6 +76,7 @@ private: Q_DECLARE_PRIVATE(QGraphicsAnchor) friend class QGraphicsAnchorLayoutPrivate; + friend struct AnchorData; }; class Q_GUI_EXPORT QGraphicsAnchorLayout : public QGraphicsLayout diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index 594a205..a6f5992 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -55,14 +55,13 @@ QT_BEGIN_NAMESPACE QGraphicsAnchorPrivate::QGraphicsAnchorPrivate(int version) : QObjectPrivate(version), layoutPrivate(0), data(0), - sizePolicy(QSizePolicy::Fixed) + sizePolicy(QSizePolicy::Fixed), preferredSize(0), + hasSize(true), reversed(false) { } QGraphicsAnchorPrivate::~QGraphicsAnchorPrivate() { - // ### - layoutPrivate->restoreSimplifiedGraph(QGraphicsAnchorLayoutPrivate::Orientation(data->orientation)); layoutPrivate->removeAnchor(data->from, data->to); } @@ -76,31 +75,60 @@ void QGraphicsAnchorPrivate::setSizePolicy(QSizePolicy::Policy policy) void QGraphicsAnchorPrivate::setSpacing(qreal value) { - if (data) { - layoutPrivate->setAnchorSize(data, &value); - } else { + if (!data) { qWarning("QGraphicsAnchor::setSpacing: The anchor does not exist."); + return; + } + + const qreal rawValue = reversed ? -preferredSize : preferredSize; + if (hasSize && (rawValue == value)) + return; + + // The anchor has an user-defined size + hasSize = true; + + // The simplex solver cannot handle negative sizes. To workaround that, + // if value is less than zero, we reverse the anchor and set the absolute + // value; + if (value >= 0) { + preferredSize = value; + if (reversed) + qSwap(data->from, data->to); + reversed = false; + } else { + preferredSize = -value; + if (!reversed) + qSwap(data->from, data->to); + reversed = true; } + + layoutPrivate->q_func()->invalidate(); } void QGraphicsAnchorPrivate::unsetSpacing() { - if (data) { - layoutPrivate->setAnchorSize(data, 0); - } else { + if (!data) { qWarning("QGraphicsAnchor::setSpacing: The anchor does not exist."); + return; } + + // Return to standard direction + hasSize = false; + if (reversed) + qSwap(data->from, data->to); + reversed = false; + + layoutPrivate->q_func()->invalidate(); } qreal QGraphicsAnchorPrivate::spacing() const { - qreal size = 0; - if (data) { - layoutPrivate->anchorSize(data, 0, &size, 0); - } else { + if (!data) { qWarning("QGraphicsAnchor::setSpacing: The anchor does not exist."); + return 0; } - return size; + + return reversed ? -preferredSize : preferredSize; } @@ -139,22 +167,22 @@ static void internalSizeHints(QSizePolicy::Policy policy, *prefSize = prefSizeHint; } -bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) +void AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) { QSizePolicy::Policy policy; qreal minSizeHint; qreal prefSizeHint; qreal maxSizeHint; - // It is an internal anchor if (item) { + // It is an internal anchor, fetch size information from the item if (isLayoutAnchor) { minSize = 0; prefSize = 0; maxSize = QWIDGETSIZE_MAX; if (isCenterAnchor) maxSize /= 2; - return true; + return; } else { if (orientation == QGraphicsAnchorLayoutPrivate::Horizontal) { policy = item->sizePolicy().horizontalPolicy(); @@ -175,14 +203,16 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) } } } else { + // It is a user-created anchor, fetch size information from the associated QGraphicsAnchor Q_ASSERT(graphicsAnchor); - policy = graphicsAnchor->sizePolicy(); + QGraphicsAnchorPrivate *anchorPrivate = graphicsAnchor->d_func(); + policy = anchorPrivate->sizePolicy; minSizeHint = 0; - if (hasSize) { + if (anchorPrivate->hasSize) { // One can only configure the preferred size of a normal anchor. Their minimum and // maximum "size hints" are always 0 and QWIDGETSIZE_MAX, correspondingly. However, // their effective size hints might be narrowed down due to their size policies. - prefSizeHint = prefSize; + prefSizeHint = anchorPrivate->preferredSize; } else { const Qt::Orientation orient = Qt::Orientation(QGraphicsAnchorLayoutPrivate::edgeOrientation(from->m_edge) + 1); qreal s = styleInfo->defaultSpacing(orient); @@ -214,8 +244,6 @@ bool AnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) sizeAtMinimum = prefSize; sizeAtPreferred = prefSize; sizeAtMaximum = prefSize; - - return true; } void ParallelAnchorData::updateChildrenSizes() @@ -224,8 +252,13 @@ void ParallelAnchorData::updateChildrenSizes() firstEdge->sizeAtPreferred = sizeAtPreferred; firstEdge->sizeAtMaximum = sizeAtMaximum; - const bool secondFwd = (secondEdge->from == from); - if (secondFwd) { + // We have the convention that the first children will define the direction of the + // pararell group. So we can check whether the second edge is "forward" in relation + // to the group if it have the same direction as the first edge. Note that we don't + // use 'this->from' because it might be changed by vertex simplification. + const bool secondForward = (firstEdge->from == secondEdge->from); + + if (secondForward) { secondEdge->sizeAtMinimum = sizeAtMinimum; secondEdge->sizeAtPreferred = sizeAtPreferred; secondEdge->sizeAtMaximum = sizeAtMaximum; @@ -239,26 +272,21 @@ void ParallelAnchorData::updateChildrenSizes() secondEdge->updateChildrenSizes(); } -bool ParallelAnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) -{ - return refreshSizeHints_helper(styleInfo); -} - -bool ParallelAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *styleInfo, - bool refreshChildren) +bool ParallelAnchorData::calculateSizeHints() { - if (refreshChildren && (!firstEdge->refreshSizeHints(styleInfo) - || !secondEdge->refreshSizeHints(styleInfo))) { - return false; - } + // Note that parallel groups can lead to unfeasibility, so during calculation, we can + // find out one unfeasibility. Because of that this method return boolean. This can't + // happen in sequential, so there the method is void. // Account for parallel anchors where the second edge is backwards. // We rely on the fact that a forward anchor of sizes min, pref, max is equivalent // to a backwards anchor of size (-max, -pref, -min) - const bool secondFwd = (secondEdge->from == from); - const qreal secondMin = secondFwd ? secondEdge->minSize : -secondEdge->maxSize; - const qreal secondPref = secondFwd ? secondEdge->prefSize : -secondEdge->prefSize; - const qreal secondMax = secondFwd ? secondEdge->maxSize : -secondEdge->minSize; + + // Also see comments in updateChildrenSizes(). + const bool secondForward = (firstEdge->from == secondEdge->from); + const qreal secondMin = secondForward ? secondEdge->minSize : -secondEdge->maxSize; + const qreal secondPref = secondForward ? secondEdge->prefSize : -secondEdge->prefSize; + const qreal secondMax = secondForward ? secondEdge->maxSize : -secondEdge->minSize; minSize = qMax(firstEdge->minSize, secondMin); maxSize = qMin(firstEdge->maxSize, secondMax); @@ -386,13 +414,7 @@ void SequentialAnchorData::updateChildrenSizes() } } -bool SequentialAnchorData::refreshSizeHints(const QLayoutStyleInfo *styleInfo) -{ - return refreshSizeHints_helper(styleInfo); -} - -bool SequentialAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *styleInfo, - bool refreshChildren) +void SequentialAnchorData::calculateSizeHints() { minSize = 0; prefSize = 0; @@ -400,11 +422,6 @@ bool SequentialAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *style for (int i = 0; i < m_edges.count(); ++i) { AnchorData *edge = m_edges.at(i); - - // If it's the case refresh children information first - if (refreshChildren && !edge->refreshSizeHints(styleInfo)) - return false; - minSize += edge->minSize; prefSize += edge->prefSize; maxSize += edge->maxSize; @@ -414,8 +431,6 @@ bool SequentialAnchorData::refreshSizeHints_helper(const QLayoutStyleInfo *style sizeAtMinimum = prefSize; sizeAtPreferred = prefSize; sizeAtMaximum = prefSize; - - return true; } #ifdef QT_DEBUG @@ -490,7 +505,6 @@ QGraphicsAnchorLayoutPrivate::QGraphicsAnchorLayoutPrivate() interpolationProgress[i] = -1; spacings[i] = -1; - graphSimplified[i] = false; graphHasConflicts[i] = false; layoutFirstVertex[i] = 0; @@ -591,7 +605,7 @@ AnchorData *QGraphicsAnchorLayoutPrivate::addAnchorMaybeParallel(AnchorData *new // At this point we can identify that the parallel anchor is not feasible, e.g. one // anchor minimum size is bigger than the other anchor maximum size. - *feasible = parallel->refreshSizeHints_helper(0, false); + *feasible = parallel->calculateSizeHints(); newAnchor = parallel; } @@ -652,7 +666,7 @@ static AnchorData *createSequence(Graph<AnchorVertex, AnchorData> *graph, sequence->from = before; sequence->to = after; - sequence->refreshSizeHints_helper(0, false); + sequence->calculateSizeHints(); return sequence; } @@ -696,16 +710,18 @@ static AnchorData *createSequence(Graph<AnchorVertex, AnchorData> *graph, */ bool QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation) { - static bool noSimplification = !qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty(); - if (noSimplification || items.isEmpty()) + if (items.isEmpty()) return true; - if (graphSimplified[orientation]) - return true; - -#if 0 +#if defined(QT_DEBUG) && 0 qDebug("Simplifying Graph for %s", orientation == Horizontal ? "Horizontal" : "Vertical"); + + static int count = 0; + if (orientation == Horizontal) { + count++; + dumpGraph(QString::fromAscii("%1-full").arg(count)); + } #endif // Vertex simplification @@ -723,13 +739,16 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraph(Orientation orientation) // Note that if we are not feasible, we fallback and make sure that the graph is fully restored if (!feasible) { - graphSimplified[orientation] = true; restoreSimplifiedGraph(orientation); restoreVertices(orientation); return false; } - graphSimplified[orientation] = true; +#if defined(QT_DEBUG) && 0 + dumpGraph(QString::fromAscii("%1-simplified-%2").arg(count).arg( + QString::fromAscii(orientation == Horizontal ? "Horizontal" : "Vertical"))); +#endif + return true; } @@ -1134,10 +1153,6 @@ void QGraphicsAnchorLayoutPrivate::restoreSimplifiedConstraints(ParallelAnchorDa void QGraphicsAnchorLayoutPrivate::restoreSimplifiedGraph(Orientation orientation) { - if (!graphSimplified[orientation]) - return; - graphSimplified[orientation] = false; - #if 0 qDebug("Restoring Simplified Graph for %s", orientation == Horizontal ? "Horizontal" : "Vertical"); @@ -1257,7 +1272,6 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() addAnchor_helper(layout, Qt::AnchorLeft, layout, Qt::AnchorRight, data); data->maxSize = QWIDGETSIZE_MAX; - data->skipInPreferred = 1; // Save a reference to layout vertices layoutFirstVertex[Horizontal] = internalVertex(layout, Qt::AnchorLeft); @@ -1269,7 +1283,6 @@ void QGraphicsAnchorLayoutPrivate::createLayoutEdges() addAnchor_helper(layout, Qt::AnchorTop, layout, Qt::AnchorBottom, data); data->maxSize = QWIDGETSIZE_MAX; - data->skipInPreferred = 1; // Save a reference to layout vertices layoutFirstVertex[Vertical] = internalVertex(layout, Qt::AnchorTop); @@ -1292,19 +1305,17 @@ void QGraphicsAnchorLayoutPrivate::deleteLayoutEdges() void QGraphicsAnchorLayoutPrivate::createItemEdges(QGraphicsLayoutItem *item) { - Q_ASSERT(!graphSimplified[Horizontal] && !graphSimplified[Vertical]); - items.append(item); // Create horizontal and vertical internal anchors for the item and // refresh its size hint / policy values. AnchorData *data = new AnchorData; addAnchor_helper(item, Qt::AnchorLeft, item, Qt::AnchorRight, data); - data->refreshSizeHints(0); // 0 = effectiveSpacing, will not be used + data->refreshSizeHints(); data = new AnchorData; addAnchor_helper(item, Qt::AnchorTop, item, Qt::AnchorBottom, data); - data->refreshSizeHints(0); // 0 = effectiveSpacing, will not be used + data->refreshSizeHints(); } /*! @@ -1336,8 +1347,6 @@ void QGraphicsAnchorLayoutPrivate::createCenterAnchors( return; } - Q_ASSERT(!graphSimplified[orientation]); - // Check if vertex already exists if (internalVertex(item, centerEdge)) return; @@ -1366,14 +1375,14 @@ void QGraphicsAnchorLayoutPrivate::createCenterAnchors( addAnchor_helper(item, firstEdge, item, centerEdge, data); data->isCenterAnchor = true; data->dependency = AnchorData::Master; - data->refreshSizeHints(0); + data->refreshSizeHints(); data = new AnchorData; c->variables.insert(data, -1.0); addAnchor_helper(item, centerEdge, item, lastEdge, data); data->isCenterAnchor = true; data->dependency = AnchorData::Slave; - data->refreshSizeHints(0); + data->refreshSizeHints(); itemCenterConstraints[orientation].append(c); @@ -1404,8 +1413,6 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( return; } - Q_ASSERT(!graphSimplified[orientation]); - // Orientation code Qt::AnchorPoint firstEdge; Qt::AnchorPoint lastEdge; @@ -1442,7 +1449,7 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( // Create the new anchor that should substitute the left-center-right anchors. AnchorData *data = new AnchorData; addAnchor_helper(item, firstEdge, item, lastEdge, data); - data->refreshSizeHints(0); + data->refreshSizeHints(); // Remove old anchors removeAnchor_helper(first, center); @@ -1473,8 +1480,6 @@ void QGraphicsAnchorLayoutPrivate::removeCenterAnchors( void QGraphicsAnchorLayoutPrivate::removeCenterConstraints(QGraphicsLayoutItem *item, Orientation orientation) { - Q_ASSERT(!graphSimplified[orientation]); - // Remove the item center constraints associated to this item // ### This is a temporary solution. We should probably use a better // data structure to hold items and/or their associated constraints @@ -1505,15 +1510,21 @@ void QGraphicsAnchorLayoutPrivate::removeCenterConstraints(QGraphicsLayoutItem * /*! * \internal + * Implements the high level "addAnchor" feature. Called by the public API + * addAnchor method. + * + * The optional \a spacing argument defines the size of the anchor. If not provided, + * the anchor size is either 0 or not-set, depending on type of anchor created (see + * matrix below). * - * Helper function that is called from the anchor functions in the public API. - * If \a spacing is 0, it will pick up the spacing defined by the style. + * All anchors that remain with size not-set will assume the standard spacing, + * set either by the layout style or through the "setSpacing" layout API. */ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *firstItem, - Qt::AnchorPoint firstEdge, - QGraphicsLayoutItem *secondItem, - Qt::AnchorPoint secondEdge, - qreal *spacing) + Qt::AnchorPoint firstEdge, + QGraphicsLayoutItem *secondItem, + Qt::AnchorPoint secondEdge, + qreal *spacing) { Q_Q(QGraphicsAnchorLayout); if ((firstItem == 0) || (secondItem == 0)) { @@ -1534,10 +1545,6 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *fi return 0; } - // Guarantee that the graph is no simplified when adding this anchor, - // anchor manipulation always happen in the full graph - restoreSimplifiedGraph(edgeOrientation(firstEdge)); - // In QGraphicsAnchorLayout, items are represented in its internal // graph as four anchors that connect: // - Left -> HCenter @@ -1547,12 +1554,10 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *fi // Ensure that the internal anchors have been created for both items. if (firstItem != q && !items.contains(firstItem)) { - restoreSimplifiedGraph(edgeOrientation(firstEdge) == Horizontal ? Vertical : Horizontal); createItemEdges(firstItem); addChildLayoutItem(firstItem); } if (secondItem != q && !items.contains(secondItem)) { - restoreSimplifiedGraph(edgeOrientation(firstEdge) == Horizontal ? Vertical : Horizontal); createItemEdges(secondItem); addChildLayoutItem(secondItem); } @@ -1565,7 +1570,13 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *fi correctEdgeDirection(firstItem, firstEdge, secondItem, secondEdge); AnchorData *data = new AnchorData; - if (!spacing) { + QGraphicsAnchor *graphicsAnchor = acquireGraphicsAnchor(data); + + addAnchor_helper(firstItem, firstEdge, secondItem, secondEdge, data); + + if (spacing) { + graphicsAnchor->setSpacing(*spacing); + } else { // If firstItem or secondItem is the layout itself, the spacing will default to 0. // Otherwise, the following matrix is used (questionmark means that the spacing // is queried from the style): @@ -1578,45 +1589,39 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::addAnchor(QGraphicsLayoutItem *fi || secondItem == q || pickEdge(firstEdge, Horizontal) == Qt::AnchorHorizontalCenter || oppositeEdge(firstEdge) != secondEdge) { - data->setPreferredSize(0); + graphicsAnchor->setSpacing(0); } else { - data->unsetSize(); + graphicsAnchor->unsetSpacing(); } - addAnchor_helper(firstItem, firstEdge, secondItem, secondEdge, data); - - } else if (*spacing >= 0) { - data->setPreferredSize(*spacing); - addAnchor_helper(firstItem, firstEdge, secondItem, secondEdge, data); - - } else { - data->setPreferredSize(-*spacing); - addAnchor_helper(secondItem, secondEdge, firstItem, firstEdge, data); } - return acquireGraphicsAnchor(data); + return graphicsAnchor; } +/* + \internal + + This method adds an AnchorData to the internal graph. It is responsible for doing + the boilerplate part of such task. + + If another AnchorData exists between the mentioned vertices, it is deleted and + the new one is inserted. +*/ void QGraphicsAnchorLayoutPrivate::addAnchor_helper(QGraphicsLayoutItem *firstItem, - Qt::AnchorPoint firstEdge, - QGraphicsLayoutItem *secondItem, - Qt::AnchorPoint secondEdge, - AnchorData *data) + Qt::AnchorPoint firstEdge, + QGraphicsLayoutItem *secondItem, + Qt::AnchorPoint secondEdge, + AnchorData *data) { Q_Q(QGraphicsAnchorLayout); const Orientation orientation = edgeOrientation(firstEdge); - // Guarantee that the graph is no simplified when adding this anchor, - // anchor manipulation always happen in the full graph - restoreSimplifiedGraph(orientation); - - // Is the Vertex (firstItem, firstEdge) already represented in our - // internal structure? + // Create or increase the reference count for the related vertices. AnchorVertex *v1 = addInternalVertex(firstItem, firstEdge); AnchorVertex *v2 = addInternalVertex(secondItem, secondEdge); // Remove previous anchor - // ### Could we update the existing edgeData rather than creating a new one? if (graph[orientation].edgeData(v1, v2)) { removeAnchor_helper(v1, v2); } @@ -1647,15 +1652,13 @@ QGraphicsAnchor *QGraphicsAnchorLayoutPrivate::getAnchor(QGraphicsLayoutItem *fi QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) { - Orientation orient = edgeOrientation(firstEdge); - restoreSimplifiedGraph(orient); - + const Orientation orientation = edgeOrientation(firstEdge); AnchorVertex *v1 = internalVertex(firstItem, firstEdge); AnchorVertex *v2 = internalVertex(secondItem, secondEdge); QGraphicsAnchor *graphicsAnchor = 0; - AnchorData *data = graph[orient].edgeData(v1, v2); + AnchorData *data = graph[orientation].edgeData(v1, v2); if (data) graphicsAnchor = acquireGraphicsAnchor(data); return graphicsAnchor; @@ -1740,12 +1743,9 @@ void QGraphicsAnchorLayoutPrivate::removeAnchor(AnchorVertex *firstVertex, void QGraphicsAnchorLayoutPrivate::removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2) { Q_ASSERT(v1 && v2); - // Guarantee that the graph is no simplified when removing this anchor, - // anchor manipulation always happen in the full graph - Orientation o = edgeOrientation(v1->m_edge); - restoreSimplifiedGraph(o); // Remove edge from graph + const Orientation o = edgeOrientation(v1->m_edge); graph[o].removeEdge(v1, v2); // Decrease vertices reference count (may trigger a deletion) @@ -1753,67 +1753,6 @@ void QGraphicsAnchorLayoutPrivate::removeAnchor_helper(AnchorVertex *v1, AnchorV removeInternalVertex(v2->m_item, v2->m_edge); } -/*! - \internal - Only called from outside. (calls invalidate()) -*/ -void QGraphicsAnchorLayoutPrivate::setAnchorSize(AnchorData *data, const qreal *anchorSize) -{ - Q_Q(QGraphicsAnchorLayout); - // ### we can avoid restoration if we really want to, but we would have to - // search recursively through all composite anchors - Q_ASSERT(data); - restoreSimplifiedGraph(edgeOrientation(data->from->m_edge)); - - QGraphicsLayoutItem *firstItem = data->from->m_item; - QGraphicsLayoutItem *secondItem = data->to->m_item; - Qt::AnchorPoint firstEdge = data->from->m_edge; - Qt::AnchorPoint secondEdge = data->to->m_edge; - - // Use heuristics to find out what the user meant with this anchor. - correctEdgeDirection(firstItem, firstEdge, secondItem, secondEdge); - if (data->from->m_item != firstItem) - qSwap(data->from, data->to); - - if (anchorSize) { - // ### The current implementation makes "setAnchorSize" behavior - // dependent on the argument order for cases where we have - // no heuristic. Ie. two widgets, same anchor point. - - // We cannot have negative sizes inside the graph. This would cause - // the simplex solver to fail because all simplex variables are - // positive by definition. - // "negative spacing" is handled by inverting the standard item order. - if (*anchorSize >= 0) { - data->setPreferredSize(*anchorSize); - } else { - data->setPreferredSize(-*anchorSize); - qSwap(data->from, data->to); - } - } else { - data->unsetSize(); - } - q->invalidate(); -} - -void QGraphicsAnchorLayoutPrivate::anchorSize(const AnchorData *data, - qreal *minSize, - qreal *prefSize, - qreal *maxSize) const -{ - Q_ASSERT(minSize || prefSize || maxSize); - Q_ASSERT(data); - QGraphicsAnchorLayoutPrivate *that = const_cast<QGraphicsAnchorLayoutPrivate *>(this); - that->restoreSimplifiedGraph(Orientation(data->orientation)); - - if (minSize) - *minSize = data->minSize; - if (prefSize) - *prefSize = data->prefSize; - if (maxSize) - *maxSize = data->maxSize; -} - AnchorVertex *QGraphicsAnchorLayoutPrivate::addInternalVertex(QGraphicsLayoutItem *item, Qt::AnchorPoint edge) { @@ -1879,8 +1818,6 @@ void QGraphicsAnchorLayoutPrivate::removeVertex(QGraphicsLayoutItem *item, Qt::A void QGraphicsAnchorLayoutPrivate::removeAnchors(QGraphicsLayoutItem *item) { - Q_ASSERT(!graphSimplified[Horizontal] && !graphSimplified[Vertical]); - // remove the center anchor first!! removeCenterAnchors(item, Qt::AnchorHorizontalCenter, false); removeVertex(item, Qt::AnchorLeft); @@ -1983,20 +1920,8 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs() { if (!calculateGraphCacheDirty) return; - -#if defined(QT_DEBUG) && 0 - static int count = 0; - count++; - dumpGraph(QString::fromAscii("%1-before").arg(count)); -#endif - calculateGraphs(Horizontal); calculateGraphs(Vertical); - -#if defined(QT_DEBUG) && 0 - dumpGraph(QString::fromAscii("%1-after").arg(count)); -#endif - calculateGraphCacheDirty = false; } @@ -2044,26 +1969,13 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( lastCalculationUsedSimplex[orientation] = false; #endif - // ### This is necessary because now we do vertex simplification, we still don't know - // differentiate between invalidate()s that doesn't need resimplification and those which - // need. For example, when size hint of an item changes, this may cause an anchor to reach 0 or to - // leave 0 and get a size. In both cases we need resimplify. - // - // ### one possible solution would be tracking all the 0-sized anchors, if this set change, we need - // resimplify. - restoreSimplifiedGraph(orientation); - - // Reset the nominal sizes of each anchor based on the current item sizes. This function - // works with both simplified and non-simplified graphs, so it'll work when the - // simplification is going to be reused. - if (!refreshAllSizeHints(orientation)) { - qWarning("QGraphicsAnchorLayout: anchor setup is not feasible."); - graphHasConflicts[orientation] = true; - return; - } + static bool simplificationEnabled = qgetenv("QT_ANCHORLAYOUT_NO_SIMPLIFICATION").isEmpty(); + + // Reset the nominal sizes of each anchor based on the current item sizes + refreshAllSizeHints(orientation); // Simplify the graph - if (!simplifyGraph(orientation)) { + if (simplificationEnabled && !simplifyGraph(orientation)) { qWarning("QGraphicsAnchorLayout: anchor setup is not feasible."); graphHasConflicts[orientation] = true; return; @@ -2127,6 +2039,9 @@ void QGraphicsAnchorLayoutPrivate::calculateGraphs( qDeleteAll(constraints[orientation]); constraints[orientation].clear(); graphPaths[orientation].clear(); // ### + + if (simplificationEnabled) + restoreSimplifiedGraph(orientation); } /*! @@ -2226,29 +2141,19 @@ bool QGraphicsAnchorLayoutPrivate::calculateNonTrunk(const QList<QSimplexConstra /*! \internal - Traverse the graph refreshing the size hints. Complex anchors will call the - refresh method of their children anchors. Simple anchors, if are internal - anchors, will query the associated item for their size hints. - - Returns false if some unfeasibility was found in the graph regarding the - complex anchors. + Traverse the graph refreshing the size hints. Edges will query their associated + item or graphicsAnchor for their size hints. */ -bool QGraphicsAnchorLayoutPrivate::refreshAllSizeHints(Orientation orientation) +void QGraphicsAnchorLayoutPrivate::refreshAllSizeHints(Orientation orientation) { Graph<AnchorVertex, AnchorData> &g = graph[orientation]; QList<QPair<AnchorVertex *, AnchorVertex *> > vertices = g.connections(); QLayoutStyleInfo styleInf = styleInfo(); for (int i = 0; i < vertices.count(); ++i) { - AnchorData *data = g.edgeData(vertices.at(i).first, vertices.at(i).second);; - Q_ASSERT(data->from && data->to); - - // During the traversal we check the feasibility of the complex anchors. - if (!data->refreshSizeHints(&styleInf)) - return false; + AnchorData *data = g.edgeData(vertices.at(i).first, vertices.at(i).second); + data->refreshSizeHints(&styleInf); } - - return true; } /*! @@ -2364,13 +2269,21 @@ QList<QSimplexConstraint *> QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutCentralVertex[orient]); } else { layoutEdge = graph[orient].edgeData(layoutFirstVertex[orient], layoutLastVertex[orient]); + } - // If maxSize is less then "infinite", that means there are other anchors - // grouped together with this one. We can't ignore its maximum value so we - // set back the variable to NULL to prevent the continue condition from being - // satisfied in the loop below. - if (layoutEdge->maxSize < QWIDGETSIZE_MAX) - layoutEdge = 0; + // If maxSize is less then "infinite", that means there are other anchors + // grouped together with this one. We can't ignore its maximum value so we + // set back the variable to NULL to prevent the continue condition from being + // satisfied in the loop below. + const qreal expectedMax = layoutCentralVertex[orient] ? QWIDGETSIZE_MAX / 2 : QWIDGETSIZE_MAX; + qreal actualMax; + if (layoutEdge->from == layoutFirstVertex[orient]) { + actualMax = layoutEdge->maxSize; + } else { + actualMax = -layoutEdge->minSize; + } + if (actualMax != expectedMax) { + layoutEdge = 0; } // For each variable, create constraints based on size hints @@ -2621,21 +2534,6 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom) } /*! - \internal - - Fill the distance in the vertex and in the sub-vertices if its a combined vertex. -*/ -static void setVertexDistance(AnchorVertex *v, qreal distance) -{ - v->distance = distance; - if (v->m_type == AnchorVertex::Pair) { - AnchorVertexPair *pair = static_cast<AnchorVertexPair *>(v); - setVertexDistance(pair->m_first, distance); - setVertexDistance(pair->m_second, distance); - } -} - -/*! \internal Calculate the position of each vertex based on the paths to each of @@ -2650,7 +2548,7 @@ void QGraphicsAnchorLayoutPrivate::calculateVertexPositions( // Get root vertex AnchorVertex *root = layoutFirstVertex[orientation]; - setVertexDistance(root, 0); + root->distance = 0; visited.insert(root); // Add initial edges to the queue @@ -2661,16 +2559,12 @@ void QGraphicsAnchorLayoutPrivate::calculateVertexPositions( // Do initial calculation required by "interpolateEdge()" setupEdgesInterpolation(orientation); - // Traverse the graph and calculate vertex positions, we need to - // visit all pairs since each of them could have a sequential - // anchor inside, which hides more vertices. + // Traverse the graph and calculate vertex positions while (!queue.isEmpty()) { QPair<AnchorVertex *, AnchorVertex *> pair = queue.dequeue(); AnchorData *edge = graph[orientation].edgeData(pair.first, pair.second); - // Both vertices were interpolated, and the anchor itself can't have other - // anchors inside (it's not a complex anchor). - if (edge->type == AnchorData::Normal && visited.contains(pair.second)) + if (visited.contains(pair.second)) continue; visited.insert(pair.second); @@ -2710,24 +2604,20 @@ void QGraphicsAnchorLayoutPrivate::setupEdgesInterpolation( } /*! - \internal - - Calculate the current Edge size based on the current Layout size and the - size the edge is supposed to have when the layout is at its: + \internal - - minimum size, - - preferred size, - - maximum size. + Calculate the current Edge size based on the current Layout size and the + size the edge is supposed to have when the layout is at its: - These three key values are calculated in advance using linear - programming (more expensive) or the simplification algorithm, then - subsequential resizes of the parent layout require a simple - interpolation. + - minimum size, + - preferred size, + - maximum size. - If the edge is sequential or parallel, it's possible to have more - vertices to be initalized, so it calls specialized functions that - will recurse back to interpolateEdge(). - */ + These three key values are calculated in advance using linear + programming (more expensive) or the simplification algorithm, then + subsequential resizes of the parent layout require a simple + interpolation. +*/ void QGraphicsAnchorLayoutPrivate::interpolateEdge(AnchorVertex *base, AnchorData *edge) { const Orientation orientation = Orientation(edge->orientation); @@ -2741,64 +2631,10 @@ void QGraphicsAnchorLayoutPrivate::interpolateEdge(AnchorVertex *base, AnchorDat // Calculate the distance for the vertex opposite to the base if (edge->from == base) { - setVertexDistance(edge->to, base->distance + edgeDistance); + edge->to->distance = base->distance + edgeDistance; } else { - setVertexDistance(edge->from, base->distance - edgeDistance); + edge->from->distance = base->distance - edgeDistance; } - - // Process child anchors - if (edge->type == AnchorData::Sequential) - interpolateSequentialEdges(static_cast<SequentialAnchorData *>(edge)); - else if (edge->type == AnchorData::Parallel) - interpolateParallelEdges(static_cast<ParallelAnchorData *>(edge)); -} - -void QGraphicsAnchorLayoutPrivate::interpolateParallelEdges(ParallelAnchorData *data) -{ - // In parallels the boundary vertices are already calculate, we - // just need to look for sequential groups inside, because only - // them may have new vertices associated. - - // First edge - if (data->firstEdge->type == AnchorData::Sequential) - interpolateSequentialEdges(static_cast<SequentialAnchorData *>(data->firstEdge)); - else if (data->firstEdge->type == AnchorData::Parallel) - interpolateParallelEdges(static_cast<ParallelAnchorData *>(data->firstEdge)); - - // Second edge - if (data->secondEdge->type == AnchorData::Sequential) - interpolateSequentialEdges(static_cast<SequentialAnchorData *>(data->secondEdge)); - else if (data->secondEdge->type == AnchorData::Parallel) - interpolateParallelEdges(static_cast<ParallelAnchorData *>(data->secondEdge)); -} - -void QGraphicsAnchorLayoutPrivate::interpolateSequentialEdges(SequentialAnchorData *data) -{ - // This method is supposed to handle any sequential anchor, even out-of-order - // ones. However, in the current QGAL implementation we should get only the - // well behaved ones. - Q_ASSERT(data->m_edges.first()->from == data->from); - Q_ASSERT(data->m_edges.last()->to == data->to); - - // At this point, the two outter vertices already have their distance - // calculated. - // We use the first as the base to calculate the internal ones - - AnchorVertex *prev = data->from; - - for (int i = 0; i < data->m_edges.count() - 1; ++i) { - AnchorData *edge = data->m_edges.at(i); - interpolateEdge(prev, edge); - - // Use the recently calculated vertex as the base for the next one - const bool edgeIsForward = (edge->from == prev); - prev = edgeIsForward ? edge->to : edge->from; - } - - // Treat the last specially, since we already calculated it's end - // vertex, so it's only interesting if it's a complex one - if (data->m_edges.last()->type != AnchorData::Normal) - interpolateEdge(prev, data->m_edges.last()); } bool QGraphicsAnchorLayoutPrivate::solveMinMax(const QList<QSimplexConstraint *> &constraints, @@ -2870,7 +2706,9 @@ bool QGraphicsAnchorLayoutPrivate::solvePreferred(const QList<QSimplexConstraint // for (int i = 0; i < variables.size(); ++i) { AnchorData *ad = variables.at(i); - if (ad->skipInPreferred) + + // The layout original structure anchors are not relevant in preferred size calculation + if (ad->isLayoutAnchor) continue; QSimplexVariable *grower = new QSimplexVariable; diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index 5f50c85..8529e2e 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -121,17 +121,16 @@ struct AnchorData : public QSimplexVariable { }; AnchorData() - : QSimplexVariable(), item(0), from(0), to(0), + : QSimplexVariable(), from(0), to(0), minSize(0), prefSize(0), maxSize(0), sizeAtMinimum(0), sizeAtPreferred(0), - sizeAtMaximum(0), - graphicsAnchor(0), skipInPreferred(0), - type(Normal), hasSize(true), isLayoutAnchor(false), + sizeAtMaximum(0), item(0), graphicsAnchor(0), + type(Normal), isLayoutAnchor(false), isCenterAnchor(false), orientation(0), dependency(Independent) {} virtual void updateChildrenSizes() {} - virtual bool refreshSizeHints(const QLayoutStyleInfo *styleInfo); + void refreshSizeHints(const QLayoutStyleInfo *styleInfo = 0); virtual ~AnchorData() {} @@ -141,43 +140,35 @@ struct AnchorData : public QSimplexVariable { QString name; #endif - inline void setPreferredSize(qreal size) - { - prefSize = size; - hasSize = true; - } - - inline void unsetSize() - { - hasSize = false; - } - - // Internal anchors have associated items - QGraphicsLayoutItem *item; - // Anchor is semantically directed AnchorVertex *from; AnchorVertex *to; - // Size restrictions of this edge. For anchors internal to items, these - // values are derived from the respective item size hints. For anchors - // that were added by users, these values are equal to the specified anchor - // size. + // Nominal sizes + // These are the intrinsic size restrictions for a given item. They are + // used as input for the calculation of the actual sizes. + // These values are filled by the refreshSizeHints method, based on the + // anchor size policy, the size hints of the item it (possibly) represents + // and the layout spacing information. qreal minSize; qreal prefSize; qreal maxSize; + // Calculated sizes // These attributes define which sizes should that anchor be in when the // layout is at its minimum, preferred or maximum sizes. Values are // calculated by the Simplex solver based on the current layout setup. qreal sizeAtMinimum; qreal sizeAtPreferred; qreal sizeAtMaximum; + + // References to the classes that represent this anchor in the public world + // An anchor may represent a LayoutItem, it may also be acessible externally + // through a GraphicsAnchor "handler". + QGraphicsLayoutItem *item; QGraphicsAnchor *graphicsAnchor; - uint skipInPreferred : 1; uint type : 2; // either Normal, Sequential or Parallel - uint hasSize : 1; // if false, get size from style. uint isLayoutAnchor : 1; // if this anchor is an internal layout anchor uint isCenterAnchor : 1; uint orientation : 1; @@ -204,9 +195,7 @@ struct SequentialAnchorData : public AnchorData } virtual void updateChildrenSizes(); - virtual bool refreshSizeHints(const QLayoutStyleInfo *styleInfo); - - bool refreshSizeHints_helper(const QLayoutStyleInfo *styleInfo, bool refreshChildren = true); + void calculateSizeHints(); QVector<AnchorVertex*> m_children; // list of vertices in the sequence QVector<AnchorData*> m_edges; // keep the list of edges too. @@ -233,9 +222,7 @@ struct ParallelAnchorData : public AnchorData } virtual void updateChildrenSizes(); - virtual bool refreshSizeHints(const QLayoutStyleInfo *styleInfo); - - bool refreshSizeHints_helper(const QLayoutStyleInfo *styleInfo, bool refreshChildren = true); + bool calculateSizeHints(); AnchorData* firstEdge; AnchorData* secondEdge; @@ -350,7 +337,13 @@ public: QGraphicsAnchorLayoutPrivate *layoutPrivate; AnchorData *data; + + // Size information for user controlled anchor QSizePolicy::Policy sizePolicy; + qreal preferredSize; + + uint hasSize : 1; // if false, get size from style. + uint reversed : 1; // if true, the anchor was inverted to keep its value positive }; @@ -445,11 +438,6 @@ public: void removeAnchor(AnchorVertex *firstVertex, AnchorVertex *secondVertex); void removeAnchor_helper(AnchorVertex *v1, AnchorVertex *v2); - void setAnchorSize(AnchorData *data, const qreal *anchorSize); - void anchorSize(const AnchorData *data, - qreal *minSize = 0, - qreal *prefSize = 0, - qreal *maxSize = 0) const; void removeAnchors(QGraphicsLayoutItem *item); @@ -489,7 +477,7 @@ public: const QList<AnchorData *> &variables); // Support functions for calculateGraph() - bool refreshAllSizeHints(Orientation orientation); + void refreshAllSizeHints(Orientation orientation); void findPaths(Orientation orientation); void constraintsFromPaths(Orientation orientation); void updateAnchorSizes(Orientation orientation); @@ -528,8 +516,6 @@ public: void calculateVertexPositions(Orientation orientation); void setupEdgesInterpolation(Orientation orientation); void interpolateEdge(AnchorVertex *base, AnchorData *edge); - void interpolateSequentialEdges(SequentialAnchorData *edge); - void interpolateParallelEdges(ParallelAnchorData *edge); // Linear Programming solver methods bool solveMinMax(const QList<QSimplexConstraint *> &constraints, @@ -576,8 +562,6 @@ public: Interval interpolationInterval[2]; qreal interpolationProgress[2]; - // ### - bool graphSimplified[2]; bool graphHasConflicts[2]; QSet<QGraphicsLayoutItem *> m_floatItems[2]; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 4e5e5c8..94a37a0 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -52,7 +52,7 @@ painting implementation and item interaction through its event handlers. QGraphicsItem is part of \l{The Graphics View Framework} - \img graphicsview-items.png + \image graphicsview-items.png For convenience, Qt provides a set of standard graphics items for the most common shapes. These are: @@ -378,14 +378,14 @@ it's parent if it's z-value is negative. This flag enables setZValue() to toggle ItemStacksBehindParent. - \value ItemIsPanel. The item is a panel. A panel provides activation and + \value ItemIsPanel The item is a panel. A panel provides activation and contained focus handling. Only one panel can be active at a time (see QGraphicsItem::isActive()). When no panel is active, QGraphicsScene activates all non-panel items. Window items (i.e., QGraphicsItem::isWindow() returns true) are panels. This flag was introduced in Qt 4.6. - \omitvalue ItemIsFocusScope Internal only (for now). + \omitvalue ItemIsFocusScope \omit Internal only (for now). \endomit \value ItemSendsScenePositionChanges The item enables itemChange() notifications for ItemScenePositionHasChanged. For performance reasons, @@ -1240,7 +1240,7 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con const QTransform reverseMap = worldTransform.inverted(); const QVector<QRect> exposedRects(exposedRegion.rects()); for (int i = 0; i < exposedRects.size(); ++i) { - option->exposedRect |= reverseMap.mapRect(exposedRects.at(i)); + option->exposedRect |= reverseMap.mapRect(QRectF(exposedRects.at(i))); if (option->exposedRect.contains(brect)) break; } @@ -10178,9 +10178,10 @@ bool QGraphicsTextItemPrivate::_q_mouseOnEdge(QGraphicsSceneMouseEvent *event) void QGraphicsTextItem::setTextInteractionFlags(Qt::TextInteractionFlags flags) { if (flags == Qt::NoTextInteraction) - setFlags(this->flags() & ~QGraphicsItem::ItemIsFocusable); + setFlags(this->flags() & ~(QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemAcceptsInputMethod)); else - setFlags(this->flags() | QGraphicsItem::ItemIsFocusable); + setFlags(this->flags() | QGraphicsItem::ItemIsFocusable | QGraphicsItem::ItemAcceptsInputMethod); + dd->textControl()->setTextInteractionFlags(flags); } diff --git a/src/gui/graphicsview/qgraphicsitemanimation.cpp b/src/gui/graphicsview/qgraphicsitemanimation.cpp index be2f300..b67ee2e 100644 --- a/src/gui/graphicsview/qgraphicsitemanimation.cpp +++ b/src/gui/graphicsview/qgraphicsitemanimation.cpp @@ -45,6 +45,7 @@ support for QGraphicsItem. \since 4.2 \ingroup graphicsview-api + \deprecated The QGraphicsItemAnimation class animates a QGraphicsItem. You can schedule changes to the item's transformation matrix at diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 13f31b8..10d251d 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -2556,11 +2556,9 @@ void QGraphicsScene::addItem(QGraphicsItem *item) item->d_ptr->resolveFont(d->font.resolve()); item->d_ptr->resolvePalette(d->palette.resolve()); - if (!item->d_ptr->explicitlyHidden) { - if (d->unpolishedItems.isEmpty()) - QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); - d->unpolishedItems.insert(item); - } + if (d->unpolishedItems.isEmpty()) + QMetaObject::invokeMethod(this, "_q_polishItems", Qt::QueuedConnection); + d->unpolishedItems.insert(item); // Reenable selectionChanged() for individual items --d->selectionChanging; @@ -4422,9 +4420,12 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte bool allowPartialCacheExposure = !viewRect.contains(deviceRect); #else // Only if deviceRect is 20% taller or wider than the desktop. - QRect desktopRect = QApplication::desktop()->availableGeometry(widget); - bool allowPartialCacheExposure = (desktopRect.width() * 1.2 < deviceRect.width() - || desktopRect.height() * 1.2 < deviceRect.height()); + bool allowPartialCacheExposure = false; + if (widget) { + QRect desktopRect = QApplication::desktop()->availableGeometry(widget); + allowPartialCacheExposure = (desktopRect.width() * 1.2 < deviceRect.width() + || desktopRect.height() * 1.2 < deviceRect.height()); + } #endif QRegion scrollExposure; if (deviceData->cacheIndent != QPoint() || allowPartialCacheExposure) { @@ -4551,6 +4552,10 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte void QGraphicsScenePrivate::drawItems(QPainter *painter, const QTransform *const viewTransform, QRegion *exposedRegion, QWidget *widget) { + // Make sure we don't have unpolished items before we draw. + if (!unpolishedItems.isEmpty()) + _q_polishItems(); + QRectF exposedSceneRect; if (exposedRegion && indexMethod != QGraphicsScene::NoIndex) { exposedSceneRect = exposedRegion->boundingRect().adjusted(-1, -1, 1, 1); @@ -5077,6 +5082,10 @@ void QGraphicsScene::drawItems(QPainter *painter, const QStyleOptionGraphicsItem options[], QWidget *widget) { Q_D(QGraphicsScene); + // Make sure we don't have unpolished items before we draw. + if (!d->unpolishedItems.isEmpty()) + d->_q_polishItems(); + QTransform viewTransform = painter->worldTransform(); Q_UNUSED(options); diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp index f0404fd..70ecd49 100644 --- a/src/gui/graphicsview/qgraphicssceneindex.cpp +++ b/src/gui/graphicsview/qgraphicssceneindex.cpp @@ -354,8 +354,8 @@ void QGraphicsSceneIndexPrivate::init() if (!scene) return; - QObject::connect(scene, SIGNAL(sceneRectChanged(const QRectF&)), - q_func(), SLOT(updateSceneRect(const QRectF&))); + QObject::connect(scene, SIGNAL(sceneRectChanged(QRectF)), + q_func(), SLOT(updateSceneRect(QRectF))); } /*! diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 3ef311c..3f9f443 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -1517,6 +1517,8 @@ void QGraphicsView::setScene(QGraphicsScene *scene) QEvent windowDeactivate(QEvent::WindowDeactivate); QApplication::sendEvent(d->scene, &windowDeactivate); } + if(hasFocus()) + d->scene->clearFocus(); } // Assign the new scene and update the contents (scrollbars, etc.)). diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h index 762cad1..cd161ad 100644 --- a/src/gui/graphicsview/qgraphicsview_p.h +++ b/src/gui/graphicsview/qgraphicsview_p.h @@ -172,10 +172,17 @@ public: inline void dispatchPendingUpdateRequests() { +#ifndef Q_WS_MAC + // QWidget::update() works slightly different on the Mac; it's not part of + // our backing store so it needs special threatment. if (qt_widget_private(viewport)->paintOnScreen()) QCoreApplication::sendPostedEvents(viewport, QEvent::UpdateRequest); else QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest); +#else + QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers + | QEventLoop::ExcludeUserInputEvents); +#endif } bool updateRect(const QRect &rect); diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 7c24002..4215f97 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -54,4 +54,4 @@ DEFINES += Q_INTERNAL_QAPP_SRC symbian:TARGET.UID3=0x2001B2DD # ro-section in gui can exceed default allocated space, so more rw-section little further -symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000" +symbian-sbsv2: QMAKE_LFLAGS.ARMCC += --rw-base 0x800000" diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 15af7a2..ad9bdd0 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -249,21 +249,19 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, const QIconDirInfo &dirInfo = subDirs.at(i); QString subdir = dirInfo.path; QDir currentDir(contentDir + subdir); - - if (dirInfo.type == QIconDirInfo::Scalable && m_supportsSvg && - currentDir.exists(iconName + svgext)) { - ScalableEntry *iconEntry = new ScalableEntry; - iconEntry->dir = dirInfo; - iconEntry->filename = currentDir.filePath(iconName + svgext); - entries.append(iconEntry); - - } else if (currentDir.exists(iconName + pngext)) { + if (currentDir.exists(iconName + pngext)) { PixmapEntry *iconEntry = new PixmapEntry; iconEntry->dir = dirInfo; iconEntry->filename = currentDir.filePath(iconName + pngext); // Notice we ensure that pixmap entries allways come before // scalable to preserve search order afterwards entries.prepend(iconEntry); + } else if (m_supportsSvg && + currentDir.exists(iconName + svgext)) { + ScalableEntry *iconEntry = new ScalableEntry; + iconEntry->dir = dirInfo; + iconEntry->filename = currentDir.filePath(iconName + svgext); + entries.append(iconEntry); } } @@ -444,10 +442,8 @@ QIconLoaderEngineEntry *QIconLoaderEngine::entryForSize(const QSize &size) /* * Returns the actual icon size. For scalable svg's this is equivalent - * to the requested size. Otherwise the closest match is returned. - * - * todo: the spec is a bit fuzzy in this area, but we should probably - * allow scaling down pixmap icons as well. + * to the requested size. Otherwise the closest match is returned but + * we can never return a bigger size than the requested size. * */ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, @@ -460,8 +456,10 @@ QSize QIconLoaderEngine::actualSize(const QSize &size, QIcon::Mode mode, const QIconDirInfo &dir = entry->dir; if (dir.type == QIconDirInfo::Scalable) return size; - else - return QSize(dir.size, dir.size); + else { + int result = qMin<int>(dir.size, qMin(size.width(), size.height())); + return QSize(result, result); + } } return QIconEngineV2::actualSize(size, mode, state); } diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index e4ea2e9..3b43ab6 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -178,6 +178,8 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* if (ok) { xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); xshminfo.shmaddr = xshmimg->data; + if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) + qWarning() << "Error while marking the shared memory segment to be destroyed"; ok = (xshminfo.shmaddr != (char*)-1); if (ok) image = QImage((uchar *)xshmimg->data, width, height, systemFormat()); diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 6175931..365c271 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -160,8 +160,8 @@ QSet<QMacPixmapData*> QMacPixmapData::validDataPointers; QMacPixmapData::QMacPixmapData(PixelType type) : QPixmapData(type, MacClass), has_alpha(0), has_mask(0), - uninit(true), pixels(0), pixelsToFree(0), bytesPerRow(0), - cg_data(0), cg_dataBeingReleased(0), cg_mask(0), + uninit(true), pixels(0), pixelsSize(0), pixelsToFree(0), + bytesPerRow(0), cg_data(0), cg_dataBeingReleased(0), cg_mask(0), pengine(0) { } @@ -637,8 +637,9 @@ void QMacPixmapData::macCreatePixels() } if (pixels) - memcpy(base_pixels, pixels, numBytes); + memcpy(base_pixels, pixels, pixelsSize); pixels = base_pixels; + pixelsSize = numBytes; } #if 0 diff --git a/src/gui/image/qpixmap_mac_p.h b/src/gui/image/qpixmap_mac_p.h index a3fb95f..45ab8e2 100644 --- a/src/gui/image/qpixmap_mac_p.h +++ b/src/gui/image/qpixmap_mac_p.h @@ -107,6 +107,7 @@ private: pixelsToFree later on instead of malloc'ing memory. */ quint32 *pixels; + uint pixelsSize; quint32 *pixelsToFree; uint bytesPerRow; QRectF cg_mask_rect; diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 9d783dd..dc33ade 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -349,7 +349,8 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type), bitmapDevice(0), bitmapGc(0), pengine(0), - bytes(0) + bytes(0), + formatLocked(false) { } @@ -425,11 +426,12 @@ void QS60PixmapData::release() } /*! - * Takes ownership of bitmap + * Takes ownership of bitmap. Used by window surface */ void QS60PixmapData::fromSymbianBitmap(CFbsBitmap* bitmap) { cfbsBitmap = bitmap; + formatLocked = true; if(!initSymbianBitmapContext()) { qWarning("Could not create CBitmapContext"); @@ -693,8 +695,10 @@ void QS60PixmapData::beginDataAccess() bytes = newBytes; TDisplayMode mode = cfbsBitmap->DisplayMode(); QImage::Format format = qt_TDisplayMode2Format(mode); - //on S60 3.1, premultiplied alpha pixels are stored in a bitmap with 16MA type - if (format == QImage::Format_ARGB32) + // On S60 3.1, premultiplied alpha pixels are stored in a bitmap with 16MA type. + // S60 window surface needs backing store pixmap for transparent window in ARGB32 format. + // In that case formatLocked is true. + if (!formatLocked && format == QImage::Format_ARGB32) format = QImage::Format_ARGB32_Premultiplied; // pixel data is actually in premultiplied format QVector<QRgb> savedColorTable; @@ -973,4 +977,9 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType) } } +QPixmapData *QS60PixmapData::createCompatiblePixmapData() const +{ + return new QS60PixmapData(pixelType()); +} + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index b23961a..8631ebd 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -87,6 +87,8 @@ public: QS60PixmapData(PixelType type); ~QS60PixmapData(); + QPixmapData *createCompatiblePixmapData() const; + void resize(int width, int height); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); @@ -118,6 +120,8 @@ private: QPaintEngine *pengine; uchar* bytes; + bool formatLocked; + friend class QPixmap; friend class QS60WindowSurface; friend class QS60PaintEngine; diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 3f297df..7008fbd 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -416,6 +416,11 @@ void QX11PixmapData::fromImage(const QImage &img, d = img.depth(); is_null = (w <= 0 || h <= 0); + if (is_null) { + w = h = 0; + return; + } + if (defaultScreen >= 0 && defaultScreen != xinfo.screen()) { QX11InfoData* xd = xinfo.getX11Data(true); xd->screen = defaultScreen; diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index c0b840a..3723500 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -1064,9 +1064,7 @@ void QPixmapDropShadowFilter::setOffset(const QPointF &offset) QRectF QPixmapDropShadowFilter::boundingRectFor(const QRectF &rect) const { Q_D(const QPixmapDropShadowFilter); - qreal delta = d->radius + 1; - return rect.adjusted(-2, -2, 2, 2).united( - rect.translated(d->offset).adjusted(-delta, -delta, delta, delta)); + return rect.united(rect.translated(d->offset).adjusted(-d->radius, -d->radius, d->radius, d->radius)); } /*! @@ -1089,19 +1087,24 @@ void QPixmapDropShadowFilter::draw(QPainter *p, return; } - QImage tmp = src.isNull() ? px.toImage() : px.copy(src.toAlignedRect()).toImage(); + QImage tmp(px.size(), QImage::Format_ARGB32_Premultiplied); + tmp.fill(0); + QPainter tmpPainter(&tmp); + tmpPainter.setCompositionMode(QPainter::CompositionMode_Source); + tmpPainter.drawPixmap(d->offset, px); + tmpPainter.end(); // blur the alpha channel tmp = blurred(tmp, tmp.rect(), qRound(d->radius), true); // blacken the image... - QPainter tmpPainter(&tmp); + tmpPainter.begin(&tmp); tmpPainter.setCompositionMode(QPainter::CompositionMode_SourceIn); - tmpPainter.fillRect(0, 0, tmp.width(), tmp.height(), d->color); + tmpPainter.fillRect(tmp.rect(), d->color); tmpPainter.end(); // draw the blurred drop shadow... - p->drawImage(pos + d->offset, tmp); + p->drawImage(pos, tmp); // Draw the actual pixmap... p->drawPixmap(pos, px, src); diff --git a/src/gui/inputmethod/qcoefepinputcontext_p.h b/src/gui/inputmethod/qcoefepinputcontext_p.h index 2c65b4c..e24ee04 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_p.h +++ b/src/gui/inputmethod/qcoefepinputcontext_p.h @@ -84,7 +84,7 @@ public: bool filterEvent(const QEvent *event); void mouseHandler( int x, QMouseEvent *event); - bool isComposing() const { return m_isEditing; } + bool isComposing() const { return !m_preeditString.isEmpty(); } void setFocusWidget(QWidget * w); void widgetDestroyed(QWidget *w); @@ -132,6 +132,7 @@ public: // From MObjectProvider public: TTypeUid::Ptr MopSupplyObject(TTypeUid id); + MObjectProvider *MopNext(); private: QSymbianControl *m_parent; @@ -139,13 +140,14 @@ private: QString m_preeditString; Qt::InputMethodHints m_lastImHints; TUint m_textCapabilities; - bool m_isEditing; bool m_inDestruction; bool m_pendingInputCapabilitiesChanged; int m_cursorVisibility; int m_inlinePosition; MFepInlineTextFormatRetriever *m_formatRetriever; MFepPointerEventHandlerDuringInlineEdit *m_pointerHandler; + int m_longPress; + int m_cursorPos; }; QT_END_NAMESPACE diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 19f296c..bdff5e7 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -65,13 +65,14 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState(q_check_ptr(new CAknEdwinState)), // CBase derived object needs check on new m_lastImHints(Qt::ImhNone), m_textCapabilities(TCoeInputCapabilities::EAllText), - m_isEditing(false), m_inDestruction(false), m_pendingInputCapabilitiesChanged(false), m_cursorVisibility(1), m_inlinePosition(0), m_formatRetriever(0), - m_pointerHandler(0) + m_pointerHandler(0), + m_longPress(0), + m_cursorPos(0) { m_fepState->SetObjectProvider(this); m_fepState->SetFlags(EAknEditorFlagDefault); @@ -79,7 +80,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState->SetPermittedInputModes( EAknEditorAllInputModes ); m_fepState->SetDefaultCase( EAknEditorLowerCase ); m_fepState->SetPermittedCases( EAknEditorLowerCase|EAknEditorUpperCase ); - m_fepState->SetSpecialCharacterTableResourceId( 0 ); + m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap ); } @@ -202,14 +203,26 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { const QKeyEvent *keyEvent = static_cast<const QKeyEvent *>(event); - Q_ASSERT(m_lastImHints == focusWidget()->inputMethodHints()); - if (keyEvent->key() == Qt::Key_F20 && m_lastImHints & Qt::ImhHiddenText) { - // Special case in Symbian. On editors with secret text, F20 is for some reason - // considered to be a backspace. - QKeyEvent modifiedEvent(keyEvent->type(), Qt::Key_Backspace, keyEvent->modifiers(), - keyEvent->text(), keyEvent->isAutoRepeat(), keyEvent->count()); - QApplication::sendEvent(focusWidget(), &modifiedEvent); - return true; + switch (keyEvent->key()) { + case Qt::Key_F20: + Q_ASSERT(m_lastImHints == focusWidget()->inputMethodHints()); + if (m_lastImHints & Qt::ImhHiddenText) { + // Special case in Symbian. On editors with secret text, F20 is for some reason + // considered to be a backspace. + QKeyEvent modifiedEvent(keyEvent->type(), Qt::Key_Backspace, keyEvent->modifiers(), + keyEvent->text(), keyEvent->isAutoRepeat(), keyEvent->count()); + QApplication::sendEvent(focusWidget(), &modifiedEvent); + return true; + } + break; + case Qt::Key_Select: + if (!m_preeditString.isEmpty()) { + commitCurrentString(false); + return true; + } + break; + default: + break; } } @@ -243,7 +256,6 @@ bool QCoeFepInputContext::filterEvent(const QEvent *event) void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event) { - Q_ASSERT(m_isEditing); Q_ASSERT(focusWidget()); if (event->type() == QEvent::MouseButtonPress && event->button() == Qt::LeftButton) { @@ -407,6 +419,14 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) } m_fepState->SetNumericKeymap(static_cast<TAknEditorNumericKeymap>(flags)); + if (hints & ImhEmailCharactersOnly) { + m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG); + } else if (hints & ImhUrlCharactersOnly) { + m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG); + } else { + m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); + } + if (hints & ImhHiddenText) { m_textCapabilities = TCoeInputCapabilities::EAllText | TCoeInputCapabilities::ESecretText; } else { @@ -478,8 +498,8 @@ void QCoeFepInputContext::StartFepInlineEditL(const TDesC& aInitialInlineText, if (!w) return; - m_isEditing = true; - + m_cursorPos = w->inputMethodQuery(Qt::ImCursorPosition).toInt(); + QList<QInputMethodEvent::Attribute> attributes; m_cursorVisibility = aCursorVisibility ? 1 : 0; @@ -543,8 +563,6 @@ void QCoeFepInputContext::CancelFepInlineEdit() event.setCommitString(QLatin1String(""), 0, 0); m_preeditString.clear(); sendEvent(event); - - m_isEditing = false; } TInt QCoeFepInputContext::DocumentLengthForFep() const @@ -683,16 +701,22 @@ void QCoeFepInputContext::DoCommitFepInlineEditL() void QCoeFepInputContext::commitCurrentString(bool triggeredBySymbian) { if (m_preeditString.size() == 0) { + QWidget *w = focusWidget(); + if (triggeredBySymbian && w) { + // We must replace the last character only if the input box has already accepted one + if (w->inputMethodQuery(Qt::ImCursorPosition).toInt() != m_cursorPos) + m_longPress = 1; + } return; } QList<QInputMethodEvent::Attribute> attributes; QInputMethodEvent event(QLatin1String(""), attributes); - event.setCommitString(m_preeditString, 0, 0);//m_preeditString.size()); + event.setCommitString(m_preeditString, 0-m_longPress, m_longPress); m_preeditString.clear(); sendEvent(event); - m_isEditing = false; + m_longPress = 0; if (!triggeredBySymbian) { CCoeFep* fep = CCoeEnv::Static()->Fep(); @@ -733,6 +757,14 @@ TTypeUid::Ptr QCoeFepInputContext::MopSupplyObject(TTypeUid /*id*/) return TTypeUid::Null(); } +MObjectProvider *QCoeFepInputContext::MopNext() +{ + QWidget *w = focusWidget(); + if (w) + return w->effectiveWinId(); + return 0; +} + QT_END_NAMESPACE #endif // QT_NO_IM diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 23bef12..ad15655 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -96,6 +96,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate() autoScrollMargin(16), autoScrollCount(0), shouldScrollToCurrentOnShow(false), + shouldClearStatusTip(false), alternatingColors(false), textElideMode(Qt::ElideRight), verticalScrollMode(QAbstractItemView::ScrollPerItem), @@ -138,10 +139,22 @@ void QAbstractItemViewPrivate::init() #endif } +void QAbstractItemViewPrivate::setHoverIndex(const QPersistentModelIndex &index) +{ + Q_Q(QAbstractItemView); + if (hover == index) + return; + + q->update(hover); //update the old one + hover = index; + q->update(hover); //update the new one +} + void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index) { //we take a persistent model index because the model might change by emitting signals Q_Q(QAbstractItemView); + setHoverIndex(index); if (viewportEnteredNeeded || enteredIndex != index) { viewportEnteredNeeded = false; @@ -149,14 +162,15 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index emit q->entered(index); #ifndef QT_NO_STATUSTIP QString statustip = model->data(index, Qt::StatusTipRole).toString(); - if (parent && !statustip.isEmpty()) { + if (parent && (shouldClearStatusTip || !statustip.isEmpty())) { QStatusTipEvent tip(statustip); QApplication::sendEvent(parent, &tip); + shouldClearStatusTip = !statustip.isEmpty(); } #endif } else { #ifndef QT_NO_STATUSTIP - if (parent) { + if (parent && shouldClearStatusTip) { QString emptyString; QStatusTipEvent tip( emptyString ); QApplication::sendEvent(parent, &tip); @@ -1536,26 +1550,25 @@ bool QAbstractItemView::viewportEvent(QEvent *event) { Q_D(QAbstractItemView); switch (event->type()) { - case QEvent::HoverEnter: { - QHoverEvent *he = static_cast<QHoverEvent*>(event); - d->hover = indexAt(he->pos()); - update(d->hover); - break; } - case QEvent::HoverLeave: { - update(d->hover); // update old - d->hover = QModelIndex(); - break; } - case QEvent::HoverMove: { - QHoverEvent *he = static_cast<QHoverEvent*>(event); - QModelIndex old = d->hover; - d->hover = indexAt(he->pos()); - if (d->hover != old) - d->viewport->update(visualRect(old)|visualRect(d->hover)); - break; } + case QEvent::HoverMove: + case QEvent::HoverEnter: + d->setHoverIndex(indexAt(static_cast<QHoverEvent*>(event)->pos())); + break; + case QEvent::HoverLeave: + d->setHoverIndex(QModelIndex()); + break; case QEvent::Enter: d->viewportEnteredNeeded = true; break; case QEvent::Leave: + #ifndef QT_NO_STATUSTIP + if (d->shouldClearStatusTip && d->parent) { + QString empty; + QStatusTipEvent tip(empty); + QApplication::sendEvent(d->parent, &tip); + d->shouldClearStatusTip = false; + } + #endif d->enteredIndex = QModelIndex(); break; case QEvent::ToolTip: diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h index c691f61..0b5cfbe 100644 --- a/src/gui/itemviews/qabstractitemview_p.h +++ b/src/gui/itemviews/qabstractitemview_p.h @@ -152,6 +152,8 @@ public: const QEvent *event) const; virtual void selectAll(QItemSelectionModel::SelectionFlags command); + void setHoverIndex(const QPersistentModelIndex &index); + void checkMouseMove(const QPersistentModelIndex &index); inline void checkMouseMove(const QPoint &pos) { checkMouseMove(q_func()->indexAt(pos)); } @@ -394,6 +396,7 @@ public: int autoScrollMargin; int autoScrollCount; bool shouldScrollToCurrentOnShow; //used to know if we should scroll to current on show event + bool shouldClearStatusTip; //if there is a statustip currently shown that need to be cleared when leaving. bool alternatingColors; diff --git a/src/gui/itemviews/qcolumnview.cpp b/src/gui/itemviews/qcolumnview.cpp index d27d061..da3e5a0 100644 --- a/src/gui/itemviews/qcolumnview.cpp +++ b/src/gui/itemviews/qcolumnview.cpp @@ -672,8 +672,8 @@ QAbstractItemView *QColumnViewPrivate::createColumn(const QModelIndex &index, bo QAbstractItemView *view = 0; if (model->hasChildren(index)) { view = q->createColumn(index); - q->connect(view, SIGNAL(clicked(const QModelIndex &)), - q, SLOT(_q_clicked(const QModelIndex &))); + q->connect(view, SIGNAL(clicked(QModelIndex)), + q, SLOT(_q_clicked(QModelIndex))); } else { if (!previewColumn) setPreviewWidget(new QWidget(q)); @@ -681,16 +681,16 @@ QAbstractItemView *QColumnViewPrivate::createColumn(const QModelIndex &index, bo view->setMinimumWidth(qMax(view->minimumWidth(), previewWidget->minimumWidth())); } - q->connect(view, SIGNAL(activated(const QModelIndex &)), - q, SIGNAL(activated(const QModelIndex &))); - q->connect(view, SIGNAL(clicked(const QModelIndex &)), - q, SIGNAL(clicked(const QModelIndex &))); - q->connect(view, SIGNAL(doubleClicked(const QModelIndex &)), - q, SIGNAL(doubleClicked(const QModelIndex &))); - q->connect(view, SIGNAL(entered(const QModelIndex &)), - q, SIGNAL(entered(const QModelIndex &))); - q->connect(view, SIGNAL(pressed(const QModelIndex &)), - q, SIGNAL(pressed(const QModelIndex &))); + q->connect(view, SIGNAL(activated(QModelIndex)), + q, SIGNAL(activated(QModelIndex))); + q->connect(view, SIGNAL(clicked(QModelIndex)), + q, SIGNAL(clicked(QModelIndex))); + q->connect(view, SIGNAL(doubleClicked(QModelIndex)), + q, SIGNAL(doubleClicked(QModelIndex))); + q->connect(view, SIGNAL(entered(QModelIndex)), + q, SIGNAL(entered(QModelIndex))); + q->connect(view, SIGNAL(pressed(QModelIndex)), + q, SIGNAL(pressed(QModelIndex))); view->setFocusPolicy(Qt::NoFocus); view->setParent(viewport); diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index 6f2cff9..6f0fba6 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -1913,7 +1913,6 @@ void QHeaderView::initializeSections(int start, int end) Q_ASSERT(start >= 0); Q_ASSERT(end >= 0); - d->executePostedLayout(); d->invalidateCachedSizeHint(); if (end + 1 < d->sectionCount) { @@ -1939,11 +1938,25 @@ void QHeaderView::initializeSections(int start, int end) d->sectionCount = end + 1; if (!d->logicalIndices.isEmpty()) { - d->logicalIndices.resize(d->sectionCount); - d->visualIndices.resize(d->sectionCount); - for (int i = start; i < d->sectionCount; ++i){ - d->logicalIndices[i] = i; - d->visualIndices[i] = i; + if (oldCount <= d->sectionCount) { + d->logicalIndices.resize(d->sectionCount); + d->visualIndices.resize(d->sectionCount); + for (int i = oldCount; i < d->sectionCount; ++i) { + d->logicalIndices[i] = i; + d->visualIndices[i] = i; + } + } else { + int j = 0; + for (int i = 0; i < oldCount; ++i) { + int v = d->logicalIndices.at(i); + if (v < d->sectionCount) { + d->logicalIndices[j] = v; + d->visualIndices[v] = j; + j++; + } + } + d->logicalIndices.resize(d->sectionCount); + d->visualIndices.resize(d->sectionCount); } } @@ -2396,7 +2409,12 @@ bool QHeaderView::viewportEvent(QEvent *e) d->state = QHeaderViewPrivate::NoState; d->pressed = d->section = d->target = -1; d->updateSectionIndicator(d->section, -1); - } + break; } + case QEvent::Wheel: { + QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea *>(parentWidget()); + if (asa) + return QApplication::sendEvent(asa->viewport(), e); + break; } default: break; } diff --git a/src/gui/itemviews/qitemselectionmodel.cpp b/src/gui/itemviews/qitemselectionmodel.cpp index c6e02a6..2e4a602 100644 --- a/src/gui/itemviews/qitemselectionmodel.cpp +++ b/src/gui/itemviews/qitemselectionmodel.cpp @@ -730,13 +730,14 @@ void QItemSelectionModelPrivate::_q_layoutAboutToBeChanged() savedPersistentIndexes.clear(); savedPersistentCurrentIndexes.clear(); - // special case for when all indexes are selected + // optimisation for when all indexes are selected + // (only if there is lots of items (1000) because this is not entirely correct) if (ranges.isEmpty() && currentSelection.count() == 1) { QItemSelectionRange range = currentSelection.first(); QModelIndex parent = range.parent(); tableRowCount = model->rowCount(parent); tableColCount = model->columnCount(parent); - if (tableRowCount * tableColCount > 100 + if (tableRowCount * tableColCount > 1000 && range.top() == 0 && range.left() == 0 && range.bottom() == tableRowCount - 1 diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 15db9a6..d03cdd3 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -773,7 +773,7 @@ void QListView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e void QListView::mouseMoveEvent(QMouseEvent *e) { if (!isVisible()) - return; + return; Q_D(QListView); QAbstractItemView::mouseMoveEvent(e); if (state() == DragSelectingState @@ -832,16 +832,16 @@ void QListView::resizeEvent(QResizeEvent *e) return; bool listWrap = (d->viewMode == ListMode) && d->wrapItemText; - bool flowDimensionChanged = (d->flow == LeftToRight && delta.width() != 0) - || (d->flow == TopToBottom && delta.height() != 0); + bool flowDimensionChanged = (d->flow == LeftToRight && delta.width() != 0) + || (d->flow == TopToBottom && delta.height() != 0); // We post a delayed relayout in the following cases : // - we're wrapping // - the state is NoState, we're adjusting and the size has changed in the flowing direction - if (listWrap + if (listWrap || (state() == NoState && d->resizeMode == Adjust && flowDimensionChanged)) { - d->doDelayedItemsLayout(100); // wait 1/10 sec before starting the layout - } else { + d->doDelayedItemsLayout(100); // wait 1/10 sec before starting the layout + } else { QAbstractItemView::resizeEvent(e); } } @@ -966,15 +966,19 @@ void QListView::paintEvent(QPaintEvent *e) bool alternateBase = false; int previousRow = -2; // trigger the alternateBase adjustment on first pass + int maxSize = (flow() == TopToBottom) + ? qMax(viewport()->size().width(), d->contentsSize().width()) - 2 * d->spacing() + : qMax(viewport()->size().height(), d->contentsSize().height()) - 2 * d->spacing(); + QVector<QModelIndex>::const_iterator end = toBeRendered.constEnd(); for (QVector<QModelIndex>::const_iterator it = toBeRendered.constBegin(); it != end; ++it) { Q_ASSERT((*it).isValid()); option.rect = visualRect(*it); if (flow() == TopToBottom) - option.rect.setWidth(qMin(viewport()->size().width() - 2 * d->spacing(), option.rect.width())); + option.rect.setWidth(qMin(maxSize, option.rect.width())); else - option.rect.setHeight(qMin(viewport()->size().height() - 2 * d->spacing(), option.rect.height())); + option.rect.setHeight(qMin(maxSize, option.rect.height())); option.state = state; if (selections && selections->isSelected(*it)) @@ -1147,7 +1151,9 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie } return d->closestIndex(initialRect, intersectVector); case MovePageUp: - rect.moveTop(rect.top() - d->viewport->height()); + // move current by (visibileRowCount - 1) items. + // rect.translate(0, -rect.height()); will happen in the switch fallthrough for MoveUp. + rect.moveTop(rect.top() - d->viewport->height() + 2 * rect.height()); if (rect.top() < rect.height()) rect.moveTop(rect.height()); case MovePrevious: @@ -1173,7 +1179,9 @@ QModelIndex QListView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifie } return d->closestIndex(initialRect, intersectVector); case MovePageDown: - rect.moveTop(rect.top() + d->viewport->height()); + // move current by (visibileRowCount - 1) items. + // rect.translate(0, rect.height()); will happen in the switch fallthrough for MoveDown. + rect.moveTop(rect.top() + d->viewport->height() - 2 * rect.height()); if (rect.bottom() > contents.height() - rect.height()) rect.moveBottom(contents.height() - rect.height()); case MoveNext: @@ -1445,7 +1453,7 @@ void QListView::doItemsLayout() // so we set the state to expanding to avoid // triggering another layout QAbstractItemView::State oldState = state(); - setState(ExpandingState); + setState(ExpandingState); if (d->model->columnCount(d->root) > 0) { // no columns means no contents d->resetBatchStartRow(); if (layoutMode() == SinglePass) diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 02e5fff..d27e693 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -114,7 +114,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } } else if (old_height > span->height()) { //remove the span from all the subspans lists that intersect the columns not covered anymore - Index::iterator it_y = index.lowerBound(-span->bottom()); + Index::iterator it_y = index.lowerBound(qMin(-span->bottom(), 0)); Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->top() + old_height -1) { if (-it_y.key() > span->bottom()) { @@ -1064,14 +1064,29 @@ QTableView::~QTableView() void QTableView::setModel(QAbstractItemModel *model) { Q_D(QTableView); - connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); - connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)), - this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); - connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), - this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); - connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), - this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + if (model == d->model) + return; + //let's disconnect from the old model + if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) { + disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); + disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + } + if (model) { //and connect to the new one + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedRows(QModelIndex,int,int))); + connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(_q_updateSpanInsertedColumns(QModelIndex,int,int))); + connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedRows(QModelIndex,int,int))); + connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(_q_updateSpanRemovedColumns(QModelIndex,int,int))); + } d->verticalHeader->setModel(model); d->horizontalHeader->setModel(model); QAbstractItemView::setModel(model); diff --git a/src/gui/itemviews/qtablewidget.cpp b/src/gui/itemviews/qtablewidget.cpp index 21c4e0a..d9b8346 100644 --- a/src/gui/itemviews/qtablewidget.cpp +++ b/src/gui/itemviews/qtablewidget.cpp @@ -2458,7 +2458,7 @@ const QTableWidgetItem *QTableWidget::itemPrototype() const The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing - editing in an empty cell. This is useful when you have a QTableWidgetItem + in an empty cell. This is useful when you have a QTableWidgetItem subclass and want to make sure that QTableWidget creates instances of your subclass. diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index a3cbc0d..3ad9fbb 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -215,6 +215,13 @@ void QTreeView::setModel(QAbstractItemModel *model) Q_D(QTreeView); if (model == d->model) return; + if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) { + disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(rowsRemoved(QModelIndex,int,int))); + + disconnect(d->model, SIGNAL(modelAboutToBeReset()), this, SLOT(_q_modelAboutToBeReset())); + } + if (d->selectionModel) { // support row editing disconnect(d->selectionModel, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), d->model, SLOT(submit())); @@ -838,10 +845,10 @@ void QTreeView::setSortingEnabled(bool enable) // because otherwise it will not call sort on the model. sortByColumn(header()->sortIndicatorSection(), header()->sortIndicatorOrder()); connect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder)), Qt::UniqueConnection); + this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder)), Qt::UniqueConnection); } else { disconnect(header(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), - this, SLOT(_q_sortIndicatorChanged(int, Qt::SortOrder))); + this, SLOT(_q_sortIndicatorChanged(int,Qt::SortOrder))); } d->sortingEnabled = enable; } diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index 040c498..948ca79 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -1580,7 +1580,7 @@ void QTreeWidgetItem::setChildIndicatorPolicy(QTreeWidgetItem::ChildIndicatorPol if (!view) return; - view->viewport()->update( view->d_func()->itemDecorationRect(view->d_func()->index(this))); + view->scheduleDelayedItemsLayout(); } /*! @@ -2851,7 +2851,14 @@ QTreeWidgetItem *QTreeWidget::itemAt(const QPoint &p) const QRect QTreeWidget::visualItemRect(const QTreeWidgetItem *item) const { Q_D(const QTreeWidget); - return visualRect(d->index(item)); + //the visual rect for an item is across all columns. So we need to determine + //what is the first and last column and get their visual index rects + QModelIndex base = d->index(item); + const int firstVisiblesection = header()->logicalIndexAt(- header()->offset()); + const int lastVisibleSection = header()->logicalIndexAt(header()->length() - header()->offset() - 1); + QModelIndex first = base.sibling(base.row(), header()->logicalIndex(firstVisiblesection)); + QModelIndex last = base.sibling(base.row(), header()->logicalIndex(lastVisibleSection)); + return visualRect(first) | visualRect(last); } /*! diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 8859358..7d0e5c7 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -188,9 +188,8 @@ embedded { HEADERS += \ kernel/qeventdispatcher_glib_qws_p.h QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB + LIBS_PRIVATE +=$$QT_LIBS_GLIB } - - } !embedded:!x11:mac { diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 64b8d15..0853b32 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -941,7 +941,8 @@ void QApplicationPrivate::initialize() QApplicationPrivate::wheel_scroll_lines = 3; #endif - initializeMultitouch(); + if (qt_is_gui_used) + initializeMultitouch(); } /*! @@ -4113,8 +4114,17 @@ bool QApplication::notify(QObject *receiver, QEvent *e) } else if (widget->isWindow() || widget->testAttribute(Qt::WA_NoMousePropagation)) { break; } + QPoint offset = widget->pos(); widget = widget->parentWidget(); - d->updateTouchPointsForWidget(widget, touchEvent); + touchEvent->setWidget(widget); + for (int i = 0; i < touchEvent->_touchPoints.size(); ++i) { + QTouchEvent::TouchPoint &pt = touchEvent->_touchPoints[i]; + QRectF rect = pt.rect(); + rect.moveCenter(offset); + pt.d->rect = rect; + pt.d->startPos = pt.startPos() + offset; + pt.d->lastPos = pt.lastPos() + offset; + } } touchEvent->setAccepted(eventAccepted); @@ -5425,9 +5435,11 @@ void QApplicationPrivate::updateTouchPointsForWidget(QWidget *widget, QTouchEven const QPointF delta = screenPos - screenPos.toPoint(); rect.moveCenter(widget->mapFromGlobal(screenPos.toPoint()) + delta); - touchPoint.setRect(rect); - touchPoint.setStartPos(widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta); - touchPoint.setLastPos(widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta); + touchPoint.d->rect = rect; + if (touchPoint.state() == Qt::TouchPointPressed) { + touchPoint.d->startPos = widget->mapFromGlobal(touchPoint.startScreenPos().toPoint()) + delta; + touchPoint.d->lastPos = widget->mapFromGlobal(touchPoint.lastScreenPos().toPoint()) + delta; + } } } @@ -5471,16 +5483,20 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, for (int i = 0; i < touchPoints.count(); ++i) { QTouchEvent::TouchPoint touchPoint = touchPoints.at(i); + // explicitly detach from the original touch point that we got, so even + // if the touchpoint structs are reused, we will make a copy that we'll + // deliver to the user (which might want to store the struct for later use). + touchPoint.d = touchPoint.d->detach(); // update state - QWidget *widget = 0; + QWeakPointer<QWidget> widget; switch (touchPoint.state()) { case Qt::TouchPointPressed: { if (deviceType == QTouchEvent::TouchPad) { // on touch-pads, send all touch points to the same widget widget = d->widgetForTouchPointId.isEmpty() - ? 0 + ? QWeakPointer<QWidget>() : d->widgetForTouchPointId.constBegin().value(); } @@ -5497,20 +5513,21 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, if (deviceType == QTouchEvent::TouchScreen) { int closestTouchPointId = d->findClosestTouchPointId(touchPoint.screenPos()); - QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId); + QWidget *closestWidget = d->widgetForTouchPointId.value(closestTouchPointId).data(); if (closestWidget - && (widget->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget))) { + && (widget.data()->isAncestorOf(closestWidget) || closestWidget->isAncestorOf(widget.data()))) { widget = closestWidget; } } d->widgetForTouchPointId[touchPoint.id()] = widget; - touchPoint.setStartScreenPos(touchPoint.screenPos()); - touchPoint.setLastScreenPos(touchPoint.screenPos()); - touchPoint.setStartNormalizedPos(touchPoint.normalizedPos()); - touchPoint.setLastNormalizedPos(touchPoint.normalizedPos()); + touchPoint.d->startScreenPos = touchPoint.screenPos(); + touchPoint.d->lastScreenPos = touchPoint.screenPos(); + touchPoint.d->startNormalizedPos = touchPoint.normalizedPos(); + touchPoint.d->lastNormalizedPos = touchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(1.)); + touchPoint.d->pressure = qreal(1.); + d->appCurrentTouchPoints.insert(touchPoint.id(), touchPoint); break; } @@ -5521,12 +5538,14 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, continue; QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.take(touchPoint.id()); - touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); - touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); - touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos()); - touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos()); + touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos(); + touchPoint.d->lastScreenPos = previousTouchPoint.screenPos(); + touchPoint.d->startPos = previousTouchPoint.startPos(); + touchPoint.d->lastPos = previousTouchPoint.pos(); + touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos(); + touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(0.)); + touchPoint.d->pressure = qreal(0.); break; } default: @@ -5536,23 +5555,25 @@ void QApplicationPrivate::translateRawTouchEvent(QWidget *window, Q_ASSERT(d->appCurrentTouchPoints.contains(touchPoint.id())); QTouchEvent::TouchPoint previousTouchPoint = d->appCurrentTouchPoints.value(touchPoint.id()); - touchPoint.setStartScreenPos(previousTouchPoint.startScreenPos()); - touchPoint.setLastScreenPos(previousTouchPoint.screenPos()); - touchPoint.setStartNormalizedPos(previousTouchPoint.startNormalizedPos()); - touchPoint.setLastNormalizedPos(previousTouchPoint.normalizedPos()); + touchPoint.d->startScreenPos = previousTouchPoint.startScreenPos(); + touchPoint.d->lastScreenPos = previousTouchPoint.screenPos(); + touchPoint.d->startPos = previousTouchPoint.startPos(); + touchPoint.d->lastPos = previousTouchPoint.pos(); + touchPoint.d->startNormalizedPos = previousTouchPoint.startNormalizedPos(); + touchPoint.d->lastNormalizedPos = previousTouchPoint.normalizedPos(); if (touchPoint.pressure() < qreal(0.)) - touchPoint.setPressure(qreal(1.)); + touchPoint.d->pressure = qreal(1.); d->appCurrentTouchPoints[touchPoint.id()] = touchPoint; break; } - Q_ASSERT(widget != 0); + Q_ASSERT(widget.data() != 0); // make the *scene* functions return the same as the *screen* functions - touchPoint.setSceneRect(touchPoint.screenRect()); - touchPoint.setStartScenePos(touchPoint.startScreenPos()); - touchPoint.setLastScenePos(touchPoint.lastScreenPos()); + touchPoint.d->sceneRect = touchPoint.screenRect(); + touchPoint.d->startScenePos = touchPoint.startScreenPos(); + touchPoint.d->lastScenePos = touchPoint.lastScreenPos(); - StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget]; + StatesAndTouchPoints &maskAndPoints = widgetsNeedingEvents[widget.data()]; maskAndPoints.first |= touchPoint.state(); if (touchPoint.isPrimary()) maskAndPoints.first |= Qt::TouchPointPrimary; diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 84da56e..22a0959 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -2449,7 +2449,7 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap switch(aeID) { case kAEQuitApplication: { extern bool qt_mac_quit_menu_item_enabled; // qmenu_mac.cpp - if(!QApplicationPrivate::modalState() && qt_mac_quit_menu_item_enabled) { + if (qt_mac_quit_menu_item_enabled) { QCloseEvent ev; QApplication::sendSpontaneousEvent(app, &ev); if(ev.isAccepted()) { diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 992e4be..14d7215 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -511,7 +511,7 @@ public: QWidget *gestureWidget; - QMap<int, QWidget *> widgetForTouchPointId; + QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId; QMap<int, QTouchEvent::TouchPoint> appCurrentTouchPoints; static void updateTouchPointsForWidget(QWidget *widget, QTouchEvent *touchEvent); void initializeMultitouch(); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index ec95d48..fb2bc72 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -319,7 +319,11 @@ void QLongTapTimer::RunL() } QSymbianControl::QSymbianControl(QWidget *w) - : CCoeControl(), qwidget(w), m_ignoreFocusChanged(false) + : CCoeControl() + , qwidget(w) + , m_longTapDetector(0) + , m_ignoreFocusChanged(0) + , m_symbianPopupIsOpen(0) { } @@ -357,9 +361,6 @@ QSymbianControl::~QSymbianControl() setFocusSafely(false); S60->appUi()->RemoveFromStack(this); delete m_longTapDetector; - - if(m_previousEventLongTap) - QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons & ~Qt::RightButton; } void QSymbianControl::setWidget(QWidget *w) @@ -374,19 +375,11 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons alienWidget = qwidget->childAt(widgetPos); if (!alienWidget) alienWidget = qwidget; - QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons &(~Qt::LeftButton); - QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons | Qt::RightButton; - QMouseEvent mEvent(QEvent::MouseButtonPress, alienWidget->mapFrom(qwidget, widgetPos), globalPos, - Qt::RightButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier); - - bool res = sendMouseEvent(alienWidget, &mEvent); #if !defined(QT_NO_CONTEXTMENU) - QContextMenuEvent contextMenuEvent(QContextMenuEvent::Mouse, widgetPos, globalPos, mEvent.modifiers()); + QContextMenuEvent contextMenuEvent(QContextMenuEvent::Mouse, widgetPos, globalPos, Qt::NoModifier); qt_sendSpontaneousEvent(alienWidget, &contextMenuEvent); #endif - - m_previousEventLongTap = true; } #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER @@ -510,12 +503,6 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent) mapS60MouseEventTypeToQt(&type, &button, &pEvent); Qt::KeyboardModifiers modifiers = mapToQtModifiers(pEvent.iModifiers); - if (m_previousEventLongTap) - if (type == QEvent::MouseButtonRelease){ - button = Qt::RightButton; - QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons & ~Qt::RightButton; - m_previousEventLongTap = false; - } if (type == QMouseEvent::None) return; @@ -725,7 +712,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers); QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode, mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods), - false, 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); + (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); // WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child(); // if (!wid) // Could happen if window isn't shown yet. @@ -911,7 +898,18 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) return; if (IsFocused() && IsVisible()) { + if (m_symbianPopupIsOpen) { + QWidget *fw = QApplication::focusWidget(); + if (fw) { + QFocusEvent event(QEvent::FocusIn, Qt::PopupFocusReason); + QCoreApplication::sendEvent(fw, &event); + } + m_symbianPopupIsOpen = false; + } + QApplication::setActiveWindow(qwidget->window()); + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); #ifdef Q_WS_S60 // If widget is fullscreen, hide status pane and button container // otherwise show them. @@ -924,6 +922,16 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) buttonGroup->MakeVisible(!isFullscreen); #endif } else if (QApplication::activeWindow() == qwidget->window()) { + if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) { + QWidget *fw = QApplication::focusWidget(); + if (fw) { + QFocusEvent event(QEvent::FocusOut, Qt::PopupFocusReason); + QCoreApplication::sendEvent(fw, &event); + } + m_symbianPopupIsOpen = true; + return; + } + QApplication::setActiveWindow(0); } // else { We don't touch the active window unless we were explicitly activated or deactivated } @@ -939,7 +947,10 @@ void QSymbianControl::HandleResourceChange(int resourceType) TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); SetExtent(r.iTl, r.Size()); } - qwidget->d_func()->setWindowIcon_sys(true); + if (IsFocused() && IsVisible()) { + qwidget->d_func()->setWindowIcon_sys(true); + qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle()); + } break; case KUidValueCoeFontChangeEvent: // font change event diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 05e75a2..b677228 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -243,8 +243,12 @@ static PtrWTGet ptrWTGet = 0; static PACKET localPacketBuf[QT_TABLET_NPACKETQSIZE]; // our own tablet packet queue. HCTX qt_tablet_context; // the hardware context for the tablet (like a window handle) bool qt_tablet_tilt_support; -static void tabletInit(UINT wActiveCsr, HCTX hTab); + +#ifndef QT_NO_TABLETEVENT +static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab); +static void tabletUpdateCursor(QTabletDeviceData &tdd, const UINT currentCursor); static void initWinTabFunctions(); // resolve the WINTAB api functions +#endif // QT_NO_TABLETEVENT #ifndef QT_NO_ACCESSIBILITY @@ -256,7 +260,7 @@ extern QWidget* qt_get_tablet_widget(); extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); extern QRegion qt_dirtyRegion(QWidget *); -typedef QHash<UINT, QTabletDeviceData> QTabletCursorInfo; +typedef QHash<quint64, QTabletDeviceData> QTabletCursorInfo; Q_GLOBAL_STATIC(QTabletCursorInfo, tCursorInfo) QTabletDeviceData currentTabletPointer; @@ -791,7 +795,9 @@ void qt_init(QApplicationPrivate *priv, int) if (QApplication::desktopSettingsAware()) qt_set_windows_resources(); +#ifndef QT_NO_TABLETEVENT initWinTabFunctions(); +#endif // QT_NO_TABLETEVENT QApplicationPrivate::inputContext = new QWinInputContext(0); // Read the initial cleartype settings... @@ -2325,25 +2331,43 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam } break; case WT_PROXIMITY: - if (ptrWTPacketsGet) { - bool enteredProximity = LOWORD(lParam) != 0; - PACKET proximityBuffer[QT_TABLET_NPACKETQSIZE]; - int totalPacks = ptrWTPacketsGet(qt_tablet_context, QT_TABLET_NPACKETQSIZE, proximityBuffer); - if (totalPacks > 0 && enteredProximity) { - uint currentCursor = proximityBuffer[0].pkCursor; - if (!tCursorInfo()->contains(currentCursor)) - tabletInit(currentCursor, qt_tablet_context); - currentTabletPointer = tCursorInfo()->value(currentCursor); + + #ifndef QT_NO_TABLETEVENT + if (ptrWTPacketsGet && ptrWTInfo) { + const bool enteredProximity = LOWORD(lParam) != 0; + PACKET proximityBuffer[1]; // we are only interested in the first packet in this case + const int totalPacks = ptrWTPacketsGet(qt_tablet_context, 1, proximityBuffer); + if (totalPacks > 0) { + const UINT currentCursor = proximityBuffer[0].pkCursor; + + UINT csr_physid; + ptrWTInfo(WTI_CURSORS + currentCursor, CSR_PHYSID, &csr_physid); + UINT csr_type; + ptrWTInfo(WTI_CURSORS + currentCursor, CSR_TYPE, &csr_type); + const UINT deviceIdMask = 0xFF6; // device type mask && device color mask + quint64 uniqueId = (csr_type & deviceIdMask); + uniqueId = (uniqueId << 32) | csr_physid; + + // initialising and updating the cursor should be done in response to + // WT_CSRCHANGE. We do it in WT_PROXIMITY because some wintab never send + // the event WT_CSRCHANGE even if asked with CXO_CSRMESSAGES + const QTabletCursorInfo *const globalCursorInfo = tCursorInfo(); + if (!globalCursorInfo->contains(uniqueId)) + tabletInit(uniqueId, csr_type, qt_tablet_context); + + currentTabletPointer = globalCursorInfo->value(uniqueId); + tabletUpdateCursor(currentTabletPointer, currentCursor); } qt_tabletChokeMouse = false; -#ifndef QT_NO_TABLETEVENT + QTabletEvent tabletProximity(enteredProximity ? QEvent::TabletEnterProximity : QEvent::TabletLeaveProximity, QPoint(), QPoint(), QPointF(), currentTabletPointer.currentDevice, currentTabletPointer.currentPointerType, 0, 0, 0, 0, 0, 0, 0, currentTabletPointer.llId); QApplication::sendEvent(qApp, &tabletProximity); -#endif // QT_NO_TABLETEVENT } + #endif // QT_NO_TABLETEVENT + break; #ifdef Q_WS_WINCE_WM case WM_SETFOCUS: { @@ -3317,63 +3341,57 @@ bool QETWidget::translateWheelEvent(const MSG &msg) // the following is adapted from the wintab syspress example (public domain) /* -------------------------------------------------------------------------- */ -static void tabletInit(UINT wActiveCsr, HCTX hTab) +// Initialize the "static" information of a cursor device (pen, airbrush, etc). +// The QTabletDeviceData is initialized with the data that do not change in time +// (number of button, type of device, etc) but do not initialize the variable data +// (e.g.: pen or eraser) +#ifndef QT_NO_TABLETEVENT + +static void tabletInit(const quint64 uniqueId, const UINT csr_type, HCTX hTab) { + Q_ASSERT(ptrWTInfo); + Q_ASSERT(ptrWTGet); + + Q_ASSERT(!tCursorInfo()->contains(uniqueId)); + /* browse WinTab's many info items to discover pressure handling. */ - if (ptrWTInfo && ptrWTGet) { - AXIS np; - LOGCONTEXT lc; - BYTE wPrsBtn; - BYTE logBtns[32]; - UINT size; - - /* discover the LOGICAL button generated by the pressure channel. */ - /* get the PHYSICAL button from the cursor category and run it */ - /* through that cursor's button map (usually the identity map). */ - wPrsBtn = (BYTE)-1; - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_NPBUTTON, &wPrsBtn); - size = ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_BUTTONMAP, &logBtns); - if ((UINT)wPrsBtn < size) - wPrsBtn = logBtns[wPrsBtn]; - - /* get the current context for its device variable. */ - ptrWTGet(hTab, &lc); - - /* get the size of the pressure axis. */ - QTabletDeviceData tdd; - ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_NPRESSURE, &np); - tdd.minPressure = int(np.axMin); - tdd.maxPressure = int(np.axMax); - - ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_TPRESSURE, &np); - tdd.minTanPressure = int(np.axMin); - tdd.maxTanPressure = int(np.axMax); - - LOGCONTEXT lcMine; - - /* get default region */ - ptrWTInfo(WTI_DEFCONTEXT, 0, &lcMine); - - tdd.minX = 0; - tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX); - - tdd.minY = 0; - tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY); - - tdd.minZ = 0; - tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ); - - int csr_type, - csr_physid; - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_TYPE, &csr_type); - ptrWTInfo(WTI_CURSORS + wActiveCsr, CSR_PHYSID, &csr_physid); - tdd.llId = csr_type & 0x0F06; - tdd.llId = (tdd.llId << 24) | csr_physid; -#ifndef QT_NO_TABLETEVENT - if (((csr_type & 0x0006) == 0x0002) && ((csr_type & 0x0F06) != 0x0902)) { - tdd.currentDevice = QTabletEvent::Stylus; - } else { - switch (csr_type & 0x0F06) { + AXIS np; + LOGCONTEXT lc; + + /* get the current context for its device variable. */ + ptrWTGet(hTab, &lc); + + /* get the size of the pressure axis. */ + QTabletDeviceData tdd; + tdd.llId = uniqueId; + + ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_NPRESSURE, &np); + tdd.minPressure = int(np.axMin); + tdd.maxPressure = int(np.axMax); + + ptrWTInfo(WTI_DEVICES + lc.lcDevice, DVC_TPRESSURE, &np); + tdd.minTanPressure = int(np.axMin); + tdd.maxTanPressure = int(np.axMax); + + LOGCONTEXT lcMine; + + /* get default region */ + ptrWTInfo(WTI_DEFCONTEXT, 0, &lcMine); + + tdd.minX = 0; + tdd.maxX = int(lcMine.lcInExtX) - int(lcMine.lcInOrgX); + + tdd.minY = 0; + tdd.maxY = int(lcMine.lcInExtY) - int(lcMine.lcInOrgY); + + tdd.minZ = 0; + tdd.maxZ = int(lcMine.lcInExtZ) - int(lcMine.lcInOrgZ); + + const uint cursorTypeBitMask = 0x0F06; // bitmask to find the specific cursor type (see Wacom FAQ) + if (((csr_type & 0x0006) == 0x0002) && ((csr_type & cursorTypeBitMask) != 0x0902)) { + tdd.currentDevice = QTabletEvent::Stylus; + } else { + switch (csr_type & cursorTypeBitMask) { case 0x0802: tdd.currentDevice = QTabletEvent::Stylus; break; @@ -3391,26 +3409,34 @@ static void tabletInit(UINT wActiveCsr, HCTX hTab) break; default: tdd.currentDevice = QTabletEvent::NoDevice; - } - } - - switch (wActiveCsr % 3) { - case 2: - tdd.currentPointerType = QTabletEvent::Eraser; - break; - case 1: - tdd.currentPointerType = QTabletEvent::Pen; - break; - case 0: - tdd.currentPointerType = QTabletEvent::Cursor; - break; - default: - tdd.currentPointerType = QTabletEvent::UnknownPointer; } + } + tCursorInfo()->insert(uniqueId, tdd); +} #endif // QT_NO_TABLETEVENT - tCursorInfo()->insert(wActiveCsr, tdd); + +// Update the "dynamic" informations of a cursor device (pen, airbrush, etc). +// The dynamic information is the information of QTabletDeviceData that can change +// in time (eraser or pen if a device is turned around). +#ifndef QT_NO_TABLETEVENT + +static void tabletUpdateCursor(QTabletDeviceData &tdd, const UINT currentCursor) +{ + switch (currentCursor % 3) { // %3 for dual track + case 0: + tdd.currentPointerType = QTabletEvent::Cursor; + break; + case 1: + tdd.currentPointerType = QTabletEvent::Pen; + break; + case 2: + tdd.currentPointerType = QTabletEvent::Eraser; + break; + default: + tdd.currentPointerType = QTabletEvent::UnknownPointer; } } +#endif // QT_NO_TABLETEVENT bool QETWidget::translateTabletEvent(const MSG &msg, PACKET *localPacketBuf, int numPackets) @@ -3546,6 +3572,10 @@ bool QETWidget::translateTabletEvent(const MSG &msg, PACKET *localPacketBuf, } extern bool qt_is_gui_used; + + +#ifndef QT_NO_TABLETEVENT + static void initWinTabFunctions() { #if defined(Q_OS_WINCE) @@ -3564,6 +3594,7 @@ static void initWinTabFunctions() } #endif // Q_OS_WINCE } +#endif // QT_NO_TABLETEVENT // diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 37dcc67..304e5d3 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -178,6 +178,9 @@ static void cleanupCocoaApplicationDelegate() return [[qtMenuLoader retain] autorelease]; } +// This function will only be called when NSApp is actually running. Before +// that, the kAEQuitApplication apple event will be sendt to +// QApplicationPrivate::globalAppleEventProcessor in qapplication_mac.mm - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { Q_UNUSED(sender); diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index 9ab077f..990571d 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -76,9 +76,14 @@ QT_USE_NAMESPACE - (void)ensureAppMenuInMenu:(NSMenu *)menu { + // The application menu is the menu in the menu bar that contains the + // 'Quit' item. When changing menu bar (e.g when swithing between + // windows with different menu bars), we never recreate this menu, but + // instead pull it out the current menu bar and place into the new one: NSMenu *mainMenu = [NSApp mainMenu]; if ([NSApp mainMenu] == menu) - return; // nothing to do! + return; // nothing to do (menu is the current menu bar)! + #ifndef QT_NAMESPACE Q_ASSERT(mainMenu); #endif diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index a16d1f8..3da783f 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -64,12 +64,16 @@ #include <qdebug.h> -@interface NSEvent (DeviceDelta) +@interface NSEvent (Qt_Compile_Leopard_DeviceDelta) - (CGFloat)deviceDeltaX; - (CGFloat)deviceDeltaY; - (CGFloat)deviceDeltaZ; @end +@interface NSEvent (Qt_Compile_Leopard_Gestures) + - (CGFloat)magnification; +@end + QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(DnDParams, qMacDnDParams); @@ -79,6 +83,7 @@ extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm extern const QStringList& qEnabledDraggedTypes(); // qmime_mac.cpp extern QPointer<QWidget> qt_mouseover; //qapplication_mac.mm +extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) { @@ -691,6 +696,9 @@ extern "C" { - (void)mouseDown:(NSEvent *)theEvent { + if (!qt_button_down) + qt_button_down = qwidget; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton); // Don't call super here. This prevents us from getting the mouseUp event, // which we need to send even if the mouseDown event was not accepted. @@ -700,75 +708,62 @@ extern "C" { - (void)mouseUp:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); + qt_button_down = 0; - if (!mouseOK) - [super mouseUp:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); } - (void)rightMouseDown:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton); + if (!qt_button_down) + qt_button_down = qwidget; - if (!mouseOK) - [super rightMouseDown:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton); } - (void)rightMouseUp:(NSEvent *)theEvent { - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); + qt_button_down = 0; - if (!mouseOK) - [super rightMouseUp:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); } - (void)otherMouseDown:(NSEvent *)theEvent { - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton); + if (!qt_button_down) + qt_button_down = qwidget; - if (!mouseOK) - [super otherMouseDown:theEvent]; + Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton); } - (void)otherMouseUp:(NSEvent *)theEvent { - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); - - if (!mouseOK) - [super otherMouseUp:theEvent]; + qt_button_down = 0; + Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); } - (void)mouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super mouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)rightMouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super rightMouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)otherMouseDragged:(NSEvent *)theEvent { qMacDnDParams()->view = self; qMacDnDParams()->theEvent = theEvent; - bool mouseOK = qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - - if (!mouseOK) - [super otherMouseDragged:theEvent]; + qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); } - (void)scrollWheel:(NSEvent *)theEvent @@ -893,6 +888,7 @@ extern "C" { bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); } +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - (void)magnifyWithEvent:(NSEvent *)event; { @@ -963,7 +959,6 @@ extern "C" { qNGEvent.position = flipPoint(p).toPoint(); qt_sendSpontaneousEvent(qwidget, &qNGEvent); } -#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - (void)frameDidChange:(NSNotification *)note { @@ -1451,7 +1446,7 @@ Qt::DropAction QDragManager::drag(QDrag *o) [image release]; dragPrivate()->executed_action = Qt::IgnoreAction; object = 0; - Qt::DropAction performedAction(qt_mac_mapNSDragOperation(dndParams.performedAction)); + Qt::DropAction performedAction(qt_mac_mapNSDragOperation(qMacDnDParams()->performedAction)); // do post drag processing, if required. if(performedAction != Qt::IgnoreAction) { // check if the receiver points us to a file location. diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm index 9fb674e..8a22a65 100644 --- a/src/gui/kernel/qcocoawindowdelegate_mac.mm +++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm @@ -324,8 +324,13 @@ static void cleanupCocoaWindowDelegate() NSRect frameToReturn = defaultFrame; QWidget *qwidget = m_windowHash->value(window); QSizeF size = qwidget->maximumSize(); - frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, size.width()); - frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, size.height()); + NSRect windowFrameRect = [window frame]; + NSRect viewFrameRect = [[window contentView] frame]; + // consider additional size required for titlebar & frame + frameToReturn.size.width = qMin<CGFloat>(frameToReturn.size.width, + size.width()+(windowFrameRect.size.width - viewFrameRect.size.width)); + frameToReturn.size.height = qMin<CGFloat>(frameToReturn.size.height, + size.height()+(windowFrameRect.size.height - viewFrameRect.size.height)); return frameToReturn; } diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h index 9839269..461cc92 100644 --- a/src/gui/kernel/qevent.h +++ b/src/gui/kernel/qevent.h @@ -787,6 +787,8 @@ public: private: QTouchEventTouchPointPrivate *d; + friend class QApplication; + friend class QApplicationPrivate; }; enum DeviceType { @@ -818,6 +820,7 @@ protected: Qt::TouchPointStates _touchPointStates; QList<QTouchEvent::TouchPoint> _touchPoints; + friend class QApplication; friend class QApplicationPrivate; }; diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index c9dd949..e0eebfd 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -571,6 +571,12 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) QBoolBlocker execGuard(d->currentExecIsNSAppRun, false); while (!d->interrupt && [NSApp runModalSession:session] == NSRunContinuesResponse) qt_mac_waitForMoreModalSessionEvents(); + if (!d->interrupt && session == d->currentModalSessionCached) { + // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event + // dispatcher (e.g to stop a native dialog). But that call wrongly stopped + // 'session' as well. As a result, we need to restart all internal sessions: + d->temporarilyStopAllModalSessions(); + } } else { d->nsAppRunCalledByQt = true; QBoolBlocker execGuard(d->currentExecIsNSAppRun, true); @@ -590,7 +596,13 @@ bool QEventDispatcherMac::processEvents(QEventLoop::ProcessEventsFlags flags) if (NSModalSession session = d->currentModalSession()) { if (flags & QEventLoop::WaitForMoreEvents) qt_mac_waitForMoreModalSessionEvents(); - [NSApp runModalSession:session]; + NSInteger status = [NSApp runModalSession:session]; + if (status != NSRunContinuesResponse && session == d->currentModalSessionCached) { + // INVARIANT: Someone called e.g. [NSApp stopModal:] from outside the event + // dispatcher (e.g to stop a native dialog). But that call wrongly stopped + // 'session' as well. As a result, we need to restart all internal sessions: + d->temporarilyStopAllModalSessions(); + } retVal = true; break; } else { diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp index 9d18c9b..4c1429a 100644 --- a/src/gui/kernel/qeventdispatcher_s60.cpp +++ b/src/gui/kernel/qeventdispatcher_s60.cpp @@ -92,7 +92,7 @@ void QEventDispatcherS60::saveInputEvent(QSymbianControl *control, QWidget *widg { DeferredInputEvent inputEvent = {control, widget, event}; m_deferredInputEvents.append(inputEvent); - connect(widget, SIGNAL(destroyed(QObject *)), SLOT(removeInputEventsForWidget(QObject *))); + connect(widget, SIGNAL(destroyed(QObject*)), SLOT(removeInputEventsForWidget(QObject*))); } bool QEventDispatcherS60::sendDeferredInputEvents() diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp index 3e5dadc..33f5489 100644 --- a/src/gui/kernel/qformlayout.cpp +++ b/src/gui/kernel/qformlayout.cpp @@ -1124,14 +1124,15 @@ QStyle* QFormLayoutPrivate::getStyle() const \value DontWrapRows Fields are always laid out next to their label. This is - the default policy for all styles except Qt Extended styles. + the default policy for all styles except Qt Extended styles + and QS60Style. \value WrapLongRows Labels are given enough horizontal space to fit the widest label, and the rest of the space is given to the fields. If the minimum size of a field pair is wider than the available space, the field is wrapped to the next line. This is the default policy for - Qt Extended styles. + Qt Extended styles and and QS60Style. \value WrapAllRows Fields are always laid out below their label. @@ -1720,8 +1721,8 @@ QFormLayout::FieldGrowthPolicy QFormLayout::fieldGrowthPolicy() const \brief the way in which the form's rows wrap The default value depends on the widget or application style. For - Qt Extended styles, the default is WrapLongRows; for the other styles, - the default is DontWrapRows. + Qt Extended styles and QS60Style, the default is WrapLongRows; + for the other styles, the default is DontWrapRows. If you want to display each label above its associated field (instead of next to it), set this property to WrapAllRows. diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 89c18fb..e3af683 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -1036,7 +1036,7 @@ QKeySequence QKeySequence::mnemonic(const QString &text) #else found = true; } else { - qWarning(qPrintable(QString::fromLatin1("QKeySequence::mnemonic: \"%1\" contains multiple occurences of '&'").arg(text))); + qWarning("QKeySequence::mnemonic: \"%s\" contains multiple occurences of '&'", qPrintable(text)); #endif } } diff --git a/src/gui/kernel/qmacgesturerecognizer_mac.mm b/src/gui/kernel/qmacgesturerecognizer_mac.mm index f142d71..3e0ba23 100644 --- a/src/gui/kernel/qmacgesturerecognizer_mac.mm +++ b/src/gui/kernel/qmacgesturerecognizer_mac.mm @@ -67,7 +67,7 @@ QMacSwipeGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e case QNativeGestureEvent::Swipe: { QSwipeGesture *g = static_cast<QSwipeGesture *>(gesture); g->setSwipeAngle(ev->angle); - return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint; + return QGestureRecognizer::FinishGesture | QGestureRecognizer::ConsumeEventHint; break; } default: break; diff --git a/src/gui/kernel/qmultitouch_mac.mm b/src/gui/kernel/qmultitouch_mac.mm index 2f6f9ca..f736146 100644 --- a/src/gui/kernel/qmultitouch_mac.mm +++ b/src/gui/kernel/qmultitouch_mac.mm @@ -180,7 +180,6 @@ QCocoaTouch::getCurrentTouchPointList(NSEvent *event, bool acceptSingleTouch) if (_touchCount != _currentTouches.size()) { // Remove all instances, and basically start from scratch: touchPoints.clear(); - QList<QCocoaTouch *> list = _currentTouches.values(); foreach (QCocoaTouch *qcocoaTouch, _currentTouches.values()) { if (!_updateInternalStateOnly) { qcocoaTouch->_touchPoint.setState(Qt::TouchPointReleased); diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index ecad72f..775d773 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -210,14 +210,22 @@ bool QSoftKeyManager::event(QEvent *e) #ifdef Q_WS_S60 void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) { + // lets not update softkeys if s60 native dialog or menu is shown + if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog()) + return; + CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer(); nativeContainer->DrawableWindow()->SetOrdinalPosition(0); nativeContainer->DrawableWindow()->SetPointerCapturePriority(1); //keep softkeys available in modal dialog - QT_TRAP_THROWING(nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS)); + nativeContainer->DrawableWindow()->SetFaded(EFalse, RWindowTreeNode::EFadeIncludeChildren); int position = -1; - int command; bool needsExitButton = true; + QT_TRAP_THROWING( + //Using -1 instead of EAknSoftkeyEmpty to avoid flickering. + nativeContainer->SetCommandL(0, -1, KNullDesC); + nativeContainer->SetCommandL(2, -1, KNullDesC); + ); for (int index = 0; index < softkeys.count(); index++) { const QAction* softKeyAction = softkeys.at(index); @@ -238,7 +246,7 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) break; } - command = (softKeyAction->objectName().contains("_q_menuSoftKeyAction")) + int command = (softKeyAction->objectName().contains("_q_menuSoftKeyAction")) ? EAknSoftkeyOptions : s60CommandStart + index; @@ -255,7 +263,8 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) : Qt::Widget; if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup) - QT_TRAP_THROWING(nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit")))); + QT_TRAP_THROWING( + nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit")))); nativeContainer->DrawDeferred(); // 3.1 needs an extra invitation } diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index c0fb8aa..2bf1465 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -899,6 +899,14 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev widgetToGetMouse = [static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(tmpView) qt_qwidget]; } + } else { + extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp + if (!mac_mouse_grabber && qt_button_down) { + // if there is no explicit grabber, and the mouse was grabbed + // implicitely (i.e. a mousebutton was pressed) + widgetToGetMouse = qt_button_down; + tmpView = qt_mac_nativeview_for(widgetToGetMouse); + } } NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil]; diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 333458b..08f8bb5 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -175,7 +175,7 @@ public: protected: // from MAknFadedComponent TInt CountFadedComponents() {return 1;} - CCoeControl* FadedComponent(TInt aIndex) {return this;} + CCoeControl* FadedComponent(TInt /*aIndex*/) {return this;} #else #warning No fallback implementation for QSymbianControl::FadeBehindPopup void FadeBehindPopup(bool /*fade*/){ } @@ -202,9 +202,9 @@ private: private: QWidget *qwidget; - bool m_ignoreFocusChanged; QLongTapTimer* m_longTapDetector; - bool m_previousEventLongTap; + bool m_ignoreFocusChanged : 1; + bool m_symbianPopupIsOpen : 1; #ifdef Q_WS_S60 // Fader object used to fade everything except this menu and the CBA. diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 30cb9a7..f31dcc4 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -3084,9 +3084,10 @@ void QWidgetPrivate::setEnabled_helper(bool enable) #endif #ifndef QT_NO_IM if (q->testAttribute(Qt::WA_InputMethodEnabled) && q->hasFocus()) { - QInputContext *qic = inputContext(); + QWidget *focusWidget = effectiveFocusWidget(); + QInputContext *qic = focusWidget->d_func()->inputContext(); if (enable) { - qic->setFocusWidget(q); + qic->setFocusWidget(focusWidget); } else { qic->reset(); qic->setFocusWidget(0); @@ -4676,8 +4677,10 @@ void QWidgetPrivate::resolveLayoutDirection() By default, this property is set to Qt::LeftToRight. When the layout direction is set on a widget, it will propagate to - the widget's children. Children added after the call to \c - setLayoutDirection() will not inherit the parent's layout + the widget's children, but not to a child that is a window and not + to a child for which setLayoutDirection() has been explicitly + called. Also, child widgets added \e after setLayoutDirection() + has been called for the parent do not inherit the parent's layout direction. \sa QApplication::layoutDirection @@ -8253,7 +8256,8 @@ bool QWidget::event(QEvent *event) QList<QObject*> childList = d->children; for (int i = 0; i < childList.size(); ++i) { QObject *o = childList.at(i); - QApplication::sendEvent(o, event); + if (o) + QApplication::sendEvent(o, event); } } update(); @@ -8282,7 +8286,7 @@ bool QWidget::event(QEvent *event) QList<QObject*> childList = d->children; for (int i = 0; i < childList.size(); ++i) { QObject *o = childList.at(i); - if (o != QApplication::activeModalWidget()) { + if (o && o != QApplication::activeModalWidget()) { if (qobject_cast<QWidget *>(o) && static_cast<QWidget *>(o)->isWindow()) { // do not forward the event to child windows, // QApplication does this for us @@ -10356,9 +10360,10 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) break; } case Qt::WA_NativeWindow: { #ifndef QT_NO_IM + QWidget *focusWidget = d->effectiveFocusWidget(); QInputContext *ic = 0; if (on && !internalWinId() && testAttribute(Qt::WA_InputMethodEnabled) && hasFocus()) { - ic = d->inputContext(); + ic = focusWidget->d_func()->inputContext(); ic->reset(); ic->setFocusWidget(0); } @@ -10367,7 +10372,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created)) d->createWinId(); if (ic && isEnabled()) - ic->setFocusWidget(this); + ic->setFocusWidget(focusWidget); #endif //QT_NO_IM break; } @@ -10399,13 +10404,14 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) break; case Qt::WA_InputMethodEnabled: { #ifndef QT_NO_IM - QInputContext *ic = d->ic; + QWidget *focusWidget = d->effectiveFocusWidget(); + QInputContext *ic = focusWidget->d_func()->ic; if (!ic && (!on || hasFocus())) - ic = d->inputContext(); + ic = focusWidget->d_func()->inputContext(); if (ic) { - if (on && hasFocus() && ic->focusWidget() != this && isEnabled()) { - ic->setFocusWidget(this); - } else if (!on && ic->focusWidget() == this) { + if (on && hasFocus() && ic->focusWidget() != focusWidget && isEnabled()) { + ic->setFocusWidget(focusWidget); + } else if (!on && ic->focusWidget() == focusWidget) { ic->reset(); ic->setFocusWidget(0); } @@ -11874,8 +11880,7 @@ void QWidget::ungrabGesture(Qt::GestureType gesture) isVisible() returns false for a widget, that widget cannot call grabMouse(). - \sa releaseMouse() grabKeyboard() releaseKeyboard() grabKeyboard() - focusWidget() + \sa releaseMouse() grabKeyboard() releaseKeyboard() */ /*! diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 75f9a59..0d9f9ee 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -725,6 +725,23 @@ static OSWindowRef qt_mac_create_window(QWidget *, WindowClass wclass, WindowAtt return window; } +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 +/* We build the release package against the 10.4 SDK. + So, to enable gestures for applications running on + 10.6+, we define the missing constants here: */ +enum { + kEventClassGesture = 'gest', + kEventGestureStarted = 1, + kEventGestureEnded = 2, + kEventGestureMagnify = 4, + kEventGestureSwipe = 5, + kEventGestureRotate = 6, + kEventParamRotationAmount = 'rota', + kEventParamSwipeDirection = 'swip', + kEventParamMagnificationAmount = 'magn' +}; +#endif + // window events static EventTypeSpec window_events[] = { { kEventClassWindow, kEventWindowClose }, @@ -741,13 +758,11 @@ static EventTypeSpec window_events[] = { { kEventClassWindow, kEventWindowGetRegion }, { kEventClassWindow, kEventWindowGetClickModality }, { kEventClassWindow, kEventWindowTransitionCompleted }, -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 { kEventClassGesture, kEventGestureStarted }, { kEventClassGesture, kEventGestureEnded }, { kEventClassGesture, kEventGestureMagnify }, { kEventClassGesture, kEventGestureSwipe }, { kEventClassGesture, kEventGestureRotate }, -#endif { kEventClassMouse, kEventMouseDown } }; static EventHandlerUPP mac_win_eventUPP = 0; @@ -1036,7 +1051,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, handled_event = false; break; } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 case kEventClassGesture: { // First, find the widget that was under // the mouse when the gesture happened: @@ -1064,7 +1078,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; case kEventGestureRotate: { CGFloat amount; - if (GetEventParameter(event, kEventParamRotationAmount, typeCGFloat, 0, + if (GetEventParameter(event, kEventParamRotationAmount, 'cgfl', 0, sizeof(amount), 0, &amount) != noErr) { handled_event = false; break; @@ -1091,7 +1105,7 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, break; } case kEventGestureMagnify: { CGFloat amount; - if (GetEventParameter(event, kEventParamMagnificationAmount, typeCGFloat, 0, + if (GetEventParameter(event, kEventParamMagnificationAmount, 'cgfl', 0, sizeof(amount), 0, &amount) != noErr) { handled_event = false; break; @@ -1103,7 +1117,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event, QApplication::sendSpontaneousEvent(widget, &qNGEvent); break; } -#endif // gestures default: handled_event = false; @@ -2673,7 +2686,10 @@ void QWidgetPrivate::transferChildren() // site disabled until it is part of the new hierarchy. bool oldRegistered = w->testAttribute(Qt::WA_DropSiteRegistered); w->setAttribute(Qt::WA_DropSiteRegistered, false); + [qt_mac_nativeview_for(w) retain]; + [qt_mac_nativeview_for(w) removeFromSuperview]; [qt_mac_nativeview_for(q) addSubview:qt_mac_nativeview_for(w)]; + [qt_mac_nativeview_for(w) release]; w->setAttribute(Qt::WA_DropSiteRegistered, oldRegistered); #endif } diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 8e87c37..ba375d8 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -467,6 +467,12 @@ public: void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0); QInputContext *inputContext() const; + inline QWidget *effectiveFocusWidget() { + QWidget *w = q_func(); + while (w->focusProxy()) + w = w->focusProxy(); + return w; + } void setModal_sys(); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 67bbd9f..359df2a 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -213,6 +213,15 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) if ((q->windowType() == Qt::Desktop)) return; + + QPoint oldPos(q->pos()); + QSize oldSize(q->size()); + QRect oldGeom(data.crect); + + // Lose maximized status if deliberate resize + if (w != oldSize.width() || h != oldSize.height()) + data.window_state &= ~Qt::WindowMaximized; + if (extra) { // any size restrictions? w = qMin(w,extra->maxw); h = qMin(h,extra->maxh); @@ -228,17 +237,10 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) data.window_state = s; } - QPoint oldPos(q->pos()); - QSize oldSize(q->size()); - QRect oldGeom(data.crect); - bool isResize = w != oldSize.width() || h != oldSize.height(); if (!isMove && !isResize) return; - if (isResize) - data.window_state &= ~Qt::WindowMaximized; - if (q->isWindow()) { if (w == 0 || h == 0) { q->setAttribute(Qt::WA_OutsideWSRange, true); @@ -359,6 +361,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de QScopedPointer<QSymbianControl> control( q_check_ptr(new QSymbianControl(q)) ); QT_TRAP_THROWING(control->ConstructL(true, desktop)); + control->SetMopParent(static_cast<CEikAppUi*>(S60->appUi())); // Symbian windows are always created in an inactive state // We perform this assignment for the case where the window is being re-created @@ -485,12 +488,6 @@ void QWidgetPrivate::show_sys() if(q->isWindow()) id->setFocusSafely(true); - - // Force setting of the icon after window is made visible, - // this is needed even WA_SetWindowIcon is not set, as in that case we need - // to reset to the application level window icon - if(q->isWindow()) - setWindowIcon_sys(true); } invalidateBuffer(q->rect()); @@ -1177,18 +1174,6 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) if (id->IsFocused()) // Avoid unnecessry calls to FocusChanged() id->setFocusSafely(false); id->ControlEnv()->AppUi()->RemoveFromStack(id); - - // Hack to activate window under destroyed one. With this activation - // the next visible window will get keyboard focus - WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl(); - if (wid) { - QWidget *widget = QWidget::find(wid); - QApplication::setActiveWindow(widget); - if (widget) { - // Reset global window title for focusing window - widget->d_func()->setWindowTitle_sys(widget->windowTitle()); - } - } } } @@ -1235,7 +1220,7 @@ void QWidget::releaseKeyboard() void QWidget::grabMouse() { - if (!qt_nograb()) { + if (isVisible() && !qt_nograb()) { if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this) QWidgetPrivate::mouseGrabber->releaseMouse(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); @@ -1252,7 +1237,7 @@ void QWidget::grabMouse() #ifndef QT_NO_CURSOR void QWidget::grabMouse(const QCursor &cursor) { - if (!qt_nograb()) { + if (isVisible() && !qt_nograb()) { if (QWidgetPrivate::mouseGrabber && QWidgetPrivate::mouseGrabber != this) QWidgetPrivate::mouseGrabber->releaseMouse(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 7461637..0bc9cbc 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -527,8 +527,13 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO QX11InfoData *xd = &X11->screens[qt_x11_create_desktop_on_screen]; xinfo.setX11Data(xd); } else if (parentXinfo && (parentXinfo->screen() != xinfo.screen() - || parentXinfo->visual() != xinfo.visual())) + || (parentXinfo->visual() != xinfo.visual() + && !q->inherits("QGLWidget")))) { + // QGLWidgets have to be excluded here as they have a + // specially crafted QX11Info structure which can't be swapped + // out with the parent widgets QX11Info. The parent visual, + // for instance, might not even be GL capable. xinfo = *parentXinfo; } diff --git a/src/gui/kernel/qwidgetaction.cpp b/src/gui/kernel/qwidgetaction.cpp index 7dc2c67..b72a41a 100644 --- a/src/gui/kernel/qwidgetaction.cpp +++ b/src/gui/kernel/qwidgetaction.cpp @@ -212,8 +212,8 @@ void QWidgetAction::releaseWidget(QWidget *widget) if (!d->createdWidgets.contains(widget)) return; - disconnect(widget, SIGNAL(destroyed(QObject *)), - this, SLOT(_q_widgetDestroyed(QObject *))); + disconnect(widget, SIGNAL(destroyed(QObject*)), + this, SLOT(_q_widgetDestroyed(QObject*))); d->createdWidgets.removeAll(widget); deleteWidget(widget); } diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 8737f10..1d15dac 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -223,21 +223,22 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, int h = ty2 - ty1; int w = tx2 - tx1; + quint32 basex; quint32 srcy; if (sx < 0) { - int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1; + int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * ix) + 1; basex = quint32(srcRect.right() * 65536) + dstx; } else { - int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1; + int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * ix) - 1; basex = quint32(srcRect.left() * 65536) + dstx; } if (sy < 0) { - int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1; + int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * iy) + 1; srcy = quint32(srcRect.bottom() * 65536) + dsty; } else { - int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1; + int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * iy) - 1; srcy = quint32(srcRect.top() * 65536) + dsty; } @@ -739,17 +740,17 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl, quint32 srcy; if (sx < 0) { - int dstx = qFloor((tx1 + 0.5 - targetRect.right()) * ix) + 1; + int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * ix) + 1; basex = quint32(srcRect.right() * 65536) + dstx; } else { - int dstx = qCeil((tx1 + 0.5 - targetRect.left()) * ix) - 1; + int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * ix) - 1; basex = quint32(srcRect.left() * 65536) + dstx; } if (sy < 0) { - int dsty = qFloor((ty1 + 0.5 - targetRect.bottom()) * iy) + 1; + int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * iy) + 1; srcy = quint32(srcRect.bottom() * 65536) + dsty; } else { - int dsty = qCeil((ty1 + 0.5 - targetRect.top()) * iy) - 1; + int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * iy) - 1; srcy = quint32(srcRect.top() * 65536) + dsty; } diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp index b8700c3..51be3b3 100644 --- a/src/gui/painting/qpaintbuffer.cpp +++ b/src/gui/painting/qpaintbuffer.cpp @@ -1708,7 +1708,7 @@ void QPaintEngineExReplayer::process(const QPaintBufferCommand &cmd) QPaintBufferResource::QPaintBufferResource(FreeFunc f, QObject *parent) : QObject(parent), free(f) { - connect(QPaintBufferSignalProxy::instance(), SIGNAL(aboutToDestroy(const QPaintBufferPrivate *)), this, SLOT(remove(const QPaintBufferPrivate *))); + connect(QPaintBufferSignalProxy::instance(), SIGNAL(aboutToDestroy(const QPaintBufferPrivate*)), this, SLOT(remove(const QPaintBufferPrivate*))); } QPaintBufferResource::~QPaintBufferResource() diff --git a/src/gui/painting/qpaintbuffer_p.h b/src/gui/painting/qpaintbuffer_p.h index adf0564..e100512 100644 --- a/src/gui/painting/qpaintbuffer_p.h +++ b/src/gui/painting/qpaintbuffer_p.h @@ -66,7 +66,7 @@ class QPaintBufferPlayback; class Q_GUI_EXPORT QPaintBuffer : public QPaintDevice { - Q_DECLARE_PRIVATE(QPaintBuffer); + Q_DECLARE_PRIVATE(QPaintBuffer) public: QPaintBuffer(); QPaintBuffer(const QPaintBuffer &other); diff --git a/src/gui/painting/qpaintdevice.qdoc b/src/gui/painting/qpaintdevice.qdoc index 6c0b04c..ac1c3de 100644 --- a/src/gui/painting/qpaintdevice.qdoc +++ b/src/gui/painting/qpaintdevice.qdoc @@ -83,7 +83,7 @@ inch. The physicalDpiX() and physicalDpiY() functions also return the resolution of the device in dots per inch, but note that if the logical and vertical resolution differ, the corresponding - QPaintEngine must handle the mapping. Finally, the numColors() + QPaintEngine must handle the mapping. Finally, the colorCount() function returns the number of different colors available for the paint device. @@ -111,7 +111,7 @@ also heightMM(). \value PdmNumColors The number of different colors available for - the paint device. See also numColors(). + the paint device. See also colorCount(). \value PdmDepth The bit depth (number of bit planes) of the paint device. See also depth(). @@ -226,18 +226,18 @@ Use colorCount() instead. Returns the number of different colors available for the paint - device. Since this value is an int, it will not be sufficient to represent - the number of colors on 32 bit displays, in this case INT_MAX is - returned instead. -*/ + device. Since this value is an int, it will not be sufficient to + represent the number of colors on 32 bit displays, in this case + INT_MAX is returned instead. + */ /*! \fn int QPaintDevice::colorCount() const Returns the number of different colors available for the paint - device. Since this value is an int, it will not be sufficient to represent - the number of colors on 32 bit displays, in this case INT_MAX is - returned instead. + device. Since this value is an int, it will not be sufficient to + represent the number of colors on 32 bit displays, in this case + INT_MAX is returned instead. */ /*! diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp index ab2dc33..51d6195 100644 --- a/src/gui/painting/qpathclipper.cpp +++ b/src/gui/painting/qpathclipper.cpp @@ -1650,7 +1650,7 @@ static void clear(QWingedEdge& list, int edge, QPathEdge::Traversal traversal) template <typename InputIterator> InputIterator qFuzzyFind(InputIterator first, InputIterator last, qreal val) { - while (first != last && !qFuzzyCompare(qreal(*first), qreal(val))) + while (first != last && !QT_PREPEND_NAMESPACE(qFuzzyCompare)(qreal(*first), qreal(val))) ++first; return first; } diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index b640858..d45bd10 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -78,8 +78,8 @@ const char *qt_real_to_string(qreal val, char *buf) { unsigned int ival = (unsigned int) val; qreal frac = val - (qreal)ival; - int ifrac = (int)(frac * 1000000); - if (ifrac == 1000000) { + int ifrac = (int)(frac * 1000000000); + if (ifrac == 1000000000) { ++ival; ifrac = 0; } @@ -90,7 +90,7 @@ const char *qt_real_to_string(qreal val, char *buf) { ++i; ival /= 10; } - int fact = 100000; + int fact = 100000000; if (i == 0) { *(buf++) = '0'; } else { diff --git a/src/gui/painting/qprintengine_pdf.cpp b/src/gui/painting/qprintengine_pdf.cpp index 4cccc91..3d82edf 100644 --- a/src/gui/painting/qprintengine_pdf.cpp +++ b/src/gui/painting/qprintengine_pdf.cpp @@ -206,7 +206,7 @@ void QPdfEngine::drawImage(const QRectF &rectangle, const QImage &image, const Q QRect sourceRect = sr.toRect(); QImage im = sourceRect != image.rect() ? image.copy(sourceRect) : image; bool bitmap = true; - const int object = d->addImage(image, &bitmap, im.cacheKey()); + const int object = d->addImage(im, &bitmap, im.cacheKey()); if (object < 0) return; diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index 9d1d965..63dec2b 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -3867,23 +3867,28 @@ QRegion::QRegion(const QRect &r, RegionType t) QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule) { if (a.count() > 2) { - d = new QRegionData; - d->ref = 1; + QRegionPrivate *qt_rgn = PolygonRegion(a.constData(), a.size(), + fillRule == Qt::WindingFill ? WindingRule : EvenOddRule); + if (qt_rgn) { + d = new QRegionData; + d->ref = 1; #if defined(Q_WS_X11) - d->rgn = 0; - d->xrectangles = 0; + d->rgn = 0; + d->xrectangles = 0; #elif defined(Q_WS_WIN) - d->rgn = 0; + d->rgn = 0; #endif - d->qt_rgn = PolygonRegion(a.constData(), a.size(), - fillRule == Qt::WindingFill ? WindingRule : EvenOddRule); + d->qt_rgn = qt_rgn; + } else { + d = &shared_empty; + d->ref.ref(); + } } else { d = &shared_empty; d->ref.ref(); } } - QRegion::QRegion(const QRegion &r) { d = r.d; diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index a192e87..46fbaa9 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -101,7 +101,7 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti, Coord c = { 0, 0, // will be filled in later glyph_width, glyph_height, // texture coords - metrics.x.truncate(), + metrics.x.round().truncate(), -metrics.y.truncate() }; // baseline for horizontal scripts listItemCoordinates.insert(glyph, c); diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 973e682..b08847d 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -3817,6 +3817,7 @@ QSize QCleanlooksStyle::sizeFromContents(ContentsType type, const QStyleOption * newSize.setWidth(80); if (!btn->icon.isNull() && btn->iconSize.height() > 16) newSize -= QSize(0, 2); + newSize += QSize(0, 1); } if (const QPushButton *button = qobject_cast<const QPushButton *>(widget)) { if (qobject_cast<const QDialogButtonBox *>(button->parentWidget())) { diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 1c78a47..b32c55b 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -127,11 +127,19 @@ static const int groupBoxBottomMargin = 2; // space below the groupbox static const int groupBoxTitleMargin = 6; // space between contents and title static const int groupBoxTopMargin = 2; +/*! + Returns the configuration string for \a value. + Returns \a fallback if \a value is not found. + */ QString QGtkStyle::getGConfString(const QString &value, const QString &fallback) { return QGtkStylePrivate::getGConfString(value, fallback); } +/*! + Returns the configuration boolean for \a key. + Returns \a fallback if \a key is not found. + */ bool QGtkStyle::getGConfBool(const QString &key, bool fallback) { return QGtkStylePrivate::getGConfBool(key, fallback); @@ -1360,7 +1368,7 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom else { gtkCachedPainter.paintFlatBox(gtkEntry, "entry_bg", contentRect, option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - GTK_SHADOW_NONE, style, entryPath + QString::number(focus)); + GTK_SHADOW_NONE, gtkCombo->style, entryPath + QString::number(focus)); } gtkCachedPainter.paintShadow(gtkEntry, comboBox->editable ? "entry" : "frame", frameRect, frameState, @@ -2513,7 +2521,7 @@ void QGtkStyle::drawControl(ControlElement element, bool selected = menuItem->state & State_Selected && menuItem->state & State_Enabled; if (selected) { - QRect rect = option->rect.adjusted(0, 0, -1, -1); + QRect rect = option->rect.adjusted(0, 0, 0, -1); #ifndef QT_NO_COMBOBOX if (qobject_cast<const QComboBox*>(widget)) rect = option->rect; @@ -2620,7 +2628,7 @@ void QGtkStyle::drawControl(ControlElement element, int pixw = pixmap.width(); int pixh = pixmap.height(); QRect pmr(0, 0, pixw, pixh); - pmr.moveCenter(vCheckRect.center()); + pmr.moveCenter(vCheckRect.center() - QPoint(0, 1)); painter->setPen(menuItem->palette.text().color()); if (!ignoreCheckMark && checkable && checked) { QStyleOption opt = *option; @@ -2662,8 +2670,8 @@ void QGtkStyle::drawControl(ControlElement element, menuitem->rect.getRect(&x, &y, &w, &h); int tab = menuitem->tabWidth; int xm = windowsItemFrame + checkcol + windowsItemHMargin; - int xpos = menuitem->rect.x() + xm; - QRect textRect(xpos, y + windowsItemVMargin, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin); + int xpos = menuitem->rect.x() + xm + 1; + QRect textRect(xpos, y + windowsItemVMargin - 1, w - xm - windowsRightBorder - tab + 1, h - 2 * windowsItemVMargin); QRect vTextRect = visualRect(opt->direction, menuitem->rect, textRect); QString s = menuitem->text; @@ -2710,13 +2718,19 @@ void QGtkStyle::drawControl(ControlElement element, QFontMetrics fm(menuitem->font); int arrow_size = fm.ascent() + fm.descent() - 2 * gtkMenuItem->style->ythickness; gfloat arrow_scaling = 0.8; + int extra = 0; + if (!d->gtk_check_version(2, 16, 0)) { + // "arrow-scaling" is actually hardcoded and fails on hardy (see gtk+-2.12/gtkmenuitem.c) + // though the current documentation states otherwise + d->gtk_widget_style_get(gtkMenuItem, "arrow-scaling", &arrow_scaling, NULL); + // in versions < 2.16 ythickness was previously subtracted from the arrow_size + extra = 2 * gtkMenuItem->style->ythickness; + } - // "arrow-scaling" is actually hardcoded and fails on hardy (see gtk+-2.12/gtkmenuitem.c) - // though the current documentation states otherwise int horizontal_padding; d->gtk_widget_style_get(gtkMenuItem, "horizontal-padding", &horizontal_padding, NULL); - const int dim = static_cast<int>(arrow_size * arrow_scaling); + const int dim = static_cast<int>(arrow_size * arrow_scaling) + extra; int xpos = menuItem->rect.left() + menuItem->rect.width() - horizontal_padding - dim; QRect vSubMenuRect = visualRect(option->direction, menuItem->rect, QRect(xpos, menuItem->rect.top() + @@ -3115,7 +3129,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, case CT_ToolButton: if (const QStyleOptionToolButton *toolbutton = qstyleoption_cast<const QStyleOptionToolButton *>(option)) { GtkWidget *gtkButton = d->gtkWidget(QLS("GtkToolButton.GtkButton")); - newSize = size + QSize(2 * gtkButton->style->xthickness, 1 + 2 * gtkButton->style->ythickness); + newSize = size + QSize(2 * gtkButton->style->xthickness, 2 + 2 * gtkButton->style->ythickness); if (widget && qobject_cast<QToolBar *>(widget->parentWidget())) { QSize minSize(0, 25); if (toolbutton->toolButtonStyle != Qt::ToolButtonTextOnly) @@ -3147,7 +3161,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, GtkWidget *gtkMenuItem = d->gtkWidget(QLS("GtkMenu.GtkMenuItem")); GtkStyle* style = gtkMenuItem->style; - newSize += QSize(textMargin + style->xthickness - 2, style->ythickness - 4); + newSize += QSize(textMargin + style->xthickness - 1, style->ythickness - 3); // Cleanlooks assumes a check column of 20 pixels so we need to // expand it a bit @@ -3167,7 +3181,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, case CT_SpinBox: // QSpinBox does some nasty things that depends on CT_LineEdit - newSize = size + QSize(0, -d->gtkWidget(QLS("GtkSpinButton"))->style->ythickness * 2 + 2); + newSize = size + QSize(0, -d->gtkWidget(QLS("GtkSpinButton"))->style->ythickness * 2); break; case CT_PushButton: @@ -3198,13 +3212,9 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, } break; - case CT_MenuBarItem://cleanlooks adds 2 pixels - newSize = QWindowsStyle::sizeFromContents(type, option, size, widget) + QSize(0, 1); - break; - case CT_LineEdit: { GtkWidget *gtkEntry = d->gtkWidget(QLS("GtkEntry")); - newSize = size + QSize(2*gtkEntry->style->xthickness, 2*gtkEntry->style->ythickness); + newSize = size + QSize(2*gtkEntry->style->xthickness, 2 + 2*gtkEntry->style->ythickness); } break; @@ -3219,7 +3229,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, newSize = size + QSize(12 + arrowButtonRect.width() + 2*gtkCombo->style->xthickness, 4 + 2*gtkCombo->style->ythickness); if (!(widget && qobject_cast<QToolBar *>(widget->parentWidget()))) - newSize += QSize(0, 3); + newSize += QSize(0, 2); } break; @@ -3232,7 +3242,7 @@ QSize QGtkStyle::sizeFromContents(ContentsType type, const QStyleOption *option, if (!tab->icon.isNull()) newSize += QSize(6, 0); } - newSize += QSize(1, 0); + newSize += QSize(1, 1); break; default: diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp index 7119a4f..5f4ebae 100644 --- a/src/gui/styles/qgtkstyle_p.cpp +++ b/src/gui/styles/qgtkstyle_p.cpp @@ -202,12 +202,16 @@ Ptr_gnome_vfs_init QGtkStylePrivate::gnome_vfs_init = 0; typedef int (*x11ErrorHandler)(Display*, XErrorEvent*); -static void gtkStyleSetCallback(GtkWidget*, QGtkStylePrivate* stylePrivate) +Q_DECLARE_METATYPE(QGtkStylePrivate*); + +static void gtkStyleSetCallback(GtkWidget*) { + qRegisterMetaType<QGtkStylePrivate *>(); + // We have to let this function return and complete the event // loop to ensure that all gtk widgets have been styled before // updating - QMetaObject::invokeMethod(styleScheduler(), "updateTheme", Qt::QueuedConnection, Q_ARG(QGtkStylePrivate*, stylePrivate)); + QMetaObject::invokeMethod(styleScheduler(), "updateTheme", Qt::QueuedConnection); } static void update_toolbar_style(GtkWidget *gtkToolBar, GParamSpec *, gpointer) @@ -251,10 +255,18 @@ bool QGtkStyleFilter::eventFilter(QObject *obj, QEvent *e) return QObject::eventFilter(obj, e); } +QList<QGtkStylePrivate *> QGtkStylePrivate::instances; + QGtkStylePrivate::QGtkStylePrivate() : QCleanlooksStylePrivate() , filter(this) { + instances.append(this); +} + +QGtkStylePrivate::~QGtkStylePrivate() +{ + instances.removeOne(this); } void QGtkStylePrivate::init() @@ -285,7 +297,7 @@ GtkStyle* QGtkStylePrivate::gtkStyle(const QString &path) /*! \internal * Get references to gtk functions after we dynamically load the library. */ -void QGtkStylePrivate::resolveGtk() +void QGtkStylePrivate::resolveGtk() const { // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0 QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0); @@ -413,7 +425,7 @@ void QGtkStylePrivate::resolveGtk() * Initializes a number of gtk menu widgets. * The widgets are cached. */ -void QGtkStylePrivate::initGtkMenu() +void QGtkStylePrivate::initGtkMenu() const { // Create menubar GtkWidget *gtkMenuBar = QGtkStylePrivate::gtk_menu_bar_new(); @@ -444,7 +456,7 @@ void QGtkStylePrivate::initGtkMenu() } -void QGtkStylePrivate::initGtkTreeview() +void QGtkStylePrivate::initGtkTreeview() const { GtkWidget *gtkTreeView = gtk_tree_view_new(); gtk_tree_view_append_column((GtkTreeView*)gtkTreeView, gtk_tree_view_column_new()); @@ -458,7 +470,7 @@ void QGtkStylePrivate::initGtkTreeview() * Initializes a number of gtk widgets that we can later on use to determine some of our styles. * The widgets are cached. */ -void QGtkStylePrivate::initGtkWidgets() +void QGtkStylePrivate::initGtkWidgets() const { // From gtkmain.c uid_t ruid = getuid (); @@ -509,7 +521,7 @@ void QGtkStylePrivate::initGtkWidgets() if (!gtkWidgetMap()->contains(QLS("GtkButton"))) { GtkWidget *gtkButton = QGtkStylePrivate::gtk_button_new(); addWidget(gtkButton); - g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), this); + g_signal_connect(gtkButton, "style-set", G_CALLBACK(gtkStyleSetCallback), 0); addWidget(QGtkStylePrivate::gtk_tool_button_new(NULL, NULL)); addWidget(QGtkStylePrivate::gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE)); addWidget(QGtkStylePrivate::gtk_hbutton_box_new()); @@ -613,7 +625,7 @@ bool QGtkStylePrivate::getGConfBool(const QString &key, bool fallback) return retVal; } -QString QGtkStylePrivate::getThemeName() const +QString QGtkStylePrivate::getThemeName() { QString themeName; // We try to parse the gtkrc file first @@ -730,7 +742,7 @@ void QGtkStylePrivate::addAllSubWidgets(GtkWidget *widget, gpointer v) } // Updates window/windowtext palette based on the indicated gtk widget -QPalette QGtkStylePrivate::gtkWidgetPalette(const QString >kWidgetName) +QPalette QGtkStylePrivate::gtkWidgetPalette(const QString >kWidgetName) const { GtkWidget *gtkWidget = QGtkStylePrivate::gtkWidget(gtkWidgetName); Q_ASSERT(gtkWidget); @@ -751,7 +763,7 @@ QPalette QGtkStylePrivate::gtkWidgetPalette(const QString >kWidgetName) } -void QGtkStyleUpdateScheduler::updateTheme( QGtkStylePrivate* stylePrivate ) +void QGtkStyleUpdateScheduler::updateTheme() { static QString oldTheme(QLS("qt_not_set")); QPixmapCache::clear(); @@ -760,20 +772,22 @@ void QGtkStyleUpdateScheduler::updateTheme( QGtkStylePrivate* stylePrivate ) if (QApplication::font() != font) qApp->setFont(font); - if (oldTheme != stylePrivate->getThemeName()) { - oldTheme = stylePrivate->getThemeName(); - QPalette newPalette = qApp->style()->standardPalette(); - QApplicationPrivate::setSystemPalette(newPalette); - QApplication::setPalette(newPalette); - stylePrivate->initGtkWidgets(); - stylePrivate->applyCustomPaletteHash(); - QList<QWidget*> widgets = QApplication::allWidgets(); - // Notify all widgets that size metrics might have changed - foreach (QWidget *widget, widgets) { - QEvent e(QEvent::StyleChange); - QApplication::sendEvent(widget, &e); - } - } + if (oldTheme != QGtkStylePrivate::getThemeName()) { + oldTheme = QGtkStylePrivate::getThemeName(); + QPalette newPalette = qApp->style()->standardPalette(); + QApplicationPrivate::setSystemPalette(newPalette); + QApplication::setPalette(newPalette); + if (!QGtkStylePrivate::instances.isEmpty()) { + QGtkStylePrivate::instances.last()->initGtkWidgets(); + QGtkStylePrivate::instances.last()->applyCustomPaletteHash(); + } + QList<QWidget*> widgets = QApplication::allWidgets(); + // Notify all widgets that size metrics might have changed + foreach (QWidget *widget, widgets) { + QEvent e(QEvent::StyleChange); + QApplication::sendEvent(widget, &e); + } + } QIconLoader::instance()->updateSystemTheme(); } diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h index fa16769..f6ab8a3 100644 --- a/src/gui/styles/qgtkstyle_p.h +++ b/src/gui/styles/qgtkstyle_p.h @@ -255,16 +255,17 @@ class QGtkStylePrivate : public QCleanlooksStylePrivate Q_DECLARE_PUBLIC(QGtkStyle) public: QGtkStylePrivate(); + ~QGtkStylePrivate(); QGtkStyleFilter filter; static GtkWidget* gtkWidget(const QString &path); static GtkStyle* gtkStyle(const QString &path = QLatin1String("GtkWindow")); - virtual void resolveGtk(); - virtual void initGtkMenu(); - virtual void initGtkTreeview(); - virtual void initGtkWidgets(); + virtual void resolveGtk() const; + virtual void initGtkMenu() const; + virtual void initGtkTreeview() const; + virtual void initGtkWidgets() const; static void cleanupGtkWidgets(); @@ -276,7 +277,7 @@ public: static bool getGConfBool(const QString &key, bool fallback = 0); static QString getGConfString(const QString &key, const QString &fallback = QString()); - virtual QString getThemeName() const; + static QString getThemeName(); virtual int getSpinboxArrowSize() const; static void setupGtkFileChooser(GtkWidget* gtkFileChooser, QWidget *parent, @@ -412,7 +413,7 @@ public: static Ptr_gnome_icon_lookup_sync gnome_icon_lookup_sync; static Ptr_gnome_vfs_init gnome_vfs_init; - virtual QPalette gtkWidgetPalette(const QString >kWidgetName); + virtual QPalette gtkWidgetPalette(const QString >kWidgetName) const; protected: typedef QHash<QString, GtkWidget*> WidgetMap; @@ -434,6 +435,10 @@ protected: static void addWidget(GtkWidget *widget); virtual void init(); + +private: + static QList<QGtkStylePrivate *> instances; + friend class QGtkStyleUpdateScheduler; }; // Helper to ensure that we have polished all our gtk widgets @@ -442,7 +447,7 @@ class QGtkStyleUpdateScheduler : public QObject { Q_OBJECT public slots: - void updateTheme( QGtkStylePrivate* stylePrivate ); + void updateTheme(); }; QT_END_NAMESPACE diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 38c3feb..51c2a96 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2155,9 +2155,9 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW wdi.titleWidth = tb->rect.width(); QCFType<HIShapeRef> region; HIRect hirect = qt_hirectForQRect(tb->rect); - if (hirect.size.width == -1) + if (hirect.size.width <= 0) hirect.size.width = 100; - if (hirect.size.height == -1) + if (hirect.size.height <= 0) hirect.size.height = 30; HIThemeGetWindowShape(&hirect, &wdi, kWindowTitleBarRgn, ®ion); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index d33dc6a..b5c0d4f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -67,6 +67,7 @@ #include "qtoolbar.h" #include "qtoolbutton.h" #include "qfocusframe.h" +#include "qformlayout.h" #include "private/qtoolbarextension_p.h" #include "private/qcombobox_p.h" @@ -473,7 +474,7 @@ void QS60StylePrivate::setBackgroundTexture(QApplication *app) const Q_UNUSED(app) QPalette applicationPalette = QApplication::palette(); applicationPalette.setBrush(QPalette::Window, backgroundTexture()); - setThemePalette(app); + setThemePalette(&applicationPalette); } void QS60StylePrivate::deleteBackground() @@ -668,7 +669,7 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const s60Color(QS60StyleEnums::CL_QsnTextColors, 55, 0)); palette->setColor(QPalette::BrightText, palette->color(QPalette::WindowText).lighter()); palette->setColor(QPalette::HighlightedText, - s60Color(QS60StyleEnums::CL_QsnTextColors, 10, 0)); + s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); palette->setColor(QPalette::Link, s60Color(QS60StyleEnums::CL_QsnHighlightColors, 3, 0)); palette->setColor(QPalette::LinkVisited, palette->color(QPalette::Link).darker()); @@ -783,6 +784,14 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const widgetPalette.setBrush(QPalette::Window, QBrush()); QApplication::setPalette(widgetPalette, "QScrollArea"); widgetPalette = *palette; + + //Webpages should not use S60 theme colors as they are designed to work + //with themeBackground and do not generally mesh well with web page backgrounds. + QPalette webPalette = *palette; + webPalette.setColor(QPalette::WindowText, Qt::black); + webPalette.setColor(QPalette::Text, Qt::black); + QApplication::setPalette(webPalette, "QWebView"); + QApplication::setPalette(webPalette, "QGraphicsWebView"); } QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlags flags) @@ -799,6 +808,9 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag case QS60StyleEnums::SP_QgnGrafTabPassiveR: case QS60StyleEnums::SP_QgnGrafTabPassiveL: case QS60StyleEnums::SP_QgnGrafTabActiveL: + //Returned QSize for tabs must not be square, but narrow rectangle with width:height + //ratio of 1:2 for horizontal tab bars (and 2:1 for vertical ones). + result.setWidth(10); break; case QS60StyleEnums::SP_QgnIndiSliderEdit: result.scale(pixelMetric(QStyle::PM_SliderLength), @@ -809,7 +821,7 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag case QS60StyleEnums::SP_QgnGrafBarFrameSideR: result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth)); break; - + case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed: case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed: case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed: @@ -856,6 +868,13 @@ QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlag return result; } +bool QS60StylePrivate::canDrawThemeBackground(const QBrush &backgroundBrush) +{ + //If brush is not changed from style's default values, draw theme graphics. + return (backgroundBrush.color() == Qt::transparent || + backgroundBrush.style() == Qt::NoBrush) ? true : false; +} + /*! \class QS60Style \brief The QS60Style class provides a look and feel suitable for applications on S60. @@ -1369,8 +1388,10 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, highlightRect = option->rect.adjusted(xBeginning, yBeginning, xEnd, yEnd); } if (vopt->showDecorationSelected && - (vopt->palette.highlight().color() == d->themePalette()->highlight().color())) + (vopt->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color())) QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags); + else + painter->fillRect(highlightRect, vopt->palette.highlight()); } // draw the icon @@ -1842,7 +1863,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, case CE_ShapedFrame: if (const QTextEdit *textEdit = qobject_cast<const QTextEdit *>(widget)) { const QStyleOptionFrame *frame = qstyleoption_cast<const QStyleOptionFrame *>(option); - if (frame->palette.base().color()==Qt::transparent) + if (QS60StylePrivate::canDrawThemeBackground(frame->palette.base())) QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_Editor, painter, option->rect, flags); else QCommonStyle::drawControl(element, option, painter, widget); @@ -1916,7 +1937,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, if (option->state & State_Sunken && option->state & State_Enabled) { painter->save(); painter->setOpacity(0.5); - painter->setBrush(d->themePalette()->light()); + painter->setBrush(QS60StylePrivate::themePalette()->light()); painter->setRenderHint(QPainter::Antialiasing); const qreal roundRectRadius = 4 * goldenRatio; painter->drawRoundedRect(option->rect, roundRectRadius, roundRectRadius); @@ -1935,6 +1956,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti { Q_D(const QS60Style); const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled; + bool commonStyleDraws = false; + switch (element) { #ifndef QT_NO_LINEEDIT case PE_PanelLineEdit: @@ -1943,12 +1966,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti if (widget && qobject_cast<const QComboBox *>(widget->parentWidget())) break; #endif - QBrush editBrush = option->palette.brush(QPalette::Base); - if (editBrush.color() == Qt::transparent) - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit, - painter, option->rect, flags); + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_FrameLineEdit, painter, option->rect, flags); else - QCommonStyle::drawPrimitive(element, option, painter, widget); + commonStyleDraws = true; } break; #endif // QT_NO_LINEEDIT @@ -1958,10 +1979,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti const QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ? QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff; painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnIconColors, 13, option); - QColor buttonTextColor = option->palette.buttonText().color(); - if (themeColor != buttonTextColor) - painter->setPen(buttonTextColor); + + QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); + QColor windowTextColor = option->palette.windowText().color(); + + if (themeColor != windowTextColor) + painter->setPen(windowTextColor); + QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags | QS60StylePrivate::SF_ColorSkinned ); painter->restore(); } @@ -2004,10 +2028,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti buttonRect.adjust(0,-newY,0,-newY); painter->save(); - QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnIconColors, 13, option); + QColor themeColor = d->s60Color(QS60StyleEnums::CL_QsnTextColors, 6, option); QColor buttonTextColor = option->palette.buttonText().color(); if (themeColor != buttonTextColor) painter->setPen(buttonTextColor); + else + painter->setPen(themeColor); // Draw radiobutton indicator as color skinned graphics. QS60StyleEnums::SkinParts skinPart = (option->state & QStyle::State_On) ? @@ -2021,14 +2047,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_PanelButtonTool: case PE_PanelButtonBevel: case PE_FrameButtonBevel: { - QBrush editBrush = option->palette.brush(QPalette::Base); - if (editBrush.color() == Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) { const bool isPressed = option->state & QStyle::State_Sunken; const QS60StylePrivate::SkinElements skinElement = isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal; QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags); } else { - QCommonStyle::drawPrimitive(element, option, painter, widget); + commonStyleDraws = true; } } break; @@ -2056,7 +2081,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_IndicatorSpinUp: if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) { QStyleOptionSpinBox optionSpinBox = *spinBox; - if (optionSpinBox.palette.base().color()==Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground(optionSpinBox.palette.base())) { const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ? QS60StyleEnums::SP_QgnGrafScrollArrowUp : QS60StyleEnums::SP_QgnGrafScrollArrowDown; @@ -2064,12 +2089,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment ); QS60StylePrivate::drawSkinPart(part, painter, optionSpinBox.rect,flags); } else { - QCommonStyle::drawPrimitive(element, &optionSpinBox, painter, widget); + commonStyleDraws = true; } } #ifndef QT_NO_COMBOBOX else if (const QStyleOptionFrame *cmb = qstyleoption_cast<const QStyleOptionFrame *>(option)) { - if (cmb->palette.base().color()==Qt::transparent) { + if (QS60StylePrivate::canDrawThemeBackground( option->palette.base())) { // We want to draw down arrow here for comboboxes as well. const QS60StyleEnums::SkinParts part = QS60StyleEnums::SP_QgnGrafScrollArrowDown; QStyleOptionFrame comboBox = *cmb; @@ -2077,7 +2102,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment ); QS60StylePrivate::drawSkinPart(part, painter, comboBox.rect,flags); } else { - QCommonStyle::drawPrimitive(element, cmb, painter, widget); + commonStyleDraws = true; } } #endif //QT_NO_COMBOBOX @@ -2108,12 +2133,10 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti || qobject_cast<const QMenu *> (widget) #endif //QT_NO_MENU ) { - if (option->palette.base().color()==Qt::transparent) { - QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_OptionsMenu; - QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags); - } else { - QCommonStyle::drawPrimitive(element, option, painter, widget); - } + if (QS60StylePrivate::canDrawThemeBackground(option->palette.base())) + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_OptionsMenu, painter, option->rect, flags); + else + commonStyleDraws = true; } break; case PE_FrameWindow: @@ -2245,6 +2268,9 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti #endif //QT_NO_COLUMNVIEW case PE_FrameTabBarBase: // since tabs are in S60 always in navipane, let's use common style for tab base in Qt. default: + commonStyleDraws = true; + } + if (commonStyleDraws) { QCommonStyle::drawPrimitive(element, option, painter, widget); } } @@ -2376,6 +2402,9 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w case SH_RequestSoftwareInputPanel: retValue = RSIP_OnMouseClickAndAlreadyFocused; break; + case SH_FormLayoutWrapPolicy: + retValue = QFormLayout::WrapLongRows; + break; default: break; } diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index cfe87ac..ea86bb2 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -453,6 +453,10 @@ public: static QSize naviPaneSize(); + //Checks that the current brush is transparent or has BrushStyle NoBrush, + //so that theme graphic background can be drawn. + static bool canDrawThemeBackground(const QBrush &backgroundBrush); + private: static void drawPart(QS60StyleEnums::SkinParts part, QPainter *painter, const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags); diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp index d73a563..9188ee0 100644 --- a/src/gui/styles/qstyleoption.cpp +++ b/src/gui/styles/qstyleoption.cpp @@ -4713,10 +4713,17 @@ QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(int version) } +/*! \fn QStyleOptionTabWidgetFrameV2::QStyleOptionTabWidgetFrameV2(const QStyleOptionTabWidgetFrameV2 &other) + Constructs a QStyleOptionTabWidgetFrameV2 copy of the \a other style option. + + If the \a other style option's version is 1, the new style option's \l + selectedTabRect and tabBarRect will contain null rects + + \sa version +*/ + /*! - Constructs a QStyleOptionTabWidgetFrameV2 copy of the \a other style option - which can be either of the QStyleOptionTabWidgetFrameV2 or - QStyleOptionTabWidgetFrame types. + Constructs a QStyleOptionTabWidgetFrameV2 copy of the \a other style option. If the \a other style option's version is 1, the new style option's \l selectedTabRect and tabBarRect will contain null rects diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 59210c3..8b40931 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -4637,6 +4637,7 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const } break; +#ifndef QT_NO_TABWIDGET case PM_TabBarTabHSpace: case PM_TabBarTabVSpace: subRule = renderRule(w, opt, PseudoElement_TabBarTab); @@ -4660,11 +4661,14 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const return 0; break; - case PM_TabBarBaseOverlap: - if (hasStyleRule(w->parentWidget(), PseudoElement_TabWidgetPane)) { + case PM_TabBarBaseOverlap: { + const QWidget *tabWidget = qobject_cast<const QTabWidget *>(w) ? w : w->parentWidget(); + if (hasStyleRule(tabWidget, PseudoElement_TabWidgetPane)) { return 0; } break; + } +#endif // QT_NO_TABWIDGET case PM_SliderThickness: // horizontal slider's height (sizeHint) case PM_SliderLength: // minimum length of slider diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index f894b82..30f2f35 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -2989,7 +2989,6 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp #ifndef QT_NO_COMBOBOX case CC_ComboBox: if (const QStyleOptionComboBox *cmb = qstyleoption_cast<const QStyleOptionComboBox *>(opt)) { - p->save(); QBrush editBrush = cmb->palette.brush(QPalette::Base); if ((cmb->subControls & SC_ComboBoxFrame)) { if (cmb->frame) { @@ -3059,7 +3058,6 @@ void QWindowsStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComp proxy()->drawPrimitive(PE_FrameFocusRect, &focus, p, widget); } } - p->restore(); } break; #endif // QT_NO_COMBOBOX diff --git a/src/gui/text/qabstracttextdocumentlayout.h b/src/gui/text/qabstracttextdocumentlayout.h index 2f8a746..438b291 100644 --- a/src/gui/text/qabstracttextdocumentlayout.h +++ b/src/gui/text/qabstracttextdocumentlayout.h @@ -122,6 +122,7 @@ protected: QTextCharFormat format(int pos); private: + friend class QTextControl; friend class QTextDocument; friend class QTextDocumentPrivate; friend class QTextEngine; diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 4041717..293eac7 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -755,9 +755,8 @@ QFontEngineFT::Glyph *QFontEngineFT::loadGlyphMetrics(QGlyphSet *set, uint glyph load_flags = FT_LOAD_NO_BITMAP; // apply our matrix to this, but note that the metrics will not be affected by this. - FT_Matrix matrix = freetype->matrix; FT_Face face = lockFace(); - matrix = this->matrix; + FT_Matrix matrix = this->matrix; FT_Matrix_Multiply(&set->transformationMatrix, &matrix); FT_Set_Transform(face, &matrix, 0); freetype->matrix = matrix; diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 6c367ab..18851b7 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -485,61 +485,78 @@ glyph_metrics_t QFontEngineWin::boundingBox(const QGlyphLayout &glyphs) return glyph_metrics_t(0, -tm.tmAscent, w, tm.tmHeight, w, 0); } +bool QFontEngineWin::getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const +{ + Q_ASSERT(metrics != 0); + + HDC hdc = shared_dc(); + + GLYPHMETRICS gm; + DWORD res = 0; + MAT2 mat; + mat.eM11.value = mat.eM22.value = 1; + mat.eM11.fract = mat.eM22.fract = 0; + mat.eM21.value = mat.eM12.value = 0; + mat.eM21.fract = mat.eM12.fract = 0; + + if (t.type() > QTransform::TxTranslate) { + // We need to set the transform using the HDC's world + // matrix rather than using the MAT2 above, because the + // results provided when transforming via MAT2 does not + // match the glyphs that are drawn using a WorldTransform + XFORM xform; + xform.eM11 = t.m11(); + xform.eM12 = t.m12(); + xform.eM21 = t.m21(); + xform.eM22 = t.m22(); + xform.eDx = 0; + xform.eDy = 0; + SetGraphicsMode(hdc, GM_ADVANCED); + SetWorldTransform(hdc, &xform); + } + + uint format = GGO_METRICS; + if (ttf) + format |= GGO_GLYPH_INDEX; + res = GetGlyphOutline(hdc, glyph, format, &gm, 0, 0, &mat); + + if (t.type() > QTransform::TxTranslate) { + XFORM xform; + xform.eM11 = xform.eM22 = 1; + xform.eM12 = xform.eM21 = xform.eDx = xform.eDy = 0; + SetWorldTransform(hdc, &xform); + SetGraphicsMode(hdc, GM_COMPATIBLE); + } + + if (res != GDI_ERROR) { + *metrics = glyph_metrics_t(gm.gmptGlyphOrigin.x, -gm.gmptGlyphOrigin.y, + (int)gm.gmBlackBoxX, (int)gm.gmBlackBoxY, gm.gmCellIncX, gm.gmCellIncY); + return true; + } else { + return false; + } +} glyph_metrics_t QFontEngineWin::boundingBox(glyph_t glyph, const QTransform &t) { #ifndef Q_WS_WINCE - GLYPHMETRICS gm; - HDC hdc = shared_dc(); SelectObject(hdc, hfont); - if (!ttf) { + + glyph_metrics_t glyphMetrics; + bool success = getOutlineMetrics(glyph, t, &glyphMetrics); + + if (!ttf && !success) { + // Bitmap fonts wchar_t ch = glyph; ABCFLOAT abc; GetCharABCWidthsFloat(hdc, ch, ch, &abc); int width = qRound(abc.abcfB); - return glyph_metrics_t(0, -tm.tmAscent, width, tm.tmHeight, width, 0).transformed(t); - } else { - DWORD res = 0; - MAT2 mat; - mat.eM11.value = mat.eM22.value = 1; - mat.eM11.fract = mat.eM22.fract = 0; - mat.eM21.value = mat.eM12.value = 0; - mat.eM21.fract = mat.eM12.fract = 0; - - if (t.type() > QTransform::TxTranslate) { - // We need to set the transform using the HDC's world - // matrix rather than using the MAT2 above, because the - // results provided when transforming via MAT2 does not - // match the glyphs that are drawn using a WorldTransform - XFORM xform; - xform.eM11 = t.m11(); - xform.eM12 = t.m12(); - xform.eM21 = t.m21(); - xform.eM22 = t.m22(); - xform.eDx = 0; - xform.eDy = 0; - SetGraphicsMode(hdc, GM_ADVANCED); - SetWorldTransform(hdc, &xform); - } - - res = GetGlyphOutline(hdc, glyph, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, 0, &mat); - - if (t.type() > QTransform::TxTranslate) { - XFORM xform; - xform.eM11 = xform.eM22 = 1; - xform.eM12 = xform.eM21 = xform.eDx = xform.eDy = 0; - SetWorldTransform(hdc, &xform); - SetGraphicsMode(hdc, GM_COMPATIBLE); - } - - if (res != GDI_ERROR) { - return glyph_metrics_t(gm.gmptGlyphOrigin.x, -gm.gmptGlyphOrigin.y, - (int)gm.gmBlackBoxX, (int)gm.gmBlackBoxY, gm.gmCellIncX, gm.gmCellIncY); - } + return glyph_metrics_t(QFixed::fromReal(abc.abcfA), -tm.tmAscent, width, tm.tmHeight, width, 0).transformed(t); } - return glyph_metrics_t(); + + return glyphMetrics; #else HDC hdc = shared_dc(); HGDIOBJ oldFont = SelectObject(hdc, hfont); @@ -1135,7 +1152,7 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin { ExtTextOut(hdc, -gx + margin, -gy + margin, options, 0, (LPCWSTR) &glyph, 1, 0); } - + SelectObject(hdc, old_font); return ni; } diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h index 9c4b0a9..43e1f12 100644 --- a/src/gui/text/qfontengine_win_p.h +++ b/src/gui/text/qfontengine_win_p.h @@ -109,6 +109,8 @@ public: int getGlyphIndexes(const QChar *ch, int numChars, QGlyphLayout *glyphs, bool mirrored) const; void getCMap(); + bool getOutlineMetrics(glyph_t glyph, const QTransform &t, glyph_metrics_t *metrics) const; + QString _name; HFONT hfont; LOGFONT logfont; diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index b8c1b33..3d3f1e1 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -1367,10 +1367,13 @@ qreal QFontMetricsF::rightBearing(QChar ch) const */ qreal QFontMetricsF::width(const QString &text) const { + int pos = text.indexOf(QLatin1Char('\x9c')); + int len = (pos != -1) ? pos : text.length(); + QTextEngine layout(text, d.data()); layout.ignoreBidi = true; layout.itemize(); - return layout.width(0, text.length()).toReal(); + return layout.width(0, len).toReal(); } /*! @@ -1587,7 +1590,7 @@ QRectF QFontMetricsF::boundingRect(const QRectF &rect, int flags, const QString& */ QSizeF QFontMetricsF::size(int flags, const QString &text, int tabStops, int *tabArray) const { - return boundingRect(QRectF(), flags, text, tabStops, tabArray).size(); + return boundingRect(QRectF(), flags | Qt::TextLongestVariant, text, tabStops, tabArray).size(); } /*! @@ -1642,7 +1645,20 @@ QRectF QFontMetricsF::tightBoundingRect(const QString &text) const */ QString QFontMetricsF::elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags) const { - QStackTextEngine engine(text, QFont(d.data())); + QString _text = text; + if (!(flags & Qt::TextLongestVariant)) { + int posA = 0; + int posB = _text.indexOf(QLatin1Char('\x9c')); + while (posB >= 0) { + QString portion = _text.mid(posA, posB - posA); + if (size(flags, portion).width() <= width) + return portion; + posA = posB + 1; + posB = _text.indexOf(QLatin1Char('\x9c'), posA); + } + _text = _text.mid(posA); + } + QStackTextEngine engine(_text, QFont(d.data())); return engine.elidedText(mode, QFixed::fromReal(width), flags); } diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 2bfe33c..f96f66b 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -55,6 +55,7 @@ #include <qstyle.h> #include <qtimer.h> #include "private/qtextdocumentlayout_p.h" +#include "private/qabstracttextdocumentlayout_p.h" #include "private/qtextedit_p.h" #include "qtextdocument.h" #include "private/qtextdocument_p.h" @@ -126,6 +127,7 @@ QTextControlPrivate::QTextControlPrivate() #endif isEnabled(true), hadSelectionOnMousePress(false), + ignoreUnusedNavigationEvents(false), openExternalLinks(false) {} @@ -264,19 +266,25 @@ bool QTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e) cursor.setVisualNavigation(visualNavigation); q->ensureCursorVisible(); + bool ignoreNavigationEvents = ignoreUnusedNavigationEvents; + bool isNavigationEvent = e->key() == Qt::Key_Up || e->key() == Qt::Key_Down; + +#ifdef QT_KEYPAD_NAVIGATION + ignoreNavigationEvents = ignoreNavigationEvents || QApplication::keypadNavigationEnabled(); + isNavigationEvent = isNavigationEvent || + (QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional + && (e->key() == Qt::Key_Left || e->key() == Qt::Key_Right)); +#else + isNavigationEvent = isNavigationEvent || e->key() == Qt::Key_Left || e->key() == Qt::Key_Right; +#endif + if (moved) { if (cursor.position() != oldCursorPos) emit q->cursorPositionChanged(); emit q->microFocusChanged(); - } -#ifdef QT_KEYPAD_NAVIGATION - else if (QApplication::keypadNavigationEnabled() - && ((e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) - || QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional - && (e->key() == Qt::Key_Left || e->key() == Qt::Key_Right))) { + } else if (ignoreNavigationEvents && isNavigationEvent) { return false; } -#endif selectionChanged(/*forceEmitSelectionChanged =*/(mode == QTextCursor::KeepAnchor)); @@ -1841,8 +1849,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) || e->preeditString() != cursor.block().layout()->preeditAreaText() || e->replacementLength() > 0; + cursor.beginEditBlock(); if (isGettingInput) { - cursor.beginEditBlock(); cursor.removeSelectedText(); } @@ -1868,7 +1876,8 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) QTextBlock block = cursor.block(); QTextLayout *layout = block.layout(); - layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); + if (isGettingInput) + layout->setPreeditArea(cursor.position() - block.position(), e->preeditString()); QList<QTextLayout::FormatRange> overrides; preeditCursor = e->preeditString().length(); hideCursor = false; @@ -1889,9 +1898,7 @@ void QTextControlPrivate::inputMethodEvent(QInputMethodEvent *e) } } layout->setAdditionalFormats(overrides); - - if (isGettingInput) - cursor.endEditBlock(); + cursor.endEditBlock(); } QVariant QTextControl::inputMethodQuery(Qt::InputMethodQuery property) const @@ -2263,6 +2270,18 @@ bool QTextControl::openExternalLinks() const return d->openExternalLinks; } +bool QTextControl::ignoreUnusedNavigationEvents() const +{ + Q_D(const QTextControl); + return d->ignoreUnusedNavigationEvents; +} + +void QTextControl::setIgnoreUnusedNavigationEvents(bool ignore) +{ + Q_D(QTextControl); + d->ignoreUnusedNavigationEvents = ignore; +} + void QTextControl::moveCursor(QTextCursor::MoveOperation op, QTextCursor::MoveMode mode) { Q_D(QTextControl); @@ -2319,6 +2338,9 @@ void QTextControl::print(QPrinter *printer) const tempDoc->setUseDesignMetrics(doc->useDesignMetrics()); QTextCursor(tempDoc).insertFragment(d->cursor.selection()); doc = tempDoc; + + // copy the custom object handlers + doc->documentLayout()->d_func()->handlers = d->doc->documentLayout()->d_func()->handlers; } doc->print(printer); delete tempDoc; diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h index 263af31..bc8e063 100644 --- a/src/gui/text/qtextcontrol_p.h +++ b/src/gui/text/qtextcontrol_p.h @@ -95,6 +95,7 @@ class Q_GUI_EXPORT QTextControl : public QObject Q_PROPERTY(int cursorWidth READ cursorWidth WRITE setCursorWidth) Q_PROPERTY(Qt::TextInteractionFlags textInteractionFlags READ textInteractionFlags WRITE setTextInteractionFlags) Q_PROPERTY(bool openExternalLinks READ openExternalLinks WRITE setOpenExternalLinks) + Q_PROPERTY(bool ignoreUnusedNavigationEvents READ ignoreUnusedNavigationEvents WRITE setIgnoreUnusedNavigationEvents) public: explicit QTextControl(QObject *parent = 0); explicit QTextControl(const QString &text, QObject *parent = 0); @@ -163,6 +164,9 @@ public: void setOpenExternalLinks(bool open); bool openExternalLinks() const; + void setIgnoreUnusedNavigationEvents(bool ignore); + bool ignoreUnusedNavigationEvents() const; + void moveCursor(QTextCursor::MoveOperation op, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor); bool canPaste() const; diff --git a/src/gui/text/qtextcontrol_p_p.h b/src/gui/text/qtextcontrol_p_p.h index 66459f6..c230512 100644 --- a/src/gui/text/qtextcontrol_p_p.h +++ b/src/gui/text/qtextcontrol_p_p.h @@ -206,6 +206,7 @@ public: QString anchorOnMousePress; bool hadSelectionOnMousePress; + bool ignoreUnusedNavigationEvents; bool openExternalLinks; QString linkToCopy; diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 1aad385..523dd18 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -64,6 +64,7 @@ #include "qtextdocument_p.h" #include <private/qprinter_p.h> +#include <private/qabstracttextdocumentlayout_p.h> #include <limits.h> @@ -1722,6 +1723,9 @@ void QTextDocument::print(QPrinter *printer) const QAbstractTextDocumentLayout *layout = doc->documentLayout(); layout->setPaintDevice(p.device()); + // copy the custom object handlers + layout->d_func()->handlers = documentLayout()->d_func()->handlers; + int dpiy = p.device()->logicalDpiY(); int margin = 0; if (printer->fullPage() && !printer->d_func()->hasCustomPageMargins) { @@ -1763,6 +1767,12 @@ void QTextDocument::print(QPrinter *printer) const fromPage = qMax(1, fromPage); toPage = qMin(doc->pageCount(), toPage); + if (toPage < fromPage) { + // if the user entered a page range outside the actual number + // of printable pages, just return + return; + } + if (printer->pageOrder() == QPrinter::LastPageFirst) { int tmp = fromPage; fromPage = toPage; diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 2ad6512..18e1ffc 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -1114,9 +1114,11 @@ void QTextDocumentPrivate::endEditBlock() return; if (undoEnabled && undoState > 0) { + const bool wasBlocking = !undoStack[undoState - 1].block_end; if (undoStack[undoState - 1].block_part) { undoStack[undoState - 1].block_end = true; - emit document()->undoCommandAdded(); + if (wasBlocking) + emit document()->undoCommandAdded(); } } diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 73434b1..2604879 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -1448,13 +1448,13 @@ void QTextDocumentLayoutPrivate::drawListItem(const QPointF &offset, QPainter *p painter->fillRect(r, brush); break; case QTextListFormat::ListCircle: - painter->drawEllipse(r); + painter->setPen(QPen(brush, 0)); + painter->drawEllipse(r.translated(0.5, 0.5)); // pixel align for sharper rendering break; case QTextListFormat::ListDisc: painter->setBrush(brush); painter->setPen(Qt::NoPen); painter->drawEllipse(r); - painter->setBrush(Qt::NoBrush); break; case QTextListFormat::ListStyleUndefined: break; diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index d05d9e5..deda39f 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -265,21 +265,55 @@ private: friend QDataStream &operator>>(QDataStream &, QTextFormat &); }; -static uint variantHash(const QVariant &variant) +// this is only safe if sizeof(int) == sizeof(float) +static inline uint hash(float d) { - switch (variant.userType()) { - case QVariant::Invalid: return 0; - case QVariant::Bool: return variant.toBool(); - case QVariant::Int: return variant.toInt(); - case QMetaType::Float: return static_cast<int>(variant.toFloat()); - case QVariant::Double: return static_cast<int>(variant.toDouble()); + return reinterpret_cast<uint&>(d); +} + +static inline uint hash(const QColor &color) +{ + return (color.isValid()) ? color.rgba() : 0x234109; +} + +static inline uint hash(const QPen &pen) +{ + return hash(pen.color()) + hash(pen.widthF()); +} + +static inline uint hash(const QBrush &brush) +{ + return hash(brush.color()) + (brush.style() << 3); +} + +static inline uint variantHash(const QVariant &variant) +{ + // simple and fast hash functions to differentiate between type and value + switch (variant.userType()) { // sorted by occurrence frequency case QVariant::String: return qHash(variant.toString()); - case QVariant::Color: return qHash(qvariant_cast<QColor>(variant).rgb()); + case QVariant::Double: return hash(variant.toDouble()); + case QVariant::Int: return 0x811890 + variant.toInt(); + case QVariant::Brush: + return 0x01010101 + hash(qvariant_cast<QBrush>(variant)); + case QVariant::Bool: return 0x371818 + variant.toBool(); + case QVariant::Pen: return 0x02020202 + hash(qvariant_cast<QPen>(variant)); + case QVariant::List: + return 0x8377 + qvariant_cast<QVariantList>(variant).count(); + case QVariant::Color: return hash(qvariant_cast<QColor>(variant)); + case QVariant::TextLength: + return 0x377 + hash(qvariant_cast<QTextLength>(variant).rawValue()); + case QMetaType::Float: return hash(variant.toFloat()); + case QVariant::Invalid: return 0; default: break; } return qHash(variant.typeName()); } +static inline int getHash(const QTextFormatPrivate *d, int format) +{ + return (d ? d->hash() : 0) + format; +} + uint QTextFormatPrivate::recalcHash() const { hashValue = 0; @@ -3033,13 +3067,15 @@ QTextFormatCollection::~QTextFormatCollection() int QTextFormatCollection::indexForFormat(const QTextFormat &format) { - uint hash = format.d ? format.d->hash() : 0; - if (hashes.contains(hash)) { - for (int i = 0; i < formats.size(); ++i) { - if (formats.at(i) == format) - return i; + uint hash = getHash(format.d, format.format_type); + QMultiHash<uint, int>::const_iterator i = hashes.find(hash); + while (i != hashes.end() && i.key() == hash) { + if (formats.value(i.value()) == format) { + return i.value(); } + ++i; } + int idx = formats.size(); formats.append(format); @@ -3049,7 +3085,7 @@ int QTextFormatCollection::indexForFormat(const QTextFormat &format) f.d = new QTextFormatPrivate; f.d->resolveFont(defaultFnt); - hashes.insert(hash); + hashes.insert(hash, idx); } QT_CATCH(...) { formats.pop_back(); @@ -3060,11 +3096,13 @@ int QTextFormatCollection::indexForFormat(const QTextFormat &format) bool QTextFormatCollection::hasFormatCached(const QTextFormat &format) const { - uint hash = format.d ? format.d->hash() : 0; - if (hashes.contains(hash)) { - for (int i = 0; i < formats.size(); ++i) - if (formats.at(i) == format) - return true; + uint hash = getHash(format.d, format.format_type); + QMultiHash<uint, int>::const_iterator i = hashes.find(hash); + while (i != hashes.end() && i.key() == hash) { + if (formats.value(i.value()) == format) { + return true; + } + ++i; } return false; } diff --git a/src/gui/text/qtextformat_p.h b/src/gui/text/qtextformat_p.h index c796343..73ca0ce 100644 --- a/src/gui/text/qtextformat_p.h +++ b/src/gui/text/qtextformat_p.h @@ -55,7 +55,7 @@ #include "QtGui/qtextformat.h" #include "QtCore/qvector.h" -#include "QtCore/qset.h" +#include "QtCore/qhash.h" QT_BEGIN_NAMESPACE @@ -97,7 +97,7 @@ public: FormatVector formats; QVector<qint32> objFormats; - QSet<uint> hashes; + QMultiHash<uint,int> hashes; inline QFont defaultFont() const { return defaultFnt; } void setDefaultFont(const QFont &f); diff --git a/src/gui/widgets/qabstractbutton.cpp b/src/gui/widgets/qabstractbutton.cpp index cb46791..8834373 100644 --- a/src/gui/widgets/qabstractbutton.cpp +++ b/src/gui/widgets/qabstractbutton.cpp @@ -165,7 +165,7 @@ QAbstractButtonPrivate::QAbstractButtonPrivate(QSizePolicy::ControlType type) shortcutId(0), #endif checkable(false), checked(false), autoRepeat(false), autoExclusive(false), - down(false), blockRefresh(false), + down(false), blockRefresh(false), pressed(false), #ifndef QT_NO_BUTTONGROUP group(0), #endif @@ -1090,6 +1090,7 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) } if (hitButton(e->pos())) { setDown(true); + d->pressed = true; repaint(); //flush paint event before invoking potentially expensive operation QApplication::flush(); d->emitPressed(); @@ -1103,6 +1104,8 @@ void QAbstractButton::mousePressEvent(QMouseEvent *e) void QAbstractButton::mouseReleaseEvent(QMouseEvent *e) { Q_D(QAbstractButton); + d->pressed = false; + if (e->button() != Qt::LeftButton) { e->ignore(); return; @@ -1127,7 +1130,7 @@ void QAbstractButton::mouseReleaseEvent(QMouseEvent *e) void QAbstractButton::mouseMoveEvent(QMouseEvent *e) { Q_D(QAbstractButton); - if (!(e->buttons() & Qt::LeftButton)) { + if (!(e->buttons() & Qt::LeftButton) || !d->pressed) { e->ignore(); return; } diff --git a/src/gui/widgets/qabstractbutton_p.h b/src/gui/widgets/qabstractbutton_p.h index be7c022..d86163b 100644 --- a/src/gui/widgets/qabstractbutton_p.h +++ b/src/gui/widgets/qabstractbutton_p.h @@ -77,6 +77,7 @@ public: uint autoExclusive :1; uint down :1; uint blockRefresh :1; + uint pressed : 1; #ifndef QT_NO_BUTTONGROUP QButtonGroup* group; diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index e0db9c2..988a7e7 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -219,6 +219,10 @@ QAbstractSliderPrivate::QAbstractSliderPrivate() blocktracking(false), pressed(false), invertedAppearance(false), invertedControls(false), orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction) +#ifdef QT_KEYPAD_NAVIGATION + , isAutoRepeating(false) + , repeatMultiplier(1) +#endif { } @@ -371,6 +375,9 @@ int QAbstractSlider::maximum() const abstract sliders provides and typically corresponds to the user pressing an arrow key. + If the property is modified during an auto repeating key event, behavior + is undefined. + \sa pageStep */ @@ -598,10 +605,10 @@ void QAbstractSlider::triggerAction(SliderAction action) d->blocktracking = true; switch (action) { case SliderSingleStepAdd: - setSliderPosition(d->overflowSafeAdd(d->singleStep)); + setSliderPosition(d->overflowSafeAdd(d->effectiveSingleStep())); break; case SliderSingleStepSub: - setSliderPosition(d->overflowSafeAdd(-d->singleStep)); + setSliderPosition(d->overflowSafeAdd(-d->effectiveSingleStep())); break; case SliderPageStepAdd: setSliderPosition(d->overflowSafeAdd(d->pageStep)); @@ -702,7 +709,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) // Calculate how many lines to scroll. Depending on what delta is (and // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. - qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->singleStep; + qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->effectiveSingleStep(); // Check if wheel changed direction since last event: if (d->offset_accumulated != 0 && (offset / d->offset_accumulated) < 0) d->offset_accumulated = 0; @@ -773,6 +780,38 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) { Q_D(QAbstractSlider); SliderAction action = SliderNoAction; +#ifdef QT_KEYPAD_NAVIGATION + if (ev->isAutoRepeat()) { + if (d->firstRepeat.isNull()) + d->firstRepeat = QTime::currentTime(); + else if (1 == d->repeatMultiplier) { + // This is the interval in milli seconds which one key repetition + // takes. + const int repeatMSecs = d->firstRepeat.msecsTo(QTime::currentTime()); + + /** + * The time it takes to currently navigate the whole slider. + */ + const qreal currentTimeElapse = (qreal(maximum()) / singleStep()) * repeatMSecs; + + /** + * This is an arbitrarily determined constant in msecs that + * specifies how long time it should take to navigate from the + * start to the end(excluding starting key auto repeat). + */ + const int SliderRepeatElapse = 2500; + + d->repeatMultiplier = currentTimeElapse / SliderRepeatElapse; + } + + } + else if (!d->firstRepeat.isNull()) { + d->firstRepeat = QTime(); + d->repeatMultiplier = 1; + } + +#endif + switch (ev->key()) { #ifdef QT_KEYPAD_NAVIGATION case Qt::Key_Select: diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 9324d44..6591981 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -68,7 +68,13 @@ public: void setSteps(int single, int page); - int minimum, maximum, singleStep, pageStep, value, position, pressValue; + int minimum, maximum, pageStep, value, position, pressValue; + + /** + * Call effectiveSingleStep() when changing the slider value. + */ + int singleStep; + float offset_accumulated; uint tracking : 1; uint blocktracking :1; @@ -83,8 +89,33 @@ public: #ifdef QT_KEYPAD_NAVIGATION int origValue; + + /** + */ + bool isAutoRepeating; + + /** + * When we're auto repeating, we multiply singleStep with this value to + * get our effective step. + */ + qreal repeatMultiplier; + + /** + * The time of when the first auto repeating key press event occurs. + */ + QTime firstRepeat; + #endif + inline int effectiveSingleStep() const + { + return singleStep +#ifdef QT_KEYPAD_NAVIGATION + * repeatMultiplier +#endif + ; + } + inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } inline int overflowSafeAdd(int add) const { diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp index 08ed7f6..ee536ee 100644 --- a/src/gui/widgets/qcalendarwidget.cpp +++ b/src/gui/widgets/qcalendarwidget.cpp @@ -2297,7 +2297,21 @@ int QCalendarWidget::monthShown() const void QCalendarWidget::setCurrentPage(int year, int month) { Q_D(QCalendarWidget); + QDate currentDate = d->getCurrentDate(); + int day = currentDate.day(); + int daysInMonths = QDate(year, month, 1).daysInMonth(); + if (day > daysInMonths) + day = daysInMonths; + d->showMonth(year, month); + + QDate newDate(year, month, day); + int row = -1, col = -1; + d->m_model->cellForDate(newDate, &row, &col); + if (row != -1 && col != -1) { + d->m_view->selectionModel()->setCurrentIndex(d->m_model->index(row, col), + QItemSelectionModel::NoUpdate); + } } /*! diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index 9adf280..8f47f25 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -326,7 +326,8 @@ int QCommandLinkButton::heightForWidth(int width) const Q_D(const QCommandLinkButton); int heightWithoutDescription = d->descriptionOffset() + d->bottomMargin(); // find the width available for the description area - return heightWithoutDescription + d->descriptionHeight(width); + return qMax(heightWithoutDescription + d->descriptionHeight(width), + iconSize().height() + d->topMargin() + d->bottomMargin()); } /*! \reimp */ diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 2231b98..0e859f1 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -315,9 +315,9 @@ void QDialogButtonBoxPrivate::initLayout() buttonLayout = new QVBoxLayout(q); } - int left, top, right, bottom; + int left, top, right, bottom; setLayoutItemMargins(QStyle::SE_PushButtonLayoutItem); - getLayoutItemMargins(&left, &top, &right, &bottom); + getLayoutItemMargins(&left, &top, &right, &bottom); buttonLayout->setContentsMargins(-left, -top, -right, -bottom); if (!q->testAttribute(Qt::WA_WState_OwnSizePolicy)) { @@ -356,7 +356,7 @@ void QDialogButtonBoxPrivate::addButtonsToLayout(const QList<QAbstractButton *> void QDialogButtonBoxPrivate::layoutButtons() { Q_Q(QDialogButtonBox); - const int MacGap = 36 - 8; // 8 is the default gap between a widget and a spacer item + const int MacGap = 36 - 8; // 8 is the default gap between a widget and a spacer item for (int i = buttonLayout->count() - 1; i >= 0; --i) { QLayoutItem *item = buttonLayout->takeAt(i); @@ -581,6 +581,22 @@ QAction* QDialogButtonBoxPrivate::createSoftKey(QAbstractButton *button, QDialog } QObject::connect(action, SIGNAL(triggered()), button, SIGNAL(clicked())); action->setSoftKeyRole(softkeyRole); + + + QWidget *dialog = 0; + QWidget *p = q; + while (p && !p->isWindow()) { + p = p->parentWidget(); + if ((dialog = qobject_cast<QDialog *>(p))) + break; + } + + if (dialog) { + dialog->addAction(action); + } else { + q->addAction(action); + } + return action; } #endif @@ -1193,16 +1209,36 @@ bool QDialogButtonBox::event(QEvent *event) if (!hasDefault && firstAcceptButton) firstAcceptButton->setDefault(true); #ifdef QT_SOFTKEYS_ENABLED - if (dialog) { + if (dialog) setFixedSize(0,0); - dialog->addActions(d->softKeyActions.values()); - } else { - addActions(d->softKeyActions.values()); - } #endif }else if (event->type() == QEvent::LanguageChange) { d->retranslateStrings(); } +#ifdef QT_SOFTKEYS_ENABLED + else if (event->type() == QEvent::ParentChange) { + QWidget *dialog = 0; + QWidget *p = this; + while (p && !p->isWindow()) { + p = p->parentWidget(); + if ((dialog = qobject_cast<QDialog *>(p))) + break; + } + + // If the parent changes, then move the softkeys + for (QHash<QAbstractButton *, QAction *>::const_iterator it = d->softKeyActions.constBegin(); + it != d->softKeyActions.constEnd(); ++it) { + QAction *current = it.value(); + QList<QWidget *> widgets = current->associatedWidgets(); + foreach (QWidget *w, widgets) + w->removeAction(current); + if (dialog) + dialog->addAction(current); + else + addAction(current); + } + } +#endif return QWidget::event(event); } diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index 953edab..07914b2 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -1931,9 +1931,6 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*> item_list.append(item); } else { QDockAreaLayoutItem item(new QDockWidgetItem(widget)); - if (!testing) { - item_list.append(item); - } if (flags & StateFlagFloating) { bool drawer = false; #ifdef Q_WS_MAC // drawer support @@ -1971,11 +1968,13 @@ bool QDockAreaLayoutInfo::restoreState(QDataStream &stream, QList<QDockWidget*> if (!testing) { widget->setVisible(flags & StateFlagVisible); + item_list.append(item); } } else { int dummy; stream >> item.pos >> item.size >> dummy >> dummy; if (!testing) { + item_list.append(item); widget->setFloating(false); widget->setVisible(flags & StateFlagVisible); emit widget->dockLocationChanged(toDockWidgetArea(dockPos)); diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp index 3d908a1..ea711e8 100644 --- a/src/gui/widgets/qlabel.cpp +++ b/src/gui/widgets/qlabel.cpp @@ -1170,22 +1170,10 @@ void QLabelPrivate::updateShortcut() // But then we do want to hide the ampersands, so we can't use shortcutId. hasShortcut = false; - if (control) { - ensureTextPopulated(); - // Underline the first character that follows an ampersand - shortcutCursor = control->document()->find(QLatin1String("&")); - if (shortcutCursor.isNull()) - return; - hasShortcut = true; - shortcutId = q->grabShortcut(QKeySequence::mnemonic(text)); - shortcutCursor.deleteChar(); // remove the ampersand - shortcutCursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor); - } else { - if (!text.contains(QLatin1Char('&'))) - return; - hasShortcut = true; - shortcutId = q->grabShortcut(QKeySequence::mnemonic(text)); - } + if (!text.contains(QLatin1Char('&'))) + return; + hasShortcut = true; + shortcutId = q->grabShortcut(QKeySequence::mnemonic(text)); } #endif // QT_NO_SHORTCUT @@ -1456,6 +1444,24 @@ void QLabelPrivate::ensureTextPopulated() const doc->setPlainText(text); #endif doc->setUndoRedoEnabled(false); + +#ifndef QT_NO_SHORTCUT + if (hasShortcut) { + // Underline the first character that follows an ampersand (and remove the others ampersands) + int from = 0; + bool found = false; + QTextCursor cursor; + while (!(cursor = control->document()->find((QLatin1String("&")), from)).isNull()) { + cursor.deleteChar(); // remove the ampersand + cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor); + from = cursor.position(); + if (!found && cursor.selectedText() != QLatin1String("&")) { //not a second & + found = true; + shortcutCursor = cursor; + } + } + } +#endif } } textDirty = false; diff --git a/src/gui/widgets/qlabel_p.h b/src/gui/widgets/qlabel_p.h index c5a74e2..ca17a35 100644 --- a/src/gui/widgets/qlabel_p.h +++ b/src/gui/widgets/qlabel_p.h @@ -113,7 +113,7 @@ public: mutable uint hasShortcut : 1; Qt::TextFormat textformat; mutable QTextControl *control; - QTextCursor shortcutCursor; + mutable QTextCursor shortcutCursor; Qt::TextInteractionFlags textInteractionFlags; inline bool needTextControl() const { diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 2914164..87975c3 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -138,7 +138,12 @@ void QLineControl::copy(QClipboard::Mode mode) const */ void QLineControl::paste() { - insert(QApplication::clipboard()->text(QClipboard::Clipboard)); + QString clip = QApplication::clipboard()->text(QClipboard::Clipboard); + if (!clip.isEmpty() || hasSelectedText()) { + separate(); //make it a separate undo/redo command + insert(clip); + separate(); + } } #endif // !QT_NO_CLIPBOARD @@ -414,7 +419,7 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) int c = m_cursor; // cursor position after insertion of commit string - if (event->replacementStart() <= 0) + if (event->replacementStart() == 0) c += event->commitString().length() + qMin(-event->replacementStart(), event->replacementLength()); m_cursor += event->replacementStart(); @@ -1666,6 +1671,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event) } #endif // QT_NO_SHORTCUT else { + bool handled = false; #ifdef Q_WS_MAC if (event->key() == Qt::Key_Up || event->key() == Qt::Key_Down) { Qt::KeyboardModifiers myModifiers = (event->modifiers() & ~Qt::KeypadModifier); @@ -1683,6 +1689,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event) event->key() == Qt::Key_Up ? home(0) : end(0); } } + handled = true; } #endif if (event->modifiers() & Qt::ControlModifier) { @@ -1715,7 +1722,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event) break; #endif default: - unknown = true; + if (!handled) + unknown = true; } } else { // ### check for *no* modifier switch (event->key()) { @@ -1748,7 +1756,8 @@ void QLineControl::processKeyEvent(QKeyEvent* event) #endif default: - unknown = true; + if (!handled) + unknown = true; } } } diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index f5dbe1c..3800224 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1515,7 +1515,8 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) } #endif - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } @@ -1594,7 +1595,9 @@ void QLineEdit::keyPressEvent(QKeyEvent *event) && !isReadOnly()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN clear(); +#endif } else { event->ignore(); return; @@ -1651,7 +1654,9 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) && hasFocus() && !hasEditFocus() && !e->preeditString().isEmpty()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN selectAll(); // so text is replaced rather than appended to +#endif } #endif @@ -1999,38 +2004,48 @@ QMenu *QLineEdit::createStandardContextMenu() Q_D(QLineEdit); QMenu *popup = new QMenu(this); popup->setObjectName(QLatin1String("qt_edit_menu")); + QAction *action = 0; - QAction *action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo)); - action->setEnabled(d->control->isUndoAvailable()); - connect(action, SIGNAL(triggered()), SLOT(undo())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("&Undo") + ACCEL_KEY(QKeySequence::Undo)); + action->setEnabled(d->control->isUndoAvailable()); + connect(action, SIGNAL(triggered()), SLOT(undo())); - action = popup->addAction(QLineEdit::tr("&Redo") + ACCEL_KEY(QKeySequence::Redo)); - action->setEnabled(d->control->isRedoAvailable()); - connect(action, SIGNAL(triggered()), SLOT(redo())); + action = popup->addAction(QLineEdit::tr("&Redo") + ACCEL_KEY(QKeySequence::Redo)); + action->setEnabled(d->control->isRedoAvailable()); + connect(action, SIGNAL(triggered()), SLOT(redo())); - popup->addSeparator(); + popup->addSeparator(); + } #ifndef QT_NO_CLIPBOARD - action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut)); - action->setEnabled(!d->control->isReadOnly() && d->control->hasSelectedText() - && d->control->echoMode() == QLineEdit::Normal); - connect(action, SIGNAL(triggered()), SLOT(cut())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("Cu&t") + ACCEL_KEY(QKeySequence::Cut)); + action->setEnabled(!d->control->isReadOnly() && d->control->hasSelectedText() + && d->control->echoMode() == QLineEdit::Normal); + connect(action, SIGNAL(triggered()), SLOT(cut())); + } action = popup->addAction(QLineEdit::tr("&Copy") + ACCEL_KEY(QKeySequence::Copy)); action->setEnabled(d->control->hasSelectedText() && d->control->echoMode() == QLineEdit::Normal); connect(action, SIGNAL(triggered()), SLOT(copy())); - action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste)); - action->setEnabled(!d->control->isReadOnly() && !QApplication::clipboard()->text().isEmpty()); - connect(action, SIGNAL(triggered()), SLOT(paste())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("&Paste") + ACCEL_KEY(QKeySequence::Paste)); + action->setEnabled(!d->control->isReadOnly() && !QApplication::clipboard()->text().isEmpty()); + connect(action, SIGNAL(triggered()), SLOT(paste())); + } #endif - action = popup->addAction(QLineEdit::tr("Delete")); - action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); - connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); + if (!isReadOnly()) { + action = popup->addAction(QLineEdit::tr("Delete")); + action->setEnabled(!d->control->isReadOnly() && !d->control->text().isEmpty() && d->control->hasSelectedText()); + connect(action, SIGNAL(triggered()), d->control, SLOT(_q_deleteSelected())); + } - popup->addSeparator(); + if (!popup->isEmpty()) + popup->addSeparator(); action = popup->addAction(QLineEdit::tr("Select All") + ACCEL_KEY(QKeySequence::SelectAll)); action->setEnabled(!d->control->text().isEmpty() && !d->control->allSelected()); diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index 148da1b..d03c003 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -131,12 +131,12 @@ void QLineEditPrivate::init(const QString& txt) Q_Q(QLineEdit); control = new QLineControl(txt); control->setFont(q->font()); - QObject::connect(control, SIGNAL(textChanged(const QString &)), - q, SIGNAL(textChanged(const QString &))); - QObject::connect(control, SIGNAL(textEdited(const QString &)), - q, SLOT(_q_textEdited(const QString &))); - QObject::connect(control, SIGNAL(cursorPositionChanged(int, int)), - q, SLOT(_q_cursorPositionChanged(int, int))); + QObject::connect(control, SIGNAL(textChanged(QString)), + q, SIGNAL(textChanged(QString))); + QObject::connect(control, SIGNAL(textEdited(QString)), + q, SLOT(_q_textEdited(QString))); + QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)), + q, SLOT(_q_cursorPositionChanged(int,int))); QObject::connect(control, SIGNAL(selectionChanged()), q, SIGNAL(selectionChanged())); QObject::connect(control, SIGNAL(accepted()), @@ -147,17 +147,17 @@ void QLineEditPrivate::init(const QString& txt) QObject::connect(control, SIGNAL(editFocusChange(bool)), q, SLOT(_q_editFocusChange(bool))); #endif - QObject::connect(control, SIGNAL(cursorPositionChanged(int, int)), + QObject::connect(control, SIGNAL(cursorPositionChanged(int,int)), q, SLOT(updateMicroFocus())); // for now, going completely overboard with updates. QObject::connect(control, SIGNAL(selectionChanged()), q, SLOT(update())); - QObject::connect(control, SIGNAL(displayTextChanged(const QString &)), + QObject::connect(control, SIGNAL(displayTextChanged(QString)), q, SLOT(update())); - QObject::connect(control, SIGNAL(updateNeeded(const QRect &)), + QObject::connect(control, SIGNAL(updateNeeded(QRect)), q, SLOT(update())); QStyleOptionFrameV2 opt; diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index 027a5d6..fa6f7a1 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -1641,6 +1641,9 @@ void QMainWindowLayout::animationFinished(QWidget *widget) savedState.clear(); currentGapPos.clear(); pluggingWidget = 0; + //applying the state will make sure that the currentGap is updated correctly + //and all the geometries (especially the one from the central widget) is correct + layoutState.apply(false); } if (!widgetAnimator.animating()) { diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp index 60c5d7b..f3dbe34 100644 --- a/src/gui/widgets/qmdiarea.cpp +++ b/src/gui/widgets/qmdiarea.cpp @@ -841,8 +841,8 @@ void QMdiAreaPrivate::appendChild(QMdiSubWindow *child) child->installEventFilter(q); QObject::connect(child, SIGNAL(aboutToActivate()), q, SLOT(_q_deactivateAllWindows())); - QObject::connect(child, SIGNAL(windowStateChanged(Qt::WindowStates, Qt::WindowStates)), - q, SLOT(_q_processWindowStateChanged(Qt::WindowStates, Qt::WindowStates))); + QObject::connect(child, SIGNAL(windowStateChanged(Qt::WindowStates,Qt::WindowStates)), + q, SLOT(_q_processWindowStateChanged(Qt::WindowStates,Qt::WindowStates))); } /*! @@ -1947,8 +1947,10 @@ QMdiSubWindow *QMdiArea::addSubWindow(QWidget *widget, Qt::WindowFlags windowFla /*! Removes \a widget from the MDI area. The \a widget must be either a QMdiSubWindow or a widget that is the internal widget of - a subwindow. Note that the subwindow is not deleted by QMdiArea - and that its parent is set to 0. + a subwindow. Note \a widget is never actually deleted by QMdiArea. + If a QMdiSubWindow is passed in its parent is set to 0 and it is + removed, but if an internal widget is passed in the child widget + is set to 0 but the QMdiSubWindow is not removed. \sa addSubWindow() */ diff --git a/src/gui/widgets/qmdisubwindow.cpp b/src/gui/widgets/qmdisubwindow.cpp index b5e28da..350f8579 100644 --- a/src/gui/widgets/qmdisubwindow.cpp +++ b/src/gui/widgets/qmdisubwindow.cpp @@ -2268,8 +2268,8 @@ QMdiSubWindow::QMdiSubWindow(QWidget *parent, Qt::WindowFlags flags) else d->menuIcon = windowIcon(); #endif - connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), - this, SLOT(_q_processFocusChanged(QWidget *, QWidget *))); + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(_q_processFocusChanged(QWidget*,QWidget*))); } /*! diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 54d1612..761a060 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -654,6 +654,24 @@ void QMenuPrivate::_q_overrideMenuActionDestroyed() menuAction=defaultMenuAction; } + +void QMenuPrivate::updateLayoutDirection() +{ + Q_Q(QMenu); + //we need to mimic the cause of the popup's layout direction + //to allow setting it on a mainwindow for example + //we call setLayoutDirection_helper to not overwrite a user-defined value + if (!q->testAttribute(Qt::WA_SetLayoutDirection)) { + if (QWidget *w = causedPopup.widget) + setLayoutDirection_helper(w->layoutDirection()); + else if (QWidget *w = q->parentWidget()) + setLayoutDirection_helper(w->layoutDirection()); + else + setLayoutDirection_helper(QApplication::layoutDirection()); + } +} + + /*! Returns the action associated with this menu. */ @@ -1106,6 +1124,7 @@ void QMenuPrivate::_q_actionTriggered() { Q_Q(QMenu); if (QAction *action = qobject_cast<QAction *>(q->sender())) { + QWeakPointer<QAction> actionGuard = action; #ifdef QT3_SUPPORT //we store it here because the action might be deleted/changed by connected slots const int id = q->findIdForAction(action); @@ -1115,7 +1134,7 @@ void QMenuPrivate::_q_actionTriggered() emit q->activated(id); #endif - if (!activationRecursionGuard) { + if (!activationRecursionGuard && actionGuard) { //in case the action has not been activated by the mouse //we check the parent hierarchy QList< QPointer<QWidget> > list; @@ -1796,6 +1815,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction) d->tearoffHighlighted = 0; d->motions = 0; d->doChildEffects = true; + d->updateLayoutDirection(); #ifndef QT_NO_MENUBAR // if this menu is part of a chain attached to a QMenuBar, set the @@ -2346,6 +2366,9 @@ QMenu::event(QEvent *e) { Q_D(QMenu); switch (e->type()) { + case QEvent::Polish: + d->updateLayoutDirection(); + break; case QEvent::ShortcutOverride: { QKeyEvent *kev = static_cast<QKeyEvent*>(e); if (kev->key() == Qt::Key_Up || kev->key() == Qt::Key_Down diff --git a/src/gui/widgets/qmenu_mac.mm b/src/gui/widgets/qmenu_mac.mm index 9510cc6..30bbd31 100644 --- a/src/gui/widgets/qmenu_mac.mm +++ b/src/gui/widgets/qmenu_mac.mm @@ -763,7 +763,9 @@ QMacMenuAction::~QMacMenuAction() { #ifdef QT_MAC_USE_COCOA [menu release]; - if (action) { + // Update the menu item if this action still owns it. For some items + // (like 'Quit') ownership will be transferred between all menu bars... + if (action && action.data() == reinterpret_cast<QAction *>([menuItem tag])) { QAction::MenuRole role = action->menuRole(); // Check if the item is owned by Qt, and should be hidden to keep it from causing // problems. Do it for everything but the quit menu item since that should always @@ -774,8 +776,8 @@ QMacMenuAction::~QMacMenuAction() && menuItem != [getMenuLoader() quitMenuItem]) { [menuItem setHidden:YES]; } + [menuItem setTag:nil]; } - [menuItem setTag:nil]; [menuItem release]; #endif } diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h index c021063..5757885 100644 --- a/src/gui/widgets/qmenu_p.h +++ b/src/gui/widgets/qmenu_p.h @@ -292,6 +292,9 @@ public: bool hasMouseMoved(const QPoint &globalPos); + void updateLayoutDirection(); + + //menu fading/scrolling effects bool doChildEffects; diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index b1ff662..599f15b 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -736,6 +736,9 @@ void QMenuBarPrivate::init() if(wce_menubar) q->hide(); } + else { + QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true); + } #endif #ifdef Q_WS_S60 symbianCreateMenuBar(q->parentWidget()); @@ -1486,7 +1489,8 @@ bool QMenuBar::event(QEvent *e) break; case QEvent::ShortcutOverride: { QKeyEvent *kev = static_cast<QKeyEvent*>(e); - if (kev->key() == Qt::Key_Escape) { + //we only filter out escape if there is a current action + if (kev->key() == Qt::Key_Escape && d->currentAction) { e->accept(); return true; } @@ -1934,7 +1938,7 @@ void QMenuBar::setDefaultAction(QAction *act) if (qt_wince_is_mobile()) if (d->defaultAction) { disconnect(d->defaultAction, SIGNAL(changed()), this, SLOT(_q_updateDefaultAction())); - disconnect(d->defaultAction, SIGNAL(destroyed ()), this, SLOT(_q_updateDefaultAction())); + disconnect(d->defaultAction, SIGNAL(destroyed()), this, SLOT(_q_updateDefaultAction())); } #endif d->defaultAction = act; diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 18adc6c..c7759e8 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -1966,7 +1966,8 @@ void QPlainTextEdit::mouseReleaseEvent(QMouseEvent *e) d->ensureCursorVisible(); } - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } diff --git a/src/gui/widgets/qsizegrip.cpp b/src/gui/widgets/qsizegrip.cpp index cf193dc..6575dbb 100644 --- a/src/gui/widgets/qsizegrip.cpp +++ b/src/gui/widgets/qsizegrip.cpp @@ -99,6 +99,7 @@ public: int dyMax; Qt::Corner m_corner; bool gotMousePress; + QWidget *tlw; #ifdef Q_WS_MAC void updateMacSizer(bool hide) const; #endif @@ -113,6 +114,19 @@ public: return m_corner == Qt::BottomLeftCorner || m_corner == Qt::TopLeftCorner; } + void updateTopLevelWidget() + { + Q_Q(QSizeGrip); + QWidget *w = qt_sizegrip_topLevelWidget(q); + if (tlw == w) + return; + if (tlw) + tlw->removeEventFilter(q); + tlw = w; + if (tlw) + tlw->installEventFilter(q); + } + // This slot is invoked by QLayout when the size grip is added to // a layout or reparented after the tlw is shown. This re-implementation is basically // the same as QWidgetPrivate::_q_showIfNotHidden except that it checks @@ -121,7 +135,7 @@ public: { Q_Q(QSizeGrip); bool showSizeGrip = !(q->isHidden() && q->testAttribute(Qt::WA_WState_ExplicitShowHide)); - QWidget *tlw = qt_sizegrip_topLevelWidget(q); + updateTopLevelWidget(); if (tlw && showSizeGrip) { Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen; #ifndef Q_WS_MAC @@ -232,6 +246,7 @@ void QSizeGripPrivate::init() Q_Q(QSizeGrip); dxMax = 0; dyMax = 0; + tlw = 0; m_corner = q->isLeftToRight() ? Qt::BottomRightCorner : Qt::BottomLeftCorner; gotMousePress = false; @@ -240,8 +255,7 @@ void QSizeGripPrivate::init() ? Qt::SizeFDiagCursor : Qt::SizeBDiagCursor); #endif q->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); - QWidget *tlw = qt_sizegrip_topLevelWidget(q); - tlw->installEventFilter(q); + updateTopLevelWidget(); } @@ -524,19 +538,18 @@ void QSizeGrip::setVisible(bool visible) /*! \reimp */ bool QSizeGrip::eventFilter(QObject *o, QEvent *e) { + Q_D(QSizeGrip); if ((isHidden() && testAttribute(Qt::WA_WState_ExplicitShowHide)) - || e->type() != QEvent::WindowStateChange) { + || e->type() != QEvent::WindowStateChange + || o != d->tlw) { return QWidget::eventFilter(o, e); } - QWidget *tlw = qt_sizegrip_topLevelWidget(this); - if (o != tlw) - return QWidget::eventFilter(o, e); Qt::WindowStates sizeGripNotVisibleState = Qt::WindowFullScreen; #ifndef Q_WS_MAC sizeGripNotVisibleState |= Qt::WindowMaximized; #endif // Don't show the size grip if the tlw is maximized or in full screen mode. - setVisible(!(tlw->windowState() & sizeGripNotVisibleState)); + setVisible(!(d->tlw->windowState() & sizeGripNotVisibleState)); setAttribute(Qt::WA_WState_ExplicitShowHide, false); return QWidget::eventFilter(o, e); } diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 98c69c0..7a99d6e 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -1949,7 +1949,8 @@ void QTabBar::changeEvent(QEvent *event) if (event->type() == QEvent::StyleChange) { if (!d->elideModeSetByUser) d->elideMode = Qt::TextElideMode(style()->styleHint(QStyle::SH_TabBar_ElideMode, 0, this)); - d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); + if (!d->useScrollButtonsSetByUser) + d->useScrollButtons = !style()->styleHint(QStyle::SH_TabBar_PreferNoArrows, 0, this); d->refresh(); } else if (event->type() == QEvent::FontChange) { d->refresh(); @@ -2005,6 +2006,7 @@ bool QTabBar::usesScrollButtons() const void QTabBar::setUsesScrollButtons(bool useButtons) { Q_D(QTabBar); + d->useScrollButtonsSetByUser = true; if (d->useScrollButtons == useButtons) return; d->useScrollButtons = useButtons; diff --git a/src/gui/widgets/qtabbar_p.h b/src/gui/widgets/qtabbar_p.h index 2854cde..d54032f 100644 --- a/src/gui/widgets/qtabbar_p.h +++ b/src/gui/widgets/qtabbar_p.h @@ -75,7 +75,7 @@ class QTabBarPrivate : public QWidgetPrivate public: QTabBarPrivate() :currentIndex(-1), pressedIndex(-1), shape(QTabBar::RoundedNorth), layoutDirty(false), - drawBase(true), scrollOffset(0), elideModeSetByUser(false), expanding(true), closeButtonOnTabs(false), + drawBase(true), scrollOffset(0), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true), closeButtonOnTabs(false), selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false), dragInProgress(false), documentMode(false), movingTab(0) #ifdef Q_WS_MAC @@ -188,6 +188,7 @@ public: Qt::TextElideMode elideMode; bool elideModeSetByUser; bool useScrollButtons; + bool useScrollButtonsSetByUser; bool expanding; bool closeButtonOnTabs; diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp index d22bd54..49651a3 100644 --- a/src/gui/widgets/qtabwidget.cpp +++ b/src/gui/widgets/qtabwidget.cpp @@ -699,8 +699,8 @@ void QTabWidget::setTabBar(QTabBar* tb) setFocusProxy(d->tabs); connect(d->tabs, SIGNAL(currentChanged(int)), this, SLOT(_q_showTab(int))); - connect(d->tabs, SIGNAL(tabMoved(int, int)), - this, SLOT(_q_tabMoved(int, int))); + connect(d->tabs, SIGNAL(tabMoved(int,int)), + this, SLOT(_q_tabMoved(int,int))); if (d->tabs->tabsClosable()) connect(d->tabs, SIGNAL(tabCloseRequested(int)), this, SIGNAL(tabCloseRequested(int))); diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 88502e3..1c49ef0 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -530,7 +530,9 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect) when the property is set. If the text edit has another content type, it will not be replaced - by plain text if you call toPlainText(). + by plain text if you call toPlainText(). The only exception to this + is the non-break space, \e{nbsp;}, that will be converted into + standard space. By default, for an editor with no contents, this property contains an empty string. @@ -1210,7 +1212,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e) if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) { if (e->text()[0].isPrint()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN clear(); +#endif } else { e->ignore(); return; @@ -1574,7 +1578,8 @@ void QTextEdit::mouseReleaseEvent(QMouseEvent *e) d->autoScrollTimer.stop(); ensureCursorVisible(); } - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } @@ -1672,7 +1677,9 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e) && QApplication::keypadNavigationEnabled() && !hasEditFocus()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN selectAll(); // so text is replaced rather than appended to +#endif } #endif d->sendControlEvent(e); @@ -1899,7 +1906,7 @@ void QTextEdit::setOverwriteMode(bool overwrite) \brief the tab stop width in pixels \since 4.1 - By default, this property contains a value of 80. + By default, this property contains a value of 80 pixels. */ int QTextEdit::tabStopWidth() const diff --git a/src/gui/widgets/qtoolbararealayout_p.h b/src/gui/widgets/qtoolbararealayout_p.h index f0ab80c..134e95a 100644 --- a/src/gui/widgets/qtoolbararealayout_p.h +++ b/src/gui/widgets/qtoolbararealayout_p.h @@ -118,7 +118,7 @@ public: void extendSize(Qt::Orientation o, int extent) { - int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : size) + extent); + int newSize = qMax(pick(o, minimumSize()), (preferredSize > 0 ? preferredSize : pick(o, sizeHint())) + extent); int sizeh = pick(o, sizeHint()); if (newSize == sizeh) { preferredSize = -1; diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index 5de6c70..9645fa8 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -152,13 +152,23 @@ bool QAudioDeviceInfoInternal::open() { int err = 0; QString dev = device; - if(!dev.contains(QLatin1String("default"))) { + QList<QByteArray> devices = availableDevices(mode); + + if(dev.compare(QLatin1String("default")) == 0) { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = QLatin1String(devices.first().constData()); +#else + dev = QLatin1String("hw:0,0"); +#endif + } else { #if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) - dev = QString(QLatin1String("default:CARD=%1")).arg(dev); + dev = device; #else int idx = 0; char *name; + QString shortName = device.mid(device.indexOf(QLatin1String("="),0)+1); + while(snd_card_get_name(idx,&name) == 0) { if(dev.contains(QLatin1String(name))) break; @@ -195,16 +205,25 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const snd_pcm_hw_params_t *params; QString dev = device; - // open() - if(!dev.contains(QLatin1String("default"))) { + QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput); + + if(dev.compare(QLatin1String("default")) == 0) { #if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) - dev = QString(QLatin1String("default:CARD=%1")).arg(dev); + dev = QLatin1String(devices.first().constData()); +#else + dev = QLatin1String("hw:0,0"); +#endif + } else { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = device; #else int idx = 0; char *name; - + + QString shortName = device.mid(device.indexOf(QLatin1String("="),0)+1); + while(snd_card_get_name(idx,&name) == 0) { - if(dev.contains(QLatin1String(name))) + if(shortName.compare(QLatin1String(name)) == 0) break; idx++; } @@ -386,6 +405,7 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) { QList<QByteArray> devices; QByteArray filter; + #if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) // Create a list of all current audio devices that support mode void **hints, **n; @@ -408,12 +428,10 @@ QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) descr = snd_device_name_get_hint(*n, "DESC"); io = snd_device_name_get_hint(*n, "IOID"); if((name != NULL) && (descr != NULL) && ((io == NULL) || (io == filter))) { - QString str = QLatin1String(name); - - if(str.contains(QLatin1String("default"))) { - int pos = str.indexOf(QLatin1String("="),0); - devices.append(str.mid(pos+1).toLocal8Bit().constData()); - } + QString deviceName = QLatin1String(name); + QString deviceDescription = QLatin1String(descr); + if(deviceDescription.contains(QLatin1String("Default Audio Device"))) + devices.append(deviceName.toLocal8Bit().constData()); } if(name != NULL) free(name); @@ -448,7 +466,7 @@ QByteArray QAudioDeviceInfoInternal::defaultInputDevice() if(devices.size() == 0) return QByteArray(); - return QByteArray("default"); + return devices.first(); } QByteArray QAudioDeviceInfoInternal::defaultOutputDevice() @@ -457,7 +475,7 @@ QByteArray QAudioDeviceInfoInternal::defaultOutputDevice() if(devices.size() == 0) return QByteArray(); - return QByteArray("default"); + return devices.first(); } QT_END_NAMESPACE diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp index e794eaf..8b368d5 100644 --- a/src/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput.cpp @@ -47,7 +47,6 @@ #include "qaudiodevicefactory_p.h" - QT_BEGIN_NAMESPACE /*! diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp index 8a8f0db..3dbe66c 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.cpp +++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp @@ -52,6 +52,7 @@ #include <QtCore/qcoreapplication.h> #include "qaudioinput_alsa_p.h" +#include "qaudiodeviceinfo_alsa_p.h" QT_BEGIN_NAMESPACE @@ -80,8 +81,7 @@ QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device, const QAudioFor pullMode = true; resuming = false; - QStringList list1 = QString(QLatin1String(device)).split(QLatin1String(":")); - m_device = QByteArray(list1.at(0).toLocal8Bit().constData()); + m_device = device; timer = new QTimer(this); connect(timer,SIGNAL(timeout()),SLOT(userFeed())); @@ -259,22 +259,31 @@ bool QAudioInputPrivate::open() unsigned int freakuency=settings.frequency(); QString dev = QString(QLatin1String(m_device.constData())); - if(!dev.contains(QLatin1String("default"))) { -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) - dev = QString(QLatin1String("default:CARD=%1")).arg(QLatin1String(m_device.constData())); + QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioInput); + if(dev.compare(QLatin1String("default")) == 0) { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = QLatin1String(devices.first()); +#else + dev = QLatin1String("hw:0,0"); +#endif + } else { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = QLatin1String(m_device); #else int idx = 0; char *name; + QString shortName = QLatin1String(m_device.mid(m_device.indexOf('=',0)+1).constData()); + while(snd_card_get_name(idx,&name) == 0) { - if(m_device.contains(name)) + if(qstrncmp(shortName.toLocal8Bit().constData(),name,shortName.length()) == 0) break; idx++; } dev = QString(QLatin1String("hw:%1,0")).arg(idx); #endif } - + // Step 1: try and open the device while((count < 5) && (err < 0)) { err=snd_pcm_open(&handle,dev.toLocal8Bit().constData(),SND_PCM_STREAM_CAPTURE,0); @@ -614,7 +623,7 @@ qint64 QAudioInputPrivate::elapsedUSecs() const if (deviceState == QAudio::StoppedState) return 0; -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) snd_pcm_status_t* status; snd_pcm_status_alloca(&status); diff --git a/src/multimedia/audio/qaudiooutput_alsa_p.cpp b/src/multimedia/audio/qaudiooutput_alsa_p.cpp index e9784d2..020a104 100644 --- a/src/multimedia/audio/qaudiooutput_alsa_p.cpp +++ b/src/multimedia/audio/qaudiooutput_alsa_p.cpp @@ -52,6 +52,7 @@ #include <QtCore/qcoreapplication.h> #include "qaudiooutput_alsa_p.h" +#include "qaudiodeviceinfo_alsa_p.h" QT_BEGIN_NAMESPACE @@ -281,21 +282,31 @@ bool QAudioOutputPrivate::open() unsigned int freakuency=settings.frequency(); QString dev = QLatin1String(m_device.constData()); - if(!dev.contains(QLatin1String("default"))) { -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) - dev = QString(QLatin1String("default:CARD=%1")).arg(QLatin1String(m_device.constData())); + QList<QByteArray> devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput); + if(dev.compare(QLatin1String("default")) == 0) { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = QLatin1String(devices.first().constData()); +#else + dev = QLatin1String("hw:0,0"); +#endif + } else { +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) + dev = QLatin1String(m_device); #else int idx = 0; char *name; + QString shortName = QLatin1String(m_device.mid(m_device.indexOf('=',0)+1).constData()); + while(snd_card_get_name(idx,&name) == 0) { - if(m_device.contains(name)) + if(qstrncmp(shortName.toLocal8Bit().constData(),name,shortName.length()) == 0) break; idx++; } dev = QString(QLatin1String("hw:%1,0")).arg(idx); #endif } + // Step 1: try and open the device while((count < 5) && (err < 0)) { err=snd_pcm_open(&handle,dev.toLocal8Bit().constData(),SND_PCM_STREAM_PLAYBACK,0); @@ -666,7 +677,7 @@ qint64 QAudioOutputPrivate::elapsedUSecs() const if (deviceState == QAudio::StoppedState) return 0; -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) snd_pcm_status_t* status; snd_pcm_status_alloca(&status); diff --git a/src/network/access/access.pri b/src/network/access/access.pri index edc1b63..aa36890 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -7,6 +7,7 @@ HEADERS += access/qftp.h \ access/qhttpnetworkreply_p.h \ access/qhttpnetworkconnection_p.h \ access/qhttpnetworkconnectionchannel_p.h \ + access/qfilenetworkreply_p.h \ access/qnetworkaccessmanager.h \ access/qnetworkaccessmanager_p.h \ access/qnetworkaccesscache_p.h \ @@ -38,6 +39,7 @@ SOURCES += access/qftp.cpp \ access/qhttpnetworkreply.cpp \ access/qhttpnetworkconnection.cpp \ access/qhttpnetworkconnectionchannel.cpp \ + access/qfilenetworkreply.cpp \ access/qnetworkaccessmanager.cpp \ access/qnetworkaccesscache.cpp \ access/qnetworkaccessbackend.cpp \ diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp new file mode 100644 index 0000000..497519f --- /dev/null +++ b/src/network/access/qfilenetworkreply.cpp @@ -0,0 +1,205 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qfilenetworkreply_p.h" + +#include "QtCore/qdatetime.h" +#include <QtCore/QCoreApplication> +#include <QtCore/QFileInfo> + +QT_BEGIN_NAMESPACE + +QFileNetworkReplyPrivate::QFileNetworkReplyPrivate() + : QNetworkReplyPrivate(), realFileSize(0), finished(false) +{ +} + +QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req) + : QNetworkReply(*new QFileNetworkReplyPrivate(), parent) +{ + setRequest(req); + setUrl(req.url()); + setOperation(QNetworkAccessManager::GetOperation); + QMetaObject::invokeMethod(this, "_q_startOperation", Qt::QueuedConnection); + QNetworkReply::open(QIODevice::ReadOnly); +} + +QFileNetworkReply::~QFileNetworkReply() +{ +} + +// This code is mostly inspired by QNetworkAccessFileBackend +// We also use its translation context for error messages +void QFileNetworkReplyPrivate::_q_startOperation() +{ + Q_Q(QFileNetworkReply); + + QUrl url = q->url(); + if (url.host() == QLatin1String("localhost")) + url.setHost(QString()); + +#if !defined(Q_OS_WIN) + // do not allow UNC paths on Unix + if (!url.host().isEmpty()) { + // we handle only local files + QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Request for opening non-local file %1").arg(url.toString()); + q->setError(QNetworkReply::ProtocolInvalidOperationError, msg); + emit q->error(QNetworkReply::ProtocolInvalidOperationError); + doFinished(); + return; + } +#endif + if (url.path().isEmpty()) + url.setPath(QLatin1String("/")); + q->setUrl(url); + + + QString fileName = url.toLocalFile(); + if (fileName.isEmpty()) { + fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery); + } + realFile.setFileName(fileName); + + QFileInfo fi(realFile); + if (fi.isDir()) { + QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Cannot open %1: Path is a directory").arg(url.toString()); + q->setError(QNetworkReply::ContentOperationNotPermittedError, msg); + emit q->error(QNetworkReply::ContentOperationNotPermittedError); + doFinished(); + return; + } + + bool opened = realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered); + + // could we open the file? + if (!opened) { + QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Error opening %1: %2") + .arg(realFile.fileName(), realFile.errorString()); + + if (realFile.exists()) { + q->setError(QNetworkReply::ContentAccessDenied, msg); + emit q->error(QNetworkReply::ContentAccessDenied); + } else { + q->setError(QNetworkReply::ContentNotFoundError, msg); + emit q->error(QNetworkReply::ContentNotFoundError); + } + doFinished(); + return; + } + + realFileSize = fi.size(); + q->setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified()); + q->setHeader(QNetworkRequest::ContentLengthHeader, realFileSize); + + emit q->metaDataChanged(); + emit q->downloadProgress(realFileSize, realFileSize); + emit q->readyRead(); + doFinished(); +} + +bool QFileNetworkReplyPrivate::isFinished() const +{ + return finished; +} + +void QFileNetworkReplyPrivate::doFinished() +{ + Q_Q(QFileNetworkReply); + finished = true; + emit q->finished(); +} + + +void QFileNetworkReply::close() +{ + Q_D(QFileNetworkReply); + QNetworkReply::close(); + d->realFile.close(); + + if (!d->finished) + d->doFinished(); +} + +void QFileNetworkReply::abort() +{ + Q_D(QFileNetworkReply); + QNetworkReply::close(); + d->realFile.close(); + + if (!d->finished) + d->doFinished(); +} + +qint64 QFileNetworkReply::bytesAvailable() const +{ + Q_D(const QFileNetworkReply); + return QNetworkReply::bytesAvailable() + d->realFile.bytesAvailable(); +} + +bool QFileNetworkReply::isSequential () const +{ + return true; +} + +qint64 QFileNetworkReply::size() const +{ + Q_D(const QFileNetworkReply); + return d->realFileSize; +} + +/*! + \internal +*/ +qint64 QFileNetworkReply::readData(char *data, qint64 maxlen) +{ + Q_D(QFileNetworkReply); + qint64 ret = d->realFile.read(data, maxlen); + if (ret == 0 && bytesAvailable() == 0) + return -1; // everything had been read + else + return ret; +} + + +QT_END_NAMESPACE + +#include "moc_qfilenetworkreply_p.cpp" + diff --git a/src/network/access/qfilenetworkreply_p.h b/src/network/access/qfilenetworkreply_p.h new file mode 100644 index 0000000..831f50a --- /dev/null +++ b/src/network/access/qfilenetworkreply_p.h @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QFILENETWORKREPLY_P_H +#define QFILENETWORKREPLY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the Network Access API. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include "qnetworkreply.h" +#include "qnetworkreply_p.h" +#include "qnetworkaccessmanager.h" +#include <QFile> + +QT_BEGIN_NAMESPACE + + +class QFileNetworkReplyPrivate; +class QFileNetworkReply: public QNetworkReply +{ + Q_OBJECT +public: + QFileNetworkReply(QObject *parent, const QNetworkRequest &req); + ~QFileNetworkReply(); + virtual void abort(); + + // reimplemented from QNetworkReply + virtual void close(); + virtual qint64 bytesAvailable() const; + virtual bool isSequential () const; + qint64 size() const; + + + virtual qint64 readData(char *data, qint64 maxlen); + + Q_DECLARE_PRIVATE(QFileNetworkReply) + Q_PRIVATE_SLOT(d_func(), void _q_startOperation()) + +}; + +class QFileNetworkReplyPrivate: public QNetworkReplyPrivate +{ +public: + QFileNetworkReplyPrivate(); + + QFile realFile; + qint64 realFileSize; + + void _q_startOperation(); + + virtual bool isFinished() const; + void doFinished(); + bool finished; + + + Q_DECLARE_PUBLIC(QFileNetworkReply) +}; + +QT_END_NAMESPACE + +#endif // QFILENETWORKREPLY_P_H diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp index f006fba..7365435 100644 --- a/src/network/access/qhttp.cpp +++ b/src/network/access/qhttp.cpp @@ -3115,14 +3115,14 @@ void QHttpPrivate::setSock(QTcpSocket *sock) QObject::connect(socket, SIGNAL(bytesWritten(qint64)), q, SLOT(_q_slotBytesWritten(qint64))); #ifndef QT_NO_NETWORKPROXY - QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), - q, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *))); + QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + q, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*))); #endif #ifndef QT_NO_OPENSSL if (qobject_cast<QSslSocket *>(socket)) { - QObject::connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), - q, SIGNAL(sslErrors(const QList<QSslError> &))); + QObject::connect(socket, SIGNAL(sslErrors(QList<QSslError>)), + q, SIGNAL(sslErrors(QList<QSslError>))); QObject::connect(socket, SIGNAL(encryptedBytesWritten(qint64)), q, SLOT(_q_slotEncryptedBytesWritten(qint64))); } diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 8dd7a00..2dbd512 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -194,11 +194,20 @@ void QHttpNetworkConnectionPrivate::prepareRequest(HttpMessagePair &messagePair) // some websites mandate an accept-language header and fail // if it is not sent. This is a problem with the website and - // not with us, but we work around this by setting a - // universal one always. + // not with us, but we work around this by setting + // one always. value = request.headerField("accept-language"); - if (value.isEmpty()) - request.setHeaderField("accept-language", "en,*"); + if (value.isEmpty()) { + QString systemLocale = QLocale::system().name().replace(QChar::fromAscii('_'),QChar::fromAscii('-')); + QString acceptLanguage; + if (systemLocale == QLatin1String("C")) + acceptLanguage = QString::fromAscii("en,*"); + else if (systemLocale.startsWith(QLatin1String("en-"))) + acceptLanguage = QString::fromAscii("%1,*").arg(systemLocale); + else + acceptLanguage = QString::fromAscii("%1,en,*").arg(systemLocale); + request.setHeaderField("Accept-Language", acceptLanguage.toAscii()); + } // set the User Agent value = request.headerField("user-agent"); diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 6962ab3..fa89fcc 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -90,8 +90,8 @@ void QHttpNetworkConnectionChannel::init() this, SLOT(_q_error(QAbstractSocket::SocketError)), Qt::DirectConnection); #ifndef QT_NO_NETWORKPROXY - QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), - this, SLOT(_q_proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), + QObject::connect(socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), + this, SLOT(_q_proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), Qt::DirectConnection); #endif @@ -102,8 +102,8 @@ void QHttpNetworkConnectionChannel::init() QObject::connect(sslSocket, SIGNAL(encrypted()), this, SLOT(_q_encrypted()), Qt::DirectConnection); - QObject::connect(sslSocket, SIGNAL(sslErrors(const QList<QSslError>&)), - this, SLOT(_q_sslErrors(const QList<QSslError>&)), + QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)), + this, SLOT(_q_sslErrors(QList<QSslError>)), Qt::DirectConnection); QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(_q_encryptedBytesWritten(qint64)), @@ -774,6 +774,8 @@ void QHttpNetworkConnectionChannel::_q_connected() { // improve performance since we get the request sent by the kernel ASAP socket->setSocketOption(QAbstractSocket::LowDelayOption, 1); + // not sure yet if it helps, but it makes sense + socket->setSocketOption(QAbstractSocket::KeepAliveOption, 1); pipeliningSupported = QHttpNetworkConnectionChannel::PipeliningSupportUnknown; diff --git a/src/network/access/qhttpnetworkheader.cpp b/src/network/access/qhttpnetworkheader.cpp index 68ed3e5..e9866ca 100644 --- a/src/network/access/qhttpnetworkheader.cpp +++ b/src/network/access/qhttpnetworkheader.cpp @@ -92,11 +92,10 @@ QByteArray QHttpNetworkHeaderPrivate::headerField(const QByteArray &name, const QList<QByteArray> QHttpNetworkHeaderPrivate::headerFieldValues(const QByteArray &name) const { QList<QByteArray> result; - QByteArray lowerName = name.toLower(); QList<QPair<QByteArray, QByteArray> >::ConstIterator it = fields.constBegin(), end = fields.constEnd(); for ( ; it != end; ++it) - if (lowerName == it->first.toLower()) + if (qstricmp(name.constData(), it->first) == 0) result += it->second; return result; @@ -104,10 +103,9 @@ QList<QByteArray> QHttpNetworkHeaderPrivate::headerFieldValues(const QByteArray void QHttpNetworkHeaderPrivate::setHeaderField(const QByteArray &name, const QByteArray &data) { - QByteArray lowerName = name.toLower(); QList<QPair<QByteArray, QByteArray> >::Iterator it = fields.begin(); while (it != fields.end()) { - if (lowerName == it->first.toLower()) + if (qstricmp(name.constData(), it->first) == 0) it = fields.erase(it); else ++it; diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index e990704..2b0c252 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -239,7 +239,7 @@ qint64 QHttpNetworkReplyPrivate::bytesAvailable() const bool QHttpNetworkReplyPrivate::isGzipped() { QByteArray encoding = headerField("content-encoding"); - return encoding.toLower() == "gzip"; + return qstricmp(encoding.constData(), "gzip") == 0; } void QHttpNetworkReplyPrivate::removeAutoDecompressHeader() @@ -247,11 +247,10 @@ void QHttpNetworkReplyPrivate::removeAutoDecompressHeader() // The header "Content-Encoding = gzip" is retained. // Content-Length is removed since the actual one send by the server is for compressed data QByteArray name("content-length"); - QByteArray lowerName = name.toLower(); QList<QPair<QByteArray, QByteArray> >::Iterator it = fields.begin(), end = fields.end(); while (it != end) { - if (name == it->first.toLower()) { + if (qstricmp(name.constData(), it->first.constData()) == 0) { fields.erase(it); break; } @@ -269,6 +268,7 @@ bool QHttpNetworkReplyPrivate::findChallenge(bool forProxy, QByteArray &challeng QList<QByteArray> challenges = headerFieldValues(header); for (int i = 0; i<challenges.size(); i++) { QByteArray line = challenges.at(i); + // todo use qstrincmp if (!line.toLower().startsWith("negotiate")) challenge = line; } diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index 1a92868..3e2db7a 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -141,6 +141,8 @@ QNonContiguousByteDevice* QNetworkAccessBackend::createUploadByteDevice() // and the special backends need to access this. void QNetworkAccessBackend::emitReplyUploadProgress(qint64 bytesSent, qint64 bytesTotal) { + if (reply->isFinished()) + return; reply->emitUploadProgress(bytesSent, bytesTotal); } diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index bfcc299..91f9189 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -732,7 +732,7 @@ void QNetworkAccessHttpBackend::replyHeaderChanged() for (; it != end; ++it) { QByteArray value = rawHeader(it->first); if (!value.isEmpty()) { - if (it->first.toLower() == "set-cookie") + if (qstricmp(it->first.constData(), "set-cookie") == 0) value += "\n"; else value += ", "; diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index b1160aa..754633d 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -52,6 +52,7 @@ #include "qnetworkaccessfilebackend_p.h" #include "qnetworkaccessdatabackend_p.h" #include "qnetworkaccessdebugpipebackend_p.h" +#include "qfilenetworkreply_p.h" #include "QtCore/qbuffer.h" #include "QtCore/qurl.h" @@ -681,6 +682,17 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera QIODevice *outgoingData) { Q_D(QNetworkAccessManager); + + // fast path for GET on file:// URLs + // Also if the scheme is empty we consider it a file. + // The QNetworkAccessFileBackend will right now only be used + // for PUT or qrc:// + if (op == QNetworkAccessManager::GetOperation + && (req.url().scheme() == QLatin1String("file") + || req.url().scheme().isEmpty())) { + return new QFileNetworkReply(this, req); + } + QNetworkRequest request = req; if (!request.header(QNetworkRequest::ContentLengthHeader).isValid() && outgoingData && !outgoingData->isSequential()) { diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index 19f7217..f826115 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -192,9 +192,10 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList<QNetworkCookie> &cookieLis // validate the cookie & set the defaults if unset if (cookie.path().isEmpty()) cookie.setPath(defaultPath); - else if (!isParentPath(pathAndFileName, cookie.path())) - continue; // not accepted - + // don't do path checking. See http://bugreports.qt.nokia.com/browse/QTBUG-5815 +// else if (!isParentPath(pathAndFileName, cookie.path())) { +// continue; // not accepted +// } if (cookie.domain().isEmpty()) { cookie.setDomain(defaultDomain); } else { diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp index 86195c6..c91c608 100644 --- a/src/network/access/qnetworkrequest.cpp +++ b/src/network/access/qnetworkrequest.cpp @@ -48,6 +48,8 @@ #include "QtCore/qlocale.h" #include "QtCore/qdatetime.h" +#include <ctype.h> + QT_BEGIN_NAMESPACE /*! @@ -606,26 +608,25 @@ static QNetworkRequest::KnownHeaders parseHeaderName(const QByteArray &headerNam { // headerName is not empty here - QByteArray lower = headerName.toLower(); - switch (lower.at(0)) { + switch (tolower(headerName.at(0))) { case 'c': - if (lower == "content-type") + if (qstricmp(headerName.constData(), "content-type") == 0) return QNetworkRequest::ContentTypeHeader; - else if (lower == "content-length") + else if (qstricmp(headerName.constData(), "content-length") == 0) return QNetworkRequest::ContentLengthHeader; - else if (lower == "cookie") + else if (qstricmp(headerName.constData(), "cookie") == 0) return QNetworkRequest::CookieHeader; break; case 'l': - if (lower == "location") + if (qstricmp(headerName.constData(), "location") == 0) return QNetworkRequest::LocationHeader; - else if (lower == "last-modified") + else if (qstricmp(headerName.constData(), "last-modified") == 0) return QNetworkRequest::LastModifiedHeader; break; case 's': - if (lower == "set-cookie") + if (qstricmp(headerName.constData(), "set-cookie") == 0) return QNetworkRequest::SetCookieHeader; break; } @@ -697,11 +698,10 @@ static QVariant parseHeaderValue(QNetworkRequest::KnownHeaders header, const QBy QNetworkHeadersPrivate::RawHeadersList::ConstIterator QNetworkHeadersPrivate::findRawHeader(const QByteArray &key) const { - QByteArray lowerKey = key.toLower(); RawHeadersList::ConstIterator it = rawHeaders.constBegin(); RawHeadersList::ConstIterator end = rawHeaders.constEnd(); for ( ; it != end; ++it) - if (it->first.toLower() == lowerKey) + if (qstricmp(it->first.constData(), key.constData()) == 0) return it; return end; // not found @@ -775,10 +775,9 @@ void QNetworkHeadersPrivate::setCookedHeader(QNetworkRequest::KnownHeaders heade void QNetworkHeadersPrivate::setRawHeaderInternal(const QByteArray &key, const QByteArray &value) { - QByteArray lowerKey = key.toLower(); RawHeadersList::Iterator it = rawHeaders.begin(); while (it != rawHeaders.end()) { - if (it->first.toLower() == lowerKey) + if (qstricmp(it->first.constData(), key.constData()) == 0) it = rawHeaders.erase(it); else ++it; @@ -805,6 +804,68 @@ void QNetworkHeadersPrivate::parseAndSetHeader(const QByteArray &key, const QByt } } +// Fast month string to int conversion. This code +// assumes that the Month name is correct and that +// the string is at least three chars long. +static int name_to_month(const char* month_str) +{ + switch (month_str[0]) { + case 'J': + switch (month_str[1]) { + case 'a': + return 1; + break; + case 'u': + switch (month_str[2] ) { + case 'n': + return 6; + break; + case 'l': + return 7; + break; + } + } + break; + case 'F': + return 2; + break; + case 'M': + switch (month_str[2] ) { + case 'r': + return 3; + break; + case 'y': + return 5; + break; + } + break; + case 'A': + switch (month_str[1]) { + case 'p': + return 4; + break; + case 'u': + return 8; + break; + } + break; + case 'O': + return 10; + break; + case 'S': + return 9; + break; + case 'N': + return 11; + break; + case 'D': + return 12; + break; + } + + return 0; +} + QDateTime QNetworkHeadersPrivate::fromHttpDate(const QByteArray &value) { // HTTP dates have three possible formats: @@ -820,16 +881,20 @@ QDateTime QNetworkHeadersPrivate::fromHttpDate(const QByteArray &value) // no comma -> asctime(3) format dt = QDateTime::fromString(QString::fromLatin1(value), Qt::TextDate); } else { - // eat the weekday, the comma and the space following it - QString sansWeekday = QString::fromLatin1(value.constData() + pos + 2); - - QLocale c = QLocale::c(); - if (pos == 3) - // must be RFC 1123 date - dt = c.toDateTime(sansWeekday, QLatin1String("dd MMM yyyy hh:mm:ss 'GMT")); - else + // Use sscanf over QLocal/QDateTimeParser for speed reasons. See the + // QtWebKit performance benchmarks to get an idea. + if (pos == 3) { + char month_name[4]; + int day, year, hour, minute, second; + if (sscanf(value.constData(), "%*3s, %d %3s %d %d:%d:%d 'GMT'", &day, month_name, &year, &hour, &minute, &second) == 6) + dt = QDateTime(QDate(year, name_to_month(month_name), day), QTime(hour, minute, second)); + } else { + QLocale c = QLocale::c(); + // eat the weekday, the comma and the space following it + QString sansWeekday = QString::fromLatin1(value.constData() + pos + 2); // must be RFC 850 date dt = c.toDateTime(sansWeekday, QLatin1String("dd-MMM-yy hh:mm:ss 'GMT'")); + } } #endif // QT_NO_DATESTRING diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp index 6f92424..0e2dd2b 100644 --- a/src/network/kernel/qnetworkproxy_win.cpp +++ b/src/network/kernel/qnetworkproxy_win.cpp @@ -291,7 +291,10 @@ void QWindowsSystemProxy::init() GlobalFree(ieProxyConfig.lpszAutoConfigUrl); } if (ieProxyConfig.lpszProxy) { - proxyServerList << QString::fromWCharArray(ieProxyConfig.lpszProxy); + // http://msdn.microsoft.com/en-us/library/aa384250%28VS.85%29.aspx speaks only about a "proxy URL", + // not multiple URLs. However we tested this and it can return multiple URLs. So we use splitSpaceSemicolon + // on it. + proxyServerList = splitSpaceSemicolon(QString::fromWCharArray(ieProxyConfig.lpszProxy)); GlobalFree(ieProxyConfig.lpszProxy); } if (ieProxyConfig.lpszProxyBypass) { diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index ecf5ad9..5d17022 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -876,7 +876,7 @@ bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut) */ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut) { - Q_D(const QNativeSocketEngine); + Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false); Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForWrite(), QAbstractSocket::UnconnectedState, false); @@ -893,6 +893,24 @@ bool QNativeSocketEngine::waitForWrite(int msecs, bool *timedOut) setState(QAbstractSocket::ConnectedState); d_func()->fetchConnectionParameters(); return true; + } else { + int value = 0; + int valueSize = sizeof(value); + if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) { + if (value == WSAECONNREFUSED) { + d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAETIMEDOUT) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAEHOSTUNREACH) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } + } } #endif @@ -913,7 +931,7 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri bool checkRead, bool checkWrite, int msecs, bool *timedOut) { - Q_D(const QNativeSocketEngine); + Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::waitForWrite(), false); Q_CHECK_NOT_STATE(QNativeSocketEngine::waitForReadOrWrite(), QAbstractSocket::UnconnectedState, false); @@ -927,6 +945,24 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri setState(QAbstractSocket::ConnectedState); d_func()->fetchConnectionParameters(); return true; + } else { + int value = 0; + int valueSize = sizeof(value); + if (::getsockopt(d->socketDescriptor, SOL_SOCKET, SO_ERROR, (char *) &value, &valueSize) == 0) { + if (value == WSAECONNREFUSED) { + d->setError(QAbstractSocket::ConnectionRefusedError, QNativeSocketEnginePrivate::ConnectionRefusedErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAETIMEDOUT) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::ConnectionTimeOutErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } else if (value == WSAEHOSTUNREACH) { + d->setError(QAbstractSocket::NetworkError, QNativeSocketEnginePrivate::HostUnreachableErrorString); + d->socketState = QAbstractSocket::UnconnectedState; + return false; + } + } } #endif if (ret == 0) { diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 63fe78e..91f930a 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -1107,10 +1107,22 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) co tv.tv_sec = timeout / 1000; tv.tv_usec = (timeout % 1000) * 1000; - if (selectForRead) + if (selectForRead) { ret = select(0, &fds, 0, 0, timeout < 0 ? 0 : &tv); - else - ret = select(0, 0, &fds, 0, timeout < 0 ? 0 : &tv); + } else { + // select for write + + // Windows needs this to report errors when connecting a socket ... + fd_set fdexception; + FD_ZERO(&fdexception); + FD_SET(socketDescriptor, &fdexception); + + ret = select(0, 0, &fds, &fdexception, timeout < 0 ? 0 : &tv); + + // ... but if it is actually set, pretend it did not happen + if (ret > 0 && FD_ISSET(socketDescriptor, &fdexception)) + ret--; + } if (readEnabled) readNotifier->setEnabled(true); @@ -1125,9 +1137,10 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool readEnabled = checkRead && readNotifier && readNotifier->isEnabled(); if (readEnabled) readNotifier->setEnabled(false); - + fd_set fdread; fd_set fdwrite; + fd_set fdexception; int ret = 0; @@ -1137,9 +1150,13 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, fdread.fd_array[0] = socketDescriptor; } memset(&fdwrite, 0, sizeof(fd_set)); + FD_ZERO(&fdexception); if (checkWrite) { fdwrite.fd_count = 1; fdwrite.fd_array[0] = socketDescriptor; + + // Windows needs this to report errors when connecting a socket + FD_SET(socketDescriptor, &fdexception); } struct timeval tv; @@ -1147,10 +1164,15 @@ int QNativeSocketEnginePrivate::nativeSelect(int timeout, tv.tv_usec = (timeout % 1000) * 1000; #if !defined(Q_OS_WINCE) - ret = select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv); + ret = select(socketDescriptor + 1, &fdread, &fdwrite, &fdexception, timeout < 0 ? 0 : &tv); #else - ret = select(1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv); + ret = select(1, &fdread, &fdwrite, &fdexception, timeout < 0 ? 0 : &tv); #endif + + //... but if it is actually set, pretend it did not happen + if (ret > 0 && FD_ISSET(socketDescriptor, &fdexception)) + ret--; + if (readEnabled) readNotifier->setEnabled(true); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 8c5bf0e..823f919 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -158,8 +158,8 @@ QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyph , m_height(0) { glGenFramebuffers(1, &m_fbo); - connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(contextDestroyed(const QGLContext *))); + connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(contextDestroyed(const QGLContext*))); } QGLTextureGlyphCache::~QGLTextureGlyphCache() diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 1163eba..1478b09 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -61,6 +61,9 @@ void QTriangulatingStroker::endCapOrJoinClosed(const qreal *start, const qreal * } else { endCap(cur); } + int count = m_vertices.size(); + m_vertices.add(m_vertices.at(count-2)); + m_vertices.add(m_vertices.at(count-1)); } @@ -144,7 +147,6 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen) bool endsAtStart = startPts[0] == *(endPts-2) && startPts[1] == *(endPts-1); - Qt::PenCapStyle cap = m_cap_style; if (endsAtStart || path.hasImplicitClose()) m_cap_style = Qt::FlatCap; moveTo(pts); @@ -166,7 +168,7 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen) switch (*types) { case QPainterPath::MoveToElement: { if (pts != path.points()) - endCapOrJoinClosed(startPts, pts, path.hasImplicitClose(), endsAtStart); + endCapOrJoinClosed(startPts, pts-2, path.hasImplicitClose(), endsAtStart); startPts = pts; int end = (endPts - pts) / 2; @@ -244,8 +246,6 @@ void QTriangulatingStroker::cubicTo(const qreal *pts) m_nvy = vy; } - - static void qdashprocessor_moveTo(qreal x, qreal y, void *data) { ((QDashedStrokeProcessor *) data)->addElement(QPainterPath::MoveToElement, x, y); @@ -279,12 +279,12 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen) m_points.reset(); m_types.reset(); - qreal width = pen.width(); + qreal width = qpen_widthf(pen); if (width == 0) width = 1; m_dash_stroker.setDashPattern(pen.dashPattern()); - m_dash_stroker.setStrokeWidth(width); + m_dash_stroker.setStrokeWidth(pen.isCosmetic() ? width * m_inv_scale : width); m_dash_stroker.setMiterLimit(pen.miterLimit()); qreal curvyness = sqrt(width) * m_inv_scale / 8; diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h index defa3f1..a0117d5 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker_p.h @@ -188,10 +188,6 @@ inline void QTriangulatingStroker::endCap(const qreal *pts) break; default: break; // to shut gcc up... } - - int count = m_vertices.size(); - m_vertices.add(m_vertices.at(count-2)); - m_vertices.add(m_vertices.at(count-1)); } diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 8063fc8..d5ca218 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -184,8 +184,13 @@ public: engineType = QPaintEngine::OpenGL2; #else // We can't do this in the constructor for this object because it - // needs to be called *before* the QApplication constructor + // needs to be called *before* the QApplication constructor. + // Also check for the FragmentProgram extension in conjunction with + // the 2.0 version flag, to cover the case where we export the display + // from an old GL 1.1 server to a GL 2.x client. In that case we can't + // use GL 2.0. if ((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) + && (QGLExtensions::glExtensions & QGLExtensions::FragmentProgram) && qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty()) engineType = QPaintEngine::OpenGL2; else @@ -2170,8 +2175,8 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G int tx_h = qt_next_power_of_two(image.height()); QImage img = image; - if (( !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) && - !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0) ) + if (!(QGLExtensions::glExtensions & QGLExtensions::NPOTTextures) + && !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0) && (target == GL_TEXTURE_2D && (tx_w != image.width() || tx_h != image.height()))) { img = img.scaled(tx_w, tx_h); @@ -2192,9 +2197,9 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G bool genMipmap = false; #endif if (glFormat.directRendering() - && QGLExtensions::glExtensions & QGLExtensions::GenerateMipmap + && (QGLExtensions::glExtensions & QGLExtensions::GenerateMipmap) && target == GL_TEXTURE_2D - && options & QGLContext::MipmapBindOption) + && (options & QGLContext::MipmapBindOption)) { #ifdef QGL_BIND_TEXTURE_DEBUG printf(" - generating mipmaps (%d ms)\n", time.elapsed()); @@ -2220,7 +2225,7 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G bool premul = options & QGLContext::PremultipliedAlphaBindOption; GLenum externalFormat; GLuint pixel_type; - if (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_2) { + if (QGLExtensions::glExtensions & QGLExtensions::BGRATextureFormat) { externalFormat = GL_BGRA; pixel_type = GL_UNSIGNED_INT_8_8_8_8_REV; } else { @@ -3030,7 +3035,7 @@ void QGLContext::setValid(bool valid) bool QGLContext::isSharing() const { Q_D(const QGLContext); - return d->sharing; + return d->group->isSharing(); } QGLFormat QGLContext::format() const @@ -4886,54 +4891,59 @@ QGLWidget::QGLWidget(QGLContext *context, QWidget *parent, void QGLExtensions::init_extensions() { - QString extensions = QLatin1String(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS))); - if (extensions.contains(QLatin1String("texture_rectangle"))) + QList<QByteArray> extensions = QByteArray(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS))).split(' '); + if (extensions.contains("GL_ARB_texture_rectangle")) glExtensions |= TextureRectangle; - if (extensions.contains(QLatin1String("multisample"))) + if (extensions.contains("GL_ARB_multisample")) glExtensions |= SampleBuffers; - if (extensions.contains(QLatin1String("generate_mipmap"))) + if (extensions.contains("GL_SGIS_generate_mipmap")) glExtensions |= GenerateMipmap; - if (extensions.contains(QLatin1String("texture_compression_s3tc"))) + if (extensions.contains("GL_EXT_texture_compression_s3tc")) glExtensions |= TextureCompression; - if (extensions.contains(QLatin1String("ARB_fragment_program"))) + if (extensions.contains("GL_ARB_fragment_program")) glExtensions |= FragmentProgram; - if (extensions.contains(QLatin1String("mirrored_repeat"))) + if (extensions.contains("GL_ARB_texture_mirrored_repeat")) glExtensions |= MirroredRepeat; - if (extensions.contains(QLatin1String("EXT_framebuffer_object"))) + if (extensions.contains("GL_EXT_framebuffer_object")) glExtensions |= FramebufferObject; - if (extensions.contains(QLatin1String("EXT_stencil_two_side"))) + if (extensions.contains("GL_EXT_stencil_two_side")) glExtensions |= StencilTwoSide; - if (extensions.contains(QLatin1String("EXT_stencil_wrap"))) + if (extensions.contains("GL_EXT_stencil_wrap")) glExtensions |= StencilWrap; - if (extensions.contains(QLatin1String("EXT_packed_depth_stencil"))) + if (extensions.contains("GL_EXT_packed_depth_stencil")) glExtensions |= PackedDepthStencil; - if (extensions.contains(QLatin1String("GL_NV_float_buffer"))) + if (extensions.contains("GL_NV_float_buffer")) glExtensions |= NVFloatBuffer; - if (extensions.contains(QLatin1String("ARB_pixel_buffer_object"))) + if (extensions.contains("GL_ARB_pixel_buffer_object")) glExtensions |= PixelBufferObject; #if defined(QT_OPENGL_ES_2) glExtensions |= FramebufferObject; glExtensions |= GenerateMipmap; #endif #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) - if (extensions.contains(QLatin1String("OES_framebuffer_object"))) + if (extensions.contains("GL_OES_framebuffer_object")) glExtensions |= FramebufferObject; #endif #if defined(QT_OPENGL_ES) - if (extensions.contains(QLatin1String("OES_packed_depth_stencil"))) + if (extensions.contains("GL_OES_packed_depth_stencil")) glExtensions |= PackedDepthStencil; #endif - if (extensions.contains(QLatin1String("ARB_framebuffer_object"))) { + if (extensions.contains("GL_ARB_framebuffer_object")) { // ARB_framebuffer_object also includes EXT_framebuffer_blit. glExtensions |= FramebufferObject; glExtensions |= FramebufferBlit; } - if (extensions.contains(QLatin1String("EXT_framebuffer_blit"))) + + if (extensions.contains("GL_EXT_framebuffer_blit")) glExtensions |= FramebufferBlit; - if (extensions.contains(QLatin1String("GL_ARB_texture_non_power_of_two"))) + if (extensions.contains("GL_ARB_texture_non_power_of_two")) glExtensions |= NPOTTextures; + if (extensions.contains("GL_EXT_bgra")) + glExtensions |= BGRATextureFormat; + + QGLContext cx(QGLFormat::defaultFormat()); if (glExtensions & TextureCompression) { qt_glCompressedTexImage2DARB = (pfn_glCompressedTexImage2DARB) cx.getProcAddress(QLatin1String("glCompressedTexImage2DARB")); diff --git a/src/opengl/qgl_mac.mm b/src/opengl/qgl_mac.mm index 063082b..4dd822d 100644 --- a/src/opengl/qgl_mac.mm +++ b/src/opengl/qgl_mac.mm @@ -460,6 +460,7 @@ void QGLContext::reset() if (d->cx) aglDestroyContext((AGLContext)d->cx); #else + QMacCocoaAutoReleasePool pool; [static_cast<NSOpenGLContext *>(d->cx) release]; #endif d->cx = 0; diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 9a17c67..8e472e5 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -233,6 +233,7 @@ public: QGLExtensionFuncs &extensionFuncs() {return m_extensionFuncs;} const QGLContext *context() const {return m_context;} + bool isSharing() const { return m_shares.size() >= 2; } void addGuard(QGLSharedResourceGuard *guard); void removeGuard(QGLSharedResourceGuard *guard); @@ -374,7 +375,8 @@ public: NVFloatBuffer = 0x00000400, PixelBufferObject = 0x00000800, FramebufferBlit = 0x00001000, - NPOTTextures = 0x00002000 + NPOTTextures = 0x00002000, + BGRATextureFormat = 0x00004000 }; Q_DECLARE_FLAGS(Extensions, Extension) diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp index 5e59975..a189c20 100644 --- a/src/opengl/qgl_qws.cpp +++ b/src/opengl/qgl_qws.cpp @@ -206,6 +206,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) d->eglContext = 0; return false; } + d->sharing = d->eglContext->isSharing(); + if (d->sharing && shareContext) + const_cast<QGLContext *>(shareContext)->d_func()->sharing = true; #if defined(EGL_VERSION_1_1) if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp index fea2d3a..2553110 100644 --- a/src/opengl/qgl_wince.cpp +++ b/src/opengl/qgl_wince.cpp @@ -166,6 +166,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) d->eglContext = 0; return false; } + d->sharing = d->eglContext->isSharing(); + if (d->sharing && shareContext) + const_cast<QGLContext *>(shareContext)->d_func()->sharing = true; #if defined(EGL_VERSION_1_1) if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 899047a..a037282 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -343,8 +343,8 @@ void* qglx_getProcAddress(const char* procName) static bool triedResolvingGlxGetProcAddress = false; if (!triedResolvingGlxGetProcAddress) { triedResolvingGlxGetProcAddress = true; - QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); - if (glxExt.contains(QLatin1String("GLX_ARB_get_proc_address"))) { + QList<QByteArray> glxExt = QByteArray(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)).split(' '); + if (glxExt.contains("GLX_ARB_get_proc_address")) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); if (handle) { @@ -523,8 +523,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) if (!d->gpm) return false; } - QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); - if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { + QList<QByteArray> glxExt = QByteArray(glXQueryExtensionsString(xinfo->display(), xinfo->screen())).split(' '); + if (glxExt.contains("GLX_SGI_video_sync")) { if (d->glFormat.swapInterval() == -1) d->glFormat.setSwapInterval(0); } else { @@ -874,8 +874,9 @@ void QGLContext::swapBuffers() const static qt_glXWaitVideoSyncSGI glXWaitVideoSyncSGI = 0; static bool resolved = false; if (!resolved) { - QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); - if (glxExt.contains(QLatin1String("GLX_SGI_video_sync"))) { + const QX11Info *xinfo = qt_x11Info(d->paintDevice); + QList<QByteArray> glxExt = QByteArray(glXQueryExtensionsString(xinfo->display(), xinfo->screen())).split(' '); + if (glxExt.contains("GLX_SGI_video_sync")) { glXGetVideoSyncSGI = (qt_glXGetVideoSyncSGI)qglx_getProcAddress("glXGetVideoSyncSGI"); glXWaitVideoSyncSGI = (qt_glXWaitVideoSyncSGI)qglx_getProcAddress("glXWaitVideoSyncSGI"); } @@ -1106,8 +1107,8 @@ void *QGLContext::getProcAddress(const QString &proc) const if (resolved && !glXGetProcAddressARB) return 0; if (!glXGetProcAddressARB) { - QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); - if (glxExt.contains(QLatin1String("GLX_ARB_get_proc_address"))) { + QList<QByteArray> glxExt = QByteArray(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)).split(' '); + if (glxExt.contains("GLX_ARB_get_proc_address")) { #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) void *handle = dlopen(NULL, RTLD_LAZY); if (handle) { @@ -1594,7 +1595,7 @@ typedef void (*qt_glXReleaseTexImageEXT)(Display*, GLXDrawable, int); static qt_glXBindTexImageEXT glXBindTexImageEXT = 0; static qt_glXReleaseTexImageEXT glXReleaseTexImageEXT = 0; -bool qt_resolveTextureFromPixmap() +static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice) { static bool resolvedTextureFromPixmap = false; @@ -1607,9 +1608,9 @@ bool qt_resolveTextureFromPixmap() { return false; // Can't use TFP without NPOT } - - QString glxExt = QLatin1String(glXGetClientString(QX11Info::display(), GLX_EXTENSIONS)); - if (glxExt.contains(QLatin1String("GLX_EXT_texture_from_pixmap"))) { + const QX11Info *xinfo = qt_x11Info(paintDevice); + QList<QByteArray> glxExt = QByteArray(glXQueryExtensionsString(xinfo->display(), xinfo->screen())).split(' '); + if (glxExt.contains("GLX_EXT_texture_from_pixmap")) { glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT"); glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT"); } @@ -1630,7 +1631,7 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData *pmd, con Q_ASSERT(pmd->classId() == QPixmapData::X11Class); - if (!qt_resolveTextureFromPixmap()) + if (!qt_resolveTextureFromPixmap(paintDevice)) return 0; QX11PixmapData *pixmapData = static_cast<QX11PixmapData*>(pmd); diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp index 9b20297..b51c239 100644 --- a/src/opengl/qgl_x11egl.cpp +++ b/src/opengl/qgl_x11egl.cpp @@ -115,6 +115,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) d->eglContext = 0; return false; } + d->sharing = d->eglContext->isSharing(); + if (d->sharing && shareContext) + const_cast<QGLContext *>(shareContext)->d_func()->sharing = true; #if defined(EGL_VERSION_1_1) if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp index 744fbd4..de08655 100644 --- a/src/opengl/qglpixelbuffer_egl.cpp +++ b/src/opengl/qglpixelbuffer_egl.cpp @@ -72,37 +72,53 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge return false; } + // Find the shared context. + QEglContext *shareContext = 0; + if (shareWidget && shareWidget->d_func()->glcx) + shareContext = shareWidget->d_func()->glcx->d_func()->eglContext; + // Choose an appropriate configuration. We use the best format // we can find, even if it is greater than the requested format. // We try for a pbuffer that is capable of texture rendering if possible. - QEglProperties configProps; - qt_egl_set_format(configProps, QInternal::Pbuffer, f); - configProps.setRenderableType(ctx->api()); - bool ok = false; + textureFormat = EGL_NONE; + if (shareContext) { + // Use the same configuration as the widget we are sharing with. + ctx->setConfig(shareContext->config()); +#if QGL_RENDER_TEXTURE + EGLint value = EGL_FALSE; + if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGBA, &value) && value) + textureFormat = EGL_TEXTURE_RGBA; + else if (ctx->configAttrib(EGL_BIND_TO_TEXTURE_RGB, &value) && value) + textureFormat = EGL_TEXTURE_RGB; +#endif + } else { + QEglProperties configProps; + qt_egl_set_format(configProps, QInternal::Pbuffer, f); + configProps.setRenderableType(ctx->api()); + bool ok = false; #if QGL_RENDER_TEXTURE - textureFormat = EGL_TEXTURE_RGBA; - configProps.setValue(EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE); - ok = ctx->chooseConfig(configProps, QEgl::BestPixelFormat); - if (!ok) { - // Try again with RGB texture rendering. - textureFormat = EGL_TEXTURE_RGB; - configProps.removeValue(EGL_BIND_TO_TEXTURE_RGBA); - configProps.setValue(EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE); + textureFormat = EGL_TEXTURE_RGBA; + configProps.setValue(EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE); ok = ctx->chooseConfig(configProps, QEgl::BestPixelFormat); if (!ok) { - // One last try for a pbuffer with no texture rendering. - configProps.removeValue(EGL_BIND_TO_TEXTURE_RGB); - textureFormat = EGL_NONE; + // Try again with RGB texture rendering. + textureFormat = EGL_TEXTURE_RGB; + configProps.removeValue(EGL_BIND_TO_TEXTURE_RGBA); + configProps.setValue(EGL_BIND_TO_TEXTURE_RGB, EGL_TRUE); + ok = ctx->chooseConfig(configProps, QEgl::BestPixelFormat); + if (!ok) { + // One last try for a pbuffer with no texture rendering. + configProps.removeValue(EGL_BIND_TO_TEXTURE_RGB); + textureFormat = EGL_NONE; + } } - } -#else - textureFormat = EGL_NONE; #endif - if (!ok) { - if (!ctx->chooseConfig(configProps, QEgl::BestPixelFormat)) { - delete ctx; - ctx = 0; - return false; + if (!ok) { + if (!ctx->chooseConfig(configProps, QEgl::BestPixelFormat)) { + delete ctx; + ctx = 0; + return false; + } } } @@ -137,9 +153,6 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge } // Create a new context for the configuration. - QEglContext *shareContext = 0; - if (shareWidget && shareWidget->d_func()->glcx) - shareContext = shareWidget->d_func()->glcx->d_func()->eglContext; if (!ctx->createContext(shareContext)) { delete ctx; ctx = 0; diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index fcb0ea2..c478630 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -989,7 +989,7 @@ bool QGLPixmapDropShadowFilter::processGL(QPainter *painter, const QPointF &pos, // ensure GL_LINEAR filtering is used painter->setRenderHint(QPainter::SmoothPixmapTransform); filter->setOnPainter(painter); - engine->drawTexture(targetRect, fbo->texture(), fbo->size(), src.rect().translated(0, fbo->height() - src.height())); + engine->drawTexture(targetRect, fbo->texture(), fbo->size(), QRectF(0, fbo->height() - targetRect.height(), targetRect.width(), targetRect.height())); filter->removeFromPainter(painter); painter->restore(); diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index aa6b6c9..8ab17a0 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -248,8 +248,8 @@ public: bound(false) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } inline void setDevice(QPaintDevice *pdev); @@ -525,8 +525,8 @@ public: QGLProgramCache() { // we have to know when a context is deleted so we can free // any program handles it holds - connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupPrograms(const QGLContext *))); + connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupPrograms(const QGLContext*))); } ~QGLProgramCache() { @@ -639,8 +639,8 @@ public: : p(priv) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } public Q_SLOTS: @@ -1010,8 +1010,8 @@ public: QGLGradientCache() : QObject(), buffer_ctx(0) { connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupGLContextRefs(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupGLContextRefs(const QGLContext*))); } inline GLuint getBuffer(const QGradient &gradient, qreal opacity, QGLContext *ctx) { @@ -4712,8 +4712,8 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, const QTextItemInt &ti, QWidget *widget = static_cast<QWidget *>(context->device()); connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); connect(QGLSignalProxy::instance(), - SIGNAL(aboutToDestroyContext(const QGLContext *)), - SLOT(cleanupContext(const QGLContext *))); + SIGNAL(aboutToDestroyContext(const QGLContext*)), + SLOT(cleanupContext(const QGLContext*))); } } else { font_cache = dev_it.value(); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index f1f5976..e353f5d 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -374,7 +374,7 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) union { QGLContext **ctxPtr; void **voidPtr; }; - connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(deleted(QObject *))); + connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(deleted(QObject*))); voidPtr = &widgetPrivate->extraData()->glContext; d_ptr->contexts << ctxPtr; diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 75b7fa5..fda4b10 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3407,6 +3407,34 @@ void QVGPaintEngine::restoreState(QPaintEngine::DirtyFlags dirty) #endif } +void QVGPaintEngine::fillRegion + (const QRegion& region, const QColor& color, const QSize& surfaceSize) +{ + Q_D(QVGPaintEngine); + if (d->clearColor != color || d->clearOpacity != 1.0f) { + VGfloat values[4]; + values[0] = color.redF(); + values[1] = color.greenF(); + values[2] = color.blueF(); + values[3] = color.alphaF(); + vgSetfv(VG_CLEAR_COLOR, 4, values); + d->clearColor = color; + d->clearOpacity = 1.0f; + } + if (region.rectCount() == 1) { + QRect r = region.boundingRect(); + vgClear(r.x(), surfaceSize.height() - r.y() - r.height(), + r.width(), r.height()); + } else { + const QVector<QRect> rects = region.rects(); + for (int i = 0; i < rects.size(); ++i) { + QRect r = rects.at(i); + vgClear(r.x(), surfaceSize.height() - r.y() - r.height(), + r.width(), r.height()); + } + } +} + #if !defined(QVG_NO_SINGLE_CONTEXT) && !defined(QT_NO_EGL) QVGCompositionHelper::QVGCompositionHelper() diff --git a/src/openvg/qpaintengine_vg_p.h b/src/openvg/qpaintengine_vg_p.h index 1202b55..86a522a 100644 --- a/src/openvg/qpaintengine_vg_p.h +++ b/src/openvg/qpaintengine_vg_p.h @@ -151,6 +151,8 @@ public: QVGPaintEnginePrivate *vgPrivate() { Q_D(QVGPaintEngine); return d; } + void fillRegion(const QRegion& region, const QColor& color, const QSize& surfaceSize); + protected: QVGPaintEngine(QVGPaintEnginePrivate &data); diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3254aa3..19c90ed 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -92,7 +92,6 @@ QVGPixmapData::~QVGPixmapData() vgDestroyImage(vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) vgDestroyImage(vgImageOpacity); - } else { #endif } #if !defined(QT_NO_EGL) @@ -202,6 +201,14 @@ QPaintEngine* QVGPixmapData::paintEngine() const return source.paintEngine(); } +// This function works around QImage::bits() making a deep copy if the +// QImage is not const. We force it to be const and then get the bits. +// XXX: Should add a QImage::constBits() in the future to replace this. +static inline const uchar *qt_vg_imageBits(const QImage& image) +{ + return image.bits(); +} + VGImage QVGPixmapData::toVGImage() { if (!isValid()) @@ -213,7 +220,7 @@ VGImage QVGPixmapData::toVGImage() context = qt_vg_create_context(0); #endif - if (recreate) { + if (recreate && prevSize != QSize(w, h)) { if (vgImage != VG_INVALID_HANDLE) { vgDestroyImage(vgImage); vgImage = VG_INVALID_HANDLE; @@ -222,6 +229,8 @@ VGImage QVGPixmapData::toVGImage() vgDestroyImage(vgImageOpacity); vgImageOpacity = VG_INVALID_HANDLE; } + } else if (recreate) { + cachedOpacity = -1.0f; // Force opacity image to be refreshed later. } if (vgImage == VG_INVALID_HANDLE) { @@ -232,11 +241,12 @@ VGImage QVGPixmapData::toVGImage() if (!source.isNull() && recreate) { vgImageSubData (vgImage, - source.bits(), source.bytesPerLine(), + qt_vg_imageBits(source), source.bytesPerLine(), VG_sARGB_8888_PRE, 0, 0, w, h); } recreate = false; + prevSize = QSize(w, h); return vgImage; } @@ -244,43 +254,14 @@ VGImage QVGPixmapData::toVGImage() VGImage QVGPixmapData::toVGImage(qreal opacity) { #if !defined(QT_SHIVAVG) - if (!isValid()) + // Force the primary VG image to be recreated if necessary. + if (toVGImage() == VG_INVALID_HANDLE) return VG_INVALID_HANDLE; -#if !defined(QT_NO_EGL) - // Increase the reference count on the shared context. - if (!context) - context = qt_vg_create_context(0); -#endif - - if (recreate) { - if (vgImage != VG_INVALID_HANDLE) { - vgDestroyImage(vgImage); - vgImage = VG_INVALID_HANDLE; - } - if (vgImageOpacity != VG_INVALID_HANDLE) { - vgDestroyImage(vgImageOpacity); - vgImageOpacity = VG_INVALID_HANDLE; - } - } - - if (vgImage == VG_INVALID_HANDLE) { - vgImage = vgCreateImage - (VG_sARGB_8888_PRE, w, h, VG_IMAGE_QUALITY_FASTER); - } - - if (!source.isNull() && recreate) { - vgImageSubData - (vgImage, - source.bits(), source.bytesPerLine(), - VG_sARGB_8888_PRE, 0, 0, w, h); - } - - recreate = false; - if (opacity == 1.0f) return vgImage; + // Create an alternative image for the selected opacity. if (vgImageOpacity == VG_INVALID_HANDLE || cachedOpacity != opacity) { if (vgImageOpacity == VG_INVALID_HANDLE) { vgImageOpacity = vgCreateImage @@ -405,6 +386,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) vgDestroyImage(vgImageOpacity); vgImageOpacity = VG_INVALID_HANDLE; } + prevSize = QSize(); TInt err = 0; @@ -465,6 +447,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) is_null = (w <= 0 || h <= 0); source = QImage(); recreate = false; + prevSize = QSize(w, h); setSerialNumber(++qt_vg_pixmap_serial); // release stuff eglDestroyImageKHR(context->display(), eglImage); diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h index f552c7b..fe19f35 100644 --- a/src/openvg/qpixmapdata_vg_p.h +++ b/src/openvg/qpixmapdata_vg_p.h @@ -89,10 +89,10 @@ public: // Return the VGImage form of this pixmap, creating it if necessary. // This assumes that there is a VG context current. - VGImage toVGImage(); + virtual VGImage toVGImage(); // Return the VGImage form for a specific opacity setting. - VGImage toVGImage(qreal opacity); + virtual VGImage toVGImage(qreal opacity); QSize size() const { return QSize(w, h); } @@ -108,7 +108,8 @@ protected: void cleanup(); #endif -private: +protected: + QSize prevSize; VGImage vgImage; VGImage vgImageOpacity; qreal cachedOpacity; diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp index f8486a6..a1301e3 100644 --- a/src/openvg/qwindowsurface_vg.cpp +++ b/src/openvg/qwindowsurface_vg.cpp @@ -48,6 +48,7 @@ #if !defined(QT_NO_EGL) #include <QtGui/private/qegl_p.h> +#include <QtGui/private/qwidget_p.h> QT_BEGIN_NAMESPACE @@ -71,7 +72,6 @@ QVGWindowSurface::~QVGWindowSurface() QPaintDevice *QVGWindowSurface::paintDevice() { - d_ptr->beginPaint(window()); return this; } @@ -94,8 +94,16 @@ bool QVGWindowSurface::scroll(const QRegion &area, int dx, int dy) void QVGWindowSurface::beginPaint(const QRegion ®ion) { - // Nothing to do here. - Q_UNUSED(region); + d_ptr->beginPaint(window()); + + // If the window is not opaque, then fill the region we are about + // to paint with the transparent color. + if (!qt_widget_private(window())->isOpaque && + window()->testAttribute(Qt::WA_TranslucentBackground)) { + QVGPaintEngine *engine = static_cast<QVGPaintEngine *> + (d_ptr->paintEngine()); + engine->fillRegion(region, Qt::transparent, d_ptr->surfaceSize()); + } } void QVGWindowSurface::endPaint(const QRegion ®ion) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index eb771ba..4cb0184 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -131,8 +131,8 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr) QWSSignalHandler::instance()->addObject(this); #endif #ifdef QT_DIRECTFB_WM - connect(QWSServer::instance(), SIGNAL(windowEvent(QWSWindow*, QWSServer::WindowEvent)), - this, SLOT(onWindowEvent(QWSWindow*, QWSServer::WindowEvent))); + connect(QWSServer::instance(), SIGNAL(windowEvent(QWSWindow*,QWSServer::WindowEvent)), + this, SLOT(onWindowEvent(QWSWindow*,QWSServer::WindowEvent))); #endif } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index c9a010f..021d52e 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -138,7 +138,7 @@ void QDirectFBWindowSurface::createWindow(const QRect &rect) DFBWindowDescription description; memset(&description, 0, sizeof(DFBWindowDescription)); - description.caps = DWCAPS_NODECORATION|DWCAPS_DOUBLEBUFFER; + description.caps = DWCAPS_NODECORATION; description.flags = DWDESC_CAPS|DWDESC_SURFACE_CAPS|DWDESC_PIXELFORMAT|DWDESC_HEIGHT|DWDESC_WIDTH|DWDESC_POSX|DWDESC_POSY; #if (Q_DIRECTFB_VERSION >= 0x010200) description.flags |= DWDESC_OPTIONS; diff --git a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp index 8756ecb..fb6f5ea 100644 --- a/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp +++ b/src/plugins/graphicssystems/trace/qgraphicssystem_trace.cpp @@ -82,6 +82,7 @@ QTraceWindowSurface::~QTraceWindowSurface() QFile outputFile(QString(QLatin1String("qtgraphics-%0.trace")).arg(winId)); if (outputFile.open(QIODevice::WriteOnly)) { QDataStream out(&outputFile); + out.writeBytes("qttrace", 7); out << *buffer << updates; } delete buffer; diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index 6b2f885..54bbcda 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -196,52 +196,52 @@ inline QRgb *QImageSmoothScaler::scanLine(const int line, const QImage *src) QImage QImageSmoothScaler::scale() { - long SCALE; - long HALFSCALE; - QRgb *xelrow = 0; - QRgb *tempxelrow = 0; - QRgb *xP; - QRgb *nxP; - int row, rowsread; - int col, needtoreadrow; - uchar maxval = 255; - qreal xscale, yscale; - long sxscale, syscale; - long fracrowtofill, fracrowleft; - long *as; - long *rs; - long *gs; - long *bs; - int rowswritten = 0; - QImage dst; + long SCALE; + long HALFSCALE; + QRgb *xelrow = 0; + QRgb *tempxelrow = 0; + QRgb *xP; + QRgb *nxP; + int row, rowsread; + int col, needtoreadrow; + uchar maxval = 255; + qreal xscale, yscale; + long sxscale, syscale; + long fracrowtofill, fracrowleft; + long *as; + long *rs; + long *gs; + long *bs; + int rowswritten = 0; + QImage dst; if (d->cols > 4096) { - SCALE = 4096; - HALFSCALE = 2048; + SCALE = 4096; + HALFSCALE = 2048; } else { - int fac = 4096; - while (d->cols * fac > 4096) { - fac /= 2; - } + int fac = 4096; + while (d->cols * fac > 4096) + fac /= 2; - SCALE = fac * d->cols; - HALFSCALE = fac * d->cols / 2; + SCALE = fac * d->cols; + HALFSCALE = fac * d->cols / 2; } - xscale = (qreal) d->newcols / (qreal) d->cols; - yscale = (qreal) d->newrows / (qreal) d->rows; + xscale = (qreal)d->newcols / (qreal)d->cols; + yscale = (qreal)d->newrows / (qreal)d->rows; sxscale = (long)(xscale * SCALE); syscale = (long)(yscale * SCALE); - if ( d->newrows != d->rows ) /* shortcut Y scaling if possible */ - tempxelrow = new QRgb[d->cols]; + // shortcut Y scaling if possible + if (d->newrows != d->rows) + tempxelrow = new QRgb[d->cols]; - if ( d->hasAlpha ) { - as = new long[d->cols]; - for ( col = 0; col < d->cols; ++col ) - as[col] = HALFSCALE; + if (d->hasAlpha) { + as = new long[d->cols]; + for (col = 0; col < d->cols; ++col) + as[col] = HALFSCALE; } else { - as = 0; + as = 0; } rs = new long[d->cols]; gs = new long[d->cols]; @@ -249,205 +249,217 @@ QImage QImageSmoothScaler::scale() rowsread = 0; fracrowleft = syscale; needtoreadrow = 1; - for ( col = 0; col < d->cols; ++col ) - rs[col] = gs[col] = bs[col] = HALFSCALE; + for (col = 0; col < d->cols; ++col) + rs[col] = gs[col] = bs[col] = HALFSCALE; fracrowtofill = SCALE; - dst = QImage( d->newcols, d->newrows, d->hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32 ); - - for ( row = 0; row < d->newrows; ++row ) { - /* First scale Y from xelrow into tempxelrow. */ - if ( d->newrows == d->rows ) { - /* shortcut Y scaling if possible */ - tempxelrow = xelrow = scanLine(rowsread++, d->src); - } else { - while ( fracrowleft < fracrowtofill ) { - if ( needtoreadrow && rowsread < d->rows ) { - xelrow = scanLine(rowsread++, d->src); - } - for ( col = 0, xP = xelrow; col < d->cols; ++col, ++xP ) { - if (as) { - as[col] += fracrowleft * qAlpha( *xP ); - rs[col] += fracrowleft * qRed( *xP ) * qAlpha( *xP ) / 255; - gs[col] += fracrowleft * qGreen( *xP ) * qAlpha( *xP ) / 255; - bs[col] += fracrowleft * qBlue( *xP ) * qAlpha( *xP ) / 255; - } else { - rs[col] += fracrowleft * qRed( *xP ); - gs[col] += fracrowleft * qGreen( *xP ); - bs[col] += fracrowleft * qBlue( *xP ); - } - } - fracrowtofill -= fracrowleft; - fracrowleft = syscale; - needtoreadrow = 1; - } - /* Now fracrowleft is >= fracrowtofill, so we can produce a row. */ - if ( needtoreadrow && rowsread < d->rows) { - xelrow = scanLine(rowsread++, d->src); - needtoreadrow = 0; - } - for ( col = 0, xP = xelrow, nxP = tempxelrow; - col < d->cols; ++col, ++xP, ++nxP ) - { - register long a, r, g, b; - - if ( as ) { - r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g = gs[col] + fracrowtofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b = bs[col] + fracrowtofill * qBlue( *xP ) * qAlpha( *xP ) / 255; - a = as[col] + fracrowtofill * qAlpha( *xP ); - if ( a ) { - r = r * 255 / a * SCALE; - g = g * 255 / a * SCALE; - b = b * 255 / a * SCALE; - } - } else { - r = rs[col] + fracrowtofill * qRed( *xP ); - g = gs[col] + fracrowtofill * qGreen( *xP ); - b = bs[col] + fracrowtofill * qBlue( *xP ); - a = 0; // unwarn - } - r /= SCALE; - if ( r > maxval ) r = maxval; - g /= SCALE; - if ( g > maxval ) g = maxval; - b /= SCALE; - if ( b > maxval ) b = maxval; - if ( as ) { - a /= SCALE; - if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); - as[col] = HALFSCALE; - } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); - } - rs[col] = gs[col] = bs[col] = HALFSCALE; - } - fracrowleft -= fracrowtofill; - if ( fracrowleft == 0 ) { - fracrowleft = syscale; - needtoreadrow = 1; - } - fracrowtofill = SCALE; - } + dst = QImage(d->newcols, d->newrows, d->hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32); - /* Now scale X from tempxelrow into dst and write it out. */ - if ( d->newcols == d->cols ) { - /* shortcut X scaling if possible */ - memcpy(dst.scanLine(rowswritten++), tempxelrow, d->newcols*4); - } else { - register long a, r, g, b; - register long fraccoltofill, fraccolleft = 0; - register int needcol; - - nxP = (QRgb*)dst.scanLine(rowswritten++); - fraccoltofill = SCALE; - a = r = g = b = HALFSCALE; - needcol = 0; - for ( col = 0, xP = tempxelrow; col < d->cols; ++col, ++xP ) { - fraccolleft = sxscale; - while ( fraccolleft >= fraccoltofill ) { - if ( needcol ) { - ++nxP; - a = r = g = b = HALFSCALE; - } - if ( as ) { - r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; - a += fraccoltofill * qAlpha( *xP ); - if ( a ) { - r = r * 255 / a * SCALE; - g = g * 255 / a * SCALE; - b = b * 255 / a * SCALE; - } - } else { - r += fraccoltofill * qRed( *xP ); - g += fraccoltofill * qGreen( *xP ); - b += fraccoltofill * qBlue( *xP ); - } - r /= SCALE; - if ( r > maxval ) r = maxval; - g /= SCALE; - if ( g > maxval ) g = maxval; - b /= SCALE; - if ( b > maxval ) b = maxval; - if (as) { - a /= SCALE; - if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); - } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); - } - fraccolleft -= fraccoltofill; - fraccoltofill = SCALE; - needcol = 1; - } - if ( fraccolleft > 0 ) { - if ( needcol ) { - ++nxP; - a = r = g = b = HALFSCALE; - needcol = 0; - } - if (as) { - a += fraccolleft * qAlpha( *xP ); - r += fraccolleft * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccolleft * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccolleft * qBlue( *xP ) * qAlpha( *xP ) / 255; - } else { - r += fraccolleft * qRed( *xP ); - g += fraccolleft * qGreen( *xP ); - b += fraccolleft * qBlue( *xP ); - } - fraccoltofill -= fraccolleft; - } - } - if ( fraccoltofill > 0 ) { - --xP; - if (as) { - a += fraccolleft * qAlpha( *xP ); - r += fraccoltofill * qRed( *xP ) * qAlpha( *xP ) / 255; - g += fraccoltofill * qGreen( *xP ) * qAlpha( *xP ) / 255; - b += fraccoltofill * qBlue( *xP ) * qAlpha( *xP ) / 255; - if ( a ) { - r = r * 255 / a * SCALE; - g = g * 255 / a * SCALE; - b = b * 255 / a * SCALE; - } - } else { - r += fraccoltofill * qRed( *xP ); - g += fraccoltofill * qGreen( *xP ); - b += fraccoltofill * qBlue( *xP ); - } - } - if ( ! needcol ) { - r /= SCALE; - if ( r > maxval ) r = maxval; - g /= SCALE; - if ( g > maxval ) g = maxval; - b /= SCALE; - if ( b > maxval ) b = maxval; - if (as) { - a /= SCALE; - if ( a > maxval ) a = maxval; - *nxP = qRgba( (int)r, (int)g, (int)b, (int)a ); - } else { - *nxP = qRgb( (int)r, (int)g, (int)b ); - } - } - } + for (row = 0; row < d->newrows; ++row) { + // First scale Y from xelrow into tempxelrow. + if (d->newrows == d->rows) { + // shortcut Y scaling if possible + tempxelrow = xelrow = scanLine(rowsread++, d->src); + } else { + while (fracrowleft < fracrowtofill) { + if (needtoreadrow && rowsread < d->rows) + xelrow = scanLine(rowsread++, d->src); + for (col = 0, xP = xelrow; col < d->cols; ++col, ++xP) { + if (as) { + as[col] += fracrowleft * qAlpha(*xP); + rs[col] += fracrowleft * qRed(*xP) * qAlpha(*xP) / 255; + gs[col] += fracrowleft * qGreen(*xP) * qAlpha(*xP) / 255; + bs[col] += fracrowleft * qBlue(*xP) * qAlpha(*xP) / 255; + } else { + rs[col] += fracrowleft * qRed(*xP); + gs[col] += fracrowleft * qGreen(*xP); + bs[col] += fracrowleft * qBlue(*xP); + } + } + fracrowtofill -= fracrowleft; + fracrowleft = syscale; + needtoreadrow = 1; + } + // Now fracrowleft is >= fracrowtofill, so we can produce a row. + if (needtoreadrow && rowsread < d->rows) { + xelrow = scanLine(rowsread++, d->src); + needtoreadrow = 0; + } + for (col = 0, xP = xelrow, nxP = tempxelrow; col < d->cols; ++col, ++xP, ++nxP) { + register long a, r, g, b; + + if (as) { + r = rs[col] + fracrowtofill * qRed(*xP) * qAlpha(*xP) / 255; + g = gs[col] + fracrowtofill * qGreen(*xP) * qAlpha(*xP) / 255; + b = bs[col] + fracrowtofill * qBlue(*xP) * qAlpha(*xP) / 255; + a = as[col] + fracrowtofill * qAlpha(*xP); + if (a) { + r = r * 255 / a * SCALE; + g = g * 255 / a * SCALE; + b = b * 255 / a * SCALE; + } + } else { + r = rs[col] + fracrowtofill * qRed(*xP); + g = gs[col] + fracrowtofill * qGreen(*xP); + b = bs[col] + fracrowtofill * qBlue(*xP); + a = 0; // unwarn + } + r /= SCALE; + if (r > maxval) + r = maxval; + g /= SCALE; + if (g > maxval) + g = maxval; + b /= SCALE; + if (b > maxval) + b = maxval; + if (as) { + a /= SCALE; + if (a > maxval) + a = maxval; + *nxP = qRgba((int)r, (int)g, (int)b, (int)a); + as[col] = HALFSCALE; + } else { + *nxP = qRgb((int)r, (int)g, (int)b); + } + rs[col] = gs[col] = bs[col] = HALFSCALE; + } + fracrowleft -= fracrowtofill; + if (fracrowleft == 0) { + fracrowleft = syscale; + needtoreadrow = 1; + } + fracrowtofill = SCALE; + } + + // Now scale X from tempxelrow into dst and write it out. + if (d->newcols == d->cols) { + // shortcut X scaling if possible + memcpy(dst.scanLine(rowswritten++), tempxelrow, d->newcols * 4); + } else { + register long a, r, g, b; + register long fraccoltofill, fraccolleft = 0; + register int needcol; + + nxP = (QRgb *)dst.scanLine(rowswritten++); + QRgb *nxPEnd = nxP + d->newcols; + fraccoltofill = SCALE; + a = r = g = b = HALFSCALE; + needcol = 0; + for (col = 0, xP = tempxelrow; col < d->cols; ++col, ++xP) { + fraccolleft = sxscale; + while (fraccolleft >= fraccoltofill) { + if (needcol) { + ++nxP; + a = r = g = b = HALFSCALE; + } + if (as) { + r += fraccoltofill * qRed(*xP) * qAlpha(*xP) / 255; + g += fraccoltofill * qGreen(*xP) * qAlpha(*xP) / 255; + b += fraccoltofill * qBlue(*xP) * qAlpha(*xP) / 255; + a += fraccoltofill * qAlpha(*xP); + if (a) { + r = r * 255 / a * SCALE; + g = g * 255 / a * SCALE; + b = b * 255 / a * SCALE; + } + } else { + r += fraccoltofill * qRed(*xP); + g += fraccoltofill * qGreen(*xP); + b += fraccoltofill * qBlue(*xP); + } + r /= SCALE; + if (r > maxval) + r = maxval; + g /= SCALE; + if (g > maxval) + g = maxval; + b /= SCALE; + if (b > maxval) + b = maxval; + if (as) { + a /= SCALE; + if (a > maxval) + a = maxval; + *nxP = qRgba((int)r, (int)g, (int)b, (int)a); + } else { + *nxP = qRgb((int)r, (int)g, (int)b); + } + fraccolleft -= fraccoltofill; + fraccoltofill = SCALE; + needcol = 1; + } + if (fraccolleft > 0) { + if (needcol) { + ++nxP; + a = r = g = b = HALFSCALE; + needcol = 0; + } + if (as) { + a += fraccolleft * qAlpha(*xP); + r += fraccolleft * qRed(*xP) * qAlpha(*xP) / 255; + g += fraccolleft * qGreen(*xP) * qAlpha(*xP) / 255; + b += fraccolleft * qBlue(*xP) * qAlpha(*xP) / 255; + } else { + r += fraccolleft * qRed(*xP); + g += fraccolleft * qGreen(*xP); + b += fraccolleft * qBlue(*xP); + } + fraccoltofill -= fraccolleft; + } + } + if (fraccoltofill > 0) { + --xP; + if (as) { + a += fraccolleft * qAlpha(*xP); + r += fraccoltofill * qRed(*xP) * qAlpha(*xP) / 255; + g += fraccoltofill * qGreen(*xP) * qAlpha(*xP) / 255; + b += fraccoltofill * qBlue(*xP) * qAlpha(*xP) / 255; + if (a) { + r = r * 255 / a * SCALE; + g = g * 255 / a * SCALE; + b = b * 255 / a * SCALE; + } + } else { + r += fraccoltofill * qRed(*xP); + g += fraccoltofill * qGreen(*xP); + b += fraccoltofill * qBlue(*xP); + } + } + if (nxP < nxPEnd) { + r /= SCALE; + if (r > maxval) + r = maxval; + g /= SCALE; + if (g > maxval) + g = maxval; + b /= SCALE; + if (b > maxval) + b = maxval; + if (as) { + a /= SCALE; + if (a > maxval) + a = maxval; + *nxP = qRgba((int)r, (int)g, (int)b, (int)a); + } else { + *nxP = qRgb((int)r, (int)g, (int)b); + } + while (++nxP != nxPEnd) + nxP[0] = nxP[-1]; + } + } } - if ( d->newrows != d->rows && tempxelrow )// Robust, tempxelrow might be 0 1 day - delete [] tempxelrow; - if ( as ) // Avoid purify complaint - delete [] as; - if ( rs ) // Robust, rs might be 0 one day - delete [] rs; - if ( gs ) // Robust, gs might be 0 one day - delete [] gs; - if ( bs ) // Robust, bs might be 0 one day - delete [] bs; + if (d->newrows != d->rows && tempxelrow)// Robust, tempxelrow might be 0 1 day + delete [] tempxelrow; + if (as) // Avoid purify complaint + delete [] as; + if (rs) // Robust, rs might be 0 one day + delete [] rs; + if (gs) // Robust, gs might be 0 one day + delete [] gs; + if (bs) // Robust, bs might be 0 one day + delete [] bs; return dst; } diff --git a/src/plugins/imageformats/tiff/qtiffhandler.cpp b/src/plugins/imageformats/tiff/qtiffhandler.cpp index 3669be7..9538745 100644 --- a/src/plugins/imageformats/tiff/qtiffhandler.cpp +++ b/src/plugins/imageformats/tiff/qtiffhandler.cpp @@ -192,7 +192,14 @@ bool QTiffHandler::read(QImage *image) return false; } - if (photometric == PHOTOMETRIC_MINISBLACK || photometric == PHOTOMETRIC_MINISWHITE) { + uint16 bitPerSample; + if (!TIFFGetField(tiff, TIFFTAG_BITSPERSAMPLE, &bitPerSample)) { + TIFFClose(tiff); + return false; + } + + bool grayscale = photometric == PHOTOMETRIC_MINISBLACK || photometric == PHOTOMETRIC_MINISWHITE; + if (grayscale && bitPerSample == 1) { if (image->size() != QSize(width, height) || image->format() != QImage::Format_Mono) *image = QImage(width, height, QImage::Format_Mono); QVector<QRgb> colortable(2); @@ -208,42 +215,43 @@ bool QTiffHandler::read(QImage *image) if (!image->isNull()) { for (uint32 y=0; y<height; ++y) { if (TIFFReadScanline(tiff, image->scanLine(y), y, 0) < 0) { - TIFFClose(tiff); - return false; + TIFFClose(tiff); + return false; } } } } else { - uint16 bitPerSample; - if (!TIFFGetField(tiff, TIFFTAG_BITSPERSAMPLE, &bitPerSample)) { - TIFFClose(tiff); - return false; - } - if (photometric == PHOTOMETRIC_PALETTE && bitPerSample == 8) { + if ((grayscale || photometric == PHOTOMETRIC_PALETTE) && bitPerSample == 8) { if (image->size() != QSize(width, height) || image->format() != QImage::Format_Indexed8) *image = QImage(width, height, QImage::Format_Indexed8); if (!image->isNull()) { - // create the color table const uint16 tableSize = 256; - uint16 *redTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); - uint16 *greenTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); - uint16 *blueTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); - if (!redTable || !greenTable || !blueTable) { - TIFFClose(tiff); - return false; - } - if (!TIFFGetField(tiff, TIFFTAG_COLORMAP, &redTable, &greenTable, &blueTable)) { - TIFFClose(tiff); - return false; - } - QVector<QRgb> qtColorTable(tableSize); - for (int i = 0; i<tableSize ;++i) { - const int red = redTable[i] / 257; - const int green = greenTable[i] / 257; - const int blue = blueTable[i] / 257; - qtColorTable[i] = qRgb(red, green, blue); + if (grayscale) { + for (int i = 0; i<tableSize; ++i) { + const int c = (photometric == PHOTOMETRIC_MINISBLACK) ? i : (255 - i); + qtColorTable[i] = qRgb(c, c, c); + } + } else { + // create the color table + uint16 *redTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); + uint16 *greenTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); + uint16 *blueTable = static_cast<uint16 *>(qMalloc(tableSize * sizeof(uint16))); + if (!redTable || !greenTable || !blueTable) { + TIFFClose(tiff); + return false; + } + if (!TIFFGetField(tiff, TIFFTAG_COLORMAP, &redTable, &greenTable, &blueTable)) { + TIFFClose(tiff); + return false; + } + for (int i = 0; i<tableSize ;++i) { + const int red = redTable[i] / 257; + const int green = greenTable[i] / 257; + const int blue = blueTable[i] / 257; + qtColorTable[i] = qRgb(red, green, blue); + } } image->setColorTable(qtColorTable); @@ -371,6 +379,20 @@ bool QTiffHandler::read(QImage *image) return true; } +static bool checkGrayscale(const QVector<QRgb> &colorTable) +{ + if (colorTable.size() != 256) + return false; + + const bool increasing = (colorTable.at(0) == 0xff000000); + for (int i = 0; i < 256; ++i) { + if (increasing && colorTable.at(i) != qRgb(i, i, i) + || !increasing && colorTable.at(i) != qRgb(255 - i, 255 - i, 255 - i)) + return false; + } + return true; +} + bool QTiffHandler::write(const QImage &image) { if (!device()->isWritable()) @@ -425,7 +447,8 @@ bool QTiffHandler::write(const QImage &image) if (image.colorTable().at(0) == 0xffffffff) photometric = PHOTOMETRIC_MINISWHITE; if (!TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, photometric) - || !TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression == NoCompression ? COMPRESSION_NONE : COMPRESSION_CCITTRLE)) { + || !TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression == NoCompression ? COMPRESSION_NONE : COMPRESSION_CCITTRLE) + || !TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 1)) { TIFFClose(tiff); return false; } @@ -450,43 +473,55 @@ bool QTiffHandler::write(const QImage &image) } TIFFClose(tiff); } else if (format == QImage::Format_Indexed8) { - if (!TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE) - || !TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression == NoCompression ? COMPRESSION_NONE : COMPRESSION_PACKBITS) - || !TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8)) { - TIFFClose(tiff); - return false; - } - //// write the color table - // allocate the color tables - uint16 *redTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); - uint16 *greenTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); - uint16 *blueTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); - if (!redTable || !greenTable || !blueTable) { - TIFFClose(tiff); - return false; - } - - // set the color table const QVector<QRgb> colorTable = image.colorTable(); + bool isGrayscale = checkGrayscale(colorTable); + if (isGrayscale) { + uint16 photometric = PHOTOMETRIC_MINISBLACK; + if (image.colorTable().at(0) == 0xffffffff) + photometric = PHOTOMETRIC_MINISWHITE; + if (!TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, photometric) + || !TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression == NoCompression ? COMPRESSION_NONE : COMPRESSION_PACKBITS) + || !TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8)) { + TIFFClose(tiff); + return false; + } + } else { + if (!TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE) + || !TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression == NoCompression ? COMPRESSION_NONE : COMPRESSION_PACKBITS) + || !TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8)) { + TIFFClose(tiff); + return false; + } + //// write the color table + // allocate the color tables + uint16 *redTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); + uint16 *greenTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); + uint16 *blueTable = static_cast<uint16 *>(qMalloc(256 * sizeof(uint16))); + if (!redTable || !greenTable || !blueTable) { + TIFFClose(tiff); + return false; + } - const int tableSize = colorTable.size(); - Q_ASSERT(tableSize <= 256); - for (int i = 0; i<tableSize; ++i) { - const QRgb color = colorTable.at(i); - redTable[i] = qRed(color) * 257; - greenTable[i] = qGreen(color) * 257; - blueTable[i] = qBlue(color) * 257; - } + // set the color table + const int tableSize = colorTable.size(); + Q_ASSERT(tableSize <= 256); + for (int i = 0; i<tableSize; ++i) { + const QRgb color = colorTable.at(i); + redTable[i] = qRed(color) * 257; + greenTable[i] = qGreen(color) * 257; + blueTable[i] = qBlue(color) * 257; + } - const bool setColorTableSuccess = TIFFSetField(tiff, TIFFTAG_COLORMAP, redTable, greenTable, blueTable); + const bool setColorTableSuccess = TIFFSetField(tiff, TIFFTAG_COLORMAP, redTable, greenTable, blueTable); - qFree(redTable); - qFree(greenTable); - qFree(blueTable); + qFree(redTable); + qFree(greenTable); + qFree(blueTable); - if (!setColorTableSuccess) { - TIFFClose(tiff); - return false; + if (!setColorTableSuccess) { + TIFFClose(tiff); + return false; + } } //// write the data diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro index ff27ea1..854f893 100644 --- a/src/plugins/phonon/mmf/mmf.pro +++ b/src/plugins/phonon/mmf/mmf.pro @@ -1,4 +1,97 @@ -TEMPLATE = subdirs -SUBDIRS = mmfphonondebug plugin +# MMF Phonon backend + +QT += phonon +TARGET = phonon_mmf +PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf + +# Uncomment the following line in order to use the CDrmPlayerUtility client +# API for audio playback, rather than CMdaAudioPlayerUtility. +#CONFIG += phonon_mmf_audio_drm + +phonon_mmf_audio_drm { + LIBS += -lDrmAudioPlayUtility + DEFINES += QT_PHONON_MMF_AUDIO_DRM +} else { + LIBS += -lmediaclientaudio +} + +# This is necessary because both epoc32/include and Phonon contain videoplayer.h. +# By making /epoc32/include the first SYSTEMINCLUDE, we ensure that +# '#include <videoplayer.h>' picks up the Symbian header, as intended. +PREPEND_INCLUDEPATH = /epoc32/include + +INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + +HEADERS += \ + $$PHONON_MMF_DIR/abstractaudioeffect.h \ + $$PHONON_MMF_DIR/abstractmediaplayer.h \ + $$PHONON_MMF_DIR/abstractplayer.h \ + $$PHONON_MMF_DIR/ancestormovemonitor.h \ + $$PHONON_MMF_DIR/audioequalizer.h \ + $$PHONON_MMF_DIR/audiooutput.h \ + $$PHONON_MMF_DIR/audioplayer.h \ + $$PHONON_MMF_DIR/backend.h \ + $$PHONON_MMF_DIR/bassboost.h \ + $$PHONON_MMF_DIR/defs.h \ + $$PHONON_MMF_DIR/dummyplayer.h \ + $$PHONON_MMF_DIR/effectfactory.h \ + $$PHONON_MMF_DIR/mediaobject.h \ + $$PHONON_MMF_DIR/mmf_medianode.h \ + $$PHONON_MMF_DIR/mmf_videoplayer.h \ + $$PHONON_MMF_DIR/objectdump.h \ + $$PHONON_MMF_DIR/objectdump_symbian.h \ + $$PHONON_MMF_DIR/objecttree.h \ + $$PHONON_MMF_DIR/utils.h \ + $$PHONON_MMF_DIR/videooutput.h \ + $$PHONON_MMF_DIR/videowidget.h + +SOURCES += \ + $$PHONON_MMF_DIR/abstractaudioeffect.cpp \ + $$PHONON_MMF_DIR/abstractmediaplayer.cpp \ + $$PHONON_MMF_DIR/abstractplayer.cpp \ + $$PHONON_MMF_DIR/ancestormovemonitor.cpp \ + $$PHONON_MMF_DIR/audioequalizer.cpp \ + $$PHONON_MMF_DIR/audiooutput.cpp \ + $$PHONON_MMF_DIR/audioplayer.cpp \ + $$PHONON_MMF_DIR/backend.cpp \ + $$PHONON_MMF_DIR/bassboost.cpp \ + $$PHONON_MMF_DIR/dummyplayer.cpp \ + $$PHONON_MMF_DIR/effectfactory.cpp \ + $$PHONON_MMF_DIR/mediaobject.cpp \ + $$PHONON_MMF_DIR/mmf_medianode.cpp \ + $$PHONON_MMF_DIR/mmf_videoplayer.cpp \ + $$PHONON_MMF_DIR/objectdump.cpp \ + $$PHONON_MMF_DIR/objectdump_symbian.cpp \ + $$PHONON_MMF_DIR/objecttree.cpp \ + $$PHONON_MMF_DIR/utils.cpp \ + $$PHONON_MMF_DIR/videooutput.cpp \ + $$PHONON_MMF_DIR/videowidget.cpp + +LIBS += -lcone +LIBS += -lws32 + +# This is only needed for debug builds, but is always linked against. +LIBS += -lhal + +TARGET.CAPABILITY = all -tcb + +LIBS += -lmediaclientvideo # For CVideoPlayerUtility +LIBS += -lcone # For CCoeEnv +LIBS += -lws32 # For RWindow +LIBS += -lefsrv # For file server +LIBS += -lapgrfx -lapmime # For recognizer +LIBS += -lmmfcontrollerframework # For CMMFMetaDataEntry + +# These are for effects. +LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect + +# This is needed for having the .qtplugin file properly created on Symbian. +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend + +target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend +INSTALLS += target + +include(../../qpluginbase.pri) + +TARGET.UID3=0x2001E629 -plugin.depends = mmfphonondebug diff --git a/src/plugins/phonon/mmf/mmfphonondebug/mmfphonondebug.pro b/src/plugins/phonon/mmf/mmfphonondebug/mmfphonondebug.pro deleted file mode 100644 index 2cfec15..0000000 --- a/src/plugins/phonon/mmf/mmfphonondebug/mmfphonondebug.pro +++ /dev/null @@ -1,31 +0,0 @@ -TEMPLATE = lib -TARGET = phonon_mmf_debug -OBJECTDUMP_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf/mmfphonondebug - -CONFIG += staticlib - -DEFINES += OBJECTDUMP_LIBRARY - -HEADERS += \ - $$OBJECTDUMP_DIR/objectdump_global.h \ - $$OBJECTDUMP_DIR/objectdump.h \ - $$OBJECTDUMP_DIR/objecttree.h - -SOURCES += \ - $$OBJECTDUMP_DIR/objectdump.cpp \ - $$OBJECTDUMP_DIR/objecttree.cpp - -symbian { - HEADERS += $$OBJECTDUMP_DIR/objectdump_symbian.h - SOURCES += $$OBJECTDUMP_DIR/objectdump_symbian.cpp - - LIBS += -lcone - LIBS += -lws32 - - TARGET.CAPABILITY = all -tcb - -} else { - SOURCES += $$OBJECTDUMP_DIR/objectdump_stub.cpp -} - -TARGET.UID3=0x2001E62A diff --git a/src/plugins/phonon/mmf/plugin/plugin.pro b/src/plugins/phonon/mmf/plugin/plugin.pro deleted file mode 100644 index 8a7de98..0000000 --- a/src/plugins/phonon/mmf/plugin/plugin.pro +++ /dev/null @@ -1,91 +0,0 @@ -# MMF Phonon backend - -QT += phonon -TARGET = phonon_mmf -PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf - -# Uncomment the following line in order to use the CDrmPlayerUtility client -# API for audio playback, rather than CMdaAudioPlayerUtility. -#CONFIG += phonon_mmf_audio_drm - -phonon_mmf_audio_drm { - LIBS += -lDrmAudioPlayUtility - DEFINES += QT_PHONON_MMF_AUDIO_DRM -} else { - LIBS += -lmediaclientaudio -} - -# This is necessary because both epoc32/include and Phonon contain videoplayer.h. -# By making /epoc32/include the first SYSTEMINCLUDE, we ensure that -# '#include <videoplayer.h>' picks up the Symbian header, as intended. -PREPEND_INCLUDEPATH = /epoc32/include - -INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE - -HEADERS += \ - $$PHONON_MMF_DIR/abstractaudioeffect.h \ - $$PHONON_MMF_DIR/abstractmediaplayer.h \ - $$PHONON_MMF_DIR/abstractplayer.h \ - $$PHONON_MMF_DIR/ancestormovemonitor.h \ - $$PHONON_MMF_DIR/audiooutput.h \ - $$PHONON_MMF_DIR/audioequalizer.h \ - $$PHONON_MMF_DIR/audioplayer.h \ - $$PHONON_MMF_DIR/backend.h \ - $$PHONON_MMF_DIR/bassboost.h \ - $$PHONON_MMF_DIR/defs.h \ - $$PHONON_MMF_DIR/dummyplayer.h \ - $$PHONON_MMF_DIR/effectfactory.h \ - $$PHONON_MMF_DIR/mmf_medianode.h \ - $$PHONON_MMF_DIR/mediaobject.h \ - $$PHONON_MMF_DIR/utils.h \ - $$PHONON_MMF_DIR/videooutput.h \ - $$PHONON_MMF_DIR/videooutputobserver.h \ - $$PHONON_MMF_DIR/mmf_videoplayer.h \ - $$PHONON_MMF_DIR/videowidget.h \ - $$PHONON_MMF_DIR/volumeobserver.h - -SOURCES += \ - $$PHONON_MMF_DIR/abstractaudioeffect.cpp \ - $$PHONON_MMF_DIR/abstractmediaplayer.cpp \ - $$PHONON_MMF_DIR/abstractplayer.cpp \ - $$PHONON_MMF_DIR/ancestormovemonitor.cpp \ - $$PHONON_MMF_DIR/audiooutput.cpp \ - $$PHONON_MMF_DIR/audioequalizer.cpp \ - $$PHONON_MMF_DIR/audioplayer.cpp \ - $$PHONON_MMF_DIR/backend.cpp \ - $$PHONON_MMF_DIR/bassboost.cpp \ - $$PHONON_MMF_DIR/dummyplayer.cpp \ - $$PHONON_MMF_DIR/effectfactory.cpp \ - $$PHONON_MMF_DIR/mmf_medianode.cpp \ - $$PHONON_MMF_DIR/mediaobject.cpp \ - $$PHONON_MMF_DIR/utils.cpp \ - $$PHONON_MMF_DIR/videooutput.cpp \ - $$PHONON_MMF_DIR/mmf_videoplayer.cpp \ - $$PHONON_MMF_DIR/videowidget.cpp - -debug { - INCLUDEPATH += $$PHONON_MMF_DIR/mmfphonondebug - LIBS += -lphonon_mmf_debug.lib - LIBS += -lhal -} - -LIBS += -lmediaclientvideo # For CVideoPlayerUtility -LIBS += -lcone # For CCoeEnv -LIBS += -lws32 # For RWindow -LIBS += -lefsrv # For file server -LIBS += -lapgrfx -lapmime # For recognizer -LIBS += -lmmfcontrollerframework # For CMMFMetaDataEntry - -# These are for effects. -LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerBase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect - -# This is needed for having the .qtplugin file properly created on Symbian. -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend - -target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend -INSTALLS += target - -include(../../../qpluginbase.pri) - -TARGET.UID3=0x2001E629 - diff --git a/src/plugins/phonon/phonon.pro b/src/plugins/phonon/phonon.pro index 814a062..803d8f9 100644 --- a/src/plugins/phonon/phonon.pro +++ b/src/plugins/phonon/phonon.pro @@ -7,4 +7,8 @@ mac:contains(QT_CONFIG, phonon-backend): SUBDIRS *= qt7 win32:!wince*:contains(QT_CONFIG, phonon-backend): SUBDIRS *= ds9 wince*:contains(QT_CONFIG, phonon-backend): SUBDIRS *= waveout wince*:contains(QT_CONFIG, directshow): SUBDIRS *= ds9 + +# Note that the MMF backend is in some scenarios an important complement to the +# Helix backend: the latter requires Symbian signed capabilities, hence MMF +# provides multimedia for self signed scenarios. symbian:contains(QT_CONFIG, phonon-backend): SUBDIRS *= mmf diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro index 158633d..9687908 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -2,6 +2,8 @@ TEMPLATE = subdirs # We just want to export the sqlite3 binaries for Symbian for platforms that do not have them. -!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { - BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" +symbian { + !exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) { + BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" + } } diff --git a/src/qbase.pri b/src/qbase.pri index 234b95a..22a57db 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -36,7 +36,7 @@ CONFIG += qt warn_on depend_includepath CONFIG += qmake_cache target_qt CONFIG -= fix_output_dirs win32|mac:!macx-xcode:CONFIG += debug_and_release -linux-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF +linux*-g++*:QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index c14ff5c..22bec63 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -116,8 +116,6 @@ QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA - /* XPM */ static const char * const start_xpm[]={ "16 15 8 1", @@ -6053,8 +6051,7 @@ Q3FilePreview::Q3FilePreview() function to provide file previewing. */ -#endif // QT_MAC_USE_COCOA - + QT_END_NAMESPACE #include "moc_q3filedialog.cpp" diff --git a/src/qt3support/dialogs/q3filedialog.h b/src/qt3support/dialogs/q3filedialog.h index 8644b4c..f6a7950 100644 --- a/src/qt3support/dialogs/q3filedialog.h +++ b/src/qt3support/dialogs/q3filedialog.h @@ -69,8 +69,6 @@ class QUrlInfo; #ifndef QT_NO_FILEDIALOG -#ifndef QT_MAC_USE_COCOA - class Q_COMPAT_EXPORT Q3FileIconProvider : public QObject { Q_OBJECT @@ -339,8 +337,6 @@ private: #endif }; -#endif // QT_MAC_USE_COCOA - #endif // QT_NO_FILEDIALOG QT_END_NAMESPACE diff --git a/src/qt3support/dialogs/q3filedialog_mac.cpp b/src/qt3support/dialogs/q3filedialog_mac.cpp index 585fa8f..6c5675b 100644 --- a/src/qt3support/dialogs/q3filedialog_mac.cpp +++ b/src/qt3support/dialogs/q3filedialog_mac.cpp @@ -56,11 +56,32 @@ #include "qstringlist.h" #include "qtextcodec.h" #include "qdesktopwidget.h" +#include "qfiledialog.h" #include <stdlib.h> QT_BEGIN_NAMESPACE -#ifndef QT_MAC_USE_COCOA +#ifdef QT_MAC_USE_COCOA + +QStringList Q3FileDialog::macGetOpenFileNames(const QString &filter, QString *pwd, + QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter, + bool /*multi*/, bool /*directory*/) +{ + return QFileDialog::getOpenFileNames(filter, *pwd, parent, 0, + caption); +} + + +QString Q3FileDialog::macGetSaveFileName(const QString &start, const QString &filter, + QString *, QWidget *parent, const char* /*name*/, + const QString& caption, QString *selectedFilter) +{ + return QFileDialog::getSaveFileName(start, filter, parent, 0, + caption, selectedFilter); +} + +#else /***************************************************************************** Externals diff --git a/src/qt3support/other/q3process_unix.cpp b/src/qt3support/other/q3process_unix.cpp index 955b65f..32a68e0 100644 --- a/src/qt3support/other/q3process_unix.cpp +++ b/src/qt3support/other/q3process_unix.cpp @@ -249,7 +249,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) { if (errno != EINPROGRESS) { BAILOUT }; // Accept connection - socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (size_t *)NULL); + socketFD[0] = accept(tmpSocket, (struct sockaddr *)NULL, (QT_SOCKLEN_T *)NULL); if(socketFD[0] == -1) { BAILOUT }; // We're done diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 1218b75..49c4361 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4387,4 +4387,15 @@ EXPORTS ?QBasicAtomicPointer_isFetchAndAddNative@@YA_NXZ @ 4386 NONAME ; bool QBasicAtomicPointer_isFetchAndAddNative(void) ?QBasicAtomicPointer_isFetchAndStoreNative@@YA_NXZ @ 4387 NONAME ; bool QBasicAtomicPointer_isFetchAndStoreNative(void) ?QBasicAtomicPointer_isTestAndSetNative@@YA_NXZ @ 4388 NONAME ; bool QBasicAtomicPointer_isTestAndSetNative(void) + ??0SignalEvent@QStateMachine@@QAE@PAVQObject@@HABV?$QList@VQVariant@@@@@Z @ 4389 NONAME ; QStateMachine::SignalEvent::SignalEvent(class QObject *, int, class QList<class QVariant> const &) + ??0WrappedEvent@QStateMachine@@QAE@PAVQObject@@PAVQEvent@@@Z @ 4390 NONAME ; QStateMachine::WrappedEvent::WrappedEvent(class QObject *, class QEvent *) + ??1SignalEvent@QStateMachine@@UAE@XZ @ 4391 NONAME ; QStateMachine::SignalEvent::~SignalEvent(void) + ??1WrappedEvent@QStateMachine@@UAE@XZ @ 4392 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(void) + ??_ESignalEvent@QStateMachine@@UAE@I@Z @ 4393 NONAME ; QStateMachine::SignalEvent::~SignalEvent(unsigned int) + ??_EWrappedEvent@QStateMachine@@UAE@I@Z @ 4394 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(unsigned int) + ?arguments@SignalEvent@QStateMachine@@QBE?AV?$QList@VQVariant@@@@XZ @ 4395 NONAME ; class QList<class QVariant> QStateMachine::SignalEvent::arguments(void) const + ?event@WrappedEvent@QStateMachine@@QBEPAVQEvent@@XZ @ 4396 NONAME ; class QEvent * QStateMachine::WrappedEvent::event(void) const + ?object@WrappedEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4397 NONAME ; class QObject * QStateMachine::WrappedEvent::object(void) const + ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const + ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 8a43f21..166b6fe 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12514,4 +12514,7 @@ EXPORTS ?app_compile_version@QApplicationPrivate@@2HA @ 12513 NONAME ; int QApplicationPrivate::app_compile_version ?spacerItemFactoryMethod@QLayoutPrivate@@2P6APAVQSpacerItem@@PBVQLayout@@HHW4Policy@QSizePolicy@@1@ZA @ 12514 NONAME ; class QSpacerItem * (*QLayoutPrivate::spacerItemFactoryMethod)(class QLayout const *, int, int, enum QSizePolicy::Policy, enum QSizePolicy::Policy) ?allWidgets@QWidgetPrivate@@2PAV?$QSet@PAVQWidget@@@@A @ 12515 NONAME ; class QSet<class QWidget *> * QWidgetPrivate::allWidgets + ?effectiveFocusWidget@QWidgetPrivate@@QAEPAVQWidget@@XZ @ 12516 NONAME ; class QWidget * QWidgetPrivate::effectiveFocusWidget(void) + ?ignoreUnusedNavigationEvents@QTextControl@@QBE_NXZ @ 12517 NONAME ; bool QTextControl::ignoreUnusedNavigationEvents(void) const + ?setIgnoreUnusedNavigationEvents@QTextControl@@QAEX_N@Z @ 12518 NONAME ; void QTextControl::setIgnoreUnusedNavigationEvents(bool) diff --git a/src/s60installs/bwins/QtWebKitu.def b/src/s60installs/bwins/QtWebKitu.def index c14abe2..e5631f8 100644 --- a/src/s60installs/bwins/QtWebKitu.def +++ b/src/s60installs/bwins/QtWebKitu.def @@ -361,8 +361,8 @@ EXPORTS ?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const ?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const ?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *) - ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ; float QWebSettings::printingMaximumShrinkFactor(void) const - ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ; float QWebSettings::printingMinimumShrinkFactor(void) const + ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const + ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const ?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void) ?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void) ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void) @@ -488,8 +488,8 @@ EXPORTS ?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *) ?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const ?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &) - ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ; void QWebSettings::setPrintingMaximumShrinkFactor(float) - ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ; void QWebSettings::setPrintingMinimumShrinkFactor(float) + ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float) + ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float) ?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool) ?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>) ?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy) @@ -619,4 +619,5 @@ EXPORTS ?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject ?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject ?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject + ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 99be68e..6a4cdbd 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3619,4 +3619,18 @@ EXPORTS _ZN15QBasicAtomicInt19isFetchAndAddNativeEv @ 3618 NONAME _ZN15QBasicAtomicInt21isFetchAndStoreNativeEv @ 3619 NONAME _ZN15QBasicAtomicInt25isReferenceCountingNativeEv @ 3620 NONAME + _ZN13QStateMachine11SignalEventC1EP7QObjectiRK5QListI8QVariantE @ 3621 NONAME + _ZN13QStateMachine11SignalEventC2EP7QObjectiRK5QListI8QVariantE @ 3622 NONAME + _ZN13QStateMachine11SignalEventD0Ev @ 3623 NONAME + _ZN13QStateMachine11SignalEventD1Ev @ 3624 NONAME + _ZN13QStateMachine11SignalEventD2Ev @ 3625 NONAME + _ZN13QStateMachine12WrappedEventC1EP7QObjectP6QEvent @ 3626 NONAME + _ZN13QStateMachine12WrappedEventC2EP7QObjectP6QEvent @ 3627 NONAME + _ZN13QStateMachine12WrappedEventD0Ev @ 3628 NONAME + _ZN13QStateMachine12WrappedEventD1Ev @ 3629 NONAME + _ZN13QStateMachine12WrappedEventD2Ev @ 3630 NONAME + _ZTIN13QStateMachine11SignalEventE @ 3631 NONAME + _ZTIN13QStateMachine12WrappedEventE @ 3632 NONAME + _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME + _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 43e291c..6c45a6e 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11735,4 +11735,6 @@ EXPORTS _Zls6QDebugP15QGraphicsObject @ 11734 NONAME _Zls6QDebugRK12QStyleOption @ 11735 NONAME _Zls6QDebugRKN12QStyleOption10OptionTypeE @ 11736 NONAME + _ZN12QTextControl31setIgnoreUnusedNavigationEventsEb @ 11737 NONAME + _ZNK12QTextControl28ignoreUnusedNavigationEventsEv @ 11738 NONAME diff --git a/src/s60installs/eabi/QtWebKitu.def b/src/s60installs/eabi/QtWebKitu.def index 88343c1..4aad884 100644 --- a/src/s60installs/eabi/QtWebKitu.def +++ b/src/s60installs/eabi/QtWebKitu.def @@ -654,8 +654,8 @@ EXPORTS _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME _ZN11QWebElement6renderEP8QPainter @ 655 NONAME - _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME - _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME + _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT + _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME @@ -674,8 +674,8 @@ EXPORTS _ZN21QWebElementCollectionD2Ev @ 673 NONAME _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME - _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME - _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME + _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT + _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME @@ -689,4 +689,5 @@ EXPORTS _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME + _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index bc69dce..41eb562 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -57,6 +57,8 @@ file=ABI_DIR\BUILD_DIR\QtTest.dll SHARED_LIB_DIR\QtTest.dll PAG file=ABI_DIR\BUILD_DIR\QtWebKit.dll SHARED_LIB_DIR\QtWebKit.dll PAGED file=ABI_DIR\BUILD_DIR\phonon.dll SHARED_LIB_DIR\phonon.dll PAGED file=ABI_DIR\BUILD_DIR\QtMultimedia.dll SHARED_LIB_DIR\QtMultimedia.dll PAGED +file=ABI_DIR\BUILD_DIR\QtXmlPatterns.dll SHARED_LIB_DIR\QtXmlPatterns.dll PAGED +file=ABI_DIR\BUILD_DIR\QtDeclarative.dll SHARED_LIB_DIR\QtDeclarative.dll PAGED // imageformats file=ABI_DIR\BUILD_DIR\qgif.dll SHARED_LIB_DIR\qgif.dll PAGED diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 90c9f27..2d9c489 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -101,6 +101,10 @@ symbian: { qtlibraries.sources += QtXmlPatterns.dll } + contains(QT_CONFIG, declarative): { + qtlibraries.sources += QtDeclarative.dll + } + contains(QT_CONFIG, webkit): { qtlibraries.sources += QtWebKit.dll } diff --git a/src/script/api/qscriptable.cpp b/src/script/api/qscriptable.cpp index c83653c..28e72c8 100644 --- a/src/script/api/qscriptable.cpp +++ b/src/script/api/qscriptable.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptable.h b/src/script/api/qscriptable.h index 7b92f74..697a271 100644 --- a/src/script/api/qscriptable.h +++ b/src/script/api/qscriptable.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptable_p.h b/src/script/api/qscriptable_p.h index b4e84f0..094950c 100644 --- a/src/script/api/qscriptable_p.h +++ b/src/script/api/qscriptable_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptclass.cpp b/src/script/api/qscriptclass.cpp index ec71d85..c982682 100644 --- a/src/script/api/qscriptclass.cpp +++ b/src/script/api/qscriptclass.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptclass.h b/src/script/api/qscriptclass.h index c416f37..df3b1a9 100644 --- a/src/script/api/qscriptclass.h +++ b/src/script/api/qscriptclass.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptclasspropertyiterator.cpp b/src/script/api/qscriptclasspropertyiterator.cpp index 14077ce..b8f278a 100644 --- a/src/script/api/qscriptclasspropertyiterator.cpp +++ b/src/script/api/qscriptclasspropertyiterator.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptclasspropertyiterator.h b/src/script/api/qscriptclasspropertyiterator.h index f8ea065..affec81 100644 --- a/src/script/api/qscriptclasspropertyiterator.h +++ b/src/script/api/qscriptclasspropertyiterator.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index caa4dc2..77bac9b 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptcontext.h b/src/script/api/qscriptcontext.h index 348ac9b..5284b13 100644 --- a/src/script/api/qscriptcontext.h +++ b/src/script/api/qscriptcontext.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptcontext_p.h b/src/script/api/qscriptcontext_p.h index a451103..e378b92 100644 --- a/src/script/api/qscriptcontext_p.h +++ b/src/script/api/qscriptcontext_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index 6c34c5e..d3a15ec 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptcontextinfo.h b/src/script/api/qscriptcontextinfo.h index 778473c..dcc57ad 100644 --- a/src/script/api/qscriptcontextinfo.h +++ b/src/script/api/qscriptcontextinfo.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 216f325..dc0e0d0 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -794,7 +776,11 @@ QScriptEnginePrivate::QScriptEnginePrivate() qMetaTypeId<QObjectList>(); #endif - JSC::initializeThreading(); // ### hmmm + if (!QCoreApplication::instance()) { + qFatal("QScriptEngine: Must construct a Q(Core)Application before a QScriptEngine"); + return; + } + JSC::initializeThreading(); globalData = JSC::JSGlobalData::create().releaseRef(); globalData->clientData = new QScript::GlobalClientData(this); @@ -1320,7 +1306,7 @@ QScript::QObjectData *QScriptEnginePrivate::qobjectData(QObject *object) QScript::QObjectData *data = new QScript::QObjectData(this); m_qobjectData.insert(object, data); QObject::connect(object, SIGNAL(destroyed(QObject*)), - q_func(), SLOT(_q_objectDestroyed(QObject *))); + q_func(), SLOT(_q_objectDestroyed(QObject*))); return data; } diff --git a/src/script/api/qscriptengine.h b/src/script/api/qscriptengine.h index 7db61e1..8cacc52 100644 --- a/src/script/api/qscriptengine.h +++ b/src/script/api/qscriptengine.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index e7cdcda..68bf8e0 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp index 0ca7ecc..a2af514 100644 --- a/src/script/api/qscriptengineagent.cpp +++ b/src/script/api/qscriptengineagent.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -172,7 +154,10 @@ void QScriptEngineAgentPrivate::exceptionCatch(const JSC::DebuggerCallFrame& fra void QScriptEngineAgentPrivate::atStatement(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, int lineno, int column) { QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID); - Q_ASSERT(source != 0); + if (!source) { + // QTBUG-6108: We don't have the source for this script, so ignore. + return; + } column = source->columnNumberFromOffset(column); JSC::CallFrame *oldFrame = engine->currentFrame; int oldAgentLineNumber = engine->agentLineNumber; @@ -201,7 +186,10 @@ void QScriptEngineAgentPrivate::didReachBreakpoint(const JSC::DebuggerCallFrame& { if (q_ptr->supportsExtension(QScriptEngineAgent::DebuggerInvocationRequest)) { QScript::UStringSourceProviderWithFeedback *source = engine->loadedScripts.value(sourceID); - Q_ASSERT(source != 0); + if (!source) { + // QTBUG-6108: We don't have the source for this script, so ignore. + return; + } column = source->columnNumberFromOffset(column); JSC::CallFrame *oldFrame = engine->currentFrame; int oldAgentLineNumber = engine->agentLineNumber; diff --git a/src/script/api/qscriptengineagent.h b/src/script/api/qscriptengineagent.h index e260f44..37c2534 100644 --- a/src/script/api/qscriptengineagent.h +++ b/src/script/api/qscriptengineagent.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptengineagent_p.h b/src/script/api/qscriptengineagent_p.h index 86e4378..efbcb4d 100644 --- a/src/script/api/qscriptengineagent_p.h +++ b/src/script/api/qscriptengineagent_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptextensioninterface.h b/src/script/api/qscriptextensioninterface.h index 0084121..9923f4a 100644 --- a/src/script/api/qscriptextensioninterface.h +++ b/src/script/api/qscriptextensioninterface.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptextensionplugin.cpp b/src/script/api/qscriptextensionplugin.cpp index 782df58..d0c770b 100644 --- a/src/script/api/qscriptextensionplugin.cpp +++ b/src/script/api/qscriptextensionplugin.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptextensionplugin.h b/src/script/api/qscriptextensionplugin.h index 6cc1efb..e4d1da6 100644 --- a/src/script/api/qscriptextensionplugin.h +++ b/src/script/api/qscriptextensionplugin.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptprogram.cpp b/src/script/api/qscriptprogram.cpp index c30f381..deea582 100644 --- a/src/script/api/qscriptprogram.cpp +++ b/src/script/api/qscriptprogram.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptprogram.h b/src/script/api/qscriptprogram.h index de891cd..54e9f01 100644 --- a/src/script/api/qscriptprogram.h +++ b/src/script/api/qscriptprogram.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptprogram_p.h b/src/script/api/qscriptprogram_p.h index 5175079..61a5b01 100644 --- a/src/script/api/qscriptprogram_p.h +++ b/src/script/api/qscriptprogram_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptstring.cpp b/src/script/api/qscriptstring.cpp index 10fccd0..65f797d 100644 --- a/src/script/api/qscriptstring.cpp +++ b/src/script/api/qscriptstring.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptstring.h b/src/script/api/qscriptstring.h index bf5d1d5..be99f53 100644 --- a/src/script/api/qscriptstring.h +++ b/src/script/api/qscriptstring.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptstring_p.h b/src/script/api/qscriptstring_p.h index 8e344e8..cb418ad 100644 --- a/src/script/api/qscriptstring_p.h +++ b/src/script/api/qscriptstring_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index d6cbb41..286230f 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptvalue.h b/src/script/api/qscriptvalue.h index aba3327..0431ee5 100644 --- a/src/script/api/qscriptvalue.h +++ b/src/script/api/qscriptvalue.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h index c322a37..8211607 100644 --- a/src/script/api/qscriptvalue_p.h +++ b/src/script/api/qscriptvalue_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptvalueiterator.cpp b/src/script/api/qscriptvalueiterator.cpp index cf27af6..03cb695 100644 --- a/src/script/api/qscriptvalueiterator.cpp +++ b/src/script/api/qscriptvalueiterator.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/api/qscriptvalueiterator.h b/src/script/api/qscriptvalueiterator.h index 26ddbed..946a322 100644 --- a/src/script/api/qscriptvalueiterator.h +++ b/src/script/api/qscriptvalueiterator.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptactivationobject.cpp b/src/script/bridge/qscriptactivationobject.cpp index edccb3e..80f4bf1 100644 --- a/src/script/bridge/qscriptactivationobject.cpp +++ b/src/script/bridge/qscriptactivationobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptactivationobject_p.h b/src/script/bridge/qscriptactivationobject_p.h index f313f90..80d8c1e 100644 --- a/src/script/bridge/qscriptactivationobject_p.h +++ b/src/script/bridge/qscriptactivationobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index 1dde98b..43ea5f9 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptclassobject_p.h b/src/script/bridge/qscriptclassobject_p.h index 9b34244..8ebde3a 100644 --- a/src/script/bridge/qscriptclassobject_p.h +++ b/src/script/bridge/qscriptclassobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index b5d9bf5..df00ce9 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ @@ -354,3 +336,4 @@ QScriptContext *QScriptDeclarativeClass::context() const return d_ptr->context; } +QT_END_NAMESPACE diff --git a/src/script/bridge/qscriptdeclarativeclass_p.h b/src/script/bridge/qscriptdeclarativeclass_p.h index d0e653d..40e5051 100644 --- a/src/script/bridge/qscriptdeclarativeclass_p.h +++ b/src/script/bridge/qscriptdeclarativeclass_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp index 1af632d..6b4f5cb 100644 --- a/src/script/bridge/qscriptdeclarativeobject.cpp +++ b/src/script/bridge/qscriptdeclarativeobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptdeclarativeobject_p.h b/src/script/bridge/qscriptdeclarativeobject_p.h index 73e5527..2aa3fb0 100644 --- a/src/script/bridge/qscriptdeclarativeobject_p.h +++ b/src/script/bridge/qscriptdeclarativeobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtDeclarative module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptfunction.cpp b/src/script/bridge/qscriptfunction.cpp index d3767bf..e2e6120 100644 --- a/src/script/bridge/qscriptfunction.cpp +++ b/src/script/bridge/qscriptfunction.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptfunction_p.h b/src/script/bridge/qscriptfunction_p.h index bfcd703..10e3f42 100644 --- a/src/script/bridge/qscriptfunction_p.h +++ b/src/script/bridge/qscriptfunction_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptglobalobject.cpp b/src/script/bridge/qscriptglobalobject.cpp index c624a31..2217025 100644 --- a/src/script/bridge/qscriptglobalobject.cpp +++ b/src/script/bridge/qscriptglobalobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptglobalobject_p.h b/src/script/bridge/qscriptglobalobject_p.h index 01784c2..9909afc 100644 --- a/src/script/bridge/qscriptglobalobject_p.h +++ b/src/script/bridge/qscriptglobalobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptobject.cpp b/src/script/bridge/qscriptobject.cpp index 1fdf0b1..2d71c43 100644 --- a/src/script/bridge/qscriptobject.cpp +++ b/src/script/bridge/qscriptobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index 0992eec..a4faa06 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index caf1018..559fcd3 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptqobject_p.h b/src/script/bridge/qscriptqobject_p.h index 2d482cc..41900b5 100644 --- a/src/script/bridge/qscriptqobject_p.h +++ b/src/script/bridge/qscriptqobject_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptvariant.cpp b/src/script/bridge/qscriptvariant.cpp index 725f4e0..cc5df9a 100644 --- a/src/script/bridge/qscriptvariant.cpp +++ b/src/script/bridge/qscriptvariant.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/bridge/qscriptvariant_p.h b/src/script/bridge/qscriptvariant_p.h index 445ca69..81312e8 100644 --- a/src/script/bridge/qscriptvariant_p.h +++ b/src/script/bridge/qscriptvariant_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/make-parser.sh b/src/script/parser/make-parser.sh new file mode 100755 index 0000000..d0c71fb --- /dev/null +++ b/src/script/parser/make-parser.sh @@ -0,0 +1,53 @@ +#!/bin/sh +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## All rights reserved. +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is the build configuration utility of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain additional +## rights. These rights are described in the Nokia Qt LGPL Exception +## version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + +me=$(dirname $0) +mkdir -p $me/out +(cd $me/out && ../../../../util/qlalr/qlalr --qt --no-lines ../qscript.g) + +for f in $me/out/*.h $me/out/*.cpp; do + n=$(basename $f) + cp $f $n +done + +git diff . + diff --git a/src/script/parser/qscript.g b/src/script/parser/qscript.g index b0b0cdf..2d61713 100644 --- a/src/script/parser/qscript.g +++ b/src/script/parser/qscript.g @@ -6,35 +6,17 @@ -- -- This file is part of the QtScript module of the Qt Toolkit. -- --- $QT_BEGIN_LICENSE:LGPL$ --- No Commercial Usage --- This file contains pre-release code and may not be distributed. --- You may use this file in accordance with the terms and conditions --- contained in the Technology Preview License Agreement accompanying --- this package. --- +-- $QT_BEGIN_LICENSE:LGPL-ONLY$ -- GNU Lesser General Public License Usage --- Alternatively, this file may be used under the terms of the GNU Lesser +-- This file may be used under the terms of the GNU Lesser -- General Public License version 2.1 as published by the Free Software -- Foundation and appearing in the file LICENSE.LGPL included in the -- packaging of this file. Please review the following information to -- ensure the GNU Lesser General Public License version 2.1 requirements -- will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -- --- In addition, as a special exception, Nokia gives you certain additional --- rights. These rights are described in the Nokia Qt LGPL Exception --- version 1.1, included in the file LGPL_EXCEPTION.txt in this package. --- -- If you have questions regarding the use of this file, please contact -- Nokia at qt-info@nokia.com. --- --- --- --- --- --- --- --- -- $QT_END_LICENSE$ -- ---------------------------------------------------------------------------- @@ -78,8 +60,7 @@ %start Program -/. -/**************************************************************************** +/./**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. @@ -87,12 +68,24 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. @@ -108,20 +101,13 @@ ** ****************************************************************************/ +// This file was generated by qlalr - DO NOT EDIT! + + #include <QtCore/QtDebug> #include <string.h> -#include "qscriptengine.h" -#include "qscriptengine_p.h" -#include "qscriptvalueimpl_p.h" -#include "qscriptcontext_p.h" -#include "qscriptmember_p.h" -#include "qscriptobject_p.h" -#include "qscriptlexer_p.h" -#include "qscriptast_p.h" -#include "qscriptnodepool_p.h" - #define Q_SCRIPT_UPDATE_POSITION(node, startloc, endloc) do { \ node->startLine = startloc.startLine; \ node->startColumn = startloc.startColumn; \ @@ -131,8 +117,7 @@ ./ -/: -/**************************************************************************** +/:/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. @@ -140,10 +125,25 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** @@ -153,10 +153,14 @@ ** ** ** +** ** $QT_END_LICENSE$ ** ****************************************************************************/ +// This file was generated by qlalr - DO NOT EDIT! + + // // W A R N I N G // ------------- diff --git a/src/script/parser/qscriptast.cpp b/src/script/parser/qscriptast.cpp index 29d3557..c2ba81b 100644 --- a/src/script/parser/qscriptast.cpp +++ b/src/script/parser/qscriptast.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptast_p.h b/src/script/parser/qscriptast_p.h index 5f687eb..921c9d8 100644 --- a/src/script/parser/qscriptast_p.h +++ b/src/script/parser/qscriptast_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptastfwd_p.h b/src/script/parser/qscriptastfwd_p.h index 620128d..3b38303 100644 --- a/src/script/parser/qscriptastfwd_p.h +++ b/src/script/parser/qscriptastfwd_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptastvisitor.cpp b/src/script/parser/qscriptastvisitor.cpp index 1e51178..256d4c3 100644 --- a/src/script/parser/qscriptastvisitor.cpp +++ b/src/script/parser/qscriptastvisitor.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptastvisitor_p.h b/src/script/parser/qscriptastvisitor_p.h index dc8a76f9..9985485 100644 --- a/src/script/parser/qscriptastvisitor_p.h +++ b/src/script/parser/qscriptastvisitor_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptgrammar.cpp b/src/script/parser/qscriptgrammar.cpp index cbb1ab8..03eb526 100644 --- a/src/script/parser/qscriptgrammar.cpp +++ b/src/script/parser/qscriptgrammar.cpp @@ -1,4 +1,3 @@ -// This file was generated by qlalr - DO NOT EDIT! /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -7,39 +6,22 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ +// This file was generated by qlalr - DO NOT EDIT! #include "qscriptgrammar_p.h" QT_BEGIN_NAMESPACE @@ -68,7 +50,7 @@ const char *const QScriptGrammar::spell [] = { #endif // QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO }; -const int QScriptGrammar::lhs [] = { +const short QScriptGrammar::lhs [] = { 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 87, 87, 92, 92, 86, 86, 89, 89, 93, 93, 93, 93, 94, 94, 94, @@ -97,7 +79,7 @@ const int QScriptGrammar::lhs [] = { 163, 97, 167, 167, 164, 164, 165, 165, 168, 84, 169, 169, 170, 170, 166, 166, 88, 88, 171}; -const int QScriptGrammar:: rhs[] = { +const short QScriptGrammar::rhs [] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 3, 4, 3, 2, 4, 1, 2, 0, 1, 3, 5, 1, 1, 1, 1, 1, 1, 1, @@ -429,7 +411,7 @@ const int QScriptGrammar::rule_index [] = { 803, 805, 808, 810, 812, 813, 815, 816, 818}; #endif // QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO -const int QScriptGrammar::action_default [] = { +const short QScriptGrammar::action_default [] = { 0, 98, 165, 129, 137, 133, 173, 180, 77, 149, 179, 187, 175, 125, 0, 176, 264, 62, 177, 178, 183, 78, 141, 145, 66, 95, 76, 81, 61, 0, @@ -478,7 +460,7 @@ const int QScriptGrammar::action_default [] = { 15, 88, 86, 90, 87, 85, 89, 204, 197, 0, 205, 201, 0, 203, 193, 0, 194, 198}; -const int QScriptGrammar::goto_default [] = { +const short QScriptGrammar::goto_default [] = { 29, 28, 439, 437, 113, 112, 14, 2, 438, 111, 114, 194, 24, 17, 190, 26, 8, 201, 21, 27, 77, 25, 1, 32, 30, 270, 13, 264, 3, 260, @@ -489,7 +471,7 @@ const int QScriptGrammar::goto_default [] = { 460, 324, 395, 399, 402, 398, 397, 417, 418, 16, 100, 107, 96, 99, 106, 108, 33, 0}; -const int QScriptGrammar::action_index [] = { +const short QScriptGrammar::action_index [] = { 1318, 79, -84, 56, 39, -17, -84, -84, 169, -84, -84, -84, -84, 216, 149, -84, -84, -84, -84, -84, -84, 475, 68, 100, 180, 184, -84, -84, -84, 99, @@ -586,7 +568,7 @@ const int QScriptGrammar::action_index [] = { -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, -88, 5, -88, -88, -56, -88, -88}; -const int QScriptGrammar::action_info [] = { +const short QScriptGrammar::action_info [] = { 305, 307, 109, 400, 400, 400, 273, 105, 416, 302, 297, 295, 293, 423, 273, 151, 313, 321, 406, 407, 424, 295, 422, 198, 420, 149, 313, 353, -47, 396, @@ -777,7 +759,7 @@ const int QScriptGrammar::action_info [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -const int QScriptGrammar::action_check [] = { +const short QScriptGrammar::action_check [] = { 61, 60, 55, 5, 5, 5, 1, 33, 33, 61, 8, 76, 48, 29, 1, 8, 2, 29, 55, 7, 60, 76, 36, 8, 20, 7, 2, 16, 7, 33, diff --git a/src/script/parser/qscriptgrammar_p.h b/src/script/parser/qscriptgrammar_p.h index 9e0f4f8..b75ee16 100644 --- a/src/script/parser/qscriptgrammar_p.h +++ b/src/script/parser/qscriptgrammar_p.h @@ -6,44 +6,21 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ -// This file was generated by qlalr - DO NOT EDIT! - -#ifndef QSCRIPTGRAMMAR_P_H -#define QSCRIPTGRAMMAR_P_H - // // W A R N I N G // ------------- @@ -55,6 +32,10 @@ // We mean it. // +// This file was generated by qlalr - DO NOT EDIT! +#ifndef QSCRIPTGRAMMAR_P_H +#define QSCRIPTGRAMMAR_P_H + #include <QtCore/qglobal.h> QT_BEGIN_NAMESPACE @@ -159,33 +140,28 @@ public: GOTO_CHECK_OFFSET = 1562 }; - static const char *const spell []; - static const int lhs []; - static const int rhs []; + static const char *const spell []; + static const short lhs []; + static const short rhs []; #ifndef QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO static const int rule_index []; static const int rule_info []; #endif // QLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO - static const int goto_default []; - static const int action_default []; - static const int action_index []; - static const int action_info []; - static const int action_check []; + static const short goto_default []; + static const short action_default []; + static const short action_index []; + static const short action_info []; + static const short action_check []; static inline int nt_action (int state, int nt) { - const int *const goto_index = &action_index [GOTO_INDEX_OFFSET]; - const int *const goto_check = &action_check [GOTO_CHECK_OFFSET]; - - const int yyn = goto_index [state] + nt; - - if (yyn < 0 || goto_check [yyn] != nt) + const int yyn = action_index [GOTO_INDEX_OFFSET + state] + nt; + if (yyn < 0 || action_check [GOTO_CHECK_OFFSET + yyn] != nt) return goto_default [nt]; - const int *const goto_info = &action_info [GOTO_INFO_OFFSET]; - return goto_info [yyn]; + return action_info [GOTO_INFO_OFFSET + yyn]; } static inline int t_action (int state, int token) @@ -199,6 +175,7 @@ public: } }; -QT_END_NAMESPACE +QT_END_NAMESPACE #endif // QSCRIPTGRAMMAR_P_H + diff --git a/src/script/parser/qscriptlexer.cpp b/src/script/parser/qscriptlexer.cpp index 5080d10..e62add1 100644 --- a/src/script/parser/qscriptlexer.cpp +++ b/src/script/parser/qscriptlexer.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptlexer_p.h b/src/script/parser/qscriptlexer_p.h index b377767..d2096ad 100644 --- a/src/script/parser/qscriptlexer_p.h +++ b/src/script/parser/qscriptlexer_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptparser.cpp b/src/script/parser/qscriptparser.cpp index 197a486..509c4b1 100644 --- a/src/script/parser/qscriptparser.cpp +++ b/src/script/parser/qscriptparser.cpp @@ -1,5 +1,3 @@ -// This file was generated by qlalr - DO NOT EDIT! - /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). @@ -8,45 +6,28 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ +// This file was generated by qlalr - DO NOT EDIT! + + #include <QtCore/QtDebug> #include <string.h> -#include "qscriptast_p.h" - #define Q_SCRIPT_UPDATE_POSITION(node, startloc, endloc) do { \ node->startLine = startloc.startLine; \ node->startColumn = startloc.startColumn; \ @@ -1136,9 +1117,9 @@ case 266: { error_message += QLatin1String (", "); first = false; - error_message += QLatin1Char('`'); + error_message += QLatin1String("`"); error_message += QLatin1String (spell [expected_tokens [s]]); - error_message += QLatin1Char('\''); + error_message += QLatin1String("'"); } } diff --git a/src/script/parser/qscriptparser_p.h b/src/script/parser/qscriptparser_p.h index 5f62db7..2a42b41 100644 --- a/src/script/parser/qscriptparser_p.h +++ b/src/script/parser/qscriptparser_p.h @@ -6,41 +6,24 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ // This file was generated by qlalr - DO NOT EDIT! + // // W A R N I N G // ------------- diff --git a/src/script/parser/qscriptsyntaxchecker.cpp b/src/script/parser/qscriptsyntaxchecker.cpp index 9256695..3503b61 100644 --- a/src/script/parser/qscriptsyntaxchecker.cpp +++ b/src/script/parser/qscriptsyntaxchecker.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/parser/qscriptsyntaxchecker_p.h b/src/script/parser/qscriptsyntaxchecker_p.h index edc4b59..1c502e9 100644 --- a/src/script/parser/qscriptsyntaxchecker_p.h +++ b/src/script/parser/qscriptsyntaxchecker_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/utils/qscriptdate.cpp b/src/script/utils/qscriptdate.cpp index 9e402b0..a6106db 100644 --- a/src/script/utils/qscriptdate.cpp +++ b/src/script/utils/qscriptdate.cpp @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/script/utils/qscriptdate_p.h b/src/script/utils/qscriptdate_p.h index 15bac00..f720527 100644 --- a/src/script/utils/qscriptdate_p.h +++ b/src/script/utils/qscriptdate_p.h @@ -6,35 +6,17 @@ ** ** This file is part of the QtScript module of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** +** $QT_BEGIN_LICENSE:LGPL-ONLY$ ** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser +** This file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp index 8ed0aaa..e25bb04 100644 --- a/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodefinderwidget.cpp @@ -143,7 +143,7 @@ QScriptDebuggerCodeFinderWidget::QScriptDebuggerCodeFinderWidget(QWidget *parent d->editFind = new QLineEdit(this); d->editFind->setMinimumSize(QSize(150, 0)); - connect(d->editFind, SIGNAL(textChanged(const QString&)), + connect(d->editFind, SIGNAL(textChanged(QString)), this, SLOT(_q_updateButtons())); connect(d->editFind, SIGNAL(returnPressed()), this, SLOT(_q_next())); diff --git a/src/scripttools/debugging/qscriptedit.cpp b/src/scripttools/debugging/qscriptedit.cpp index 7f0a5e0..67d82a3 100644 --- a/src/scripttools/debugging/qscriptedit.cpp +++ b/src/scripttools/debugging/qscriptedit.cpp @@ -110,8 +110,8 @@ QScriptEdit::QScriptEdit(QWidget *parent) QObject::connect(this, SIGNAL(blockCountChanged(int)), this, SLOT(updateExtraAreaWidth())); - QObject::connect(this, SIGNAL(updateRequest(const QRect &, int)), - this, SLOT(updateExtraArea(const QRect &, int))); + QObject::connect(this, SIGNAL(updateRequest(QRect,int)), + this, SLOT(updateExtraArea(QRect,int))); QObject::connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine())); diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp index f368d1d..b74babc 100644 --- a/src/sql/drivers/mysql/qsql_mysql.cpp +++ b/src/sql/drivers/mysql/qsql_mysql.cpp @@ -509,15 +509,24 @@ bool QMYSQLResult::fetchNext() return false; if (d->preparedQuery) { #if MYSQL_VERSION_ID >= 40108 - if (mysql_stmt_fetch(d->stmt)) + int nRC = mysql_stmt_fetch(d->stmt); + if (nRC) { +#ifdef MYSQL_DATA_TRUNCATED + if (nRC == 1 || nRC == MYSQL_DATA_TRUNCATED) +#else + if (nRC == 1) +#endif // MYSQL_DATA_TRUNCATED + setLastError(qMakeStmtError(QCoreApplication::translate("QMYSQLResult", + "Unable to fetch data"), QSqlError::StatementError, d->stmt)); return false; + } #else return false; #endif } else { - d->row = mysql_fetch_row(d->result); - if (!d->row) - return false; + d->row = mysql_fetch_row(d->result); + if (!d->row) + return false; } setAt(at() + 1); return true; @@ -1365,7 +1374,6 @@ QStringList QMYSQLDriver::tables(QSql::TableType type) const QSqlIndex QMYSQLDriver::primaryIndex(const QString& tablename) const { QSqlIndex idx; - bool prepQ; if (!isOpen()) return idx; diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index f834016..57927fd 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -363,7 +363,10 @@ void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraSt if (m_strokeMiterLimitSet) pen.setMiterLimit(m_stroke.miterLimit()); - if (setDashOffsetNeeded) { + // You can have dash offset on solid strokes in SVG files, but not in Qt. + // QPen::setDashOffset() will set the pen style to Qt::CustomDashLine, + // so don't call the method if the pen is solid. + if (setDashOffsetNeeded && pen.style() != Qt::SolidLine) { qreal currentWidth = pen.widthF(); if (currentWidth == 0) currentWidth = 1; diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index b4f9b2f..b3ee948 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -38,7 +38,7 @@ DEPENDPATH += $$INCLUDEPATH \ $$QT_SOURCE_TREE/src/xml hpux-acc*|hpuxi-acc* { - LIBS += ../bootstrap/libbootstrap.a + LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a } else { contains(CONFIG, debug_and_release_target) { CONFIG(debug, debug|release) { diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 1f81a6c..0dbb90f 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -30,7 +30,7 @@ win32:DEFINES += QT_NODLL INCLUDEPATH += $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ - $$QT_BUILD_TREE/include/QtXml \ + $$QT_BUILD_TREE/include/QtXml DEPENDPATH += $$INCLUDEPATH \ ../../corelib/global \ @@ -52,6 +52,7 @@ SOURCES += \ ../../corelib/global/qnumeric.cpp \ ../../corelib/io/qabstractfileengine.cpp \ ../../corelib/io/qbuffer.cpp \ + ../../corelib/io/qdatastream.cpp \ ../../corelib/io/qdir.cpp \ ../../corelib/io/qdiriterator.cpp \ ../../corelib/io/qfile.cpp \ diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 51f850a..6b3227a 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -709,46 +709,6 @@ bool RCCResourceLibrary::writeHeader() { if (m_format == C_Code) { writeString("/****************************************************************************\n"); - writeString("**\n"); - writeString("** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"); - writeString("** All rights reserved.\n"); - writeString("** Contact: Nokia Corporation (qt-info@nokia.com)\n"); - writeString("**\n"); - writeString("** This file is part of the tools applications of the Qt Toolkit.\n"); - writeString("**\n"); - writeString("** $QT_BEGIN_LICENSE:LGPL$\n"); - writeString("** No Commercial Usage\n"); - writeString("** This file contains pre-release code and may not be distributed.\n"); - writeString("** You may use this file in accordance with the terms and conditions\n"); - writeString("** contained in the Technology Preview License Agreement accompanying\n"); - writeString("** this package.\n"); - writeString("**\n"); - writeString("** GNU Lesser General Public License Usage\n"); - writeString("** Alternatively, this file may be used under the terms of the GNU Lesser\n"); - writeString("** General Public License version 2.1 as published by the Free Software\n"); - writeString("** Foundation and appearing in the file LICENSE.LGPL included in the\n"); - writeString("** packaging of this file. Please review the following information to\n"); - writeString("** ensure the GNU Lesser General Public License version 2.1 requirements\n"); - writeString("** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"); - writeString("**\n"); - writeString("** In addition, as a special exception, Nokia gives you certain additional\n"); - writeString("** rights. These rights are described in the Nokia Qt LGPL Exception\n"); - writeString("** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"); - writeString("**\n"); - writeString("** If you have questions regarding the use of this file, please contact\n"); - writeString("** Nokia at qt-info@nokia.com.\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("** $QT_END_LICENSE$\n"); - writeString("**\n"); - writeString("****************************************************************************/\n"); - writeString("/****************************************************************************\n"); writeString("** Resource object code\n"); writeString("**\n"); writeString("** Created: "); diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 1690c2e..88dfa98 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -670,10 +670,13 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_layoutWidget = false; if (className == QLatin1String("QWidget") && !node->hasAttributeNative()) { - if (m_widgetChain.top() - && m_widgetChain.top()->attributeClass() != QLatin1String("QMainWindow") - && !m_uic->isContainer(m_widgetChain.top()->attributeClass())) + if (const DomWidget* parentWidget = m_widgetChain.top()) { + const QString parentClass = parentWidget->attributeClass(); + if (parentClass != QLatin1String("QMainWindow") + && !m_uic->isCustomWidgetContainer(parentClass) + && !m_uic->isContainer(parentClass)) m_layoutWidget = true; + } } m_widgetChain.push(node); m_layoutChain.push(0); @@ -718,7 +721,7 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n"; } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) { m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n"; - } else if (className == QLatin1String("QWidget")) { + } else { m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; } } @@ -2706,11 +2709,11 @@ void WriteInitialization::acceptConnection(DomConnection *connection) m_output << m_indent << "QObject::connect(" << sender << ", " - << "SIGNAL(" << connection->elementSignal() << ')' + << "SIGNAL("<<connection->elementSignal()<<')' << ", " << receiver << ", " - << "SLOT(" << connection->elementSlot() << ')' + << "SLOT("<<connection->elementSlot()<<')' << ");\n"; } diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp index 70adba2..ca3fd19 100644 --- a/src/tools/uic/customwidgetsinfo.cpp +++ b/src/tools/uic/customwidgetsinfo.cpp @@ -88,6 +88,14 @@ bool CustomWidgetsInfo::extends(const QString &classNameIn, const QLatin1String return false; } +bool CustomWidgetsInfo::isCustomWidgetContainer(const QString &className) const +{ + if (const DomCustomWidget *dcw = m_customWidgets.value(className, 0)) + if (dcw->hasElementContainer()) + return dcw->elementContainer() != 0; + return false; +} + QString CustomWidgetsInfo::realClassName(const QString &className) const { if (className == QLatin1String("Line")) diff --git a/src/tools/uic/customwidgetsinfo.h b/src/tools/uic/customwidgetsinfo.h index 1471118..d5be5a2 100644 --- a/src/tools/uic/customwidgetsinfo.h +++ b/src/tools/uic/customwidgetsinfo.h @@ -78,6 +78,8 @@ public: bool extends(const QString &className, const QLatin1String &baseClassName) const; + bool isCustomWidgetContainer(const QString &className) const; + private: typedef QMap<QString, DomCustomWidget*> NameCustomWidgetMap; NameCustomWidgetMap m_customWidgets; diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp index 32e5e3d..71b6ac1 100644 --- a/src/tools/uic/uic.cpp +++ b/src/tools/uic/uic.cpp @@ -363,6 +363,11 @@ bool Uic::isContainer(const QString &className) const || customWidgetsInfo()->extends(className, QLatin1String("QDockWidget")); } +bool Uic::isCustomWidgetContainer(const QString &className) const +{ + return customWidgetsInfo()->isCustomWidgetContainer(className); +} + bool Uic::isStatusBar(const QString &className) const { return customWidgetsInfo()->extends(className, QLatin1String("QStatusBar")); diff --git a/src/tools/uic/uic.h b/src/tools/uic/uic.h index 3e072a4..5175ea9 100644 --- a/src/tools/uic/uic.h +++ b/src/tools/uic/uic.h @@ -115,6 +115,7 @@ public: bool isStatusBar(const QString &className) const; bool isButton(const QString &className) const; bool isContainer(const QString &className) const; + bool isCustomWidgetContainer(const QString &className) const; bool isMenuBar(const QString &className) const; bool isMenu(const QString &className) const; diff --git a/src/tools/uic3/uic.cpp b/src/tools/uic3/uic.cpp index 7872866..6761eaf 100644 --- a/src/tools/uic3/uic.cpp +++ b/src/tools/uic3/uic.cpp @@ -322,6 +322,11 @@ bool Uic::isContainer(const QString &className) const || customWidgetsInfo()->extends(className, QLatin1String("QDockWidget")); } +bool Uic::isCustomWidgetContainer(const QString &className) const +{ + return customWidgetsInfo()->isCustomWidgetContainer(className); +} + bool Uic::isStatusBar(const QString &className) const { return customWidgetsInfo()->extends(className, QLatin1String("QStatusBar")); diff --git a/src/tools/uic3/uic.h b/src/tools/uic3/uic.h index 50aa71c..63a1f8d 100644 --- a/src/tools/uic3/uic.h +++ b/src/tools/uic3/uic.h @@ -114,6 +114,7 @@ public: bool isStatusBar(const QString &className) const; bool isButton(const QString &className) const; bool isContainer(const QString &className) const; + bool isCustomWidgetContainer(const QString &className) const; bool isMenuBar(const QString &className) const; bool isMenu(const QString &className) const; diff --git a/src/xmlpatterns/api/qxmlschema.cpp b/src/xmlpatterns/api/qxmlschema.cpp index 287cf11..ee92195 100644 --- a/src/xmlpatterns/api/qxmlschema.cpp +++ b/src/xmlpatterns/api/qxmlschema.cpp @@ -65,6 +65,11 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/qxmlschema/main.cpp 0 + \section1 XML Schema Version + + This class is used to represent schemas that conform to the \l{XML Schema} 1.0 + specification. + \sa QXmlSchemaValidator, {xmlpatterns/schema}{XML Schema Validation Example} */ diff --git a/src/xmlpatterns/api/qxmlschemavalidator.cpp b/src/xmlpatterns/api/qxmlschemavalidator.cpp index 11e0417..682d34f 100644 --- a/src/xmlpatterns/api/qxmlschemavalidator.cpp +++ b/src/xmlpatterns/api/qxmlschemavalidator.cpp @@ -71,6 +71,11 @@ QT_BEGIN_NAMESPACE \snippet doc/src/snippets/qxmlschemavalidator/main.cpp 3 + \section1 XML Schema Version + + This class implements schema validation according to the \l{XML Schema} 1.0 + specification. + \sa QXmlSchema, {xmlpatterns/schema}{XML Schema Validation Example} */ diff --git a/src/xmlpatterns/data/qderivedinteger_p.h b/src/xmlpatterns/data/qderivedinteger_p.h index 859e03d..19dc4c4 100644 --- a/src/xmlpatterns/data/qderivedinteger_p.h +++ b/src/xmlpatterns/data/qderivedinteger_p.h @@ -401,18 +401,18 @@ namespace QPatternist { return ValidationError::createError(QtXmlPatterns::tr( "Value %1 of type %2 exceeds maximum (%3).") - .arg(formatData(static_cast<xsInteger>(num))) + .arg(QPatternist::formatData(static_cast<xsInteger>(num))) .arg(formatType(np, itemType())) - .arg(formatData(static_cast<xsInteger>(maxInclusive)))); + .arg(QPatternist::formatData(static_cast<xsInteger>(maxInclusive)))); } else if((limitsUsage & LimitDownwards) && lessThan(num, minimum)) { return ValidationError::createError(QtXmlPatterns::tr( "Value %1 of type %2 is below minimum (%3).") - .arg(formatData(static_cast<xsInteger>(num))) + .arg(QPatternist::formatData(static_cast<xsInteger>(num))) .arg(formatType(np, itemType())) - .arg(formatData(static_cast<xsInteger>(minInclusive)))); + .arg(QPatternist::formatData(static_cast<xsInteger>(minInclusive)))); } else return AtomicValue::Ptr(new DerivedInteger(num)); diff --git a/src/xmlpatterns/functions/qcomparingaggregator.cpp b/src/xmlpatterns/functions/qcomparingaggregator.cpp index 6d07109..acda08c 100644 --- a/src/xmlpatterns/functions/qcomparingaggregator.cpp +++ b/src/xmlpatterns/functions/qcomparingaggregator.cpp @@ -195,7 +195,7 @@ ComparingAggregator<oper, result>::typeCheck(const StaticContext::Ptr &context, !BuiltinTypes::xsYearMonthDuration->xdtTypeMatches(t1)) { context->error(QtXmlPatterns::tr("The first argument to %1 cannot be of type %2.") - .arg(formatFunction(context->namePool(), signature())) + .arg(QPatternist::formatFunction(context->namePool(), signature())) .arg(formatType(context->namePool(), m_operands.first()->staticType())), ReportContext::FORG0006, this); return me; diff --git a/src/xmlpatterns/parser/querytransformparser.ypp b/src/xmlpatterns/parser/querytransformparser.ypp index 45dc773..562d245 100644 --- a/src/xmlpatterns/parser/querytransformparser.ypp +++ b/src/xmlpatterns/parser/querytransformparser.ypp @@ -870,7 +870,7 @@ static void variableUnavailable(const QXmlName &variableName, const ParserContext *const parseInfo, const YYLTYPE &location) { - parseInfo->staticContext->error(QtXmlPatterns::tr("No variable by name %1 exists") + parseInfo->staticContext->error(QtXmlPatterns::tr("No variable with name %1 exists") .arg(formatKeyword(parseInfo->staticContext->namePool(), variableName)), ReportContext::XPST0008, fromYYLTYPE(location, parseInfo)); } |