aboutsummaryrefslogtreecommitdiff
path: root/www/waterfox/files/patch-bug1438425
blob: f53e948ae22375ab9a65316bc9260474d991c98f (plain) (blame)
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
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
commit f324bee78e24
Author: Jeff Muizelaar <jmuizelaar@mozilla.com>
Date:   Wed Mar 7 11:54:01 2018 -0500

    Bug 1438425 - Delete DocumentRenderer. r=jesup, r=jgilbert, a=RyanVM
    
    It is unused.
---
 dom/canvas/CanvasRenderingContext2D.cpp |  2 -
 dom/canvas/DocumentRendererChild.cpp    | 94 ---------------------------------
 dom/canvas/DocumentRendererChild.h      | 37 -------------
 dom/canvas/DocumentRendererParent.cpp   | 63 ----------------------
 dom/canvas/DocumentRendererParent.h     | 44 ---------------
 dom/canvas/WebGL2ContextState.cpp       |  1 +
 dom/canvas/WebGLContextDraw.cpp         |  1 +
 dom/canvas/WebGLFramebuffer.cpp         |  3 ++
 dom/canvas/WebGLObjectModel.h           | 12 +++++
 dom/canvas/WebGLProgram.cpp             |  1 +
 dom/canvas/WebGLTransformFeedback.cpp   |  1 +
 dom/canvas/moz.build                    |  7 ---
 dom/ipc/PBrowser.ipdl                   | 20 -------
 dom/ipc/PDocumentRenderer.ipdl          | 25 ---------
 dom/ipc/TabChild.cpp                    | 52 ------------------
 dom/ipc/TabChild.h                      | 21 --------
 dom/ipc/TabParent.cpp                   | 19 -------
 dom/ipc/TabParent.h                     | 11 ----
 dom/ipc/moz.build                       |  1 -
 19 files changed, 19 insertions(+), 396 deletions(-)

diff --git dom/canvas/CanvasRenderingContext2D.cpp dom/canvas/CanvasRenderingContext2D.cpp
index 6c3f5878e724..f314f2022baf 100644
--- dom/canvas/CanvasRenderingContext2D.cpp
+++ dom/canvas/CanvasRenderingContext2D.cpp
@@ -91,8 +91,6 @@
 #include "mozilla/gfx/DataSurfaceHelpers.h"
 #include "mozilla/gfx/PatternHelpers.h"
 #include "mozilla/gfx/Swizzle.h"
-#include "mozilla/ipc/DocumentRendererParent.h"
-#include "mozilla/ipc/PDocumentRendererParent.h"
 #include "mozilla/layers/PersistentBufferProvider.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/Preferences.h"
