Bug 111578 - Web Inspector: split Console into two entities, a web-facing bound object and page console.
Summary: Web Inspector: split Console into two entities, a web-facing bound object and...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Sergey Ryazanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 07:10 PST by Pavel Feldman
Modified: 2013-03-19 09:42 PDT (History)
24 users (show)

See Also:


Attachments
Patch (41.81 KB, patch)
2013-03-06 08:52 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (42.96 KB, patch)
2013-03-06 10:30 PST, Pavel Feldman
no flags Details | Formatted Diff | Diff
Patch (41.40 KB, patch)
2013-03-14 11:01 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (41.40 KB, patch)
2013-03-15 01:40 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (41.42 KB, patch)
2013-03-15 02:26 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (43.64 KB, patch)
2013-03-15 03:53 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (46.17 KB, patch)
2013-03-15 05:19 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (47.69 KB, patch)
2013-03-16 02:03 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (47.97 KB, patch)
2013-03-16 15:30 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (48.41 KB, patch)
2013-03-18 23:38 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (48.41 KB, patch)
2013-03-19 00:19 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (48.21 KB, patch)
2013-03-19 04:45 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (48.25 KB, patch)
2013-03-19 05:56 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff
Patch (48.11 KB, patch)
2013-03-19 08:13 PDT, Sergey Ryazanov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2013-03-06 07:10:14 PST
Otherwise, a lot of logging in WebCore needs to go through the DOMWindow which is unnecessary.
Comment 1 Pavel Feldman 2013-03-06 08:52:34 PST
Created attachment 191760 [details]
Patch
Comment 2 Early Warning System Bot 2013-03-06 09:05:32 PST
Comment on attachment 191760 [details]
Patch

Attachment 191760 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17045262
Comment 3 Build Bot 2013-03-06 09:16:37 PST
Comment on attachment 191760 [details]
Patch

Attachment 191760 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17086053
Comment 4 Early Warning System Bot 2013-03-06 09:18:26 PST
Comment on attachment 191760 [details]
Patch

Attachment 191760 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/16991311
Comment 5 EFL EWS Bot 2013-03-06 09:28:09 PST
Comment on attachment 191760 [details]
Patch

Attachment 191760 [details] did not pass efl-ews (efl):
Output: http://webkit-commit-queue.appspot.com/results/17082223
Comment 6 WebKit Review Bot 2013-03-06 09:49:50 PST
Comment on attachment 191760 [details]
Patch

Attachment 191760 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17073145

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 7 Pavel Feldman 2013-03-06 10:30:46 PST
Created attachment 191786 [details]
Patch
Comment 8 Build Bot 2013-03-06 11:15:38 PST
Comment on attachment 191786 [details]
Patch

Attachment 191786 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/16991356
Comment 9 Sergey Ryazanov 2013-03-14 11:01:04 PDT
Created attachment 193152 [details]
Patch
Comment 10 Early Warning System Bot 2013-03-14 11:11:52 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17189511
Comment 11 Early Warning System Bot 2013-03-14 11:19:48 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17129205
Comment 12 Build Bot 2013-03-14 11:44:14 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass win-ews (win):
Output: http://webkit-commit-queue.appspot.com/results/17041605
Comment 13 WebKit Review Bot 2013-03-14 12:20:36 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/16996290

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 14 Build Bot 2013-03-14 12:29:26 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17126439
Comment 15 Build Bot 2013-03-14 12:32:26 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17186187
Comment 16 EFL EWS Bot 2013-03-14 12:51:32 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass efl-ews (efl):
Output: http://webkit-commit-queue.appspot.com/results/16997832
Comment 17 WebKit Review Bot 2013-03-14 13:18:55 PDT
Comment on attachment 193152 [details]
Patch

Attachment 193152 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17176167

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 18 Sergey Ryazanov 2013-03-15 01:40:10 PDT
Created attachment 193259 [details]
Patch
Comment 19 Early Warning System Bot 2013-03-15 01:53:45 PDT
Comment on attachment 193259 [details]
Patch

Attachment 193259 [details] did not pass qt-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17215140
Comment 20 Early Warning System Bot 2013-03-15 01:56:44 PDT
Comment on attachment 193259 [details]
Patch

Attachment 193259 [details] did not pass qt-wk2-ews (qt):
Output: http://webkit-commit-queue.appspot.com/results/17116304
Comment 21 EFL EWS Bot 2013-03-15 02:05:15 PDT
Comment on attachment 193259 [details]
Patch

Attachment 193259 [details] did not pass efl-ews (efl):
Output: http://webkit-commit-queue.appspot.com/results/17210250
Comment 22 Build Bot 2013-03-15 02:19:26 PDT
Comment on attachment 193259 [details]
Patch

Attachment 193259 [details] did not pass win-ews (win):
Output: http://webkit-commit-queue.appspot.com/results/17055662
Comment 23 Sergey Ryazanov 2013-03-15 02:26:34 PDT
Created attachment 193261 [details]
Patch
Comment 24 WebKit Review Bot 2013-03-15 03:35:41 PDT
Comment on attachment 193261 [details]
Patch

Attachment 193261 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17060887

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 25 Sergey Ryazanov 2013-03-15 03:53:07 PDT
Created attachment 193275 [details]
Patch
Comment 26 Mike West 2013-03-15 04:05:16 PDT
Comment on attachment 193275 [details]
Patch

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

> Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp:82
> +            if (console)

Nit: I believe the accepted WebKit style here would be to inline the assignment. That is `if (PageConsole* console = m_globalObject->impl()->pageConsole())`.

> Source/WebCore/dom/Document.cpp:4819
> +    if (p)

Nit: Inline the assignment, and prefer complete words for variable names: 'page' rather than 'p'.

