Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2014 01:15:49 +0000 (UTC)
From:      Martin Matuska <mm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r343179 - in head/converters/wkhtmltopdf: . files
Message-ID:  <201402070115.s171FnHN034980@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mm
Date: Fri Feb  7 01:15:49 2014
New Revision: 343179
URL: http://svnweb.freebsd.org/changeset/ports/343179
QAT: https://qat.redports.org/buildarchive/r343179/

Log:
  Update to 0.12.0 and support staging

Added:
  head/converters/wkhtmltopdf/files/
  head/converters/wkhtmltopdf/files/patch-libcxx
     - copied unchanged from r343176, head/www/webkit-qt4/files/patch-libcxx
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__jit__JITStubs.cpp
     - copied unchanged from r343176, head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__jit__JITStubs.cpp
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp
     - copied unchanged from r343176, head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__Collector.cpp
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__JSValue.h
     - copied unchanged from r343176, head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__runtime__JSValue.h
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h
     - copied unchanged from r343176, head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__HashTable.h
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h
     - copied unchanged from r343176, head/devel/qt4-script/files/patch-src__3rdparty__javascriptcore__JavaScriptCore__wtf__Threading.h
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__webkit__Source__JavaScriptCore__runtime__JSValueInlineMethods.h
     - copied unchanged from r343176, head/www/webkit-qt4/files/patch-src__3rdparty__webkit__Source__JavaScriptCore__runtime__JSValueInlineMethods.h
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__webkit__Source__JavaScriptCore__wtf__Atomics.h
     - copied unchanged from r343176, head/www/webkit-qt4/files/patch-src__3rdparty__webkit__Source__JavaScriptCore__wtf__Atomics.h
  head/converters/wkhtmltopdf/files/patch-src__3rdparty__webkit__Source__WebKit__qt__QtWebKit.pro
     - copied unchanged from r343176, head/www/webkit-qt4/files/patch-src__3rdparty__webkit__Source__WebKit__qt__QtWebKit.pro
Modified:
  head/converters/wkhtmltopdf/Makefile
  head/converters/wkhtmltopdf/distinfo
  head/converters/wkhtmltopdf/pkg-descr
  head/converters/wkhtmltopdf/pkg-plist

Modified: head/converters/wkhtmltopdf/Makefile
==============================================================================
--- head/converters/wkhtmltopdf/Makefile	Fri Feb  7 01:01:37 2014	(r343178)
+++ head/converters/wkhtmltopdf/Makefile	Fri Feb  7 01:15:49 2014	(r343179)
@@ -2,37 +2,41 @@
 # $FreeBSD$
 
 PORTNAME=	wkhtmltopdf
-DISTVERSION=	0.11.0_rc1
-PORTREVISION=	3
+DISTVERSION=	0.12.0
 CATEGORIES=	converters
-MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}:wkhtmltopdf \
-		${MASTER_SITE_LOCAL}
+MASTER_SITES=	${MASTER_SITE_LOCAL}
 MASTER_SITE_SUBDIR=	mm/wkhtmltopdf
-DISTFILES=	${DISTNAME}.tar.bz2:wkhtmltopdf \
+DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
 		wkhtmltopdf-qt-${WKQTVERSION}.tar.xz
 
 MAINTAINER=	mm@FreeBSD.org
 COMMENT=	Convert HTML (or live webpages) to PDF or image files
+
+LICENSE=	LGPL3
+LICENSE_FILE_LGPL3=	${INSTALL_WRKSRC}/COPYING
+
 LIB_DEPENDS+=	libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
 		libfreetype.so:${PORTSDIR}/print/freetype2
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-qt
-INSTALL_WRKSRC=	${WRKDIR}/${PORTNAME}-${DISTVERSION}
-
-WKQTVERSION=		6053b687
+#USE_GITHUB=		yes
+GH_ACCOUNT=		wkhtmltopdf
+GH_PROJECT=		wkhtmltopdf
+GH_TAGNAME=		0.12.0
+GH_COMMIT=		03c001d
+WKQTVERSION=		0ec3313
 USES=			pkgconfig gmake perl5
 USE_XORG=		x11 xext xrender
 USE_PERL5=		build
 USE_LDCONFIG=		yes
 HAS_CONFIGURE=		yes
 
+WRKSRC=		${WRKDIR}/qt-wk_4.8.5
+INSTALL_WRKSRC=	${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
+
 OPTIONS_DEFINE=	BUNDLED_LIBS
 BUNDLED_LIBS_DESC=	Use Qt-bundled jpeg, mng, png and tiff
 
-LICENSE=	LGPL3
-LICENSE_FILE_LGPL3=	${INSTALL_WRKSRC}/COPYING
-
-CONFIGURE_ARGS=	-prefix ${WRKDIR}/wkqt \
+CONFIGURE_ARGS=	-prefix ${WRKDIR}/qt-wk \
 	-release -static -fast -exceptions -no-accessibility -no-stl \
 	-no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite \
 	-no-sql-sqlite2 -no-qt3support -xmlpatterns -no-phonon \
@@ -47,15 +51,10 @@ CONFIGURE_ARGS=	-prefix ${WRKDIR}/wkqt \
 	-no-opengl -no-xsync -no-audio-backend -no-sse3 -no-ssse3 -no-sse4.1 \
 	-no-sse4.2
 
-MAKE_ARGS+=	INSTALL_ROOT="${PREFIX}"
+MAKE_ARGS+=	INSTALL_ROOT="${STAGEDIR}${PREFIX}"
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} > 1000000
-USE_GCC=	yes
-.endif
-
 .if ${OSVERSION} < 800000
 BROKEN=		fails to extract on FreeBSD 7.X
 .endif
@@ -85,13 +84,16 @@ post-patch:
 
 post-build:
 	@cd ${WRKSRC} && \
