[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:21:52 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit f21a3cde2597448c11aa49a444cde3286e2709d3
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 4 08:42:44 2009 +0000

    2009-11-04  Kelly Norton  <knorton at google.com>
    
            Reviewed by Timothy Hatcher.
    
            Adds paint rectangle information to TimelineAgent's didPaint callback.
            https://bugs.webkit.org/show_bug.cgi?id=31087
    
            * inspector/InspectorTimelineAgent.cpp:
            (WebCore::InspectorTimelineAgent::willPaint):
            * inspector/InspectorTimelineAgent.h:
            * inspector/TimelineRecordFactory.cpp:
            (WebCore::TimelineRecordFactory::createPaintTimelineRecord):
            * inspector/TimelineRecordFactory.h:
            * page/FrameView.cpp:
            (WebCore::FrameView::paintContents):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50502 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c4b0906..d64c0cb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-04  Kelly Norton  <knorton at google.com>
+
+        Reviewed by Timothy Hatcher.
+
+        Adds paint rectangle information to TimelineAgent's didPaint callback.
+        https://bugs.webkit.org/show_bug.cgi?id=31087
+
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::willPaint):
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/TimelineRecordFactory.cpp:
+        (WebCore::TimelineRecordFactory::createPaintTimelineRecord):
+        * inspector/TimelineRecordFactory.h:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::paintContents):
+
 2009-11-04  Jaime Yap  <jaimeyap at google.com>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/inspector/InspectorTimelineAgent.cpp b/WebCore/inspector/InspectorTimelineAgent.cpp
index 84222c8..f051c1a 100644
--- a/WebCore/inspector/InspectorTimelineAgent.cpp
+++ b/WebCore/inspector/InspectorTimelineAgent.cpp
@@ -35,6 +35,7 @@
 
 #include "Event.h"
 #include "InspectorFrontend.h"
+#include "IntRect.h"
 #include "TimelineRecordFactory.h"
 
 #include <wtf/CurrentTime.h>
@@ -82,9 +83,10 @@ void InspectorTimelineAgent::didRecalculateStyle()
     didCompleteCurrentRecord(RecalculateStylesTimelineRecordType);
 }
 
-void InspectorTimelineAgent::willPaint()
+void InspectorTimelineAgent::willPaint(const IntRect& rect)
 {
-    pushCurrentRecord(TimelineRecordFactory::createGenericRecord(m_frontend, currentTimeInMilliseconds()), PaintTimelineRecordType);
+    pushCurrentRecord(TimelineRecordFactory::createPaintTimelineRecord(m_frontend, currentTimeInMilliseconds(), rect),
+        PaintTimelineRecordType);
 }
 
 void InspectorTimelineAgent::didPaint()
diff --git a/WebCore/inspector/InspectorTimelineAgent.h b/WebCore/inspector/InspectorTimelineAgent.h
index e2fcace..d500090 100644
--- a/WebCore/inspector/InspectorTimelineAgent.h
+++ b/WebCore/inspector/InspectorTimelineAgent.h
@@ -40,6 +40,7 @@
 namespace WebCore {
     class Event;
     class InspectorFrontend;
+    class IntRect;
 
     // Must be kept in sync with TimelineAgent.js
     enum TimelineRecordType {
@@ -75,7 +76,7 @@ namespace WebCore {
         void willRecalculateStyle();
         void didRecalculateStyle();
 
-        void willPaint();
+        void willPaint(const IntRect&);
         void didPaint();
 
         void willWriteHTML();
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index ea6b4d0..b35290f 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -35,6 +35,7 @@
 
 #include "Event.h"
 #include "InspectorFrontend.h"
+#include "IntRect.h"
 #include "ScriptArray.h"
 #include "ScriptObject.h"
 namespace WebCore {
@@ -113,6 +114,18 @@ ScriptObject TimelineRecordFactory::createMarkTimelineRecord(InspectorFrontend*
     return item;
 }
 
+ScriptObject TimelineRecordFactory::createPaintTimelineRecord(InspectorFrontend* frontend, double startTime, const IntRect& rect)
+{
+    ScriptObject record = createGenericRecord(frontend, startTime);
+    ScriptObject data = frontend->newScriptObject();
+    data.set("x", rect.x());
+    data.set("y", rect.y());
+    data.set("width", rect.width());
+    data.set("height", rect.height());
+    record.set("data", data);
+    return record;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INSPECTOR)
diff --git a/WebCore/inspector/TimelineRecordFactory.h b/WebCore/inspector/TimelineRecordFactory.h
index d5c6e1b..e40e68b 100644
--- a/WebCore/inspector/TimelineRecordFactory.h
+++ b/WebCore/inspector/TimelineRecordFactory.h
@@ -37,6 +37,7 @@ namespace WebCore {
 
     class Event;
     class InspectorFrontend;
+    class IntRect;
     class ScriptObject;
 
     class TimelineRecordFactory {
@@ -53,6 +54,8 @@ namespace WebCore {
         static ScriptObject createXHRLoadTimelineRecord(InspectorFrontend*, double startTime, const String& url);
         
         static ScriptObject createEvaluateScriptTimelineRecord(InspectorFrontend*, double startTime, const String&, double lineNumber);
+        
+        static ScriptObject createPaintTimelineRecord(InspectorFrontend*, double startTime, const IntRect&);
 
         static ScriptObject createMarkTimelineRecord(InspectorFrontend*, double startTime, const String&);
 
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 7161bc1..a6c8e84 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -1617,7 +1617,7 @@ void FrameView::paintContents(GraphicsContext* p, const IntRect& rect)
 #if ENABLE(INSPECTOR)
     InspectorTimelineAgent* timelineAgent = inspectorTimelineAgent();
     if (timelineAgent)
-        timelineAgent->willPaint();
+        timelineAgent->willPaint(rect);
 #endif
 
     Document* document = frame()->document();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list