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

Unified Diff: Source/core/inspector/InspectorInspectorAgent.cpp

Issue 964493002: DevTools: improve TTIE, do not select body before the target element upon inspect element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: headless test fixed Created 5 years, 10 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: Source/core/inspector/InspectorInspectorAgent.cpp
diff --git a/Source/core/inspector/InspectorInspectorAgent.cpp b/Source/core/inspector/InspectorInspectorAgent.cpp
index 7da1fbf59444c078be2ef6227a655231e9a34f04..d0ae2bd816e3b3cde48c8dc516d6d87cdaecbf05 100644
--- a/Source/core/inspector/InspectorInspectorAgent.cpp
+++ b/Source/core/inspector/InspectorInspectorAgent.cpp
@@ -98,9 +98,6 @@ void InspectorInspectorAgent::enable(ErrorString*)
{
m_state->setBoolean(InspectorAgentState::inspectorAgentEnabled, true);
- if (m_pendingInspectData.first)
- inspect(m_pendingInspectData.first, m_pendingInspectData.second);
-
for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); m_frontend && it != m_pendingEvaluateTestCommands.end(); ++it)
m_frontend->evaluateForTestInFrontend(static_cast<int>((*it).first), (*it).second);
m_pendingEvaluateTestCommands.clear();
@@ -136,14 +133,8 @@ void InspectorInspectorAgent::evaluateForTestInFrontend(long callId, const Strin
void InspectorInspectorAgent::inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<JSONObject> hints)
{
- if (m_state->getBoolean(InspectorAgentState::inspectorAgentEnabled) && m_frontend) {
+ if (m_frontend && m_state->getBoolean(InspectorAgentState::inspectorAgentEnabled))
m_frontend->inspect(objectToInspect, hints);
- m_pendingInspectData.first = nullptr;
- m_pendingInspectData.second = nullptr;
- return;
- }
- m_pendingInspectData.first = objectToInspect;
- m_pendingInspectData.second = hints;
}
} // namespace blink
« no previous file with comments | « Source/core/inspector/InspectorInspectorAgent.h ('k') | Source/devtools/front_end/elements/ElementsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698