Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: third_party/WebKit/Source/web/InspectorOverlay.cpp

Issue 2218603003: Timeline: show white overlay till page being reloaded paints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased, dropped console.error() upon paint with 0 layer Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/InspectorOverlay.cpp
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index d78738a5d0a750778b03e4e4ea48129b4ca67cd9..2c1973061907767c39c3d3eef87baf97c3f9379b 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -178,6 +178,7 @@ InspectorOverlay::InspectorOverlay(WebViewImpl* webViewImpl)
, m_omitTooltip(false)
, m_timer(this, &InspectorOverlay::onTimer)
, m_suspended(false)
+ , m_showReloadingBlanket(false)
, m_inLayout(false)
, m_needsUpdate(false)
, m_inspectMode(InspectorDOMAgent::NotSearching)
@@ -293,6 +294,23 @@ void InspectorOverlay::setPausedInDebuggerMessage(const String& message)
scheduleUpdate();
}
+void InspectorOverlay::showReloadingBlanket()
+{
+ m_showReloadingBlanket = true;
+ scheduleUpdate();
+}
+
+void InspectorOverlay::hideReloadingBlanket()
+{
+ if (!m_showReloadingBlanket)
+ return;
+ m_showReloadingBlanket = false;
+ if (m_suspended)
+ clearInternal();
+ else
+ scheduleUpdate();
+}
+
void InspectorOverlay::hideHighlight()
{
m_highlightNode.clear();
@@ -353,6 +371,8 @@ void InspectorOverlay::highlightQuad(std::unique_ptr<FloatQuad> quad, const Insp
bool InspectorOverlay::isEmpty()
{
+ if (m_showReloadingBlanket)
+ return false;
if (m_suspended)
return true;
bool hasVisibleElements = m_highlightNode || m_eventTargetNode || m_highlightQuad || (m_resizeTimerActive && m_drawViewSize) || !m_pausedInDebuggerMessage.isNull();
@@ -387,6 +407,10 @@ void InspectorOverlay::rebuildOverlayPage()
reset(viewportSize, visibleRectInDocument.location());
+ if (m_showReloadingBlanket) {
+ evaluateInOverlay("showReloadingBlanket", "");
+ return;
+ }
drawNodeHighlight();
drawQuadHighlight();
drawPausedInDebuggerMessage();
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.h ('k') | third_party/WebKit/Source/web/WebDevToolsAgentImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698