Skip to content
  • achicu@adobe.com's avatar
    Web Inspector: It should be possible to debug the Inspector code · 6fc29267
    achicu@adobe.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124065
    
    Reviewed by Timothy Hatcher.
    
    Source/WebKit2:
    
    When the script is paused, the debugger will pause all the pages in the same PageGroup.
    All the Inspector windows were created in the same PageGroup, so pausing one debugger
    would stop the other too.
    
    Added WebInspectorPageGroups to manage the PageGroups created for the Inspectors.
    The WebInspectors will now use the inspection "level" to figure out which PageGroup to use.
    The inspector that debugs the main page will use "__WebInspectorPageGroupLevel1__",
    the second inspector (that debugs the first inspector) will use "__WebInspectorPageGroupLevel2__" ...
    
    * UIProcess/WebInspectorProxy.cpp:
    (WebKit::WebInspectorPageGroups::shared):
    (WebKit::WebInspectorPageGroups::inspectorLevel):
    (WebKit::WebInspectorPageGroups::isInspectorPageGroup):
    (WebKit::WebInspectorPageGroups::inspectorPageGroupLevel):
    (WebKit::WebInspectorPageGroups::inspectorPageGroupForLevel):
    (WebKit::WebInspectorPageGroups::createInspectorPageGroup):
    (WebKit::WebInspectorProxy::WebInspectorProxy):
    (WebKit::WebInspectorProxy::inspectorPageGroup):
    (WebKit::WebInspectorProxy::isInspectorPage):
    (WebKit::WebInspectorProxy::canAttach):
    * UIProcess/WebInspectorProxy.h:
    
    LayoutTests:
    
    Added test to check that a second inspector window can be used to debug the first one.
    
    * inspector-protocol/debugger/nested-inspectors-expected.txt: Added.
    * inspector-protocol/debugger/nested-inspectors.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6fc29267