diff options
Diffstat (limited to 'WebCore/inspector/InspectorFrontendClientLocal.cpp')
-rw-r--r-- | WebCore/inspector/InspectorFrontendClientLocal.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/WebCore/inspector/InspectorFrontendClientLocal.cpp b/WebCore/inspector/InspectorFrontendClientLocal.cpp index 77616da..4812b2a 100644 --- a/WebCore/inspector/InspectorFrontendClientLocal.cpp +++ b/WebCore/inspector/InspectorFrontendClientLocal.cpp @@ -47,7 +47,6 @@ namespace WebCore { -static const char* const inspectorAttachedHeightName = "inspectorAttachedHeight"; static const unsigned defaultAttachedHeight = 300; static const float minimumAttachedHeight = 250.0f; static const float maximumAttachedHeightRatio = 0.75f; @@ -108,7 +107,7 @@ void InspectorFrontendClientLocal::changeAttachedWindowHeight(unsigned height) { unsigned totalHeight = m_frontendPage->mainFrame()->view()->visibleHeight() + m_inspectorController->inspectedPage()->mainFrame()->view()->visibleHeight(); unsigned attachedHeight = constrainedAttachedWindowHeight(height, totalHeight); - m_inspectorController->setSetting(inspectorAttachedHeightName, String::number(attachedHeight)); + m_inspectorController->setInspectorAttachedHeight(attachedHeight); setAttachedWindowHeight(attachedHeight); } @@ -134,10 +133,9 @@ void InspectorFrontendClientLocal::setAttachedWindow(bool attached) void InspectorFrontendClientLocal::restoreAttachedWindowHeight() { unsigned inspectedPageHeight = m_inspectorController->inspectedPage()->mainFrame()->view()->visibleHeight(); - String attachedHeight = m_inspectorController->setting(inspectorAttachedHeightName); + int attachedHeight = m_inspectorController->inspectorAttachedHeight(); bool success = true; - int height = attachedHeight.toInt(&success); - unsigned preferredHeight = success ? static_cast<unsigned>(height) : defaultAttachedHeight; + unsigned preferredHeight = success ? static_cast<unsigned>(attachedHeight) : defaultAttachedHeight; // This call might not go through (if the window starts out detached), but if the window is initially created attached, // InspectorController::attachWindow is never called, so we need to make sure to set the attachedWindowHeight. |