@@ -8476,35 +8476,26 @@ index 6bbd1cabd27ae2847648a8c2edcf9acfcd556ff5..38d101b9a96986e40f6e9f0261fa429a
8476
8476
{
8477
8477
m_hasReceivedFirstUpdate = true;
8478
8478
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8479
- index d7695088e7cfc4f638f157338754f9f157489749..74a3654235d5e24a39d3714ec4d2f45a8803c816 100644
8479
+ index d7695088e7cfc4f638f157338754f9f157489749..d7ed4f58f033ebfc13142f2d6e8814d6dd13dd8e 100644
8480
8480
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8481
8481
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8482
- @@ -30,6 +30,8 @@
8482
+ @@ -30,6 +30,7 @@
8483
8483
#include "BackingStore.h"
8484
8484
#include "DrawingAreaProxy.h"
8485
8485
#include "LayerTreeContext.h"
8486
8486
+#include <wtf/Function.h>
8487
- +#include <wtf/HashMap.h>
8488
8487
#include <wtf/RunLoop.h>
8489
8488
8490
8489
namespace WebCore {
8491
- @@ -49,6 +51,15 @@ public:
8490
+ @@ -49,6 +50,7 @@ public:
8492
8491
8493
8492
bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
8494
8493
const LayerTreeContext& layerTreeContext() const { return m_layerTreeContext; }
8495
8494
+ void waitForSizeUpdate(Function<void ()>&&);
8496
- +
8497
- + using PaintCallback = Function<void(cairo_surface_t*, WebCore::IntSize)>;
8498
- + void setPaintCallback(PaintCallback&& callback) { m_paintCallback = WTFMove(callback); }
8499
- + void didPaint(cairo_surface_t* surface, WebCore::IntSize size)
8500
- + {
8501
- + if (m_paintCallback)
8502
- + m_paintCallback(surface, size);
8503
- + }
8504
8495
8505
8496
private:
8506
8497
// DrawingAreaProxy
8507
- @@ -126,12 +137,15 @@ private:
8498
+ @@ -126,6 +128,8 @@ private:
8508
8499
// For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
8509
8500
bool m_hasReceivedFirstUpdate { false };
8510
8501
@@ -8513,13 +8504,6 @@ index d7695088e7cfc4f638f157338754f9f157489749..74a3654235d5e24a39d3714ec4d2f45a
8513
8504
#if !PLATFORM(WPE)
8514
8505
bool m_isBackingStoreDiscardable { true };
8515
8506
std::unique_ptr<BackingStore> m_backingStore;
8516
- RunLoop::Timer<DrawingAreaProxyCoordinatedGraphics> m_discardBackingStoreTimer;
8517
- #endif
8518
- std::unique_ptr<DrawingMonitor> m_drawingMonitor;
8519
- + PaintCallback m_paintCallback;
8520
- };
8521
-
8522
- } // namespace WebKit
8523
8507
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
8524
8508
index c5de4e7d0f59194f43a023b089e372c58cf8ee06..211f4c1baf5d1a66cd08ee8147e96f7ec6c0098a 100644
8525
8509
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
@@ -8622,10 +8606,10 @@ index 59cdfdafab1d85ea3a5aecb3cd2293e6dfb1eb8d..52fe7990b1c18b964ee3cfa9f324e3c2
8622
8606
// The timeout we use when waiting for a DidUpdateGeometry message.
8623
8607
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
8624
8608
new file mode 100644
8625
- index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a56bb03ac5
8609
+ index 0000000000000000000000000000000000000000..d796a81ab5dae0627fab017f77074d411c4da40a
8626
8610
--- /dev/null
8627
8611
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
8628
- @@ -0,0 +1,257 @@
8612
+ @@ -0,0 +1,255 @@
8629
8613
+/*
8630
8614
+ * Copyright (C) 2020 Microsoft Corporation.
8631
8615
+ *
@@ -8695,6 +8679,14 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
8695
8679
+ stop(errorString);
8696
8680
+}
8697
8681
+
8682
+ +#if USE(COORDINATED_GRAPHICS)
8683
+ +void InspectorScreencastAgent::didPaint(cairo_surface_t* surface)
8684
+ +{
8685
+ + if (m_encoder)
8686
+ + m_encoder->encodeFrame(surface, m_page.drawingArea()->size());
8687
+ +}
8688
+ +#endif
8689
+ +
8698
8690
+void InspectorScreencastAgent::start(Inspector::ErrorString& errorString, const String& format, const int* quality)
8699
8691
+{
8700
8692
+ if (m_enabled)
@@ -8759,23 +8751,16 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
8759
8751
+ errorString = "Already recording"_s;
8760
8752
+ return;
8761
8753
+ }
8754
+ +
8762
8755
+ if (width < 10 || width > 10000 || height < 10 || height > 10000) {
8763
8756
+ errorString = "Invalid size"_s;
8764
8757
+ return;
8765
8758
+ }
8766
8759
+
8767
- + if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_page.drawingArea())) {
8768
- + m_encoder = ScreencastEncoder::create(errorString, file, IntSize(width, height));
8769
- + if (!m_encoder)
8770
- + return;
8771
- +
8772
- + drawingArea->setPaintCallback([encoder = m_encoder.get()] (cairo_surface_t* surface, WebCore::IntSize size) {
8773
- + encoder->encodeFrame(surface, size);
8774
- + });
8775
- + } else {
8776
- + errorString = "Cannot get drawing area"_s;
8760
+ + m_encoder = ScreencastEncoder::create(errorString, file, IntSize(width, height));
8761
+ + if (!m_encoder)
8777
8762
+ return;
8778
- + }
8763
+ +
8779
8764
+#else
8780
8765
+ errorString = "Not implemented"_s;
8781
8766
+#endif
@@ -8789,9 +8774,6 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
8789
8774
+ return;
8790
8775
+ }
8791
8776
+
8792
- + if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_page.drawingArea()))
8793
- + drawingArea->setPaintCallback(nullptr);
8794
- +
8795
8777
+ m_encoder->finish([protectRef = m_encoder.copyRef(), callback = WTFMove(callback)] {
8796
8778
+ callback->sendSuccess();
8797
8779
+ });
@@ -8885,10 +8867,10 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
8885
8867
+} // namespace WebKit
8886
8868
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
8887
8869
new file mode 100644
8888
- index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d20771d797
8870
+ index 0000000000000000000000000000000000000000..dbdb294ee1b4c04e1dec3f53bd229d2a89e7e767
8889
8871
--- /dev/null
8890
8872
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
8891
- @@ -0,0 +1,85 @@
8873
+ @@ -0,0 +1,89 @@
8892
8874
+/*
8893
8875
+ * Copyright (C) 2020 Microsoft Corporation.
8894
8876
+ *
@@ -8945,6 +8927,10 @@ index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d2
8945
8927
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
8946
8928
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
8947
8929
+
8930
+ +#if USE(COORDINATED_GRAPHICS)
8931
+ + void didPaint(cairo_surface_t*);
8932
+ +#endif
8933
+ +
8948
8934
+ void start(Inspector::ErrorString&, const String& format, const int* quality) override;
8949
8935
+ void stop(Inspector::ErrorString&) override;
8950
8936
+ void frameAck(Inspector::ErrorString&) override;
@@ -9556,7 +9542,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..79f3ff84327dc075ec96983e04db4b10
9556
9542
9557
9543
} // namespace WebKit
9558
9544
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
9559
- index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e04094a77 100644
9545
+ index 1861cff806131196ea49b4f8aca6665beebbf6e8..fc37922a680f2a46e2512975b558b839d75cff42 100644
9560
9546
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
9561
9547
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
9562
9548
@@ -26,12 +26,20 @@
@@ -9580,7 +9566,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9580
9566
#include <JavaScriptCore/InspectorAgentBase.h>
9581
9567
#include <JavaScriptCore/InspectorBackendDispatcher.h>
9582
9568
#include <JavaScriptCore/InspectorBackendDispatchers.h>
9583
- @@ -48,27 +56,104 @@ static String getTargetID(const ProvisionalPageProxy& provisionalPage)
9569
+ @@ -48,27 +56,106 @@ static String getTargetID(const ProvisionalPageProxy& provisionalPage)
9584
9570
return WebPageInspectorTarget::toTargetID(provisionalPage.webPageID());
9585
9571
}
9586
9572
@@ -9614,7 +9600,9 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9614
9600
+ m_agents.append(WTFMove(inputAgent));
9615
9601
+ m_agents.append(makeUnique<InspectorDialogAgent>(m_backendDispatcher.get(), m_frontendRouter.get(), m_page));
9616
9602
+#if !PLATFORM(WPE) && !PLATFORM(WIN)
9617
- + m_agents.append(makeUnique<InspectorScreencastAgent>(m_backendDispatcher.get(), m_frontendRouter.get(), m_page));
9603
+ + auto screencastAgent = makeUnique<InspectorScreencastAgent>(m_backendDispatcher.get(), m_frontendRouter.get(), m_page);
9604
+ + m_screecastAgent = screencastAgent.get();
9605
+ + m_agents.append(WTFMove(screencastAgent));
9618
9606
+#endif
9619
9607
+ if (s_observer)
9620
9608
+ s_observer->didCreateInspectorController(m_page);
@@ -9688,7 +9676,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9688
9676
}
9689
9677
9690
9678
bool WebPageInspectorController::hasLocalFrontend() const
9691
- @@ -82,6 +167 ,17 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro
9679
+ @@ -82,6 +169 ,17 @@ void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& fro
9692
9680
9693
9681
bool connectingFirstFrontend = !m_frontendRouter->hasFrontends();
9694
9682
@@ -9706,7 +9694,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9706
9694
m_frontendRouter->connectFrontend(frontendChannel);
9707
9695
9708
9696
if (connectingFirstFrontend)
9709
- @@ -100,8 +196 ,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
9697
+ @@ -100,8 +198 ,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
9710
9698
m_frontendRouter->disconnectFrontend(frontendChannel);
9711
9699
9712
9700
bool disconnectingLastFrontend = !m_frontendRouter->hasFrontends();
@@ -9718,7 +9706,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9718
9706
9719
9707
m_page.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());
9720
9708
9721
- @@ -124,6 +222 ,8 @@ void WebPageInspectorController::disconnectAllFrontends()
9709
+ @@ -124,6 +224 ,8 @@ void WebPageInspectorController::disconnectAllFrontends()
9722
9710
// Disconnect any remaining remote frontends.
9723
9711
m_frontendRouter->disconnectAllFrontends();
9724
9712
@@ -9727,10 +9715,21 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9727
9715
m_page.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());
9728
9716
9729
9717
#if ENABLE(REMOTE_INSPECTOR)
9730
- @@ -150,6 +250,55 @@ void WebPageInspectorController::setIndicating(bool indicating)
9718
+ @@ -150,6 +252,66 @@ void WebPageInspectorController::setIndicating(bool indicating)
9731
9719
}
9732
9720
#endif
9733
9721
9722
+ +#if USE(COORDINATED_GRAPHICS)
9723
+ +void WebPageInspectorController::didPaint(cairo_surface_t* surface)
9724
+ +{
9725
+ + if (!m_frontendRouter->hasFrontends())
9726
+ + return;
9727
+ +
9728
+ + m_screecastAgent->didPaint(surface);
9729
+ +}
9730
+ +#endif
9731
+ +
9732
+ +
9734
9733
+void WebPageInspectorController::navigate(WebCore::ResourceRequest&& request, WebFrameProxy* frame, NavigationHandler&& completionHandler)
9735
9734
+{
9736
9735
+ auto navigation = m_page.loadRequestForInspector(WTFMove(request), frame);
@@ -9783,7 +9782,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9783
9782
void WebPageInspectorController::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
9784
9783
{
9785
9784
addTarget(InspectorTargetProxy::create(m_page, targetId, type));
9786
- @@ -169,6 +318 ,33 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta
9785
+ @@ -169,6 +331 ,33 @@ void WebPageInspectorController::sendMessageToInspectorFrontend(const String& ta
9787
9786
m_targetAgent->sendMessageFromTargetToFrontend(targetId, message);
9788
9787
}
9789
9788
@@ -9817,7 +9816,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9817
9816
bool WebPageInspectorController::shouldPauseLoading(const ProvisionalPageProxy& provisionalPage) const
9818
9817
{
9819
9818
if (!m_frontendRouter->hasFrontends())
9820
- @@ -188,7 +364 ,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag
9819
+ @@ -188,7 +377 ,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag
9821
9820
9822
9821
void WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage)
9823
9822
{
@@ -9826,7 +9825,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9826
9825
}
9827
9826
9828
9827
void WebPageInspectorController::willDestroyProvisionalPage(const ProvisionalPageProxy& provisionalPage)
9829
- @@ -241,4 +417 ,20 @@ void WebPageInspectorController::addTarget(std::unique_ptr<InspectorTargetProxy>
9828
+ @@ -241,4 +430 ,20 @@ void WebPageInspectorController::addTarget(std::unique_ptr<InspectorTargetProxy>
9830
9829
m_targets.set(target->identifier(), WTFMove(target));
9831
9830
}
9832
9831
@@ -9848,7 +9847,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
9848
9847
+
9849
9848
} // namespace WebKit
9850
9849
diff --git a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
9851
- index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb83151331961 100644
9850
+ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..ca95d658c1f260020624291aaf5d8ea4172e5b45 100644
9852
9851
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
9853
9852
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
9854
9853
@@ -26,17 +26,27 @@
@@ -9879,10 +9878,11 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
9879
9878
}
9880
9879
9881
9880
namespace WebKit {
9882
- @@ -44,6 +54,21 @@ namespace WebKit {
9881
+ @@ -44,6 +54,22 @@ namespace WebKit {
9883
9882
class InspectorBrowserAgent;
9884
9883
struct WebPageAgentContext;
9885
9884
9885
+ +class InspectorScreencastAgent;
9886
9886
+class WebFrameProxy;
9887
9887
+class WebPageInspectorEmulationAgent;
9888
9888
+class WebPageInspectorInputAgent;
@@ -9901,7 +9901,7 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
9901
9901
class WebPageInspectorController {
9902
9902
WTF_MAKE_NONCOPYABLE(WebPageInspectorController);
9903
9903
WTF_MAKE_FAST_ALLOCATED;
9904
- @@ -51,7 +76 ,19 @@ public:
9904
+ @@ -51,7 +77 ,19 @@ public:
9905
9905
WebPageInspectorController(WebPageProxy&);
9906
9906
9907
9907
void init();
@@ -9921,17 +9921,20 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
9921
9921
9922
9922
bool hasLocalFrontend() const;
9923
9923
9924
- @@ -65,10 +102,22 @@ public:
9924
+ @@ -64,11 +102,25 @@ public:
9925
+ #if ENABLE(REMOTE_INSPECTOR)
9925
9926
void setIndicating(bool);
9926
9927
#endif
9927
-
9928
+ +#if USE(COORDINATED_GRAPHICS)
9929
+ + void didPaint(cairo_surface_t*);
9930
+ +#endif
9928
9931
+ using NavigationHandler = Function<void(const String&, uint64_t)>;
9929
9932
+ void navigate(WebCore::ResourceRequest&&, WebFrameProxy*, NavigationHandler&&);
9930
9933
+ void didReceivePolicyDecision(WebCore::PolicyAction action, uint64_t navigationID);
9931
9934
+ void didDestroyNavigation(uint64_t navigationID);
9932
9935
+
9933
9936
+ void didFailProvisionalLoadForFrame(uint64_t navigationID, const WebCore::ResourceError& error);
9934
- +
9937
+
9935
9938
void createInspectorTarget(const String& targetId, Inspector::InspectorTargetType);
9936
9939
void destroyInspectorTarget(const String& targetId);
9937
9940
void sendMessageToInspectorFrontend(const String& targetId, const String& message);
@@ -9944,20 +9947,21 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
9944
9947
bool shouldPauseLoading(const ProvisionalPageProxy&) const;
9945
9948
void setContinueLoadingCallback(const ProvisionalPageProxy&, WTF::Function<void()>&&);
9946
9949
9947
- @@ -84,6 +133 ,7 @@ private:
9950
+ @@ -84,6 +136 ,7 @@ private:
9948
9951
void createLazyAgents();
9949
9952
9950
9953
void addTarget(std::unique_ptr<InspectorTargetProxy>&&);
9951
9954
+ void adjustPageSettings();
9952
9955
9953
9956
Ref<Inspector::FrontendRouter> m_frontendRouter;
9954
9957
Ref<Inspector::BackendDispatcher> m_backendDispatcher;
9955
- @@ -92,11 +142,16 @@ private:
9958
+ @@ -92,11 +145,17 @@ private:
9956
9959
WebPageProxy& m_page;
9957
9960
9958
9961
Inspector::InspectorTargetAgent* m_targetAgent;
9959
9962
+ WebPageInspectorEmulationAgent* m_emulationAgent { nullptr };
9960
9963
+ WebPageInspectorInputAgent* m_inputAgent { nullptr };
9964
+ + InspectorScreencastAgent* m_screecastAgent { nullptr };
9961
9965
HashMap<String, std::unique_ptr<InspectorTargetProxy>> m_targets;
9962
9966
9963
9967
InspectorBrowserAgent* m_enabledInspectorBrowserAgent;
@@ -12702,24 +12706,27 @@ index 964c6315e38f5e0a0303febce45b1e975054f0b4..117d8c7c74bc81b34cfc0fe2b11a5429
12702
12706
UniqueRef<SOAuthorizationCoordinator> m_soAuthorizationCoordinator;
12703
12707
#endif
12704
12708
diff --git a/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp b/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12705
- index dc0a70b8824afdc7ec3dd1f69f4d9b51942924f6..f31988b5b9b896f17994bcf15c72b5f384d65afb 100644
12709
+ index dc0a70b8824afdc7ec3dd1f69f4d9b51942924f6..4da6649c86b46dea36c2750802494ddb9b70cc24 100644
12706
12710
--- a/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12707
12711
+++ b/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12708
- @@ -27,6 +27,7 @@
12712
+ @@ -27,9 +27,11 @@
12709
12713
#include "config.h"
12710
12714
#include "BackingStore.h"
12711
12715
12712
12716
+#include "DrawingAreaProxyCoordinatedGraphics.h"
12713
12717
#include "ShareableBitmap.h"
12714
12718
#include "UpdateInfo.h"
12715
12719
#include "WebPageProxy.h"
12716
- @@ -72,6 +73,10 @@ void BackingStore::paint(cairo_t* context, const IntRect& rect)
12720
+ +#include "WebPageInspectorController.h"
12721
+ #include <WebCore/BackingStoreBackendCairoImpl.h>
12722
+ #include <WebCore/CairoUtilities.h>
12723
+ #include <WebCore/GraphicsContextImplCairo.h>
12724
+ @@ -72,6 +74,9 @@ void BackingStore::paint(cairo_t* context, const IntRect& rect)
12717
12725
cairo_rectangle(context, rect.x(), rect.y(), rect.width(), rect.height());
12718
12726
cairo_fill(context);
12719
12727
cairo_restore(context);
12720
12728
+#if PLATFORM(GTK)
12721
- + if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_webPageProxy.drawingArea()))
12722
- + drawingArea->didPaint(m_backend->surface(), drawingArea->size());
12729
+ + m_webPageProxy.inspectorController().didPaint(m_backend->surface());
12723
12730
+#endif
12724
12731
}
12725
12732
@@ -12997,15 +13004,22 @@ index 0000000000000000000000000000000000000000..a073a77390b206deb794efe937df4f35
12997
13004
+
12998
13005
+#endif // ENABLE(REMOTE_INSPECTOR)
12999
13006
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13000
- index be19b6007c9c0fbfffb859e40fd34751493fe7d1..dd51b743f0bb5ba5a537edd1caf0005054c89839 100644
13007
+ index be19b6007c9c0fbfffb859e40fd34751493fe7d1..ce214fb7e22f8623aff6e2487cecd0272b21c478 100644
13001
13008
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13002
13009
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
13003
- @@ -256,6 +256,9 @@ bool AcceleratedBackingStoreX11::paint(cairo_t* cr, const IntRect& clipRect)
13010
+ @@ -31,6 +31,7 @@
13011
+ #include "DrawingAreaProxyCoordinatedGraphics.h"
13012
+ #include "LayerTreeContext.h"
13013
+ #include "WebPageProxy.h"
13014
+ +#include "WebPageInspectorController.h"
13015
+ #include <WebCore/CairoUtilities.h>
13016
+ #include <WebCore/PlatformDisplayX11.h>
13017
+ #include <WebCore/XErrorTrapper.h>
13018
+ @@ -256,6 +257,8 @@ bool AcceleratedBackingStoreX11::paint(cairo_t* cr, const IntRect& clipRect)
13004
13019
13005
13020
cairo_restore(cr);
13006
13021
13007
- + if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_webPage.drawingArea()))
13008
- + drawingArea->didPaint(m_surface.get(), drawingArea->size());
13022
+ + m_webPage.inspectorController().didPaint(m_surface.get());
13009
13023
+
13010
13024
cairo_surface_flush(m_surface.get());
13011
13025
0 commit comments