2010-11-02 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 14:10:41 +0000 (14:10 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Nov 2010 14:10:41 +0000 (14:10 +0000)
        Reviewed by Pavel Feldman.

        Web Inspector: Remove obsolete code.
        It is not required to push onload and DOMContentLoaded events times to the fresh instance of Inspector.
        Network Panel is showing the markers only after reloading the inspected page.
        https://bugs.webkit.org/show_bug.cgi?id=48854

        * inspector/InspectorController.cpp:
        (WebCore::InspectorController::InspectorController):
        (WebCore::InspectorController::populateScriptObjects):
        (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
        (WebCore::InspectorController::mainResourceFiredLoadEvent):
        * inspector/InspectorController.h:

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

WebCore/ChangeLog
WebCore/inspector/InspectorController.cpp
WebCore/inspector/InspectorController.h

index bb1ae98ad5b01d7632589678070c565987ec0224..e42a6ca85a2edf8f63953dfb1888e78eb7b7f18c 100644 (file)
@@ -1,3 +1,19 @@
+2010-11-02  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        Web Inspector: Remove obsolete code.
+        It is not required to push onload and DOMContentLoaded events times to the fresh instance of Inspector.
+        Network Panel is showing the markers only after reloading the inspected page.
+        https://bugs.webkit.org/show_bug.cgi?id=48854
+
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::InspectorController):
+        (WebCore::InspectorController::populateScriptObjects):
+        (WebCore::InspectorController::mainResourceFiredDOMContentEvent):
+        (WebCore::InspectorController::mainResourceFiredLoadEvent):
+        * inspector/InspectorController.h:
+
 2010-11-03  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Jeremy Orlow.
index 5a4abc03aefd6172f3038bd8e9c9d9c9f3237814..0825dc656b43ec9b86af7cabf653be7af779c971 100644 (file)
@@ -143,8 +143,6 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
     , m_openingFrontend(false)
     , m_cssStore(new InspectorCSSStore(this))
     , m_mainResourceIdentifier(0)
-    , m_loadEventTime(-1.0)
-    , m_domContentEventTime(-1.0)
     , m_expiredConsoleMessageCount(0)
     , m_groupLevel(0)
     , m_previousMessage(0)
@@ -629,11 +627,6 @@ void InspectorController::populateScriptObjects()
         m_frontend->profilerWasEnabled();
 #endif
 
-    if (m_domContentEventTime != -1.0)
-        m_frontend->domContentEventFired(m_domContentEventTime);
-    if (m_loadEventTime != -1.0)
-        m_frontend->loadEventFired(m_loadEventTime);
-
     m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
 
     if (m_nodeToFocus)
@@ -804,11 +797,10 @@ void InspectorController::mainResourceFiredDOMContentEvent(DocumentLoader* loade
     if (!enabled() || !isMainResourceLoader(loader, url))
         return;
 
-    m_domContentEventTime = currentTime();
     if (m_timelineAgent)
         m_timelineAgent->didMarkDOMContentEvent();
     if (m_frontend)
-        m_frontend->domContentEventFired(m_domContentEventTime);
+        m_frontend->domContentEventFired(currentTime());
 }
 
 void InspectorController::mainResourceFiredLoadEvent(DocumentLoader* loader, const KURL& url)
@@ -816,11 +808,10 @@ void InspectorController::mainResourceFiredLoadEvent(DocumentLoader* loader, con
     if (!enabled() || !isMainResourceLoader(loader, url))
         return;
 
-    m_loadEventTime = currentTime();
     if (m_timelineAgent)
         m_timelineAgent->didMarkLoadEvent();
     if (m_frontend)
-        m_frontend->loadEventFired(m_loadEventTime);
+        m_frontend->loadEventFired(currentTime());
 }
 
 bool InspectorController::isMainResourceLoader(DocumentLoader* loader, const KURL& requestUrl)
index ab728a13624f81e65cba1052907772a6b9295a83..86fea67fc6c37c1d31a91ba89401c7c8fb800b7a 100644 (file)
@@ -349,8 +349,6 @@ private:
     RefPtr<Node> m_nodeToFocus;
     RefPtr<InspectorResourceAgent> m_resourceAgent;
     unsigned long m_mainResourceIdentifier;
-    double m_loadEventTime;
-    double m_domContentEventTime;
     Vector<OwnPtr<ConsoleMessage> > m_consoleMessages;
     unsigned m_expiredConsoleMessageCount;
     HashMap<String, double> m_times;