diff --git dom/canvas/DocumentRendererChild.cpp dom/canvas/DocumentRendererChild.cpp
deleted file mode 100644
index edfc4746a72c..000000000000
--- dom/canvas/DocumentRendererChild.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ipc/DocumentRendererChild.h"
-
-#include "base/basictypes.h"
-
-#include "gfx2DGlue.h"
-#include "gfxContext.h"
-#include "gfxPattern.h"
-#include "mozilla/gfx/2D.h"
-#include "mozilla/RefPtr.h"
-#include "nsPIDOMWindow.h"
-#include "nsIDOMWindow.h"
-#include "nsIDocShell.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsComponentManagerUtils.h"
-#include "nsCSSParser.h"
-#include "nsPresContext.h"
-#include "nsCOMPtr.h"
-#include "nsColor.h"
-#include "nsLayoutUtils.h"
-#include "nsContentUtils.h"
-#include "nsCSSValue.h"
-#include "nsRuleNode.h"
-#include "mozilla/gfx/Matrix.h"
-
-using namespace mozilla;
-using namespace mozilla::gfx;
-using namespace mozilla::ipc;
-
-DocumentRendererChild::DocumentRendererChild()
-{}
-
-DocumentRendererChild::~DocumentRendererChild()
-{}
-
-bool
-DocumentRendererChild::RenderDocument(nsPIDOMWindowOuter* window,
-                                      const nsRect& documentRect,
-                                      const mozilla::gfx::Matrix& transform,
-                                      const nsString& aBGColor,
-                                      uint32_t renderFlags,
-                                      bool flushLayout,
-                                      const nsIntSize& renderSize,
-                                      nsCString& data)
-{
-    if (flushLayout)
-        nsContentUtils::FlushLayoutForTree(window);
-
-    RefPtr<nsPresContext> presContext;
-    if (window) {
-        nsIDocShell* docshell = window->GetDocShell();
-        if (docshell) {
-            docshell->GetPresContext(getter_AddRefs(presContext));
-        }
-    }
-    if (!presContext)
-        return false;
-
-    nsCSSParser parser;
-    nsCSSValue bgColorValue;
-    if (!parser.ParseColorString(aBGColor, nullptr, 0, bgColorValue)) {
-        return false;
-    }
-
-    nscolor bgColor;
-    if (!nsRuleNode::ComputeColor(bgColorValue, presContext, nullptr, bgColor)) {
-        return false;
-    }
-
-    // Draw directly into the output array.
-    data.SetLength(renderSize.width * renderSize.height * 4);
-
-    RefPtr<DrawTarget> dt =
-        Factory::CreateDrawTargetForData(gfxPlatform::GetPlatform()->GetSoftwareBackend(),
-                                         reinterpret_cast<uint8_t*>(data.BeginWriting()),
-                                         IntSize(renderSize.width, renderSize.height),
-                                         4 * renderSize.width,
-                                         SurfaceFormat::B8G8R8A8);
-    if (!dt || !dt->IsValid()) {
-        gfxWarning() << "DocumentRendererChild::RenderDocument failed to Factory::CreateDrawTargetForData";
-        return false;
-    }
-    RefPtr<gfxContext> ctx = gfxContext::CreateOrNull(dt);
-    MOZ_ASSERT(ctx); // already checked the draw target above
-    ctx->SetMatrix(mozilla::gfx::ThebesMatrix(transform));
-
-    nsCOMPtr<nsIPresShell> shell = presContext->PresShell();
-    shell->RenderDocument(documentRect, renderFlags, bgColor, ctx);
-
-    return true;
-}
diff --git dom/canvas/DocumentRendererChild.h dom/canvas/DocumentRendererChild.h
deleted file mode 100644
index 80fe0ddf64bc..000000000000
--- dom/canvas/DocumentRendererChild.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_DocumentRendererChild
-#define mozilla_dom_DocumentRendererChild
-
-#include "gfxContext.h"
-#include "mozilla/ipc/PDocumentRendererChild.h"
-#include "nsString.h"
-
-class nsIDOMWindow;
-
-namespace mozilla {
-namespace ipc {
-
-class DocumentRendererChild : public PDocumentRendererChild
-{
-public:
-    DocumentRendererChild();
-    virtual ~DocumentRendererChild();
-
-    bool RenderDocument(nsPIDOMWindowOuter* window,
-                        const nsRect& documentRect, const gfx::Matrix& transform,
-                        const nsString& bgcolor,
-                        uint32_t renderFlags, bool flushLayout,
-                        const nsIntSize& renderSize, nsCString& data);
-
-private:
-
-    DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererChild);
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif
diff --git dom/canvas/DocumentRendererParent.cpp dom/canvas/DocumentRendererParent.cpp
deleted file mode 100644
index 0783dee1ab79..000000000000
--- dom/canvas/DocumentRendererParent.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/ipc/DocumentRendererParent.h"
-
-#include "gfx2DGlue.h"
-#include "mozilla/gfx/2D.h"
-#include "mozilla/gfx/PathHelpers.h"
-#include "mozilla/RefPtr.h"
-#include "nsICanvasRenderingContextInternal.h"
-
-using namespace mozilla;
-using namespace mozilla::gfx;
-using namespace mozilla::ipc;
-
-DocumentRendererParent::DocumentRendererParent()
-{}
-
-DocumentRendererParent::~DocumentRendererParent()
-{}
-
-void DocumentRendererParent::SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
-                                              gfxContext* ctx)
-{
-    mCanvas = aCanvas;
-    mCanvasContext = ctx;
-}
-
-void DocumentRendererParent::DrawToCanvas(const nsIntSize& aSize,
-                                          const nsCString& aData)
-{
-    if (!mCanvas || !mCanvasContext)
-        return;
-
-    DrawTarget* drawTarget = mCanvasContext->GetDrawTarget();
-    Rect rect(0, 0, aSize.width, aSize.height);
-    MaybeSnapToDevicePixels(rect, *drawTarget, true);
-    RefPtr<DataSourceSurface> dataSurface =
-        Factory::CreateWrappingDataSourceSurface(reinterpret_cast<uint8_t*>(const_cast<nsCString&>(aData).BeginWriting()),
-                                                 aSize.width * 4,
-                                                 IntSize(aSize.width, aSize.height),
-                                                 SurfaceFormat::B8G8R8A8);
-    SurfacePattern pattern(dataSurface, ExtendMode::CLAMP);
-    drawTarget->FillRect(rect, pattern);
-
-    gfxRect damageRect = mCanvasContext->UserToDevice(ThebesRect(rect));
-    mCanvas->Redraw(damageRect);
-}
-
-void
-DocumentRendererParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  // Implement me! Bug 1005139
-}
-
-mozilla::ipc::IPCResult
-DocumentRendererParent::Recv__delete__(const nsIntSize& renderedSize,
-                                       const nsCString& data)
-{
-    DrawToCanvas(renderedSize, data);
-    return IPC_OK();
-}
diff --git dom/canvas/DocumentRendererParent.h dom/canvas/DocumentRendererParent.h
deleted file mode 100644
index 7cfe5322795f..000000000000
--- dom/canvas/DocumentRendererParent.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_DocumentRendererParent
-#define mozilla_dom_DocumentRendererParent
-
-#include "gfxContext.h"
-#include "mozilla/ipc/PDocumentRendererParent.h"
-#include "nsCOMPtr.h"
-#include "nsString.h"
-
-class nsICanvasRenderingContextInternal;
-
-namespace mozilla {
-namespace ipc {
-
-class DocumentRendererParent : public PDocumentRendererParent
-{
-public:
-    DocumentRendererParent();
-    virtual ~DocumentRendererParent();
-
-    void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
-			  gfxContext* ctx);
-    void DrawToCanvas(const nsIntSize& renderedSize,
-		      const nsCString& aData);
-
-    virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-
-    virtual mozilla::ipc::IPCResult Recv__delete__(const nsIntSize& renderedSize,
-                                                   const nsCString& data) override;
-
-private:
-    nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
-    RefPtr<gfxContext> mCanvasContext;
-
-    DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent);
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif
diff --git dom/canvas/WebGL2ContextState.cpp dom/canvas/WebGL2ContextState.cpp
index be0a7a3cbdea..e6283b12dd9e 100644
--- dom/canvas/WebGL2ContextState.cpp
+++ dom/canvas/WebGL2ContextState.cpp
@@ -7,6 +7,7 @@
 #include "WebGL2Context.h"
 
 #include "GLContext.h"
+#include "GLScreenBuffer.h"
 #include "WebGLBuffer.h"
 #include "WebGLContextUtils.h"
 #include "WebGLFramebuffer.h"
diff --git dom/canvas/WebGLFramebuffer.cpp dom/canvas/WebGLFramebuffer.cpp
index e5150d5ddd43..e2fdea239632 100644
--- dom/canvas/WebGLFramebuffer.cpp
+++ dom/canvas/WebGLFramebuffer.cpp
@@ -17,7 +17,9 @@
 #include "WebGLContextUtils.h"
 #include "WebGLExtensions.h"
 #include "WebGLRenderbuffer.h"
+#include "WebGLShader.h"
 #include "WebGLTexture.h"
+#include "WebGLObjectModel.h"
 
 namespace mozilla {
 
@@ -1990,6 +1992,7 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback,
     }
 }
 
