Bug 31587

Summary: Web Inspector: "Error dispatching: getStyles" message if IFRAME is from external domain
Product: WebKit Reporter: Daniel Fazekas <fds>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://web.t-online.hu/fdsoft/iframe/
Bug Depends on: 32554    
Bug Blocks:    
Attachments:
Description Flags
layout test for the issue
pfeldman: review-
patch pfeldman: review+

Daniel Fazekas
Reported 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
Attachments
layout test for the issue (7.30 KB, patch)
2010-02-11 08:39 PST, Yury Semikhatsky
pfeldman: review-
patch (26.30 KB, patch)
2010-02-11 10:35 PST, Yury Semikhatsky
pfeldman: review+
Pavel Feldman
Comment 1 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.
Yury Semikhatsky
Comment 2 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.
Pavel Feldman
Comment 3 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.
Yury Semikhatsky
Comment 4 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?
Yury Semikhatsky
Comment 5 2010-02-11 10:35:26 PST
Created attachment 48581 [details] patch Addressed all comments.
Yury Semikhatsky
Comment 6 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
Daniel Bates
Comment 7 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.
Note You need to log in before you can comment on or make changes to this bug.