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
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.
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 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.
(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?
Created attachment 48581 [details] patch Addressed all comments.
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 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.