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); |
} |