Bug 31587 - Web Inspector: "Error dispatching: getStyles" message if IFRAME is from external domain
Summary: Web Inspector: "Error dispatching: getStyles" message if IFRAME is from exter...
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: Yury Semikhatsky
URL: http://web.t-online.hu/fdsoft/iframe/
Keywords:
Depends on: 32554
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-17 07:56 PST by Daniel Fazekas
Modified: 2010-03-24 14:00 PDT (History)
8 users (show)

See Also:


Attachments
layout test for the issue (7.30 KB, patch)
2010-02-11 08:39 PST, Yury Semikhatsky
pfeldman: review-
Details | Formatted Diff | Diff
patch (26.30 KB, patch)
2010-02-11 10:35 PST, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Fazekas 2009-11-17 07:56:51 PST
If you try to inspect elements located inside an IFRAME that was loaded from a different domain, not satisfying the same origin policy, Web Inpector in recent WebKit nightly builds cannot show style information. Works in Safari 4.0.4.

Load the test page at:
http://web.t-online.hu/fdsoft/iframe/

Then try to inspect the blue text on yellow background.

WebKit nightlies no longer can show the proper colors and instead show these error messages in the console:
Error dispatching: getStyles
Error dispatching: getComputedStyle
Comment 1 Pavel Feldman 2009-12-04 12:05:29 PST
Yury is working on fixing this. The fix is complex and large, involving creating an injected script instance (and utility context/global object) per frame on the InspectorController side.
Comment 2 Yury Semikhatsky 2010-02-11 08:39:00 PST
Created attachment 48566 [details]
layout test for the issue

The issues has been fix as part of 32554. Here is a layout test for it.
Comment 3 Pavel Feldman 2010-02-11 09:37:20 PST
Comment on attachment 48566 [details]
layout test for the issue

We need to check if it passes on all platforms first (and potentially skip it on some).
Copying file is not good, can we reference new one from LayoutTests/inspector instead? (via ../http/inspector/). r- until you convince me it is not feasible.
Comment 4 Yury Semikhatsky 2010-02-11 09:54:49 PST
(In reply to comment #3)
> (From update of attachment 48566 [details])
> We need to check if it passes on all platforms first (and potentially skip it
> on some).
> Copying file is not good, can we reference new one from LayoutTests/inspector
> instead? (via ../http/inspector/). r- until you convince me it is not feasible.
I don't know how we can create a reference from LayoutTests/http/tests/inspector to files from LayoutTests/inspector. I suppose that symlinks are not supported by svn, is it the case?
Comment 5 Yury Semikhatsky 2010-02-11 10:35:26 PST
Created attachment 48581 [details]
patch

Addressed all comments.
Comment 6 Yury Semikhatsky 2010-02-11 10:56:16 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	R	LayoutTests/inspector/inspector-test.js => LayoutTests/http/tests/inspector/inspector-test.js
	M	LayoutTests/ChangeLog
	A	LayoutTests/http/tests/inspector/inspect-iframe-from-different-domain-expected.txt
	A	LayoutTests/http/tests/inspector/inspect-iframe-from-different-domain.html
	A	LayoutTests/http/tests/inspector/resources/iframe-from-different-domain-data.html
	M	LayoutTests/inspector/console-clear.html
	M	LayoutTests/inspector/console-dir.html
	M	LayoutTests/inspector/console-dirxml.html
	M	LayoutTests/inspector/console-format-collections-expected.txt
	M	LayoutTests/inspector/console-format-collections.html
	M	LayoutTests/inspector/console-format.html
	M	LayoutTests/inspector/console-log-before-inspector-open.html
	M	LayoutTests/inspector/console-tests.html
	M	LayoutTests/inspector/cookie-resource-match.html
	M	LayoutTests/inspector/elements-img-tooltip.html
	M	LayoutTests/inspector/elements-panel-rewrite-href-expected.txt
	M	LayoutTests/inspector/elements-panel-rewrite-href.html
	M	LayoutTests/inspector/elements-panel-selection-on-refresh.html
	M	LayoutTests/inspector/elements-panel-structure.html
	M	LayoutTests/inspector/evaluate-in-frontend.html
	M	LayoutTests/inspector/inspected-objects-not-overriden.html
	M	LayoutTests/inspector/styles-iframe.html
	M	LayoutTests/inspector/syntax-highlight-css.html
	M	LayoutTests/inspector/syntax-highlight-javascript.html
	M	LayoutTests/inspector/timeline-enum-stability.html
	M	LayoutTests/inspector/timeline-event-dispatch.html
	M	LayoutTests/inspector/timeline-layout.html
	M	LayoutTests/inspector/timeline-mark-timeline.html
	M	LayoutTests/inspector/timeline-network-resource.html
	M	LayoutTests/inspector/timeline-paint.html
	M	LayoutTests/inspector/timeline-parse-html.html
	M	LayoutTests/inspector/timeline-recalculate-styles.html
	M	LayoutTests/inspector/timeline-script-tag-1.html
	M	LayoutTests/inspector/timeline-script-tag-2.html
	M	LayoutTests/inspector/timeline-trivial.html
	M	LayoutTests/platform/qt/Skipped
Committed r54659
Comment 7 Daniel Bates 2010-03-24 14:00:49 PDT
Comment on attachment 48581 [details]
patch

Clearing commit-queue flag to get this patch out of the commit queue listing since it has already been committed.