Skip to content

Commit 4cac74f

Browse files
authored
browser(webkit): continue screecast after cross-process navigation (#2499)
1 parent 5c3a275 commit 4cac74f

File tree

2 files changed

+80
-66
lines changed

2 files changed

+80
-66
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1269
1+
1270

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 79 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -8476,35 +8476,26 @@ index 6bbd1cabd27ae2847648a8c2edcf9acfcd556ff5..38d101b9a96986e40f6e9f0261fa429a
84768476
{
84778477
m_hasReceivedFirstUpdate = true;
84788478
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
84808480
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
84818481
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
8482-
@@ -30,6 +30,8 @@
8482+
@@ -30,6 +30,7 @@
84838483
#include "BackingStore.h"
84848484
#include "DrawingAreaProxy.h"
84858485
#include "LayerTreeContext.h"
84868486
+#include <wtf/Function.h>
8487-
+#include <wtf/HashMap.h>
84888487
#include <wtf/RunLoop.h>
84898488

84908489
namespace WebCore {
8491-
@@ -49,6 +51,15 @@ public:
8490+
@@ -49,6 +50,7 @@ public:
84928491

84938492
bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
84948493
const LayerTreeContext& layerTreeContext() const { return m_layerTreeContext; }
84958494
+ 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-
+ }
85048495

85058496
private:
85068497
// DrawingAreaProxy
8507-
@@ -126,12 +137,15 @@ private:
8498+
@@ -126,6 +128,8 @@ private:
85088499
// For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
85098500
bool m_hasReceivedFirstUpdate { false };
85108501

@@ -8513,13 +8504,6 @@ index d7695088e7cfc4f638f157338754f9f157489749..74a3654235d5e24a39d3714ec4d2f45a
85138504
#if !PLATFORM(WPE)
85148505
bool m_isBackingStoreDiscardable { true };
85158506
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
85238507
diff --git a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp b/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
85248508
index c5de4e7d0f59194f43a023b089e372c58cf8ee06..211f4c1baf5d1a66cd08ee8147e96f7ec6c0098a 100644
85258509
--- a/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp
@@ -8622,10 +8606,10 @@ index 59cdfdafab1d85ea3a5aecb3cd2293e6dfb1eb8d..52fe7990b1c18b964ee3cfa9f324e3c2
86228606
// The timeout we use when waiting for a DidUpdateGeometry message.
86238607
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
86248608
new file mode 100644
8625-
index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a56bb03ac5
8609+
index 0000000000000000000000000000000000000000..d796a81ab5dae0627fab017f77074d411c4da40a
86268610
--- /dev/null
86278611
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.cpp
8628-
@@ -0,0 +1,257 @@
8612+
@@ -0,0 +1,255 @@
86298613
+/*
86308614
+ * Copyright (C) 2020 Microsoft Corporation.
86318615
+ *
@@ -8695,6 +8679,14 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
86958679
+ stop(errorString);
86968680
+}
86978681
+
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+
+
86988690
+void InspectorScreencastAgent::start(Inspector::ErrorString& errorString, const String& format, const int* quality)
86998691
+{
87008692
+ if (m_enabled)
@@ -8759,23 +8751,16 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
87598751
+ errorString = "Already recording"_s;
87608752
+ return;
87618753
+ }
8754+
+
87628755
+ if (width < 10 || width > 10000 || height < 10 || height > 10000) {
87638756
+ errorString = "Invalid size"_s;
87648757
+ return;
87658758
+ }
87668759
+
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)
87778762
+ return;
8778-
+ }
8763+
+
87798764
+#else
87808765
+ errorString = "Not implemented"_s;
87818766
+#endif
@@ -8789,9 +8774,6 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
87898774
+ return;
87908775
+ }
87918776
+
8792-
+ if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(m_page.drawingArea()))
8793-
+ drawingArea->setPaintCallback(nullptr);
8794-
+
87958777
+ m_encoder->finish([protectRef = m_encoder.copyRef(), callback = WTFMove(callback)] {
87968778
+ callback->sendSuccess();
87978779
+ });
@@ -8885,10 +8867,10 @@ index 0000000000000000000000000000000000000000..103febd9eed246c6cc1f21f7e5e4f5a5
88858867
+} // namespace WebKit
88868868
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
88878869
new file mode 100644
8888-
index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d20771d797
8870+
index 0000000000000000000000000000000000000000..dbdb294ee1b4c04e1dec3f53bd229d2a89e7e767
88898871
--- /dev/null
88908872
+++ b/Source/WebKit/UIProcess/Inspector/Agents/InspectorScreencastAgent.h
8891-
@@ -0,0 +1,85 @@
8873+
@@ -0,0 +1,89 @@
88928874
+/*
88938875
+ * Copyright (C) 2020 Microsoft Corporation.
88948876
+ *
@@ -8945,6 +8927,10 @@ index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d2
89458927
+ void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
89468928
+ void willDestroyFrontendAndBackend(Inspector::DisconnectReason) override;
89478929
+
8930+
+#if USE(COORDINATED_GRAPHICS)
8931+
+ void didPaint(cairo_surface_t*);
8932+
+#endif
8933+
+
89488934
+ void start(Inspector::ErrorString&, const String& format, const int* quality) override;
89498935
+ void stop(Inspector::ErrorString&) override;
89508936
+ void frameAck(Inspector::ErrorString&) override;
@@ -9556,7 +9542,7 @@ index a2239cec8e18850f35f7f88a9c4ebadc62bf4023..79f3ff84327dc075ec96983e04db4b10
95569542

95579543
} // namespace WebKit
95589544
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
95609546
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
95619547
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.cpp
95629548
@@ -26,12 +26,20 @@
@@ -9580,7 +9566,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
95809566
#include <JavaScriptCore/InspectorAgentBase.h>
95819567
#include <JavaScriptCore/InspectorBackendDispatcher.h>
95829568
#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)
95849570
return WebPageInspectorTarget::toTargetID(provisionalPage.webPageID());
95859571
}
95869572

@@ -9614,7 +9600,9 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
96149600
+ m_agents.append(WTFMove(inputAgent));
96159601
+ m_agents.append(makeUnique<InspectorDialogAgent>(m_backendDispatcher.get(), m_frontendRouter.get(), m_page));
96169602
+#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));
96189606
+#endif
96199607
+ if (s_observer)
96209608
+ s_observer->didCreateInspectorController(m_page);
@@ -9688,7 +9676,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
96889676
}
96899677

96909678
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
96929680

96939681
bool connectingFirstFrontend = !m_frontendRouter->hasFrontends();
96949682

@@ -9706,7 +9694,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
97069694
m_frontendRouter->connectFrontend(frontendChannel);
97079695

97089696
if (connectingFirstFrontend)
9709-
@@ -100,8 +196,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
9697+
@@ -100,8 +198,10 @@ void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendCha
97109698
m_frontendRouter->disconnectFrontend(frontendChannel);
97119699

97129700
bool disconnectingLastFrontend = !m_frontendRouter->hasFrontends();
@@ -9718,7 +9706,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
97189706

97199707
m_page.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());
97209708

9721-
@@ -124,6 +222,8 @@ void WebPageInspectorController::disconnectAllFrontends()
9709+
@@ -124,6 +224,8 @@ void WebPageInspectorController::disconnectAllFrontends()
97229710
// Disconnect any remaining remote frontends.
97239711
m_frontendRouter->disconnectAllFrontends();
97249712

@@ -9727,10 +9715,21 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
97279715
m_page.didChangeInspectorFrontendCount(m_frontendRouter->frontendCount());
97289716

97299717
#if ENABLE(REMOTE_INSPECTOR)
9730-
@@ -150,6 +250,55 @@ void WebPageInspectorController::setIndicating(bool indicating)
9718+
@@ -150,6 +252,66 @@ void WebPageInspectorController::setIndicating(bool indicating)
97319719
}
97329720
#endif
97339721

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+
+
97349733
+void WebPageInspectorController::navigate(WebCore::ResourceRequest&& request, WebFrameProxy* frame, NavigationHandler&& completionHandler)
97359734
+{
97369735
+ auto navigation = m_page.loadRequestForInspector(WTFMove(request), frame);
@@ -9783,7 +9782,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
97839782
void WebPageInspectorController::createInspectorTarget(const String& targetId, Inspector::InspectorTargetType type)
97849783
{
97859784
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
97879786
m_targetAgent->sendMessageFromTargetToFrontend(targetId, message);
97889787
}
97899788

@@ -9817,7 +9816,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
98179816
bool WebPageInspectorController::shouldPauseLoading(const ProvisionalPageProxy& provisionalPage) const
98189817
{
98199818
if (!m_frontendRouter->hasFrontends())
9820-
@@ -188,7 +364,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag
9819+
@@ -188,7 +377,7 @@ void WebPageInspectorController::setContinueLoadingCallback(const ProvisionalPag
98219820

98229821
void WebPageInspectorController::didCreateProvisionalPage(ProvisionalPageProxy& provisionalPage)
98239822
{
@@ -9826,7 +9825,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
98269825
}
98279826

98289827
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>
98309829
m_targets.set(target->identifier(), WTFMove(target));
98319830
}
98329831

@@ -9848,7 +9847,7 @@ index 1861cff806131196ea49b4f8aca6665beebbf6e8..57cb5bd0a6916b00da01af17b743da9e
98489847
+
98499848
} // namespace WebKit
98509849
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
98529851
--- a/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
98539852
+++ b/Source/WebKit/UIProcess/Inspector/WebPageInspectorController.h
98549853
@@ -26,17 +26,27 @@
@@ -9879,10 +9878,11 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
98799878
}
98809879

98819880
namespace WebKit {
9882-
@@ -44,6 +54,21 @@ namespace WebKit {
9881+
@@ -44,6 +54,22 @@ namespace WebKit {
98839882
class InspectorBrowserAgent;
98849883
struct WebPageAgentContext;
98859884

9885+
+class InspectorScreencastAgent;
98869886
+class WebFrameProxy;
98879887
+class WebPageInspectorEmulationAgent;
98889888
+class WebPageInspectorInputAgent;
@@ -9901,7 +9901,7 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
99019901
class WebPageInspectorController {
99029902
WTF_MAKE_NONCOPYABLE(WebPageInspectorController);
99039903
WTF_MAKE_FAST_ALLOCATED;
9904-
@@ -51,7 +76,19 @@ public:
9904+
@@ -51,7 +77,19 @@ public:
99059905
WebPageInspectorController(WebPageProxy&);
99069906

99079907
void init();
@@ -9921,17 +9921,20 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
99219921

99229922
bool hasLocalFrontend() const;
99239923

9924-
@@ -65,10 +102,22 @@ public:
9924+
@@ -64,11 +102,25 @@ public:
9925+
#if ENABLE(REMOTE_INSPECTOR)
99259926
void setIndicating(bool);
99269927
#endif
9927-
9928+
+#if USE(COORDINATED_GRAPHICS)
9929+
+ void didPaint(cairo_surface_t*);
9930+
+#endif
99289931
+ using NavigationHandler = Function<void(const String&, uint64_t)>;
99299932
+ void navigate(WebCore::ResourceRequest&&, WebFrameProxy*, NavigationHandler&&);
99309933
+ void didReceivePolicyDecision(WebCore::PolicyAction action, uint64_t navigationID);
99319934
+ void didDestroyNavigation(uint64_t navigationID);
99329935
+
99339936
+ void didFailProvisionalLoadForFrame(uint64_t navigationID, const WebCore::ResourceError& error);
9934-
+
9937+
99359938
void createInspectorTarget(const String& targetId, Inspector::InspectorTargetType);
99369939
void destroyInspectorTarget(const String& targetId);
99379940
void sendMessageToInspectorFrontend(const String& targetId, const String& message);
@@ -9944,20 +9947,21 @@ index 9ce5ef36b652fd56a843c1d12a4c3c3cf639282c..bb4d6b26bf245aebc2bd0f435a7bb831
99449947
bool shouldPauseLoading(const ProvisionalPageProxy&) const;
99459948
void setContinueLoadingCallback(const ProvisionalPageProxy&, WTF::Function<void()>&&);
99469949

9947-
@@ -84,6 +133,7 @@ private:
9950+
@@ -84,6 +136,7 @@ private:
99489951
void createLazyAgents();
99499952

99509953
void addTarget(std::unique_ptr<InspectorTargetProxy>&&);
99519954
+ void adjustPageSettings();
99529955

99539956
Ref<Inspector::FrontendRouter> m_frontendRouter;
99549957
Ref<Inspector::BackendDispatcher> m_backendDispatcher;
9955-
@@ -92,11 +142,16 @@ private:
9958+
@@ -92,11 +145,17 @@ private:
99569959
WebPageProxy& m_page;
99579960

99589961
Inspector::InspectorTargetAgent* m_targetAgent;
99599962
+ WebPageInspectorEmulationAgent* m_emulationAgent { nullptr };
99609963
+ WebPageInspectorInputAgent* m_inputAgent { nullptr };
9964+
+ InspectorScreencastAgent* m_screecastAgent { nullptr };
99619965
HashMap<String, std::unique_ptr<InspectorTargetProxy>> m_targets;
99629966

99639967
InspectorBrowserAgent* m_enabledInspectorBrowserAgent;
@@ -12702,24 +12706,27 @@ index 964c6315e38f5e0a0303febce45b1e975054f0b4..117d8c7c74bc81b34cfc0fe2b11a5429
1270212706
UniqueRef<SOAuthorizationCoordinator> m_soAuthorizationCoordinator;
1270312707
#endif
1270412708
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
1270612710
--- a/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
1270712711
+++ b/Source/WebKit/UIProcess/cairo/BackingStoreCairo.cpp
12708-
@@ -27,6 +27,7 @@
12712+
@@ -27,9 +27,11 @@
1270912713
#include "config.h"
1271012714
#include "BackingStore.h"
1271112715

1271212716
+#include "DrawingAreaProxyCoordinatedGraphics.h"
1271312717
#include "ShareableBitmap.h"
1271412718
#include "UpdateInfo.h"
1271512719
#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)
1271712725
cairo_rectangle(context, rect.x(), rect.y(), rect.width(), rect.height());
1271812726
cairo_fill(context);
1271912727
cairo_restore(context);
1272012728
+#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());
1272312730
+#endif
1272412731
}
1272512732

@@ -12997,15 +13004,22 @@ index 0000000000000000000000000000000000000000..a073a77390b206deb794efe937df4f35
1299713004
+
1299813005
+#endif // ENABLE(REMOTE_INSPECTOR)
1299913006
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
1300113008
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
1300213009
+++ 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)
1300413019

1300513020
cairo_restore(cr);
1300613021

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());
1300913023
+
1301013024
cairo_surface_flush(m_surface.get());
1301113025

0 commit comments

Comments
 (0)