> Source/WebCore/dom/Document.cpp:4831
> +    if (p)

Nit: Same as above.

> Source/WebCore/page/DOMWindow.h:236
>          Console* console() const;

Do we still need access to the Console from DOMWindow, or will PageConsole fill the external requirements? It would be nice if external callers only had one option; otherwise they'll likely make the wrong choice. If possible, I'd suggest removing DOMWindow::console, or making it private.
Comment 27 Build Bot 2013-03-15 04:42:52 PDT
Comment on attachment 193275 [details]
Patch

Attachment 193275 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17060918
Comment 28 WebKit Review Bot 2013-03-15 04:43:19 PDT
Comment on attachment 193275 [details]
Patch

Attachment 193275 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17145279

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 29 Sergey Ryazanov 2013-03-15 05:19:17 PDT
Created attachment 193285 [details]
Patch
Comment 30 WebKit Review Bot 2013-03-15 06:10:02 PDT
Comment on attachment 193285 [details]
Patch

Attachment 193285 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17207241

New failing tests:
fast/xsl/xslt-mismatched-tags-in-xslt.xml
fast/xsl/xslt-missing-namespace-in-xslt.xml
Comment 31 Build Bot 2013-03-15 06:41:12 PDT
Comment on attachment 193285 [details]
Patch

Attachment 193285 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17187261
Comment 32 Build Bot 2013-03-15 07:18:27 PDT
Comment on attachment 193285 [details]
Patch

Attachment 193285 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17165234
Comment 33 Build Bot 2013-03-15 09:50:56 PDT
Comment on attachment 193285 [details]
Patch

Attachment 193285 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17156719
Comment 34 Sergey Ryazanov 2013-03-16 02:03:40 PDT
Created attachment 193432 [details]
Patch
Comment 35 Sergey Ryazanov 2013-03-16 15:30:49 PDT
Created attachment 193448 [details]
Patch
Comment 36 Vsevolod Vlasov 2013-03-18 06:46:23 PDT
Comment on attachment 193448 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        No new tests (OOPS!).

Please remove this line, otherwise commit queue won't let you commit the patch.

> Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp:-80
> -            // FIXME: Pass actual line number and source URL.

Please keep FIXME here.

> Source/WebCore/dom/Document.cpp:127
> +#include "PageConsole.h"

Do we still need to include Console.h here?

> Source/WebCore/dom/Document.cpp:4848
> +    Page* p = page();

Page* page = ...

> Source/WebCore/dom/Document.cpp:4861
> +    if (p)

Ditto

> Source/WebCore/page/Console.h:81
>      static void mute();

Should be removed.

> Source/WebCore/page/Console.h:82
>      static void unmute();

Ditto

> Source/WebCore/page/Console.h:-99
> -    inline Page* page() const;

Why did you remove this?

> Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:27
>  #include "DOMWindow.h"

Could be removed now.

> Source/WebCore/xml/XSLTProcessorLibxslt.cpp:30
>  #include "DOMWindow.h"

Could be removed now.
Comment 37 Sergey Ryazanov 2013-03-18 23:38:10 PDT
Created attachment 193743 [details]
Patch
Comment 38 Vsevolod Vlasov 2013-03-18 23:53:32 PDT
Comment on attachment 193743 [details]
Patch

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

> Source/WebCore/WebCore.vcxproj/WebCore.vcxproj:13641
>  \ No newline at end of file

I am not sure if newline is expected here. Please revert this change.

> Source/WebCore/dom/Document.cpp:4847
> +    if (page())

if (Page* page = page())
    page->console()->addMessage(source, level, message, requestIdentifier, this);

> Source/WebCore/dom/Document.cpp:4858
> +    if (page())

Ditto

> Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:27
>  #include "DOMWindow.h"

I still think you don't need to include DOMWindow.h here.

> Source/WebCore/xml/XSLTProcessorLibxslt.cpp:30
>  #include "DOMWindow.h"

Ditto
Comment 39 Sergey Ryazanov 2013-03-19 00:19:01 PDT
Created attachment 193750 [details]
Patch
Comment 40 Sergey Ryazanov 2013-03-19 04:45:47 PDT
Created attachment 193791 [details]
Patch
Comment 41 Sergey Ryazanov 2013-03-19 04:50:12 PDT
Comment on attachment 193743 [details]
Patch

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

>> Source/WebCore/WebCore.vcxproj/WebCore.vcxproj:13641
>>  \ No newline at end of file
> 
> I am not sure if newline is expected here. Please revert this change.

done

>> Source/WebCore/dom/Document.cpp:4847
>> +    if (page())
> 
> if (Page* page = page())
>     page->console()->addMessage(source, level, message, requestIdentifier, this);

It is not valid C++ code. 'page' on the both sides of the expressions refer to the same variable. It is a pointer and the () operation is not applicable to it.

>> Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:27
>>  #include "DOMWindow.h"
> 
> I still think you don't need to include DOMWindow.h here.

done

>> Source/WebCore/xml/XSLTProcessorLibxslt.cpp:30
>>  #include "DOMWindow.h"
> 
> Ditto

done
Comment 42 Sergey Ryazanov 2013-03-19 05:56:25 PDT
Created attachment 193804 [details]
Patch
Comment 43 Sergey Ryazanov 2013-03-19 08:13:14 PDT
Created attachment 193833 [details]
Patch
Comment 44 WebKit Review Bot 2013-03-19 08:56:36 PDT
Comment on attachment 193833 [details]
Patch

Clearing flags on attachment: 193833

Committed r146208: <http://trac.webkit.org/changeset/146208>
Comment 45 WebKit Review Bot 2013-03-19 08:56:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 46 Vsevolod Vlasov 2013-03-19 09:42:15 PDT
Comment on attachment 193743 [details]
Patch

Clearing obsolete r?