WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
162387
REGRESSION(
r206165
): [GTK] Web inspector broken since
r206165
https://bugs.webkit.org/show_bug.cgi?id=162387
Summary
REGRESSION(r206165): [GTK] Web inspector broken since r206165
Carlos Garcia Campos
Reported
2016-09-22 06:31:23 PDT
Web inspector no longer works after
r206165
because it fails to load all resources with messages like: CONSOLE ERROR Refused to load resource:///org/webkitgtk/inspector/UserInterface/External/CodeMirror/codemirror.css because it does not appear in the style-src directive of the Content Security Policy. CONSOLE ERROR Refused to load resource:///org/webkitgtk/inspector/UserInterface/External/CodeMirror/codemirror.js because it does not appear in the script-src directive of the Content Security Policy. Adding resource: to style-src or script-src doesn't work, resources are indeed loaded, but then it fails with: resource:///org/webkitgtk/inspector/UserInterface/Base/Setting.js:61:44: CONSOLE ERROR SecurityError (DOM Exception 18): The operation is insecure. resource:///org/webkitgtk/inspector/UserInterface/Main.html:1:21: CONSOLE ERROR ReferenceError: Can't find variable: InspectorFrontendAPI Because since
r206165
resource scheme is considered as unique origin. Simply including resource in the list of schemes checked in shouldTreatAsUniqueOrigin() would fix it, but I'm not sure it's really correct, because that's supposed to be the list of special schemes according to the spec (
https://url.spec.whatwg.org/#origin
).
Attachments
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-09-22 13:27:45 PDT
(In reply to
comment #0
)
> Simply including resource in the list of schemes checked in shouldTreatAsUniqueOrigin() would fix it, but I'm not sure it's really correct.
That would indeed not be correct. Why are these not file urls?
Michael Catanzaro
Comment 2
2016-09-22 13:44:38 PDT
(In reply to
comment #1
)
> That would indeed not be correct. Why are these not file urls?
With GResources, the files get bundled into the ELF executable by glib-compile-resources so that we can do fast sync I/O without error checking, and don't have to worry about users messing with or removing the files. It's the best practice for distributing data files on our platform. See
https://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/
Alex Christensen
Comment 3
2016-09-22 17:56:55 PDT
There are more problems similar to this. I think the correct solution is using
https://bugs.webkit.org/show_bug.cgi?id=162475
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug