From f370fa5c6758cdce3c161de94888ed1d05ae2c9f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 1 Jun 2010 15:32:57 +0200 Subject: Updated WebKit to f59a934694947496cedecc5256a71bff60c43c4c Integrated changes: || || [Qt] QtWebkit.pc is broken || Plus a fix for the installation/setup of qt_webkit_version.pri --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 23 ++++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 18 +++++++++++++---- src/3rdparty/webkit/WebKit/qt/ChangeLog | 8 ++++++++ .../webkit/WebKit/qt/qt_webkit_version.pri | 4 ++++ src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri | 4 ---- 7 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri delete mode 100644 src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 8cb0e53..14be658 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -f59a934694947496cedecc5256a71bff60c43c4c +9a83f22bc41a2016b6bbf495bfd32b3a659038c8 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index fb78e36..a63a9d1 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - c58dc2f491a824ac56e31c440fcf7fe16dab09c4 + f59a934694947496cedecc5256a71bff60c43c4c diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index ff7d214..246504f 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,26 @@ +2010-06-01 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] Fix a QtWebKit.pc corruption problem. + https://bugs.webkit.org/show_bug.cgi?id=36826 + + The problem occurs while installing QtWebKit from trunk + or a source package. + + * WebCore.pro: + +2010-06-01 Simon Hausmann + + Reviewed by Laszlo Gombos. + + [Qt] Fix Symbian package dependencies of apps against QtWebKit when installing into Qt + + Install the versioning qt_webkit_version.pri into $$[QMAKE_MKSPECS]/modules, which is + where mkspecs/features/qt.prf expects it. + + * WebCore.pro: + 2010-05-31 Oswald Buddenhagen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 63e78a7..f2671fb 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -74,7 +74,8 @@ CONFIG(QTDIR_build) { !static: DEFINES += QT_MAKEDLL symbian: TARGET =$$TARGET$${QT_LIBINFIX} } -include($$PWD/../WebKit/qt/qtwebkit_version.pri) +moduleFile=$$PWD/../WebKit/qt/qt_webkit_version.pri +include($$moduleFile) VERSION = $${QT_WEBKIT_MAJOR_VERSION}.$${QT_WEBKIT_MINOR_VERSION}.$${QT_WEBKIT_PATCH_VERSION} unix { @@ -2849,7 +2850,10 @@ HEADERS += $$WEBKIT_API_HEADERS headers.path = $$[QT_INSTALL_HEADERS]/QtWebKit target.path = $$[QT_INSTALL_LIBS] - INSTALLS += target headers + modfile.files = $$moduleFile + modfile.path = $$[QMAKE_MKSPECS]/modules + + INSTALLS += target headers modfile } else { # INSTALLS is not implemented in qmake's s60 generators, copy headers manually inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} @@ -2857,7 +2861,13 @@ HEADERS += $$WEBKIT_API_HEADERS inst_headers.output = $$[QT_INSTALL_HEADERS]/QtWebKit/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} QMAKE_EXTRA_COMPILERS += inst_headers - install.depends += compiler_inst_headers_make_all + inst_modfile.commands = $$inst_headers.commands + inst_modfile.input = moduleFile + inst_modfile.output = $$[QMAKE_MKSPECS]/modules + + QMAKE_EXTRA_COMPILERS += inst_modfile + + install.depends += compiler_inst_headers_make_all compiler_inst_modfile_make_all QMAKE_EXTRA_TARGETS += install } @@ -2875,7 +2885,7 @@ HEADERS += $$WEBKIT_API_HEADERS QMAKE_PKGCONFIG_LIBDIR = $$target.path QMAKE_PKGCONFIG_INCDIR = $$headers.path QMAKE_PKGCONFIG_DESTDIR = pkgconfig - lib_replace.match = $$DESTDIR + lib_replace.match = $$re_escape($$DESTDIR) lib_replace.replace = $$[QT_INSTALL_LIBS] QMAKE_PKGCONFIG_INSTALL_REPLACE += lib_replace } diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index b6cbf92..39f2cf3 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,11 @@ +2010-06-01 Simon Hausmann + + Reviewed by Laszlo Gombos. + + [Qt] Rename versioning .pri file to what Qt's mkspecs/features/qt.pri expects. + + * qt_webkit_version.pri: Renamed from WebKit/qt/qtwebkit_version.pri. + 2010-05-31 Oswald Buddenhagen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri new file mode 100644 index 0000000..ffd192c --- /dev/null +++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri @@ -0,0 +1,4 @@ +QT_WEBKIT_VERSION = 4.7.0 +QT_WEBKIT_MAJOR_VERSION = 4 +QT_WEBKIT_MINOR_VERSION = 7 +QT_WEBKIT_PATCH_VERSION = 0 diff --git a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri deleted file mode 100644 index ffd192c..0000000 --- a/src/3rdparty/webkit/WebKit/qt/qtwebkit_version.pri +++ /dev/null @@ -1,4 +0,0 @@ -QT_WEBKIT_VERSION = 4.7.0 -QT_WEBKIT_MAJOR_VERSION = 4 -QT_WEBKIT_MINOR_VERSION = 7 -QT_WEBKIT_PATCH_VERSION = 0 -- cgit v0.12 From 9ea2eb78e4e3613f052535892a5f3bbf0e8c4dee Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 1 Jun 2010 16:06:00 +0200 Subject: Fix versioning of pkg files on Symbian for apps linking against WebKit Currently features/symbian/qt.prf defaults to the qt version for WebKit when it comes with Qt from src/3rdparty. Instead of defaulting to the Qt version, pick up the real version from src/3rdparty by including the .pri file. Reviewed-by: Jocelyn Turcotte --- mkspecs/modules/qt_webkit_version.pri | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mkspecs/modules/qt_webkit_version.pri diff --git a/mkspecs/modules/qt_webkit_version.pri b/mkspecs/modules/qt_webkit_version.pri new file mode 100644 index 0000000..0370720 --- /dev/null +++ b/mkspecs/modules/qt_webkit_version.pri @@ -0,0 +1,2 @@ +# The version information comes from our copy of +include($$PWD/../../src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri) -- cgit v0.12 From 5d7b4968cc181726b97848bda5684da99e6db312 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 1 Jun 2010 16:38:48 +0200 Subject: Updated WebKit to 9a83f22bc41a2016b6bbf495bfd32b3a659038c8 Integrated changes: || || [Qt] QtWebkit.pc is broken || || || Bring CanvasRenderingContext2D's createImageData() in line with HTML5 spec || || || Properly handle invalid arguments to CanvasRenderingContext2D's getImageData() and putImageData() || As well as fixes for the qt_webkit_version.pri module installation. --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 50 ++++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 7 ++- .../js/JSCanvasRenderingContext2DCustom.cpp | 18 ++++++++ .../generated/JSCanvasRenderingContext2D.cpp | 12 +----- .../WebCore/generated/JSCanvasRenderingContext2D.h | 1 + .../html/canvas/CanvasRenderingContext2D.cpp | 30 +++++++++++-- .../WebCore/html/canvas/CanvasRenderingContext2D.h | 1 + .../html/canvas/CanvasRenderingContext2D.idl | 3 +- 10 files changed, 108 insertions(+), 18 deletions(-) diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 14be658..cc67d1b 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -9a83f22bc41a2016b6bbf495bfd32b3a659038c8 +de1e909b06cbc981d63e0fc0f6a3f84002dd1e80 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index a63a9d1..f37c367 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - f59a934694947496cedecc5256a71bff60c43c4c + 9a83f22bc41a2016b6bbf495bfd32b3a659038c8 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 246504f..e907167 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,11 @@ +2010-06-01 Simon Hausmann + + Reviewed by Laszlo Gombos. + + [Qt] Fix installation of the QtWebKit module .pri file when building inside of Qt + + * WebCore.pro: + 2010-06-01 Jocelyn Turcotte Reviewed by Simon Hausmann. @@ -21,6 +29,48 @@ * WebCore.pro: +2010-05-17 Andreas Kling + + Reviewed by Kenneth Rohde Christiansen. + + Bring CanvasRenderingContext2D's createImageData() in line with HTML5 spec + Added createImageData(ImageData) which returns a new ImageData with the same size as the one passed. + Changed createImageData(width, height) to use the absolute values of width and height. + + https://bugs.webkit.org/show_bug.cgi?id=39189 + + Spec link: + http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-createimagedata + + Test: fast/canvas/canvas-createImageData.html + + * bindings/js/JSCanvasRenderingContext2DCustom.cpp: + (WebCore::JSCanvasRenderingContext2D::createImageData): + * html/canvas/CanvasRenderingContext2D.cpp: + (WebCore::CanvasRenderingContext2D::createImageData): + * html/canvas/CanvasRenderingContext2D.h: + * html/canvas/CanvasRenderingContext2D.idl: + +2010-05-16 Andreas Kling + + Reviewed by Kenneth Rohde Christiansen. + + Properly handle invalid arguments to CanvasRenderingContext2D's getImageData() and putImageData(). + Both should throw NOT_SUPPORTED_ERR when called with nonfinite arguments. + getImageData() should throw INDEX_SIZE_ERR if either width or height is 0. + + https://bugs.webkit.org/show_bug.cgi?id=39175 + + Spec link: + http://www.whatwg.org/specs/web-apps/current-work/#pixel-manipulation + + Test: fast/canvas/canvas-getImageData-invalid.html + + * html/canvas/CanvasRenderingContext2D.cpp: + (WebCore::CanvasRenderingContext2D::createImageData): + (WebCore::CanvasRenderingContext2D::getImageData): + (WebCore::CanvasRenderingContext2D::putImageData): + 2010-05-31 Oswald Buddenhagen Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index f2671fb..2a1536c 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2841,7 +2841,12 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { include($$PWD/../WebKit/qt/Api/headers.pri) HEADERS += $$WEBKIT_API_HEADERS -!CONFIG(QTDIR_build) { +CONFIG(QTDIR_build) { + modfile.files = $$moduleFile + modfile.path = $$[QMAKE_MKSPECS]/modules + + INSTALLS += modfile +} else { exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp index a271923..0254d0f 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp @@ -361,6 +361,24 @@ JSValue JSCanvasRenderingContext2D::createPattern(ExecState* exec, const ArgList return jsUndefined(); } +JSValue JSCanvasRenderingContext2D::createImageData(ExecState* exec, const ArgList& args) +{ + // createImageData has two variants + // createImageData(ImageData) + // createImageData(width, height) + CanvasRenderingContext2D* context = static_cast(impl()); + RefPtr imageData = 0; + + ExceptionCode ec = 0; + if (args.size() == 1) + imageData = context->createImageData(toImageData(args.at(0)), ec); + else if (args.size() == 2) + imageData = context->createImageData(args.at(0).toFloat(exec), args.at(1).toFloat(exec), ec); + + setDOMException(exec, ec); + return toJS(exec, globalObject(), WTF::getPtr(imageData)); +} + JSValue JSCanvasRenderingContext2D::putImageData(ExecState* exec, const ArgList& args) { // putImageData has two variants diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp index a991e8d..d97b54a 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.cpp @@ -165,7 +165,7 @@ static const HashTableValue JSCanvasRenderingContext2DPrototypeTableValues[45] = { "drawImageFromRect", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionDrawImageFromRect), (intptr_t)0 }, { "setShadow", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionSetShadow), (intptr_t)0 }, { "createPattern", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionCreatePattern), (intptr_t)0 }, - { "createImageData", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionCreateImageData), (intptr_t)2 }, + { "createImageData", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionCreateImageData), (intptr_t)0 }, { "getImageData", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionGetImageData), (intptr_t)4 }, { "putImageData", DontDelete|Function, (intptr_t)static_cast(jsCanvasRenderingContext2DPrototypeFunctionPutImageData), (intptr_t)0 }, { 0, 0, 0, 0 } @@ -1018,15 +1018,7 @@ JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionCreateImageData if (!thisValue.inherits(&JSCanvasRenderingContext2D::s_info)) return throwError(exec, TypeError); JSCanvasRenderingContext2D* castedThisObj = static_cast(asObject(thisValue)); - CanvasRenderingContext2D* imp = static_cast(castedThisObj->impl()); - ExceptionCode ec = 0; - float sw = args.at(0).toFloat(exec); - float sh = args.at(1).toFloat(exec); - - - JSC::JSValue result = toJS(exec, castedThisObj->globalObject(), WTF::getPtr(imp->createImageData(sw, sh, ec))); - setDOMException(exec, ec); - return result; + return castedThisObj->createImageData(exec, args); } JSValue JSC_HOST_CALL jsCanvasRenderingContext2DPrototypeFunctionGetImageData(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) diff --git a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h index 218e455..92fabb7 100644 --- a/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h +++ b/src/3rdparty/webkit/WebCore/generated/JSCanvasRenderingContext2D.h @@ -61,6 +61,7 @@ public: JSC::JSValue drawImageFromRect(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue setShadow(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue createPattern(JSC::ExecState*, const JSC::ArgList&); + JSC::JSValue createImageData(JSC::ExecState*, const JSC::ArgList&); JSC::JSValue putImageData(JSC::ExecState*, const JSC::ArgList&); protected: static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp index 398e4d8..9cec7a9 100644 --- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp +++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.cpp @@ -1278,14 +1278,30 @@ static PassRefPtr createEmptyImageData(const IntSize& size) return data.get(); } +PassRefPtr CanvasRenderingContext2D::createImageData(PassRefPtr imageData, ExceptionCode& ec) const +{ + if (!imageData) { + ec = NOT_SUPPORTED_ERR; + return 0; + } + + IntSize size(imageData->width(), imageData->height()); + return createEmptyImageData(size); +} + PassRefPtr CanvasRenderingContext2D::createImageData(float sw, float sh, ExceptionCode& ec) const { ec = 0; + if (!sw || !sh) { + ec = INDEX_SIZE_ERR; + return 0; + } if (!isfinite(sw) || !isfinite(sh)) { ec = NOT_SUPPORTED_ERR; return 0; } - FloatSize unscaledSize(sw, sh); + + FloatSize unscaledSize(fabs(sw), fabs(sh)); IntSize scaledSize = canvas()->convertLogicalToDevice(unscaledSize); if (scaledSize.width() < 1) scaledSize.setWidth(1); @@ -1301,7 +1317,15 @@ PassRefPtr CanvasRenderingContext2D::getImageData(float sx, float sy, ec = SECURITY_ERR; return 0; } - + if (!sw || !sh) { + ec = INDEX_SIZE_ERR; + return 0; + } + if (!isfinite(sx) || !isfinite(sy) || !isfinite(sw) || !isfinite(sh)) { + ec = NOT_SUPPORTED_ERR; + return 0; + } + FloatRect unscaledRect(sx, sy, sw, sh); IntRect scaledRect = canvas()->convertLogicalToDevice(unscaledRect); if (scaledRect.width() < 1) @@ -1332,7 +1356,7 @@ void CanvasRenderingContext2D::putImageData(ImageData* data, float dx, float dy, } if (!isfinite(dx) || !isfinite(dy) || !isfinite(dirtyX) || !isfinite(dirtyY) || !isfinite(dirtyWidth) || !isfinite(dirtyHeight)) { - ec = INDEX_SIZE_ERR; + ec = NOT_SUPPORTED_ERR; return; } diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h index 553ffd2..2220f7e 100644 --- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h +++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.h @@ -178,6 +178,7 @@ namespace WebCore { PassRefPtr createPattern(HTMLImageElement*, const String& repetitionType, ExceptionCode&); PassRefPtr createPattern(HTMLCanvasElement*, const String& repetitionType, ExceptionCode&); + PassRefPtr createImageData(PassRefPtr imageData, ExceptionCode&) const; PassRefPtr createImageData(float width, float height, ExceptionCode&) const; PassRefPtr getImageData(float sx, float sy, float sw, float sh, ExceptionCode&) const; void putImageData(ImageData*, float dx, float dy, ExceptionCode&); diff --git a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl index f93a752..3f7ead7 100644 --- a/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl +++ b/src/3rdparty/webkit/WebCore/html/canvas/CanvasRenderingContext2D.idl @@ -105,13 +105,12 @@ module html { [Custom] void drawImageFromRect(/* 10 */); [Custom] void setShadow(/* 3 */); [Custom] void createPattern(/* 2 */); + [Custom] ImageData createImageData(/* 3 */); attribute [Custom] custom strokeStyle; attribute [Custom] custom fillStyle; // pixel manipulation - ImageData createImageData(in float sw, in float sh) - raises (DOMException); ImageData getImageData(in float sx, in float sy, in float sw, in float sh) raises(DOMException); [Custom] void putImageData(/* in ImageData imagedata, in float dx, in float dy [, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight] */); -- cgit v0.12