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

Unified Diff: Source/WebCore/inspector/InspectorPageAgent.cpp

Issue 11416095: Merge 134917 - Web Inspector: [Overrides] Device metrics get reset on navigation, yet remain in the… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/InspectorPageAgent.cpp
===================================================================
--- Source/WebCore/inspector/InspectorPageAgent.cpp (revision 135249)
+++ Source/WebCore/inspector/InspectorPageAgent.cpp (working copy)
@@ -355,6 +355,14 @@
if (m_state->getBoolean(PageAgentState::pageAgentEnabled)) {
ErrorString error;
enable(&error);
+ bool scriptExecutionDisabled = m_state->getBoolean(PageAgentState::pageAgentScriptExecutionDisabled);
+ setScriptExecutionDisabled(0, scriptExecutionDisabled);
+
+ int currentWidth = static_cast<int>(m_state->getLong(PageAgentState::pageAgentScreenWidthOverride));
+ int currentHeight = static_cast<int>(m_state->getLong(PageAgentState::pageAgentScreenHeightOverride));
+ double currentFontScaleFactor = m_state->getDouble(PageAgentState::pageAgentFontScaleFactorOverride);
+ bool currentFitWindow = m_state->getBoolean(PageAgentState::pageAgentFitWindow);
+ updateViewMetrics(currentWidth, currentHeight, currentFontScaleFactor, currentFitWindow);
#if ENABLE(TOUCH_EVENTS)
updateTouchEventEmulationInPage(m_state->getBoolean(PageAgentState::touchEventEmulationEnabled));
#endif
@@ -364,8 +372,6 @@
void InspectorPageAgent::enable(ErrorString*)
{
m_state->setBoolean(PageAgentState::pageAgentEnabled, true);
- bool scriptExecutionDisabled = m_state->getBoolean(PageAgentState::pageAgentScriptExecutionDisabled);
- setScriptExecutionDisabled(0, scriptExecutionDisabled);
m_instrumentingAgents->setInspectorPageAgent(this);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698