Title: [98232] trunk
- Revision
- 98232
- Author
- [email protected]
- Date
- 2011-10-24 04:04:55 -0700 (Mon, 24 Oct 2011)
Log Message
Web Inspector: Audits hang on pages without img[src] elements
https://bugs.webkit.org/show_bug.cgi?id=70604
Reviewed by Pavel Feldman.
Source/WebCore:
Test: inspector/audits/audits-panel-noimages-functional.html
* inspector/front-end/AuditRules.js:
(WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
LayoutTests:
* inspector/audits/audits-panel-noimages-functional-expected.txt: Added.
* inspector/audits/audits-panel-noimages-functional.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (98231 => 98232)
--- trunk/LayoutTests/ChangeLog 2011-10-24 10:29:26 UTC (rev 98231)
+++ trunk/LayoutTests/ChangeLog 2011-10-24 11:04:55 UTC (rev 98232)
@@ -1,3 +1,13 @@
+2011-10-21 Alexander Pavlov <[email protected]>
+
+ Web Inspector: Audits hang on pages without img[src] elements
+ https://bugs.webkit.org/show_bug.cgi?id=70604
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/audits/audits-panel-noimages-functional-expected.txt: Added.
+ * inspector/audits/audits-panel-noimages-functional.html: Added.
+
2011-10-24 Deepak Sherveghar <[email protected]>
[Qt] fast/events/media-focus-in-standalone-media-document.html fails
Added: trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional-expected.txt (0 => 98232)
--- trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional-expected.txt 2011-10-24 11:04:55 UTC (rev 98232)
@@ -0,0 +1,33 @@
+Tests audit rules on a page without images.
+Page reloaded.
+ Network Utilization
+ Combine external _javascript_ (4)
+ There are multiple resources served from same domain. Consider combining them into as few files as possible.
+ 4 _javascript_ resources served from [domain].
+ Web Page Performance
+ Optimize the order of styles and scripts (2)
+ The following external CSS files were included after an external _javascript_ file in the document head. To ensure CSS files are downloaded in parallel, always include external CSS before external _javascript_.
+ audits-style1.css
+ 1 inline script block was found in the head between an external CSS file and another resource. To allow parallel downloading, move the inline script before the external CSS file, or after the next resource.
+ Put CSS in the document head (2)
+ CSS in the document body adversely impacts rendering performance.
+ 1 style block(s) in the
+ audits-panel-noimages-functional.html
+ body should be moved to the document head.
+ Link node
+ audits-style1.css
+ should be moved to the document head in
+ audits-panel-noimages-functional.html
+ Remove unused CSS rules (4)
+ 141B (100%) of CSS is not used by the current page.
+ Inline block #1: 29B (100%) is not used by the current page.
+ .unused
+ audits-style1.css
+ : 43B (100%) is not used by the current page.
+ .some-style
+ Inline block #2: 26B (100%) is not used by the current page.
+ .violation
+ audits-style1.css
+ : 43B (100%) is not used by the current page.
+ .some-style
+
Property changes on: trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional.html (0 => 98232)
--- trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional.html (rev 0)
+++ trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional.html 2011-10-24 11:04:55 UTC (rev 98232)
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<style>
+.unused {
+ color: green;
+}
+</style>
+<script>
+JSON = {};
+</script>
+<script src=""
+<script src=""
+
+<!-- These scripts are needed to result in a violation of the max JS resource count from the same domain -->
+<script src=""
+<link rel="stylesheet" href="" type="text/css">
+<script src=""
+<script>
+var test = function()
+{
+ InspectorTest.reloadPage(step1);
+
+ function step1()
+ {
+ WebInspector.AuditRuleResult.resourceDomain = function() {
+ return "[domain]";
+ };
+
+ var launcherView = WebInspector.panels.audits._launcherView;
+ launcherView._selectAllClicked(true);
+ launcherView._auditPresentStateElement.checked = true;
+ launcherView._launchButtonClicked();
+
+ InspectorTest.runAfterPendingDispatches(step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.collectAuditResults();
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+Tests audit rules on a page without images.
+<style>
+.violation { color: red; }
+</style>
+<link rel="stylesheet" href="" type="text/css">
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/audits/audits-panel-noimages-functional.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (98231 => 98232)
--- trunk/Source/WebCore/ChangeLog 2011-10-24 10:29:26 UTC (rev 98231)
+++ trunk/Source/WebCore/ChangeLog 2011-10-24 11:04:55 UTC (rev 98232)
@@ -1,3 +1,15 @@
+2011-10-21 Alexander Pavlov <[email protected]>
+
+ Web Inspector: Audits hang on pages without img[src] elements
+ https://bugs.webkit.org/show_bug.cgi?id=70604
+
+ Reviewed by Pavel Feldman.
+
+ Test: inspector/audits/audits-panel-noimages-functional.html
+
+ * inspector/front-end/AuditRules.js:
+ (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun.getStyles):
+
2011-10-24 Deepak Sherveghar <[email protected]>
[Qt] fast/events/media-focus-in-standalone-media-document.html fails
Modified: trunk/Source/WebCore/inspector/front-end/AuditRules.js (98231 => 98232)
--- trunk/Source/WebCore/inspector/front-end/AuditRules.js 2011-10-24 10:29:26 UTC (rev 98231)
+++ trunk/Source/WebCore/inspector/front-end/AuditRules.js 2011-10-24 11:04:55 UTC (rev 98232)
@@ -744,6 +744,8 @@
function getStyles(nodeIds)
{
+ if (!nodeIds || !nodeIds.length)
+ doneCallback();
for (var i = 0; nodeIds && i < nodeIds.length; ++i)
WebInspector.cssModel.getStylesAsync(nodeIds[i], undefined, imageStylesReady.bind(this, nodeIds[i], i === nodeIds.length - 1));
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes