1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
|
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.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/NullPtr.h
@@ -35,9 +35,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH D
#define __has_feature(feature) 0
#endif
+#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
--- src/3rdparty/webkit/Source/WebCore/dom/XMLDocumentParserQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebCore/dom/XMLDocumentParserQt.cpp
@@ -215,7 +215,7 @@ void XMLDocumentParser::doEnd()
{
#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/loader/icon/IconRecord.h.orig 2018-05-29 06:56:52 UTC
+++ 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.orig 2018-05-29 06:56:52 UTC
+++ 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.orig 2018-05-29 06:56:52 UTC
+++ 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.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -285,7 +285,7 @@ void QNetworkReplyWrapper::receiveMetaData()
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();
@@ -666,7 +666,7 @@ void QNetworkReplyHandler::start()
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.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebCore/platform/text/qt/TextCodecQt.cpp
@@ -64,7 +64,7 @@ void TextCodecQt::registerEncodingNames(EncodingNameRe
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/WebCore/plugins/qt/PluginViewQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebCore/plugins/qt/PluginViewQt.cpp
@@ -950,7 +950,7 @@ bool PluginView::platformStart()
#if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)
if (shouldUseAcceleratedCompositing()) {
- m_platformLayer = new PluginGraphicsLayerQt(this);
+ m_platformLayer = adoptPtr(new PluginGraphicsLayerQt(this));
// Trigger layer computation in RenderLayerCompositor
m_element->setNeedsStyleRecalc(SyntheticStyleChange);
}
--- src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/Api/qgraphicswebview.cpp
@@ -504,7 +504,7 @@ void QGraphicsWebView::setPage(QWebPage* page)
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.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/Api/qwebpage.cpp
@@ -1343,7 +1343,7 @@ void QWebPagePrivate::adjustPointForClicking(QMouseEve
void QWebPagePrivate::adjustPointForClicking(QGraphicsSceneMouseEvent* ev)
{
QtPlatformPlugin platformPlugin;
- QWebTouchModifier* touchModifier = platformPlugin.createTouchModifier();
+ OwnPtr<QWebTouchModifier> touchModifier = platformPlugin.createTouchModifier();
if (!touchModifier)
return;
@@ -1352,8 +1352,7 @@ void QWebPagePrivate::adjustPointForClicking(QGraphics
unsigned bottomPadding = touchModifier->hitTestPaddingForTouch(QWebTouchModifier::Down);
unsigned leftPadding = touchModifier->hitTestPaddingForTouch(QWebTouchModifier::Left);
- delete touchModifier;
- touchModifier = 0;
+ touchModifier = nullptr;
if (!topPadding && !rightPadding && !bottomPadding && !leftPadding)
return;
@@ -2068,7 +2067,7 @@ void QWebPage::setView(QWidget* view)
}
if (view)
- d->client = new PageClientQWidget(view, this);
+ d->client = adoptPtr(new PageClientQWidget(view, this));
}
/*!
--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -702,18 +702,18 @@ void ChromeClientQt::exitFullscreenForNode(Node* node)
}
#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/ChromeClientQt.h.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -34,6 +34,7 @@
#include "KURL.h"
#include "PlatformString.h"
#include "QtPlatformPlugin.h"
+#include <wtf/PassOwnPtr.h>
#include <wtf/RefCounted.h>
QT_BEGIN_NAMESPACE
@@ -190,7 +191,7 @@ class ChromeClientQt : public ChromeClient { (public)
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
virtual void populateVisitedLinks();
- QWebSelectMethod* createSelectPopup() const;
+ PassOwnPtr<QWebSelectMethod> createSelectPopup() const;
virtual void dispatchViewportDataDidChange(const ViewportArguments&) const;
--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FullScreenVideoQt.cpp
@@ -140,7 +140,7 @@ FullScreenVideoQt::FullScreenVideoQt(ChromeClientQt* c
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/InspectorClientQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -203,8 +203,9 @@ void InspectorClientQt::inspectorDestroyed()
void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController* inspectorController)
{
#if ENABLE(INSPECTOR)
- QWebView* inspectorView = new QWebView;
- InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView);
+ OwnPtr<QWebView> inspectorView = adoptPtr(new QWebView);
+ // FIXME: Where does inspectorPage get deleted?
+ InspectorClientWebPage* inspectorPage = new InspectorClientWebPage(inspectorView.get());
inspectorView->setPage(inspectorPage);
QWebInspector* inspector = m_inspectedWebPage->d->getOrCreateInspector();
@@ -229,11 +230,14 @@ void InspectorClientQt::openInspectorFrontend(WebCore:
inspectorPage->setProperty("_q_inspectorJavaScriptWindowObjects", inspectorJavaScriptWindowObjects);
#endif
inspectorView->page()->mainFrame()->load(inspectorUrl);
- m_inspectedWebPage->d->inspectorFrontend = inspectorView;
- inspector->d->setFrontend(inspectorView);
+ m_inspectedWebPage->d->inspectorFrontend = inspectorView.get();
+ inspector->d->setFrontend(inspectorView.get());
- m_frontendClient = new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView, this);
- inspectorView->page()->d->page->inspectorController()->setInspectorFrontendClient(m_frontendClient);
+ // Is 'controller' the same object as 'inspectorController' (which appears to be unused)?
+ InspectorController* controller = inspectorView->page()->d->page->inspectorController();
+ OwnPtr<InspectorFrontendClientQt> frontendClient = adoptPtr(new InspectorFrontendClientQt(m_inspectedWebPage, inspectorView.release(), this));
+ m_frontendClient = frontendClient.get();
+ controller->setInspectorFrontendClient(frontendClient.release());
m_frontendWebPage = inspectorPage;
#endif
}
@@ -297,7 +301,7 @@ bool InspectorClientQt::sendMessageToFrontend(const St
#if ENABLE(INSPECTOR)
InspectorFrontendClientQt::InspectorFrontendClientQt(QWebPage* inspectedWebPage, PassOwnPtr<QWebView> inspectorView, InspectorClientQt* inspectorClient)
- : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page, new InspectorFrontendSettingsQt())
+ : InspectorFrontendClientLocal(inspectedWebPage->d->page->inspectorController(), inspectorView->page()->d->page, adoptPtr(new InspectorFrontendSettingsQt()))
, m_inspectedWebPage(inspectedWebPage)
, m_inspectorView(inspectorView)
, m_destroyingInspectorView(false)
--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -211,9 +211,9 @@ void NotificationPresenterClientQt::displayNotificatio
QPixmap pixmap;
if (bytes.length() && pixmap.loadFromData(bytes)) {
QIcon icon(pixmap);
- wrapper->m_notificationIcon = new QSystemTrayIcon(icon);
+ wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon(icon));
} else
- wrapper->m_notificationIcon = new QSystemTrayIcon();
+ wrapper->m_notificationIcon = adoptPtr(new QSystemTrayIcon());
#endif
}
--- src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
@@ -82,16 +82,12 @@ namespace WebCore {
PopupMenuQt::PopupMenuQt(PopupMenuClient* client, const ChromeClientQt* chromeClient)
: m_popupClient(client)
- , m_popup(0)
- , m_selectData(0)
, m_chromeClient(chromeClient)
{
}
PopupMenuQt::~PopupMenuQt()
{
- delete m_selectData;
- delete m_popup;
}
void PopupMenuQt::disconnectClient()
@@ -107,21 +103,19 @@ void PopupMenuQt::show(const IntRect& rect, FrameView*
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);
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/PopupMenuQt.h.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/PopupMenuQt.h
@@ -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 slots:
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.cpp.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -102,36 +102,35 @@ QWebKitPlatformPlugin* QtPlatformPlugin::plugin()
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/QtPlatformPlugin.h.orig 2018-05-29 06:56:52 UTC
+++ src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/QtPlatformPlugin.h
@@ -22,6 +22,7 @@
#define QtPlatformPlugin_h
#include <QPluginLoader>
+#include <wtf/PassOwnPtr.h>
class QWebSelectMethod;
class QWebKitPlatformPlugin;
@@ -37,15 +38,20 @@ namespace WebCore {
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();
|