Bug 64596

Summary: Web Inspector: arrays in object properties sections do not scale.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, apavlov, bweinstein, cc-bugs, cgarcia, dglazkov, gns, jamesr, japhet, joepeck, keishi, levin+threading, loislo, macpherson, menard, ojan, pfeldman, pmuellr, rakuco, rik, timothy, vsevik, webkit.review.bot, yurys, zoltan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ec2-cr-linux-03
none
Patch
none
[IMAGE] Looks with patch applied.
none
Patch
none
Patch vsevik: review+

Description Pavel Feldman 2011-07-15 06:42:16 PDT
Patch to follow.
Comment 1 Pavel Feldman 2011-07-15 06:43:36 PDT
Created attachment 100968 [details]
Patch
Comment 2 WebKit Review Bot 2011-07-15 07:01:35 PDT
Comment on attachment 100968 [details]
Patch

Attachment 100968 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/9094260

New failing tests:
inspector/elements/event-listener-sidebar.html
inspector/debugger/error-in-watch-expressions.html
Comment 3 WebKit Review Bot 2011-07-15 07:01:41 PDT
Created attachment 100971 [details]
Archive of layout-test-results from ec2-cr-linux-03

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-03  Port: Chromium  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 4 Yury Semikhatsky 2011-07-15 08:10:17 PDT
Comment on attachment 100968 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=100968&action=review

Let's make sure that it works for object property section as well, r- for now.

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:81
> +        var expandableArrayThreashold = 100;

typo: threashold -> threshold

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:90
> +                if (index >= 0 && (index < minIndex || minIndex == -1))

if -> else if? 
== -> ===
Comment 5 Pavel Feldman 2011-07-22 06:55:16 PDT
Created attachment 101725 [details]
Patch
Comment 6 Pavel Feldman 2011-07-22 07:25:23 PDT
Created attachment 101729 [details]
[IMAGE] Looks with patch applied.
Comment 7 Yury Semikhatsky 2011-07-25 06:07:36 PDT
Comment on attachment 101725 [details]
Patch

Array UI is not properly updated after editing array value. r- for this.
Comment 8 Pavel Feldman 2012-03-01 05:32:33 PST
*** Bug 80021 has been marked as a duplicate of this bug. ***
Comment 9 Pavel Feldman 2012-03-01 06:13:51 PST
Created attachment 129694 [details]
Patch
Comment 10 WebKit Review Bot 2012-03-01 06:21:26 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 11 WebKit Review Bot 2012-03-01 06:22:43 PST
Attachment 129694 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'ChangeLog', u'LayoutTests/ChangeLog', u'La..." exit_code: 1
WARNING: File exempt from style guide. Skipping: "Source/WebKit2/UIProcess/API/gtk/WebKitDefines.h"
Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:71:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 1 in 186 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Vsevolod Vlasov 2012-03-01 07:55:31 PST
Comment on attachment 129694 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=129694&action=review

Looks like this needs a test.

> Source/WebCore/inspector/front-end/ConsoleMessage.js:291
> +        if (array.arrayLength() > 100)

Maybe use const?

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:382
> +    TreeElement.call(this, "[" + this._properties[fromIndex].name + " \u2026 " + this._properties[toIndex - 1].name + "]", null, true);

var title = fromIndex === toIndex - 1 ? "[" + this._properties[fromIndex].name + " \u2026 " + this._properties[toIndex - 1].name + "]" : this._properties[fromIndex].name;
TreeElement.call(this, title, null, true);

> Source/WebCore/inspector/front-end/ObjectPropertiesSection.js:404
> +        treeElement._readOnly = true; 

So we can not edit any array shown as dir(array) even if it shorter than 20 elements?

> Source/WebCore/inspector/front-end/RemoteObject.js:313
> +        return parseInt(this._description.match(/[0-9]+/), 10);

Maybe
var matches = this._description.match(/\[([0-9]+)\]/))
return parseInt(matches[1], 10);
would be better?
Comment 13 Pavel Feldman 2012-03-01 09:07:20 PST
Created attachment 129713 [details]
Patch
Comment 14 Vsevolod Vlasov 2012-06-29 00:10:28 PDT
This was landed as r109372