Bug 92437

Summary: Web Inspector: Allow front_end to be loaded into an iframe
Product: WebKit Reporter: johnjbarton <johnjbarton>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Description johnjbarton 2012-07-26 16:31:22 PDT
One of the wonderful aspects of WebInspector is its use of 100% Web technology. I have leverage this aspect to embed WebInspector in a Web app and in a Chrome browser extension. I was able to hook the load sequence of the code to adapt the WebInspector to alternative backend connections (chrome.debugger API and WebSockets without using the built-in instance).

The only small problem I hit was in loading extensions: the postMessage system uses 'top' in two places, but when embedded the WebInspector will not be 'top'.  By replacing these uses with 'window.parent' the WebInspector is iframeable.
Comment 1 johnjbarton 2012-07-26 16:53:08 PDT
Created attachment 154791 [details]
Patch
Comment 2 Pavel Feldman 2012-07-26 22:16:15 PDT
Comment on attachment 154791 [details]
Patch

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

Please resubmit with proper changle log so that I could CQ+ it

> Source/WebCore/ChangeLog:8
> +        Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!).

Remove this line
Comment 3 johnjbarton 2012-07-27 10:42:53 PDT
Created attachment 154986 [details]
Patch
Comment 4 johnjbarton 2012-07-27 10:45:45 PDT
Note I changed the patch to catch one more "top." over in Source/WebKit/chromium. I think this change would only help if embedders can figure out how to use unmodified devtools extensions, but I added it to be consistent with the other changes.
Comment 5 WebKit Review Bot 2012-07-27 12:03:03 PDT
Comment on attachment 154986 [details]
Patch

Clearing flags on attachment: 154986

Committed r123902: <http://trac.webkit.org/changeset/123902>
Comment 6 WebKit Review Bot 2012-07-27 12:03:07 PDT
All reviewed patches have been landed.  Closing bug.