2010-10-18 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Oct 2010 12:46:12 +0000 (12:46 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Oct 2010 12:46:12 +0000 (12:46 +0000)
        Reviewed by Yury Semikhatsky.

        Web Inspector: [REGRESSION] Inspector window visible during run-webkit-tests.
        The initial state of an inspector setting should stay untouched
        if the profile has no value for it.

        https://bugs.webkit.org/show_bug.cgi?id=47785

        * inspector/InspectorState.cpp:
        (WebCore::InspectorState::loadFromSettings):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@69956 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/inspector/InspectorState.cpp

index b2600c362bdd09514bcb15e7ac8c522ec6c0c05b..34bd385944d4d8c98216c889f22deaa726e4b421 100644 (file)
@@ -1,3 +1,16 @@
+2010-10-18  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: [REGRESSION] Inspector window visible during run-webkit-tests.
+        The initial state of an inspector setting should stay untouched
+        if the profile has no value for it.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47785
+
+        * inspector/InspectorState.cpp:
+        (WebCore::InspectorState::loadFromSettings):
+
 2010-10-18  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index c33743da87a9a1eadf9ff44421b78cecb85f1065..44065c07bf085af58140dc0b92bf330201d9e250 100644 (file)
@@ -92,13 +92,15 @@ void InspectorState::loadFromSettings()
             m_client->populateSetting(i->second.m_preferenceName, &value);
             switch (i->second.m_value->type()) {
             case InspectorValue::TypeBoolean:
-                i->second.m_value = InspectorBasicValue::create(value == "true");
+                if (value.length())
+                    i->second.m_value = InspectorBasicValue::create(value == "true");
                 break;
             case InspectorValue::TypeString:
                 i->second.m_value = InspectorString::create(value);
                 break;
             case InspectorValue::TypeNumber:
-                i->second.m_value = InspectorBasicValue::create((double)value.toInt());
+                if (value.length())
+                    i->second.m_value = InspectorBasicValue::create((double)value.toInt());
                 break;
             default:
                 ASSERT(false);