2011-02-14 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Feb 2011 20:48:12 +0000 (20:48 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Feb 2011 20:48:12 +0000 (20:48 +0000)
commite30b54c46bbf92b3fe6fb9855da5ef35eda14f67
tree52a425eb2183d05d36000310ff55bb0e8370d247
parent3635a86d3ab42721e2c98316ab9ce1def9fec54f
2011-02-14  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Add basic parser for Content Security Policy
        https://bugs.webkit.org/show_bug.cgi?id=54379

        Add a constructor for copying a Vector into a String.  I suspect there
        are a number of call sites that are doing this manually that would
        benefit from being moved to this API.

        * wtf/text/WTFString.h:
        (WTF::String::String):
2011-02-14  Adam Barth  <abarth@webkit.org>

        Reviewed by Eric Seidel.

        Add basic parser for Content Security Policy
        https://bugs.webkit.org/show_bug.cgi?id=54379

        The parser in this patch is very basic.  It just segments the CSP
        header into directives.  The exactly syntax will likely change a bit as
        we discuss the details in public-web-security, but this parser will
        allow us to make progress.

        Sadly, this patch does not contain any tests.  That's because CSP
        policies do not have any observable effects yet.  Hopefully we'll get
        enough sketched out in the next couple patches to begin writing tests.

        * page/ContentSecurityPolicy.cpp:
        (WebCore::CSPDirective::CSPDirective):
        (WebCore::CSPDirective::name):
        (WebCore::CSPDirective::value):
        (WebCore::ContentSecurityPolicy::~ContentSecurityPolicy):
        (WebCore::ContentSecurityPolicy::didReceiveHeader):
        (WebCore::ContentSecurityPolicy::parse):
        * page/ContentSecurityPolicy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/page/ContentSecurityPolicy.cpp
Source/WebCore/page/ContentSecurityPolicy.h