Bug 20210 - Console groups are incorrect when closing and reopening the Inspector
: Console groups are incorrect when closing and reopening the Inspector
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P1 Critical
Assigned To: Keishi Hattori
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-29 11:15 PDT by Timothy Hatcher
Modified: 2008-08-15 10:48 PDT (History)
2 users (show)

See Also:


Attachments
Expected Results (3.05 KB, image/png)
2008-07-29 11:15 PDT, Timothy Hatcher
no flags Details
Actual Results (2.73 KB, image/png)
2008-07-29 11:19 PDT, Timothy Hatcher
no flags Details
Test Case (263 bytes, text/html)
2008-07-29 11:19 PDT, Timothy Hatcher
no flags Details
patch (8.73 KB, patch)
2008-08-11 06:18 PDT, Keishi Hattori
timothy: review-
Details | Formatted Diff | Diff
removed commented out code (7.55 KB, patch)
2008-08-14 08:44 PDT, Keishi Hattori
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2008-07-29 11:15:02 PDT
When closing and reopening the inspector the console groups are messed up and in the wrong order and logs are lumped into the last group. See the attached screenshot and test.

Steps:
1) Load the test case.
2) Open the inspector's console.

Results:
Notice the order of the groups does not match the file.

Reloading the page while the inspector is open gives the correct results.
Comment 1 Timothy Hatcher 2008-07-29 11:15:44 PDT
Created attachment 22539 [details]
Expected Results
Comment 2 Timothy Hatcher 2008-07-29 11:19:01 PDT
Created attachment 22540 [details]
Actual Results
Comment 3 Timothy Hatcher 2008-07-29 11:19:23 PDT
Created attachment 22541 [details]
Test Case
Comment 4 Timothy Hatcher 2008-07-29 11:20:08 PDT
Also in the messed up state, expanding/collapsing one of the top level groups, toggles all of the groups in that level, not just the clicked one.
Comment 5 Keishi Hattori 2008-08-11 06:18:10 PDT
Created attachment 22726 [details]
patch

I forgot to test for this in the way. This fixes the issue. I realized you can't properly do this without recording where the group ended, so now there's StartGroup and EndGroup message levels.
Comment 6 Timothy Hatcher 2008-08-13 00:28:42 PDT
Comment on attachment 22726 [details]
patch

Better ChangeLog!

The patch seems technically correct, but there are some style issues.

+    //if (arguments.isEmpty())
+    //    addConsoleMessage(new ConsoleMessage(source, StartGroupMessageLevel, exec, String(), lineNumber, sourceURL, m_groupLevel));
+    //else

We don't comment out code. Just remove it.

Attach a new patch that removes this and i'll r+ it.
Comment 7 Keishi Hattori 2008-08-14 08:44:36 PDT
Created attachment 22793 [details]
removed commented out code
Comment 8 Timothy Hatcher 2008-08-15 10:48:57 PDT
Landed in r35788.