-		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} \
-		INSTALL_ROOT=
-	@cd ${WRKDIR}/${PORTNAME}-${DISTVERSION} && ${WRKDIR}/wkqt/bin/qmake && \
-		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}
+		${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} \
+		${MAKE_ARGS} ${INSTALL_TARGET} INSTALL_ROOT=
+	@cd ${INSTALL_WRKSRC} && ${WRKDIR}/qt-wk/bin/qmake && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} \
+		${_MAKE_JOBS} ${MAKE_ARGS:C,^${DESTDIRNAME}=.*,,g} \
+		${ALL_TARGET}
 
 post-install:
-	@${STRIP_CMD} ${PREFIX}/bin/wkhtmltopdf ${PREFIX}/bin/wkhtmltoimage
+	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/wkhtmltopdf \
+		${STAGEDIR}${PREFIX}/bin/wkhtmltoimage
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>

Modified: head/converters/wkhtmltopdf/distinfo
==============================================================================
--- head/converters/wkhtmltopdf/distinfo	Fri Feb  7 01:01:37 2014	(r343178)
+++ head/converters/wkhtmltopdf/distinfo	Fri Feb  7 01:15:49 2014	(r343179)
@@ -1,4 +1,4 @@
-SHA256 (wkhtmltopdf-0.11.0_rc1.tar.bz2) = a36dbfc7cc27604b667f278ff8e9c86ced6777cdd1646d585d4e06e473b1905c
-SIZE (wkhtmltopdf-0.11.0_rc1.tar.bz2) = 97589
-SHA256 (wkhtmltopdf-qt-6053b687.tar.xz) = 6d3f3e2dc7b450ab8c8074e124ca8ee9b90234224aa48a7f8f335b1cd9527a14
-SIZE (wkhtmltopdf-qt-6053b687.tar.xz) = 122782824
+SHA256 (wkhtmltopdf-0.12.0.tar.gz) = 47b35536ca60220c402113c9ceee9b1f68bd7ca0dc831e3242e26684a9fd4baf
+SIZE (wkhtmltopdf-0.12.0.tar.gz) = 135609
+SHA256 (wkhtmltopdf-qt-0ec3313.tar.xz) = cd930bb84124a5cf4f74f430233be4aa5c1c69b5846684f1223ab1a0bc9110a7
+SIZE (wkhtmltopdf-qt-0ec3313.tar.xz) = 132737360

Copied: head/converters/wkhtmltopdf/files/patch-libcxx (from r343176, head/www/webkit-qt4/files/patch-libcxx)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/converters/wkhtmltopdf/files/patch-libcxx	Fri Feb  7 01:15:49 2014	(r343179, copy of r343176, head/www/webkit-qt4/files/patch-libcxx)
@@ -0,0 +1,983 @@
+Several upstream (as in WebKit itself) commits that fix the build with libc++,
+plus a few additional changes made only for the port (the OS(FREEBSD) part for
+time_t). Some of those commits had to be edited because they did not apply
+cleanly to the ancient WebKit checkout present in Qt.
+
+Upstream commit messages:
+
+------------------------------------------------------------------------
+r86529 | abarth@webkit.org | 2011-05-16 09:30:58 +0300 (Mon, 16 May 2011) | 7 lines
+
+2011-05-15  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Qt build.  (Strict PassOwnPtr fix.)
+
+        * dom/XMLDocumentParserQt.cpp:
+        (WebCore::XMLDocumentParser::doEnd):
+
+------------------------------------------------------------------------
+r86530 | abarth@webkit.org | 2011-05-16 09:36:56 +0300 (Mon,  16 May 2011) | 13 lines
+
+2011-05-15  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Qt build.  (Strict PassOwnPtr fix.)
+
+* platform/network/qt/QNetworkReplyHandler.cpp:
+(WebCore::QNetworkReplyWrapper::release):
+(WebCore::QNetworkReplyWrapper::receiveMetaData):
+(WebCore::QNetworkReplyWrapper::receiveSniffedMIMEType):
+(WebCore::QNetworkReplyHandler::release):
+(WebCore::QNetworkReplyHandler::finish):
+(WebCore::QNetworkReplyHandler::redirect):
+(WebCore::QNetworkReplyHandler::start):
+
+------------------------------------------------------------------------
+r86531 | abarth@webkit.org | 2011-05-16 09:41:08 +0300 (Mon, 16 May 2011) | 7 lines
+
+2011-05-15  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Qt build.  (Strict PassOwnPtr fix.)
+
+        * platform/text/qt/TextCodecQt.cpp:
+        (WebCore::newTextCodecQt):
+
+------------------------------------------------------------------------
+r86532 | abarth@webkit.org | 2011-05-16 09:46:33 +0300 (Mon, 16 May 2011) | 8 lines
+
+2011-05-15  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Qt build.  (Strict PassOwnPtr fix.)
+
+        * platform/graphics/qt/GraphicsLayerQt.cpp:
+        (WebCore::GraphicsLayerQt::GraphicsLayerQt):
+        (WebCore::GraphicsLayer::create):
+
+
+------------------------------------------------------------------------
+r86533 | abarth@webkit.org | 2011-05-16 09:52:23 +0300 (Mon, 16 May 2011) | 10 lines
+
+2011-05-15  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix the Qt build.  (Strict PassOwnPtr fix.)
+
+        * Api/qgraphicswebview.cpp:
+        (QGraphicsWebViewPrivate::detachCurrentPage):
+        (QGraphicsWebView::setPage):
+        * Api/qwebpage.cpp:
+        (QWebPage::setView):
+
+------------------------------------------------------------------------
+r86537 | abarth@webkit.org | 2011-05-16 10:24:01 +0300 (Mon, 16 May 2011) | 41 lines
+
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        [Qt] QtPlatformPlugin create methods should use PassOwnPtr
+        https://bugs.webkit.org/show_bug.cgi?id=60873
+
+        This change is slightly more than a build fix because the patch kind of
+        spidered a bit while I was trying to fix the build the "right way."
+        Hopefully nothing here is controversial.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::adjustPointForClicking):
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::createSelectPopup):
+        * WebCoreSupport/FullScreenVideoQt.cpp:
+        (WebCore::FullScreenVideoQt::FullScreenVideoQt):
+        (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
+        * WebCoreSupport/FullScreenVideoQt.h:
+        * WebCoreSupport/NotificationPresenterClientQt.cpp:
+        (WebCore::NotificationWrapper::NotificationWrapper):
+        (WebCore::NotificationPresenterClientQt::displayNotification):
+        * WebCoreSupport/PopupMenuQt.cpp:
+        (WebCore::PopupMenuQt::PopupMenuQt):
+        (WebCore::PopupMenuQt::~PopupMenuQt):
+        (WebCore::PopupMenuQt::show):
+        * WebCoreSupport/PopupMenuQt.h:
+        * WebCoreSupport/QtPlatformPlugin.cpp:
+        (WebCore::QtPlatformPlugin::createSelectInputMethod):
+        (WebCore::QtPlatformPlugin::createNotificationPresenter):
+        (WebCore::QtPlatformPlugin::createHapticFeedbackPlayer):
+        (WebCore::QtPlatformPlugin::createTouchModifier):
+        (WebCore::QtPlatformPlugin::createFullScreenVideoHandler):
+        * WebCoreSupport/QtPlatformPlugin.h:
+        (WebCore::QtPlatformPlugin::QtPlatformPlugin):
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        [Qt] QtPlatformPlugin create methods should use PassOwnPtr
+        https://bugs.webkit.org/show_bug.cgi?id=60873
+
+        * plugins/qt/PluginViewQt.cpp:
+        (WebCore::PluginView::platformStart):
+
+------------------------------------------------------------------------
+r86538 | abarth@webkit.org | 2011-05-16 10:27:51 +0300 (Mon, 16 May 2011) | 6 lines
+
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        Missing include.
+
+        * WebCoreSupport/PopupMenuQt.h:
+
+------------------------------------------------------------------------
+r86540 | abarth@webkit.org | 2011-05-16 10:43:22 +0300 (Mon, 16 May 2011) | 10 lines
+
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        Attempt to fix Qt build.  (Strict PassOwnPtr fix.)
+
+        This patch requires some slightly fancy footwork.
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorClientQt::openInspectorFrontend):
+        (WebCore::InspectorFrontendClientQt::InspectorFrontendClientQt):
+
+------------------------------------------------------------------------
+r86541 | abarth@webkit.org | 2011-05-16 10:51:04 +0300 (Mon, 16 May 2011) | 7 lines
+
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        Sigh.  This code is somewhat crazy.
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorClientQt::openInspectorFrontend):
+
+------------------------------------------------------------------------
+r86550 | abarth@webkit.org | 2011-05-16 12:30:40 +0300 (Mon, 16 May 2011) | 13 lines
+
+2011-05-16  Adam Barth  <abarth@webkit.org>
+
+        Partial revert of r86537.  FullScreenVideoQt.h can't depend on OwnPtr.h
+        because moc_FullScreenVideoQt.cpp fails to include config.h.
+        Apparently, having moc_FullScreenVideoQt.cpp properly include config.h
+        is hard, so we're going back to manual new and delete for this class.
+        Bad times.
+
+        * WebCoreSupport/FullScreenVideoQt.cpp:
+        (WebCore::FullScreenVideoQt::FullScreenVideoQt):
+        (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
+        * WebCoreSupport/FullScreenVideoQt.h:
+
+------------------------------------------------------------------------
+r90915 | andersca@apple.com | 2011-07-13 17:11:49 +0300 (Wed, 13 Jul 2011) | 7 lines
+
+If a compiler has nullptr support, include <cstddef> to get the nullptr_t definition
+https://bugs.webkit.org/show_bug.cgi?id=64429
+
+Include the cstddef which has the nullptr_t typedef according to the C++0x standard.
+
+* wtf/NullPtr.h:
+
+------------------------------------------------------------------------
+r92556 | darin@apple.com | 2011-08-06 23:17:26 +0300 (Sat, 06 Aug 2011) | 17 lines
+
+Fix Timer heap implementation to work with more libraries (other versions of STL)
+https://bugs.webkit.org/show_bug.cgi?id=65782
+
+Reviewed by Anders Carlsson.
+
+No behavior change, so no tests needed. Existing tests pass.
+
+* platform/Timer.cpp: Added TimerHeapPointer and TimerHeapReference class
+alongside the TimerHeapIterator class. Also added a swap function. Also
+added a TimerHeapLessThanFunction class.
+(WebCore::TimerBase::heapDecreaseKey): Pass pointers in to the TimerHeapIterator
+since that's how the class works now. Pass a TimerHeapLessThanFunction object
+instead of letting the library use the < operator directly.
+(WebCore::TimerBase::heapPopMin): Ditto.
+
+* platform/Timer.h: Updated for above changes.
+
+------------------------------------------------------------------------
+r107489 | weinig@apple.com | 2012-02-12 01:10:24 +0200 (Sun, 12 Feb 2012) | 9 lines
+
+Prepare JavaScriptCore to build with libc++
+<rdar://problem/10426673>
+https://bugs.webkit.org/show_bug.cgi?id=78424
+
+Reviewed by Anders Carlsson.
+
+* wtf/NullPtr.cpp:
+* wtf/NullPtr.h:
+libc++ provides std::nullptr emulation, so we don't have to.
+
+------------------------------------------------------------------------
+--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h
++++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h
+@@ -35,10 +35,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+     #define __has_feature(feature) 0
+ #endif
+ 
+-#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL))
++#include <ciso646>
++
++#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600 && !COMPILER(INTEL)) || defined(_LIBCPP_VERSION)
+ 
+ #define HAVE_NULLPTR 1
+ 
++#include <cstddef>
++
+ #else
+ 
+ namespace std {
+--- src/3rdparty/webkit/Source/WebCore/dom/XMLDocumentParserQt.cpp	(revision 86528)
++++ src/3rdparty/webkit/Source/WebCore/dom/XMLDocumentParserQt.cpp	(revision 86529)
+@@ -215,7 +215,7 @@
+ {
+ #if ENABLE(XSLT)
+     if (m_sawXSLTransform) {
+-        document()->setTransformSource(new TransformSource(m_originalSourceForTransform));
++        document()->setTransformSource(adoptPtr(new TransformSource(m_originalSourceForTransform)));
+         document()->setParsing(false); // Make the doc think it's done, so it will apply xsl sheets.
+         document()->styleSelectorChanged(RecalcStyleImmediately);
+         document()->setParsing(true);
+--- src/3rdparty/webkit/Source/WebCore/platform/Timer.cpp	(revision 92555)
++++ src/3rdparty/webkit/Source/WebCore/platform/Timer.cpp	(revision 92556)
+@@ -41,6 +41,8 @@
+ 
+ namespace WebCore {
+ 
++class TimerHeapReference;
++
+ // Timers are stored in a heap data structure, used to implement a priority queue.
+ // This allows us to efficiently determine which timer needs to fire the soonest.
+ // Then we set a single shared system timer to fire at that time.
+@@ -53,113 +55,141 @@
+     return threadGlobalData().threadTimers().timerHeap();
+ }
+ 
+-// Class to represent elements in the heap when calling the standard library heap algorithms.
+-// Maintains the m_heapIndex value in the timers themselves, which allows us to do efficient
+-// modification of the heap.
+-class TimerHeapElement {
++// ----------------
++
++class TimerHeapPointer {
+ public:
+-    explicit TimerHeapElement(int i)
+-        : m_index(i)
+-        , m_timer(timerHeap()[m_index])
+-    { 
+-        checkConsistency(); 
+-    }
++    TimerHeapPointer(TimerBase** pointer) : m_pointer(pointer) { }
++    TimerHeapReference operator*() const;
++    TimerBase* operator->() const { return *m_pointer; }
++private:
++    TimerBase** m_pointer;
++};
+ 
+-    TimerHeapElement(const TimerHeapElement&);
+-    TimerHeapElement& operator=(const TimerHeapElement&);
+-
+-    TimerBase* timer() const { return m_timer; }
+-
+-    void checkConsistency() const
+-    {
+-        ASSERT(m_index >= 0);
+-        ASSERT(m_index < static_cast<int>(timerHeap().size()));
+-    }
+-
++class TimerHeapReference {
++public:
++    TimerHeapReference(TimerBase*& reference) : m_reference(reference) { }
++    operator TimerBase*() const { return m_reference; }
++    TimerHeapPointer operator&() const { return &m_reference; }
++    TimerHeapReference& operator=(TimerBase*);
++    TimerHeapReference& operator=(TimerHeapReference);
+ private:
+-    TimerHeapElement();
+-
+-    int m_index;
+-    TimerBase* m_timer;
++    TimerBase*& m_reference;
+ };
+ 
+-inline TimerHeapElement::TimerHeapElement(const TimerHeapElement& o)
+-    : m_index(-1), m_timer(o.timer())
++inline TimerHeapReference TimerHeapPointer::operator*() const
+ {
++    return *m_pointer;
+ }
+ 
+-inline TimerHeapElement& TimerHeapElement::operator=(const TimerHeapElement& o)
++inline TimerHeapReference& TimerHeapReference::operator=(TimerBase* timer)
+ {
+-    TimerBase* t = o.timer();
+-    m_timer = t;
+-    if (m_index != -1) {
+-        checkConsistency();
+-        timerHeap()[m_index] = t;
+-        t->m_heapIndex = m_index;
+-    }
++    m_reference = timer;
++    Vector<TimerBase*>& heap = timerHeap();
++    if (&m_reference >= heap.data() && &m_reference < heap.data() + heap.size())
++        timer->m_heapIndex = &m_reference - heap.data();
+     return *this;
+ }
+ 
+-inline bool operator<(const TimerHeapElement& a, const TimerHeapElement& b)
++inline TimerHeapReference& TimerHeapReference::operator=(TimerHeapReference b)
+ {
+-    // The comparisons below are "backwards" because the heap puts the largest 
+-    // element first and we want the lowest time to be the first one in the heap.
+-    double aFireTime = a.timer()->m_nextFireTime;
+-    double bFireTime = b.timer()->m_nextFireTime;
+-    if (bFireTime != aFireTime)
+-        return bFireTime < aFireTime;
+-    
+-    // We need to look at the difference of the insertion orders instead of comparing the two 
+-    // outright in case of overflow. 
+-    unsigned difference = a.timer()->m_heapInsertionOrder - b.timer()->m_heapInsertionOrder;
+-    return difference < UINT_MAX / 2;
++    TimerBase* timer = b;
++    return *this = timer;
+ }
+ 
++inline void swap(TimerHeapReference a, TimerHeapReference b)
++{
++    TimerBase* timerA = a;
++    TimerBase* timerB = b;
++
++    // Invoke the assignment operator, since that takes care of updating m_heapIndex.
++    a = timerB;
++    b = timerA;
++}
++
+ // ----------------
+ 
+ // Class to represent iterators in the heap when calling the standard library heap algorithms.
+-// Returns TimerHeapElement for elements in the heap rather than the TimerBase pointers themselves.
+-class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerHeapElement, int> {
++// Uses a custom pointer and reference type that update indices for pointers in the heap.
++class TimerHeapIterator : public iterator<random_access_iterator_tag, TimerBase*, ptrdiff_t, TimerHeapPointer, TimerHeapReference> {
+ public:
+-    TimerHeapIterator() : m_index(-1) { }
+-    TimerHeapIterator(int i) : m_index(i) { checkConsistency(); }
++    explicit TimerHeapIterator(TimerBase** pointer) : m_pointer(pointer) { checkConsistency(); }
+ 
+-    TimerHeapIterator& operator++() { checkConsistency(); ++m_index; checkConsistency(); return *this; }
+-    TimerHeapIterator operator++(int) { checkConsistency(); checkConsistency(1); return m_index++; }
++    TimerHeapIterator& operator++() { checkConsistency(); ++m_pointer; checkConsistency(); return *this; }
++    TimerHeapIterator operator++(int) { checkConsistency(1); return TimerHeapIterator(m_pointer++); }
+ 
+-    TimerHeapIterator& operator--() { checkConsistency(); --m_index; checkConsistency(); return *this; }
+-    TimerHeapIterator operator--(int) { checkConsistency(); checkConsistency(-1); return m_index--; }
++    TimerHeapIterator& operator--() { checkConsistency(); --m_pointer; checkConsistency(); return *this; }
++    TimerHeapIterator operator--(int) { checkConsistency(-1); return TimerHeapIterator(m_pointer--); }
+ 
+-    TimerHeapIterator& operator+=(int i) { checkConsistency(); m_index += i; checkConsistency(); return *this; }
+-    TimerHeapIterator& operator-=(int i) { checkConsistency(); m_index -= i; checkConsistency(); return *this; }
++    TimerHeapIterator& operator+=(ptrdiff_t i) { checkConsistency(); m_pointer += i; checkConsistency(); return *this; }
++    TimerHeapIterator& operator-=(ptrdiff_t i) { checkConsistency(); m_pointer -= i; checkConsistency(); return *this; }
+ 
+-    TimerHeapElement operator*() const { return TimerHeapElement(m_index); }
+-    TimerHeapElement operator[](int i) const { return TimerHeapElement(m_index + i); }
++    TimerHeapReference operator*() const { return TimerHeapReference(*m_pointer); }
++    TimerHeapReference operator[](ptrdiff_t i) const { return TimerHeapReference(m_pointer[i]); }
++    TimerBase* operator->() const { return *m_pointer; }
+ 
+-    int index() const { return m_index; }
+-
+-    void checkConsistency(int offset = 0) const
++private:
++    void checkConsistency(ptrdiff_t offset = 0) const
+     {
+-        ASSERT_UNUSED(offset, m_index + offset >= 0);
+-        ASSERT_UNUSED(offset, m_index + offset <= static_cast<int>(timerHeap().size()));
++        ASSERT(m_pointer >= timerHeap().data());
++        ASSERT(m_pointer <= timerHeap().data() + timerHeap().size());
++        ASSERT_UNUSED(offset, m_pointer + offset >= timerHeap().data());
++        ASSERT_UNUSED(offset, m_pointer + offset <= timerHeap().data() + timerHeap().size());
+     }
+ 
+-private:
+-    int m_index;
++    friend bool operator==(TimerHeapIterator, TimerHeapIterator);
++    friend bool operator!=(TimerHeapIterator, TimerHeapIterator);
++    friend bool operator<(TimerHeapIterator, TimerHeapIterator);
++    friend bool operator>(TimerHeapIterator, TimerHeapIterator);
++    friend bool operator<=(TimerHeapIterator, TimerHeapIterator);
++    friend bool operator>=(TimerHeapIterator, TimerHeapIterator);
++    
++    friend TimerHeapIterator operator+(TimerHeapIterator, size_t);
++    friend TimerHeapIterator operator+(size_t, TimerHeapIterator);
++    
++    friend TimerHeapIterator operator-(TimerHeapIterator, size_t);
++    friend ptrdiff_t operator-(TimerHeapIterator, TimerHeapIterator);
++
++    TimerBase** m_pointer;
+ };
+ 
+-inline bool operator==(TimerHeapIterator a, TimerHeapIterator b) { return a.index() == b.index(); }
+-inline bool operator!=(TimerHeapIterator a, TimerHeapIterator b) { return a.index() != b.index(); }
+-inline bool operator<(TimerHeapIterator a, TimerHeapIterator b) { return a.index() < b.index(); }
++inline bool operator==(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer == b.m_pointer; }
++inline bool operator!=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer != b.m_pointer; }
++inline bool operator<(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer < b.m_pointer; }
++inline bool operator>(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer > b.m_pointer; }
++inline bool operator<=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer <= b.m_pointer; }
++inline bool operator>=(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer >= b.m_pointer; }
+ 
+-inline TimerHeapIterator operator+(TimerHeapIterator a, int b) { return a.index() + b; }
+-inline TimerHeapIterator operator+(int a, TimerHeapIterator b) { return a + b.index(); }
++inline TimerHeapIterator operator+(TimerHeapIterator a, size_t b) { return TimerHeapIterator(a.m_pointer + b); }
++inline TimerHeapIterator operator+(size_t a, TimerHeapIterator b) { return TimerHeapIterator(a + b.m_pointer); }
+ 
+-inline TimerHeapIterator operator-(TimerHeapIterator a, int b) { return a.index() - b; }
+-inline int operator-(TimerHeapIterator a, TimerHeapIterator b) { return a.index() - b.index(); }
++inline TimerHeapIterator operator-(TimerHeapIterator a, size_t b) { return TimerHeapIterator(a.m_pointer - b); }
++inline ptrdiff_t operator-(TimerHeapIterator a, TimerHeapIterator b) { return a.m_pointer - b.m_pointer; }
+ 
+ // ----------------
+ 
++class TimerHeapLessThanFunction {
++public:
++    bool operator()(TimerBase*, TimerBase*) const;
++};
++
++inline bool TimerHeapLessThanFunction::operator()(TimerBase* a, TimerBase* b) const
++{
++    // The comparisons below are "backwards" because the heap puts the largest 
++    // element first and we want the lowest time to be the first one in the heap.
++    double aFireTime = a->m_nextFireTime;
++    double bFireTime = b->m_nextFireTime;
++    if (bFireTime != aFireTime)
++        return bFireTime < aFireTime;
++    
++    // We need to look at the difference of the insertion orders instead of comparing the two 
++    // outright in case of overflow. 
++    unsigned difference = a->m_heapInsertionOrder - b->m_heapInsertionOrder;
++    return difference < numeric_limits<unsigned>::max() / 2;
++}
++
++// ----------------
++
+ TimerBase::TimerBase()
+     : m_nextFireTime(0)
+     , m_repeatInterval(0)
+@@ -225,7 +255,8 @@
+ {
+     ASSERT(m_nextFireTime != 0);
+     checkHeapIndex();
+-    push_heap(TimerHeapIterator(0), TimerHeapIterator(m_heapIndex + 1));
++    TimerBase** heapData = timerHeap().data();
++    push_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + m_heapIndex + 1), TimerHeapLessThanFunction());
+     checkHeapIndex();
+ }
+ 
+@@ -274,7 +305,9 @@
+ {
+     ASSERT(this == timerHeap().first());
+     checkHeapIndex();
+-    pop_heap(TimerHeapIterator(0), TimerHeapIterator(timerHeap().size()));
++    Vector<TimerBase*>& heap = timerHeap();
++    TimerBase** heapData = heap.data();
++    pop_heap(TimerHeapIterator(heapData), TimerHeapIterator(heapData + heap.size()), TimerHeapLessThanFunction());
+     checkHeapIndex();
+     ASSERT(this == timerHeap().last());
+ }
+--- src/3rdparty/webkit/Source/WebCore/platform/Timer.h	(revision 92555)
++++ src/3rdparty/webkit/Source/WebCore/platform/Timer.h	(revision 92556)
+@@ -84,9 +84,9 @@
+     ThreadIdentifier m_thread;
+ #endif
+ 
+-    friend class TimerHeapElement;
+     friend class ThreadTimers;
+-    friend bool operator<(const TimerHeapElement&, const TimerHeapElement&);
++    friend class TimerHeapLessThanFunction;
++    friend class TimerHeapReference;
+ };
+ 
+ template <typename TimerFiredClass> class Timer : public TimerBase {
+--- src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp	(revision 86531)
++++ src/3rdparty/webkit/Source/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp	(revision 86532)
+@@ -944,7 +944,7 @@
+ 
+ GraphicsLayerQt::GraphicsLayerQt(GraphicsLayerClient* client)
+     : GraphicsLayer(client)
+-    , m_impl(PassOwnPtr<GraphicsLayerQtImpl>(new GraphicsLayerQtImpl(this)))
++    , m_impl(adoptPtr(new GraphicsLayerQtImpl(this)))
+ {
+ }
+ 
+@@ -955,7 +955,7 @@
+ // This is the hook for WebCore compositor to know that Qt implements compositing with GraphicsLayerQt.
+ PassOwnPtr<GraphicsLayer> GraphicsLayer::create(GraphicsLayerClient* client)
+ {
+-    return new GraphicsLayerQt(client);
++    return adoptPtr(new GraphicsLayerQt(client));
+ }
+ 
+ /* \reimp (GraphicsLayer.h): The current size might change, thus we need to update the whole display.
+
+--- src/3rdparty/webkit/Source/WebCore/loader/icon/IconRecord.h
++++ src/3rdparty/webkit/Source/WebCore/loader/icon/IconRecord.h
+@@ -38,7 +38,7 @@
+ #include <wtf/OwnPtr.h>
+ #include <wtf/text/StringHash.h>
+ 
+-#if OS(SOLARIS)
++#if OS(FREEBSD) || OS(SOLARIS)
+ #include <sys/types.h> // For time_t structure.
+ #endif
+ 
+--- src/3rdparty/webkit/Source/WebCore/page/Page.h
++++ src/3rdparty/webkit/Source/WebCore/page/Page.h
+@@ -29,7 +29,7 @@
+ #include <wtf/HashSet.h>
+ #include <wtf/Noncopyable.h>
+ 
+-#if OS(SOLARIS)
++#if OS(FREEBSD) || OS(SOLARIS)
+ #include <sys/time.h> // For time_t structure.
+ #endif
+ 
+--- src/3rdparty/webkit/Source/WebCore/platform/network/ResourceResponseBase.h
++++ src/3rdparty/webkit/Source/WebCore/platform/network/ResourceResponseBase.h
+@@ -35,7 +35,7 @@
+ #include <wtf/PassOwnPtr.h>
+ #include <wtf/RefPtr.h>
+ 
+-#if OS(SOLARIS)
++#if OS(FREEBSD) || OS(SOLARIS)
+ #include <sys/time.h> // For time_t structure.
+ #endif
+ 
+--- src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp	(revision 86529)
++++ src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp	(revision 86530)
+@@ -235,7 +235,7 @@
+     resetConnections();
+     QNetworkReply* reply = m_reply;
+     m_reply = 0;
+-    m_sniffer = 0;
++    m_sniffer = nullptr;
+ 
+     reply->setParent(0);
+     return reply;
+@@ -285,7 +285,7 @@
+ 
+     Q_ASSERT(!m_sniffer);
+ 
+-    m_sniffer = new QtMIMETypeSniffer(m_reply, m_advertisedMIMEType, isSupportedImageType);
++    m_sniffer = adoptPtr(new QtMIMETypeSniffer(m_reply, m_advertisedMIMEType, isSupportedImageType));
+ 
+     if (m_sniffer->isFinished()) {
+         receiveSniffedMIMEType();
+@@ -300,7 +300,7 @@
+     Q_ASSERT(m_sniffer);
+ 
+     m_sniffedMIMEType = m_sniffer->mimeType();
+-    m_sniffer = 0;
++    m_sniffer = nullptr;
+ 
+     emitMetaDataChanged();
+ }
+@@ -417,7 +417,7 @@
+         return 0;
+ 
+     QNetworkReply* reply = m_replyWrapper->release();
+-    m_replyWrapper = 0;
++    m_replyWrapper = nullptr;
+     return reply;
+ }
+ 
+@@ -440,12 +440,12 @@
+ 
+     ResourceHandleClient* client = m_resourceHandle->client();
+     if (!client) {
+-        m_replyWrapper = 0;
++        m_replyWrapper = nullptr;
+         return;
+     }
+ 
+     if (m_replyWrapper->wasRedirected()) {
+-        m_replyWrapper = 0;
++        m_replyWrapper = nullptr;
+         m_queue.push(&QNetworkReplyHandler::start);
+         return;
+     }
+@@ -465,7 +465,7 @@
+         }
+     }
+ 
+-    m_replyWrapper = 0;
++    m_replyWrapper = nullptr;
+ }
+ 
+ void QNetworkReplyHandler::sendResponseIfNeeded()
+@@ -539,7 +539,7 @@
+                             newUrl.toString(),
+                             QCoreApplication::translate("QWebPage", "Redirection limit reached"));
+         client->didFail(m_resourceHandle, error);
+-        m_replyWrapper = 0;
++        m_replyWrapper = nullptr;
+         return;
+     }
+ 
+@@ -660,7 +660,7 @@
+     if (!reply)
+         return;
+ 
+-    m_replyWrapper = new QNetworkReplyWrapper(&m_queue, reply, m_resourceHandle->shouldContentSniff() && d->m_context->mimeSniffingEnabled(), this);
++    m_replyWrapper = adoptPtr(new QNetworkReplyWrapper(&m_queue, reply, m_resourceHandle->shouldContentSniff() && d->m_context->mimeSniffingEnabled(), this));
+ 
+     if (m_loadType == SynchronousLoad) {
+         m_replyWrapper->synchronousLoad();
+===================================================================
+--- src/3rdparty/webkit/Source/WebCore/platform/text/qt/TextCodecQt.cpp	(revision 86530)
++++ src/3rdparty/webkit/Source/WebCore/platform/text/qt/TextCodecQt.cpp	(revision 86531)
+@@ -64,7 +64,7 @@
+ 
+ static PassOwnPtr<TextCodec> newTextCodecQt(const TextEncoding& encoding, const void*)
+ {
+-    return new TextCodecQt(encoding);
++    return adoptPtr(new TextCodecQt(encoding));
+ }
+ 
+ void TextCodecQt::registerCodecs(TextCodecRegistrar registrar)
+
+--- src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp	(revision 86532)
++++ src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp	(revision 86533)
+@@ -473,7 +473,7 @@
+         return;
+ 
+     page->d->view.clear();
+-    page->d->client = 0;
++    page->d->client = nullptr;
+ 
+     // if the page was created by us, we own it and need to
+     // destroy it as well.
+@@ -506,7 +506,7 @@
+     if (!d->page)
+         return;
+ 
+-    d->page->d->client = new PageClientQGraphicsWidget(this, page); // set the page client
++    d->page->d->client = adoptPtr(new PageClientQGraphicsWidget(this, page));
+ 
+     if (d->overlay())
+         d->overlay()->prepareGraphicsItemGeometryChange();
+--- src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp	(revision 86532)
++++ src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp	(revision 86550)
+@@ -1319,7 +1319,7 @@
+ void QWebPagePrivate::adjustPointForClicking(QGraphicsSceneMouseEvent* ev)
+ {
+     QtPlatformPlugin platformPlugin;
+-    QWebTouchModifier* touchModifier = platformPlugin.createTouchModifier();
++    OwnPtr<QWebTouchModifier> touchModifier = platformPlugin.createTouchModifier();
+     if (!touchModifier)
+         return;
+ 
+@@ -1328,8 +1328,7 @@
+     unsigned bottomPadding = touchModifier->hitTestPaddingForTouch(QWebTouchModifier::Down);
+     unsigned leftPadding = touchModifier->hitTestPaddingForTouch(QWebTouchModifier::Left);
+ 
+-    delete touchModifier;
+-    touchModifier = 0;
++    touchModifier = nullptr;
+ 
+     if (!topPadding && !rightPadding && !bottomPadding && !leftPadding)
+         return;
+@@ -2044,7 +2044,7 @@
+     }
+ 
+     if (view)
+-        d->client = new PageClientQWidget(view, this);
++        d->client = adoptPtr(new PageClientQWidget(view, this));
+ }
+ 
+ /*!
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h	(revision 86550)
+@@ -22,6 +22,8 @@
+ 
+ #include "PopupMenu.h"
+ #include <QObject>
++#include <wtf/OwnPtr.h>
++#include <wtf/PassOwnPtr.h>
+ 
+ class QWebSelectData;
+ class QWebSelectMethod;
+@@ -49,8 +51,8 @@
+ 
+ private:
+     PopupMenuClient* m_popupClient;
+-    QWebSelectMethod* m_popup;
+-    QWebSelectData* m_selectData;
++    OwnPtr<QWebSelectMethod> m_popup;
++    OwnPtr<QWebSelectData> m_selectData;
+     const ChromeClientQt* m_chromeClient;
+ };
+ 
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h	(revision 86550)
+@@ -22,6 +22,7 @@
+ #define QtPlatformPlugin_h
+ 
+ #include <QPluginLoader>
++#include <wtf/PassOwnPtr.h>
+ 
+ class QWebSelectMethod;
+ class QWebKitPlatformPlugin;
+@@ -37,15 +38,20 @@
+ 
+ class QtPlatformPlugin {
+ public:
+-    QtPlatformPlugin() : m_loaded(false), m_plugin(0) {}
++    QtPlatformPlugin()
++        : m_loaded(false)
++        , m_plugin(0)
++    {
++    }
++
+     ~QtPlatformPlugin();
+ 
+-    QWebSelectMethod* createSelectInputMethod();
+-    QWebNotificationPresenter* createNotificationPresenter();
+-    QWebHapticFeedbackPlayer* createHapticFeedbackPlayer();
+-    QWebTouchModifier* createTouchModifier();
++    PassOwnPtr<QWebSelectMethod> createSelectInputMethod();
++    PassOwnPtr<QWebNotificationPresenter> createNotificationPresenter();
++    PassOwnPtr<QWebHapticFeedbackPlayer> createHapticFeedbackPlayer();
++    PassOwnPtr<QWebTouchModifier> createTouchModifier();
+ #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
+-    QWebFullScreenVideoHandler* createFullScreenVideoHandler();
++    PassOwnPtr<QWebFullScreenVideoHandler> createFullScreenVideoHandler();
+ #endif
+ 
+     QWebKitPlatformPlugin* plugin();
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp	(revision 86550)
+@@ -696,18 +696,18 @@
+ } 
+ #endif
+ 
+-QWebSelectMethod* ChromeClientQt::createSelectPopup() const
++PassOwnPtr<QWebSelectMethod> ChromeClientQt::createSelectPopup() const
+ {
+-    QWebSelectMethod* result = m_platformPlugin.createSelectInputMethod();
++    OwnPtr<QWebSelectMethod> result = m_platformPlugin.createSelectInputMethod();
+     if (result)
+-        return result;
++        return result.release();
+ 
+ #if defined(Q_WS_MAEMO_5)
+-    return new QtMaemoWebPopup;
++    return adoptPtr(new QtMaemoWebPopup);
+ #elif !defined(QT_NO_COMBOBOX)
+-    return new QtFallbackWebPopup(this);
++    return adoptPtr(new QtFallbackWebPopup(this));
+ #else
+-    return 0;
++    return nullptr;
+ #endif
+ }
+ 
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp	(revision 86550)
+@@ -82,8 +82,6 @@
+ 
+ PopupMenuQt::PopupMenuQt(PopupMenuClient* client, const ChromeClientQt* chromeClient)
+     : m_popupClient(client)
+-    , m_popup(0)
+-    , m_selectData(0)
+     , m_chromeClient(chromeClient)
+ {
+ }
+@@ -90,8 +88,6 @@
+ 
+ PopupMenuQt::~PopupMenuQt()
+ {
+-    delete m_selectData;
+-    delete m_popup;
+ }
+ 
+ void PopupMenuQt::disconnectClient()
+@@ -107,11 +103,11 @@
+ 
+     if (!m_popup) {
+         m_popup = m_chromeClient->createSelectPopup();
+-        connect(m_popup, SIGNAL(didHide()), this, SLOT(didHide()));
+-        connect(m_popup, SIGNAL(selectItem(int, bool, bool)), this, SLOT(selectItem(int, bool, bool)));
++        connect(m_popup.get(), SIGNAL(didHide()), this, SLOT(didHide()));
++        connect(m_popup.get(), SIGNAL(selectItem(int, bool, bool)), this, SLOT(selectItem(int, bool, bool)));
+     }
+ 
+-    if (QtFallbackWebPopup* fallback = qobject_cast<QtFallbackWebPopup*>(m_popup)) {
++    if (QtFallbackWebPopup* fallback = qobject_cast<QtFallbackWebPopup*>(m_popup.get())) {
+         QRect geometry(rect);
+         geometry.moveTopLeft(view->contentsToWindow(rect.location()));
+         fallback->setGeometry(geometry);
+@@ -118,10 +114,8 @@
+         fallback->setFont(m_popupClient->menuStyle().font().font());
+     }
+ 
+-    if (m_selectData)
+-        delete m_selectData;
+-    m_selectData = new SelectData(m_popupClient);
+-    m_popup->show(*m_selectData);
++    m_selectData = adoptPtr(new SelectData(m_popupClient));
++    m_popup->show(*m_selectData.get());
+ #endif
+ }
+ 
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp	(revision 86550)
+@@ -136,7 +136,7 @@
+     Q_ASSERT(m_chromeClient);
+ 
+ #if USE(QT_MULTIMEDIA)
+-    m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler();
++    m_FullScreenVideoHandler = m_chromeClient->m_platformPlugin.createFullScreenVideoHandler().leakPtr();
+     if (!m_FullScreenVideoHandler)
+         m_FullScreenVideoHandler = new DefaultFullScreenVideoHandler;
+ 
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp	(revision 86550)
+@@ -102,36 +102,35 @@
+     return m_plugin;
+ }
+ 
+-QWebSelectMethod* QtPlatformPlugin::createSelectInputMethod()
++PassOwnPtr<QWebSelectMethod> QtPlatformPlugin::createSelectInputMethod()
+ {
+     QWebKitPlatformPlugin* p = plugin();
+-    return p ? static_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0;
++    return adoptPtr(p ? static_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0);
+ }
+ 
+-
+-QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter()
++PassOwnPtr<QWebNotificationPresenter> QtPlatformPlugin::createNotificationPresenter()
+ {
+     QWebKitPlatformPlugin* p = plugin();
+-    return p ? static_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0;
++    return adoptPtr(p ? static_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0);
+ }
+ 
+-QWebHapticFeedbackPlayer* QtPlatformPlugin::createHapticFeedbackPlayer()
++PassOwnPtr<QWebHapticFeedbackPlayer> QtPlatformPlugin::createHapticFeedbackPlayer()
+ {
+     QWebKitPlatformPlugin* p = plugin();
+-    return p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0;
++    return adoptPtr(p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0);
+ }
+ 
+-QWebTouchModifier* QtPlatformPlugin::createTouchModifier()
++PassOwnPtr<QWebTouchModifier> QtPlatformPlugin::createTouchModifier()
+ {
+     QWebKitPlatformPlugin* p = plugin();
+-    return p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0;
++    return adoptPtr(p ? static_cast<QWebTouchModifier*>(p->createExtension(QWebKitPlatformPlugin::TouchInteraction)) : 0);
+ }
+ 
+ #if ENABLE(VIDEO) && USE(QT_MULTIMEDIA)
+-QWebFullScreenVideoHandler* QtPlatformPlugin::createFullScreenVideoHandler()
++PassOwnPtr<QWebFullScreenVideoHandler> QtPlatformPlugin::createFullScreenVideoHandler()
+ {
+     QWebKitPlatformPlugin* p = plugin();
+-    return p ? static_cast<QWebFullScreenVideoHandler*>(p->createExtension(QWebKitPlatformPlugin::FullScreenVideoPlayer)) : 0;
++    return adoptPtr(p ? static_cast<QWebFullScreenVideoHandler*>(p->createExtension(QWebKitPlatformPlugin::FullScreenVideoPlayer)) : 0);
+ }
+ #endif
+ 
+--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp	(revision 86536)
++++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp	(revision 86550)
+@@ -203,8 +203,9 @@
+ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController* inspectorController)
+ {

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402070115.s171FnHN034980>