Title: [185886] trunk/Source/WebInspectorUI
- Revision
- 185886
- Author
- commit-qu...@webkit.org
- Date
- 2015-06-23 15:09:05 -0700 (Tue, 23 Jun 2015)
Log Message
Web Inspector: Some brief previews are incorrectly treated as lossless
https://bugs.webkit.org/show_bug.cgi?id=146247
Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-06-23
Reviewed by Timothy Hatcher.
* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
When we have a brief preview we may need to override lossless / overflow
if the preview view itself shows less properties than were in the preview.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (185885 => 185886)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-06-23 22:02:34 UTC (rev 185885)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-06-23 22:09:05 UTC (rev 185886)
@@ -1,3 +1,16 @@
+2015-06-23 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Some brief previews are incorrectly treated as lossless
+ https://bugs.webkit.org/show_bug.cgi?id=146247
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/ObjectPreviewView.js:
+ (WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
+ (WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):
+ When we have a brief preview we may need to override lossless / overflow
+ if the preview view itself shows less properties than were in the preview.
+
2015-06-23 Matt Baker <mattba...@apple.com>
Web Inspector: Layout & Rendering timeline should show paint and layout records in separate rows
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js (185885 => 185886)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-06-23 22:02:34 UTC (rev 185885)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ObjectPreviewView.js 2015-06-23 22:09:05 UTC (rev 185886)
@@ -148,6 +148,7 @@
_appendEntryPreviews(element, preview)
{
var lossless = preview.lossless && !preview.propertyPreviews.length;
+ var overflow = preview.overflow;
var isIterator = preview.subtype === "iterator";
@@ -171,7 +172,12 @@
lossless = false;
}
- if (preview.overflow)
+ if (preview.collectionEntryPreviews.length > limit) {
+ lossless = false;
+ overflow = true;
+ }
+
+ if (overflow)
element.appendChild(document.createTextNode(", \u2026"));
element.appendChild(document.createTextNode(isIterator ? "]" : "}"));
@@ -188,6 +194,9 @@
if (preview.subtype === "date")
return !preview.propertyPreviews.length;
+ var lossless = preview.lossless;
+ var overflow = preview.overflow;
+
// FIXME: Array previews should have better sparse support: (undefined × 10).
var isArray = preview.subtype === "array";
@@ -224,12 +233,16 @@
element.appendChild(WebInspector.FormattedValue.createElementForPropertyPreview(property));
}
- if (preview.overflow)
+ if (numberAdded === limit && preview.propertyPreviews.length > limit) {
+ lossless = false;
+ overflow = true;
+ }
+
+ if (overflow)
element.appendChild(document.createTextNode(", \u2026"));
-
element.appendChild(document.createTextNode(isArray ? "]" : "}"));
- return preview.lossless;
+ return lossless;
}
_appendValuePreview(element, preview)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes