[Webkit-unassigned] [Bug 51159] [Qt] Permit qrc resources to load in QWebSettings::setUserStyleSheetUrl()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 13 11:54:23 PDT 2011


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


Kenneth Rohde Christiansen <kenneth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #107204|review?                     |review+
               Flag|                            |




--- Comment #22 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2011-09-13 11:54:23 PST ---
(From update of attachment 107204)
View in context: https://bugs.webkit.org/attachment.cgi?id=107204&action=review

> Source/WebCore/page/Page.cpp:689
> +    // Allow any local file URL scheme to be loaded.
> +    if (SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol()))

I wonder if this should be a separate change with tests? Especially since it is in shared code

> Source/WebCore/platform/qt/KURLQt.cpp:54
> +    if (isValid()) {
> +        if (isLocalFile())
> +            return static_cast<QUrl>(*this).toLocalFile();
> +            
> +        // A valid qrc resource path begins with a colon.
> +        if (protocolIs("qrc"))
> +            return ":" + path();
> +    }

We generally try avoiding indentation when possible. So what about

if (!isValid)
    return String();

-- 
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