Bug 92437 - Web Inspector: Allow front_end to be loaded into an iframe
Summary: Web Inspector: Allow front_end to be loaded into an iframe
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-26 16:31 PDT by johnjbarton
Modified: 2012-07-27 12:03 PDT (History)
11 users (show)

See Also:


Attachments
Patch (2.43 KB, patch)
2012-07-26 16:53 PDT, johnjbarton
no flags Details | Formatted Diff | Diff
Patch (3.21 KB, patch)
2012-07-27 10:42 PDT, johnjbarton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.