[Webkit-unassigned] [Bug 114854] Web Inspector: Backend should detect sourceMappingURLs in CSS Resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 19 06:43:15 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=114854





--- Comment #3 from Timothy Hatcher <timothy at apple.com>  2013-04-19 06:41:33 PST ---
(From update of attachment 198808)
View in context: https://bugs.webkit.org/attachment.cgi?id=198808&action=review

Looks good otherwise.

> Source/WebCore/inspector/Inspector.json:947
>              {
> +                "id": "ExtraResourceInfo",
> +                "type": "object",
> +                "description": "Extra data extracted from a resource after it has completed loading.",
> +                "properties": [
> +                    { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." }
> +                ]
> +            },

I'm not sure ExtraResourceInfo helps much. What might we use it for later? If we keep it then FrameResourceTree should likely use it too. Otherwise everyone should just report sourceMapURL directly.

I suspect you want this to make it more compatible in the future to collect optional parameters. Instead maybe we should start using Safari's InspectorBackend "expectsResultObject" flag for more/all callbacks, which is good when there are a lot of optional parameters and for compatibility reasons.

>> Source/WebCore/inspector/InspectorPageAgent.cpp:270
>> +//static
> 
> Should have a space between // and comment  [whitespace/comments] [4]

I'd just drop the comment.

> Source/WebCore/inspector/InspectorPageAgent.cpp:273
> +    DEFINE_STATIC_LOCAL(String, sourceMapHttpHeader, (ASCIILiteral("X-SourceMap")));

HTTP

> Source/WebCore/inspector/InspectorPageAgent.cpp:280
> +    // Scripts are handled in a separate path.
> +
> +    if (cachedResource->type() != CachedResource::CSSStyleSheet)

Remove blank line.

> Source/WebCore/inspector/InspectorPageAgent.cpp:292
> +        String sourceMapURL = ContentSearchUtils::findStylesheetSourceMapURL(content);
> +        if (!sourceMapURL.isEmpty())
> +            return sourceMapURL;

Can't you just return ContentSearchUtils::findStylesheetSourceMapURL(content)?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list