+
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WebGLFramebuffer,
                                       mDepthAttachment,
                                       mStencilAttachment,
diff --git dom/canvas/WebGLObjectModel.h dom/canvas/WebGLObjectModel.h
index e19d2fd8e44d..b18b790c036e 100644
--- dom/canvas/WebGLObjectModel.h
+++ dom/canvas/WebGLObjectModel.h
@@ -15,6 +15,7 @@ namespace mozilla {
 template<typename> class LinkedList;
 class WebGLContext;
 
+
 ////
 
 // This class is a mixin for objects that are tied to a specific
@@ -352,6 +353,16 @@ ImplCycleCollectionUnlink(mozilla::WebGLRefPtr<T>& field)
     field = nullptr;
 }
 
+template <typename T>
+inline void
+ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback,
+                            mozilla::WebGLRefPtr<T>& field,
+                            const char* name,
+                            uint32_t flags = 0)
+{
+    CycleCollectionNoteChild(callback, field.get(), name, flags);
+}
+
 template <typename T>
 inline void
 ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback,
@@ -362,4 +373,5 @@ ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& callback,
     CycleCollectionNoteChild(callback, field.get(), name, flags);
 }
 
+
 #endif
diff --git dom/canvas/WebGLProgram.cpp dom/canvas/WebGLProgram.cpp
index 365b8e178af8..9e48a240332c 100644
--- dom/canvas/WebGLProgram.cpp
+++ dom/canvas/WebGLProgram.cpp
@@ -17,6 +17,7 @@
 #include "WebGLTransformFeedback.h"
 #include "WebGLUniformLocation.h"
 #include "WebGLValidateStrings.h"
+#include "WebGLObjectModel.h"
 
 namespace mozilla {
 
diff --git dom/canvas/moz.build dom/canvas/moz.build
index ac4172318a7e..b33b09d7bc70 100644
--- dom/canvas/moz.build
+++ dom/canvas/moz.build
@@ -49,11 +49,6 @@ EXPORTS += [
     'nsICanvasRenderingContextInternal.h',
 ]
 
-EXPORTS.mozilla.ipc += [
-    'DocumentRendererChild.h',
-    'DocumentRendererParent.h',
-]
-
 EXPORTS.mozilla.dom += [
     'BasicRenderingContext2D.h',
     'CanvasGradient.h',
@@ -78,8 +73,6 @@ UNIFIED_SOURCES += [
     'CanvasRenderingContext2D.cpp',
     'CanvasRenderingContextHelper.cpp',
     'CanvasUtils.cpp',
-    'DocumentRendererChild.cpp',
-    'DocumentRendererParent.cpp',
     'ImageBitmap.cpp',
     'ImageBitmapColorUtils.cpp',
     'ImageBitmapRenderingContext.cpp',
diff --git dom/ipc/PBrowser.ipdl dom/ipc/PBrowser.ipdl
index 5525931e914f..90f559063c4d 100644
--- dom/ipc/PBrowser.ipdl
+++ dom/ipc/PBrowser.ipdl
@@ -9,7 +9,6 @@ include protocol PColorPicker;
 include protocol PContent;
 include protocol PContentBridge;
 include protocol PDocAccessible;
-include protocol PDocumentRenderer;
 include protocol PFilePicker;
 include protocol PIndexedDBPermissionRequest;
 include protocol PRenderFrame;
@@ -110,7 +109,6 @@ nested(upto inside_cpow) sync protocol PBrowser
 
     manages PColorPicker;
     manages PDocAccessible;
-    manages PDocumentRenderer;
     manages PFilePicker;
     manages PIndexedDBPermissionRequest;
     manages PRenderFrame;
@@ -698,24 +696,6 @@ child:
 
     async LoadRemoteScript(nsString aURL, bool aRunInGlobalScope);
 
-    /**
-     * Create a asynchronous request to render whatever document is
-     * loaded in the child when this message arrives.  When the
-     * request finishes, PDocumentRenderer:__delete__ is sent back to
-     * this side to notify completion.
-     *
-     * |documentRect| is the area of the remote document to draw,
-     * transformed by |transform|.  The rendered area will have the
-     * default background color |bgcolor|.  |renderFlags| are the
-     * nsIPresShell::RenderDocument() flags to use on the remote side,
-     * and if true, |flushLayout| will do just that before rendering
-     * the document.  The rendered image will be of size |renderSize|.
-     */
-    async PDocumentRenderer(nsRect documentRect, Matrix transform,
-                            nsString bgcolor,
-                            uint32_t renderFlags, bool flushLayout,
-                            IntSize renderSize);
-
     /**
      * Sent by the chrome process when it no longer wants this remote
      * <browser>.  The child side cleans up in response, then
diff --git dom/ipc/PDocumentRenderer.ipdl dom/ipc/PDocumentRenderer.ipdl
deleted file mode 100644
index bdaed45d7414..000000000000
--- dom/ipc/PDocumentRenderer.ipdl
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-include protocol PBrowser;
-
-include "mozilla/GfxMessageUtils.h";
-
-using nsIntSize from "nsSize.h";
-
-namespace mozilla {
-namespace ipc {
-
-protocol PDocumentRenderer
-{
-  manager PBrowser;
-
-parent:
-    // Returns the width and height, in pixels, of the returned ARGB32 data.
-    async __delete__(nsIntSize renderedSize, nsCString data);
-};
-
-} // namespace ipc
-} // namespace mozilla
diff --git dom/ipc/TabChild.cpp dom/ipc/TabChild.cpp
index 5a14fd9dc0ff..44f366056c2a 100644
--- dom/ipc/TabChild.cpp
+++ dom/ipc/TabChild.cpp
@@ -23,7 +23,6 @@
 #include "mozilla/dom/PaymentRequestChild.h"
 #include "mozilla/dom/TelemetryScrollProbe.h"
 #include "mozilla/IMEStateManager.h"
-#include "mozilla/ipc/DocumentRendererChild.h"
 #include "mozilla/ipc/URIUtils.h"
 #include "mozilla/layers/APZChild.h"
 #include "mozilla/layers/APZCCallbackHelper.h"
@@ -2027,60 +2026,6 @@ TabChild::DeallocPDocAccessibleChild(a11y::PDocAccessibleChild* aChild)
   return true;
 }
 
-PDocumentRendererChild*
-TabChild::AllocPDocumentRendererChild(const nsRect& documentRect,
-                                      const mozilla::gfx::Matrix& transform,
-                                      const nsString& bgcolor,
-                                      const uint32_t& renderFlags,
-                                      const bool& flushLayout,
-                                      const nsIntSize& renderSize)
-{
-    return new DocumentRendererChild();
-}
-
-bool
-TabChild::DeallocPDocumentRendererChild(PDocumentRendererChild* actor)
-{
-    delete actor;
-    return true;
-}
-
-mozilla::ipc::IPCResult
-TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
-                                           const nsRect& documentRect,
-                                           const mozilla::gfx::Matrix& transform,
-                                           const nsString& bgcolor,
-                                           const uint32_t& renderFlags,
-                                           const bool& flushLayout,
-                                           const nsIntSize& renderSize)
-{
-    DocumentRendererChild *render = static_cast<DocumentRendererChild *>(actor);
-
-    nsCOMPtr<nsIWebBrowser> browser = do_QueryInterface(WebNavigation());
-    if (!browser)
-        return IPC_OK(); // silently ignore
-    nsCOMPtr<mozIDOMWindowProxy> window;
-    if (NS_FAILED(browser->GetContentDOMWindow(getter_AddRefs(window))) ||
-        !window)
-    {
-        return IPC_OK(); // silently ignore
-    }
-
-    nsCString data;
-    bool ret = render->RenderDocument(nsPIDOMWindowOuter::From(window),
-                                      documentRect, transform,
-                                      bgcolor,
-                                      renderFlags, flushLayout,
-                                      renderSize, data);
-    if (!ret)
-        return IPC_OK(); // silently ignore
-
-    if (!PDocumentRendererChild::Send__delete__(actor, renderSize, data)) {
-      return IPC_FAIL_NO_REASON(this);
-    }
-    return IPC_OK();
-}
-
 PColorPickerChild*
 TabChild::AllocPColorPickerChild(const nsString&, const nsString&)
 {
diff --git dom/ipc/TabChild.h dom/ipc/TabChild.h
index af01a50542ac..1b1e580b29e6 100644
--- dom/ipc/TabChild.h
+++ dom/ipc/TabChild.h
@@ -456,27 +456,6 @@ public:
 
   virtual bool DeallocPDocAccessibleChild(PDocAccessibleChild*) override;
 
-  virtual PDocumentRendererChild*
-  AllocPDocumentRendererChild(const nsRect& aDocumentRect,
-                              const gfx::Matrix& aTransform,
-                              const nsString& aBggcolor,
-                              const uint32_t& aRenderFlags,
-                              const bool& aFlushLayout,
-                              const nsIntSize& arenderSize) override;
-
-  virtual bool
-  DeallocPDocumentRendererChild(PDocumentRendererChild* aCctor) override;
-
-  virtual mozilla::ipc::IPCResult
-  RecvPDocumentRendererConstructor(PDocumentRendererChild* aActor,
-                                   const nsRect& aDocumentRect,
-                                   const gfx::Matrix& aTransform,
-                                   const nsString& aBgcolor,
-                                   const uint32_t& aRenderFlags,
-                                   const bool& aFlushLayout,
-                                   const nsIntSize& aRenderSize) override;
-
-
   virtual PColorPickerChild*
   AllocPColorPickerChild(const nsString& aTitle,
                          const nsString& aInitialColor) override;
diff --git dom/ipc/TabParent.cpp dom/ipc/TabParent.cpp
index e6eac09db4aa..8468343b8930 100644
--- dom/ipc/TabParent.cpp
+++ dom/ipc/TabParent.cpp
@@ -26,7 +26,6 @@
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/Hal.h"
 #include "mozilla/IMEStateManager.h"
-#include "mozilla/ipc/DocumentRendererParent.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/layers/AsyncDragMetrics.h"
 #include "mozilla/layers/InputAPZContext.h"
@@ -982,24 +981,6 @@ TabParent::GetTopLevelDocAccessible() const
   return nullptr;
 }
 
-PDocumentRendererParent*
-TabParent::AllocPDocumentRendererParent(const nsRect& documentRect,
-                                        const gfx::Matrix& transform,
-                                        const nsString& bgcolor,
-                                        const uint32_t& renderFlags,
-                                        const bool& flushLayout,
-                                        const nsIntSize& renderSize)
-{
-    return new DocumentRendererParent();
-}
-
-bool
-TabParent::DeallocPDocumentRendererParent(PDocumentRendererParent* actor)
-{
-    delete actor;
-    return true;
-}
-
 PFilePickerParent*
 TabParent::AllocPFilePickerParent(const nsString& aTitle, const int16_t& aMode)
 {
diff --git dom/ipc/TabParent.h dom/ipc/TabParent.h
index 1f75d188d92e..0472dad56e97 100644
--- dom/ipc/TabParent.h
+++ dom/ipc/TabParent.h
@@ -468,17 +468,6 @@ public:
                      const ScrollableLayerGuid& aGuid,
                      uint64_t aInputBlockId);
 
-  virtual PDocumentRendererParent*
-  AllocPDocumentRendererParent(const nsRect& documentRect,
-                               const gfx::Matrix& transform,
-                               const nsString& bgcolor,
-                               const uint32_t& renderFlags,
-                               const bool& flushLayout,
-                               const nsIntSize& renderSize) override;
-
-  virtual bool
-  DeallocPDocumentRendererParent(PDocumentRendererParent* actor) override;
-
   virtual PFilePickerParent*
   AllocPFilePickerParent(const nsString& aTitle,
                          const int16_t& aMode) override;
diff --git dom/ipc/moz.build dom/ipc/moz.build
index fa7d4a9ef549..4880a69f00ec 100644
--- dom/ipc/moz.build
+++ dom/ipc/moz.build
@@ -91,7 +91,6 @@ IPDL_SOURCES += [
     'PContentPermission.ipdlh',
     'PContentPermissionRequest.ipdl',
     'PCycleCollectWithLogs.ipdl',
-    'PDocumentRenderer.ipdl',
     'PFilePicker.ipdl',
     'PPluginWidget.ipdl',
     'PProcessHangMonitor.ipdl',