Diff
Modified: trunk/LayoutTests/ChangeLog (121864 => 121865)
--- trunk/LayoutTests/ChangeLog 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/LayoutTests/ChangeLog 2012-07-04 17:39:26 UTC (rev 121865)
@@ -1,3 +1,16 @@
+2012-07-04 Andrey Kosyakov <[email protected]>
+
+ Unreviewed, rolling out r121767.
+ http://trac.webkit.org/changeset/121767
+ https://bugs.webkit.org/show_bug.cgi?id=89584
+
+ Crashes inspected page while recording timeline due to
+ conflict with BeginFrame in record stack
+
+ * inspector/timeline-dfs-expected.txt: Removed.
+ * inspector/timeline-dfs.html: Removed.
+ * inspector/timeline/timeline-enum-stability-expected.txt:
+
2012-07-04 Alexander Pavlov <[email protected]>
Web Inspector: Emulate pseudo styles (hover etc.) of non-selected elements
Modified: trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt (121864 => 121865)
--- trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/LayoutTests/inspector/timeline/timeline-enum-stability-expected.txt 2012-07-04 17:39:26 UTC (rev 121865)
@@ -4,7 +4,6 @@
{
Root : "Root"
- Program : "Program"
EventDispatch : "EventDispatch"
BeginFrame : "BeginFrame"
Layout : "Layout"
Deleted: trunk/LayoutTests/inspector/timeline-dfs-expected.txt (121864 => 121865)
--- trunk/LayoutTests/inspector/timeline-dfs-expected.txt 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/LayoutTests/inspector/timeline-dfs-expected.txt 2012-07-04 17:39:26 UTC (rev 121865)
@@ -1,34 +0,0 @@
-Tests TimelinePresentationModel.forAllRecords function.
-
-DFS preorder:
-a
-aa
-aaa
-aab
-ab
-aba
-abb
-b
-ba
-baa
-bab
-bb
-bba
-bbb
-
-DFS postorder:
-aaa
-aab
-aa
-aba
-abb
-ab
-a
-baa
-bab
-ba
-bba
-bbb
-bb
-b
-
Deleted: trunk/LayoutTests/inspector/timeline-dfs.html (121864 => 121865)
--- trunk/LayoutTests/inspector/timeline-dfs.html 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/LayoutTests/inspector/timeline-dfs.html 2012-07-04 17:39:26 UTC (rev 121865)
@@ -1,50 +0,0 @@
-<html>
-<head>
-<script src=""
-<script type="text/_javascript_">
-
-var test = function()
-{
- function dumper(record)
- {
- InspectorTest.addResult(record.name);
- }
-
- var records = [
- {"name" : "a", "children" : [
- {"name" : "aa", "children": [
- {"name" : "aaa"},
- {"name" : "aab"},
- ]},
- {"name" : "ab", "children":[
- {"name" : "aba"},
- {"name" : "abb"},
- ]}
- ]},
- {"name" : "b", "children" : [
- {"name" : "ba", "children" : [
- {"name" : "baa"},
- {"name" : "bab"},
- ]},
- {"name" : "bb", "children":[
- {"name" : "bba"},
- {"name" : "bbb"},
- ]}
- ]},
- ];
-
- InspectorTest.addResult("DFS preorder:");
- WebInspector.TimelinePresentationModel.forAllRecords(records, dumper);
- InspectorTest.addResult("");
-
- InspectorTest.addResult("DFS postorder:");
- WebInspector.TimelinePresentationModel.forAllRecords(records, null, dumper);
- InspectorTest.completeTest();
-}
-
-</script>
-</head>
-<body _onload_="runTest()">
-<p>Tests TimelinePresentationModel.forAllRecords function.</p>
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (121864 => 121865)
--- trunk/Source/WebCore/ChangeLog 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/ChangeLog 2012-07-04 17:39:26 UTC (rev 121865)
@@ -1,3 +1,38 @@
+2012-07-04 Andrey Kosyakov <[email protected]>
+
+ Unreviewed, rolling out r121767.
+ http://trac.webkit.org/changeset/121767
+ https://bugs.webkit.org/show_bug.cgi?id=89584
+
+ Crashes inspected page while recording timeline due to
+ conflict with BeginFrame in record stack
+
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willSendResourceRequest):
+ (WebCore::InspectorTimelineAgent::willProcessTask):
+ (WebCore::InspectorTimelineAgent::didProcessTask):
+ (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
+ (WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
+ * inspector/InspectorTimelineAgent.h:
+ (InspectorTimelineAgent):
+ * inspector/front-end/MemoryStatistics.js:
+ (WebInspector.MemoryStatistics.prototype._onRecordAdded):
+ * inspector/front-end/TimelineFrameController.js:
+ (WebInspector.TimelineFrameController.prototype._addRecord):
+ * inspector/front-end/TimelineModel.js:
+ * inspector/front-end/TimelineOverviewPane.js:
+ (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord):
+ (WebInspector.TimelineCategoryStrips.prototype.update):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
+ (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
+ * inspector/front-end/TimelinePresentationModel.js:
+ (WebInspector.TimelinePresentationModel.categories):
+ (WebInspector.TimelinePresentationModel.recordStyle):
+ (WebInspector.TimelinePresentationModel.categoryForRecord):
+ (WebInspector.TimelinePresentationModel.forAllRecords):
+ (WebInspector.TimelinePresentationModel.prototype.addRecord):
+
2012-07-04 Dana Jansens <[email protected]>
[chromium] Clear RenderSurfaces still when no idle paint will be done
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (121864 => 121865)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp 2012-07-04 17:39:26 UTC (rev 121865)
@@ -60,8 +60,6 @@
// Must be kept in sync with WebInspector.TimelineModel.RecordType in TimelineModel.js
namespace TimelineRecordType {
-static const char Program[] = "Program";
-
static const char EventDispatch[] = "EventDispatch";
static const char BeginFrame[] = "BeginFrame";
static const char Layout[] = "Layout";
@@ -344,7 +342,7 @@
String frameId(m_pageAgent->frameId(frame));
recordRaw->setString("frameId", frameId);
}
- setHeapSizeStatistics(recordRaw.get());
+ setHeapSizeStatistic(recordRaw.get());
// FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now.
RefPtr<TypeBuilder::Timeline::TimelineEvent> record = TypeBuilder::Timeline::TimelineEvent::runtimeCast(recordRaw.release());
m_frontend->eventRecorded(record.release());
@@ -429,12 +427,12 @@
void InspectorTimelineAgent::willProcessTask()
{
- pushCurrentRecord(InspectorObject::create(), TimelineRecordType::Program, false, 0);
+ // TODO: Record task processing start time.
}
void InspectorTimelineAgent::didProcessTask()
{
- didCompleteCurrentRecord(TimelineRecordType::Program);
+ // TODO: Record task processing end time.
}
void InspectorTimelineAgent::addRecordToTimeline(PassRefPtr<InspectorObject> record, const String& type, const String& frameId)
@@ -445,15 +443,11 @@
void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, const String& type, const String& frameId)
{
- DEFINE_STATIC_LOCAL(String, program, (TimelineRecordType::Program));
-
RefPtr<InspectorObject> record(prpRecord);
record->setString("type", type);
if (!frameId.isEmpty())
record->setString("frameId", frameId);
- if (type != program)
- setHeapSizeStatistics(record.get());
-
+ setHeapSizeStatistic(record.get());
if (m_recordStack.isEmpty()) {
// FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now.
RefPtr<TypeBuilder::Timeline::TimelineEvent> recordChecked = TypeBuilder::Timeline::TimelineEvent::runtimeCast(record.release());
@@ -464,7 +458,7 @@
}
}
-void InspectorTimelineAgent::setHeapSizeStatistics(InspectorObject* record)
+void InspectorTimelineAgent::setHeapSizeStatistic(InspectorObject* record)
{
size_t usedHeapSize = 0;
size_t totalHeapSize = 0;
Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.h (121864 => 121865)
--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.h 2012-07-04 17:39:26 UTC (rev 121865)
@@ -163,8 +163,8 @@
InspectorTimelineAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorState*, InspectorType, InspectorClient*);
void pushCurrentRecord(PassRefPtr<InspectorObject>, const String& type, bool captureCallStack, Frame*);
- void setHeapSizeStatistics(InspectorObject* record);
-
+ void setHeapSizeStatistic(InspectorObject* record);
+
void didCompleteCurrentRecord(const String& type);
void appendRecord(PassRefPtr<InspectorObject> data, const String& type, bool captureCallStack, Frame*);
void pushCancelableRecord(PassRefPtr<InspectorObject>, const String& type, Frame*);
Modified: trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -257,20 +257,15 @@
_onRecordAdded: function(event)
{
- var statistics = this._counters;
- function addStatistics(record)
- {
- var counters = record["counters"];
- if (!counters)
- return;
- statistics.push({
- time: record.endTime || record.startTime,
- documentCount: counters["documents"],
- nodeCount: counters["nodes"],
- listenerCount: counters["jsEventListeners"]
- });
- }
- WebInspector.TimelinePresentationModel.forAllRecords([event.data], null, addStatistics);
+ var counters = event.data["counters"];
+ if (!counters)
+ return;
+ this._counters.push({
+ time: event.data.endTime || event.data.startTime,
+ documentCount: counters["documents"],
+ nodeCount: counters["nodes"],
+ listenerCount: counters["jsEventListeners"]
+ });
},
_draw: function()
Modified: trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/TimelineFrameController.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -61,16 +61,6 @@
_addRecord: function(record)
{
- var records;
- if (record.type === WebInspector.TimelineModel.RecordType.Program)
- records = record["children"] || [];
- else
- records = [record];
- records.forEach(this._innerAddRecord, this);
- },
-
- _innerAddRecord: function(record)
- {
if (record.type === WebInspector.TimelineModel.RecordType.BeginFrame && this._lastFrame)
this._flushFrame(record);
else {
Modified: trunk/Source/WebCore/inspector/front-end/TimelineModel.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/TimelineModel.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/TimelineModel.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -44,7 +44,6 @@
WebInspector.TimelineModel.RecordType = {
Root: "Root",
- Program: "Program",
EventDispatch: "EventDispatch",
BeginFrame: "BeginFrame",
Modified: trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/TimelineOverviewPane.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -885,8 +885,6 @@
var recordStart = Math.floor((WebInspector.TimelineModel.startTimeInSeconds(record) - timeOffset) * scale);
var recordEnd = Math.ceil((WebInspector.TimelineModel.endTimeInSeconds(record) - timeOffset) * scale);
var category = WebInspector.TimelinePresentationModel.categoryForRecord(record);
- if (category.overviewStripGroupIndex < 0)
- return;
var bar = lastBarByGroup[category.overviewStripGroupIndex];
// This bar may be merged with previous -- so just adjust the previous bar.
const barsMergeThreshold = 2;
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -232,8 +232,6 @@
var categories = WebInspector.TimelinePresentationModel.categories();
for (var categoryName in categories) {
var category = categories[categoryName];
- if (category.overviewStripGroupIndex < 0)
- continue;
this.statusBarFilters.appendChild(this._createTimelineCategoryStatusBarCheckbox(category, this._onCategoryCheckboxClicked.bind(this, category)));
}
},
@@ -497,8 +495,8 @@
_innerAddRecordToTimeline: function(record, parentRecord)
{
- var records = this._presentationModel.addRecord(record, parentRecord);
- this._allRecordsCount += records.length;
+ var formattedRecord = this._presentationModel.addRecord(record, parentRecord);
+ ++this._allRecordsCount;
var recordTypes = WebInspector.TimelineModel.RecordType;
var timeStampRecords = this._timeStampRecords;
var hasVisibleRecords = false;
@@ -509,14 +507,10 @@
timeStampRecords.push(record);
hasVisibleRecords |= presentationModel.isVisible(record);
}
+ var records = [ formattedRecord ];
WebInspector.TimelinePresentationModel.forAllRecords(records, processRecord);
-
- function isAdoptedRecord(record)
- {
- return record.parent !== presentationModel.rootRecord;
- }
// Tell caller update is necessary either if we added a visible record or if we re-parented a record.
- return hasVisibleRecords || records.some(isAdoptedRecord);
+ return hasVisibleRecords || formattedRecord.parent !== this._presentationModel.rootRecord;
},
sidebarResized: function(event)
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js (121864 => 121865)
--- trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js 2012-07-04 17:27:20 UTC (rev 121864)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePresentationModel.js 2012-07-04 17:39:26 UTC (rev 121865)
@@ -47,7 +47,6 @@
if (WebInspector.TimelinePresentationModel._categories)
return WebInspector.TimelinePresentationModel._categories;
WebInspector.TimelinePresentationModel._categories = {
- program: new WebInspector.TimelineCategory("program", WebInspector.UIString("Program"), -1, "#BBBBBB", "#DDDDDD", "#FFFFFF"),
loading: new WebInspector.TimelineCategory("loading", WebInspector.UIString("Loading"), 0, "#5A8BCC", "#8EB6E9", "#70A2E3"),
scripting: new WebInspector.TimelineCategory("scripting", WebInspector.UIString("Scripting"), 1, "#D8AA34", "#F3D07A", "#F1C453"),
rendering: new WebInspector.TimelineCategory("rendering", WebInspector.UIString("Rendering"), 2, "#8266CC", "#AF9AEB", "#9A7EE6"),
@@ -69,7 +68,6 @@
var recordStyles = {};
recordStyles[recordTypes.Root] = { title: "#root", category: categories["loading"] };
- recordStyles[recordTypes.Program] = { title: WebInspector.UIString("Program"), category: categories["program"] };
recordStyles[recordTypes.EventDispatch] = { title: WebInspector.UIString("Event"), category: categories["scripting"] };
recordStyles[recordTypes.BeginFrame] = { title: WebInspector.UIString("Frame Start"), category: categories["rendering"] };
recordStyles[recordTypes.Layout] = { title: WebInspector.UIString("Layout"), category: categories["rendering"] };
@@ -105,7 +103,7 @@
WebInspector.TimelinePresentationModel.categoryForRecord = function(record)
{
- return WebInspector.TimelinePresentationModel.recordStyle(record).category;
+ return WebInspector.TimelinePresentationModel.recordStyle(record).category;
}
WebInspector.TimelinePresentationModel.isEventDivider = function(record)
@@ -119,12 +117,7 @@
return false;
}
-/**
- * @param {Array} recordsArray
- * @param {?function(*)} preOrderCallback
- * @param {function(*)=} postOrderCallback
- */
-WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, preOrderCallback, postOrderCallback)
+WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, callback)
{
if (!recordsArray)
return;
@@ -134,18 +127,13 @@
var records = entry.array;
if (entry.index < records.length) {
var record = records[entry.index];
- if (preOrderCallback && preOrderCallback(record))
+ if (callback(record))
return;
if (record.children)
- stack.push({array: record.children, index: 0, record: record});
- else if (postOrderCallback && postOrderCallback(record))
- return;
+ stack.push({array: record.children, index: 0});
++entry.index;
- } else {
- if (entry.record && postOrderCallback && postOrderCallback(entry.record))
- return;
+ } else
stack.pop();
- }
}
}
@@ -217,27 +205,12 @@
addRecord: function(record, parentRecord)
{
- if (this._minimumRecordTime === -1 || record.startTime < this._minimumRecordTime)
- this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeconds(record);
-
- var records;
- if (record.type === WebInspector.TimelineModel.RecordType.Program)
- records = record.children;
- else
- records = [record];
-
- var formattedRecords = [];
- var recordsCount = records.length;
- for (var i = 0; i < recordsCount; ++i)
- formattedRecords.push(this._innerAddRecord(records[i], parentRecord));
- return formattedRecords;
- },
-
- _innerAddRecord: function(record, parentRecord)
- {
var connectedToOldRecord = false;
var recordTypes = WebInspector.TimelineModel.RecordType;
+ if (this._minimumRecordTime === -1 || record.startTime < this._minimumRecordTime)
+ this._minimumRecordTime = WebInspector.TimelineModel.startTimeInSeconds(record);
+
switch (record.type) {
// No bar entry for load events.
case recordTypes.MarkDOMContent:
@@ -284,7 +257,7 @@
var childrenCount = children ? children.length : 0;
for (var i = 0; i < childrenCount; ++i)
- this._innerAddRecord(children[i], formattedRecord);
+ this.addRecord(children[i], formattedRecord);
formattedRecord.calculateAggregatedStats(WebInspector.TimelinePresentationModel.categories());